Skip to content

Release v5.0.1 #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/CI-Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
github-token: '${{ secrets.GH_PACKAGES }}'
steps:
- name: Step-01 Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Step-02 Lint Code Base
Expand All @@ -39,7 +39,7 @@ jobs:
versionSpec: 5.x

- name: Step-02 Check out Code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
working-directory: '${{ env.working-directory }}'

- name: Step-08 Upload Build Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: ${{env.working-directory}}
Expand All @@ -88,7 +88,7 @@ jobs:
versionSpec: 5.x

- name: Step-02 Check out Code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
working-directory: '${{ env.working-directory }}'

- name: Step-08 Upload Build Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: ${{env.working-directory}}
Expand All @@ -136,7 +136,7 @@ jobs:
working-directory: /home/runner/work/FeatureOne/FeatureOne
steps:
- name: Step-01 Retrieve Build Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifact
path: ${{env.working-directory}}
Expand Down
79 changes: 53 additions & 26 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,59 +19,86 @@ on:
paths-ignore:
- "**/*.md"
- "**/*.gitignore"
- "**/*.gitattributes"
- "**/*.gitattributes"
schedule:
- cron: '35 15 * * 2'
- cron: '42 7 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

include:
- language: actions
build-mode: none
- language: csharp
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 5.0.0
next-version: 5.0.1
tag-prefix: '[vV]'
mode: ContinuousDeployment
branches:
Expand Down
2 changes: 1 addition & 1 deletion License.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Code Shayk
Copyright (c) 2025 Code Shayk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

# <img src="https://github.com/NinjaRocks/FeatureOne/blob/master/ninja-icon-16.png" alt="ninja" style="width:30px;"/> FeatureOne v5.0.0
# <img src="https://github.com/NinjaRocks/FeatureOne/blob/master/ninja-icon-16.png" alt="ninja" style="width:30px;"/> FeatureOne v5.0.1
[![GitHub Release](https://img.shields.io/github/v/release/ninjarocks/FeatureOne?logo=github&sort=semver)](https://github.com/ninjarocks/FeatureOne/releases/latest)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/NinjaRocks/FeatureOne/blob/master/License.md) [![build-master](https://github.com/NinjaRocks/FeatureOne/actions/workflows/Build-Master.yml/badge.svg)](https://github.com/NinjaRocks/FeatureOne/actions/workflows/Build-Master.yml)
[![CodeQL](https://github.com/NinjaRocks/FeatureOne/actions/workflows/codeql.yml/badge.svg)](https://github.com/NinjaRocks/FeatureOne/actions/workflows/codeql.yml) [![.Net](https://img.shields.io/badge/.Net-9.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)
[![CodeQL](https://github.com/NinjaRocks/FeatureOne/actions/workflows/codeql.yml/badge.svg)](https://github.com/NinjaRocks/FeatureOne/actions/workflows/codeql.yml)
[![.Net](https://img.shields.io/badge/.Net_Framework-4.6.2-blue)](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net46)
[![.Net](https://img.shields.io/badge/.Net_Standard-2.1-blue)](https://dotnet.microsoft.com/en-us/download/netstandard/2.1)
[![.Net](https://img.shields.io/badge/.Net-9.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)

.Net Library to implement feature toggles.
--
Expand Down
10 changes: 5 additions & 5 deletions src/FeatureOne.File/FeatureOne.File.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>net462;netstandard2.1;net9.0</TargetFrameworks>
<Nullable>disable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
Expand All @@ -17,16 +17,16 @@
<Company>Code Shayk</Company>
<Product>FeatureOne</Product>
<Description>.Net library to implement feature toggles with File system storage.</Description>
<Copyright>Copyright (c) 2024 Code Shayk</Copyright>
<Copyright>Copyright (c) 2025 Code Shayk</Copyright>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/codeshayk/FeatureOne</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>feature-toggle; feature-flag; feature-flags; feature-toggles; .net8.0; featureOne; File-system; File-Backend; File-Toggles;</PackageTags>
<Version>5.0.0</Version>
<Version>5.0.1</Version>
<PackageLicenseFile>License.md</PackageLicenseFile>
<PackageIcon>ninja-icon-16.png</PackageIcon>
<PackageReleaseNotes>
Release Notes v4.0.0. - Targets .Net 9.0
Release Notes v5.0.1. - Targets .Net Framework 4.6.2, .NetStandard 2.1 and .Net 9.0
Library to Implement Feature Toggles to hide/show program features with File system storage.
- Provides Out of box Simple and Regex toggle conditions.
- Provides Out of box support for File system storage provider to store toggles on disk file.
Expand Down
10 changes: 5 additions & 5 deletions src/FeatureOne.SQL/FeatureOne.SQL.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>net462;netstandard2.1;net9.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand All @@ -18,16 +18,16 @@
<Company>Code Shayk</Company>
<Product>FeatureOne</Product>
<Description>.Net library to implement feature toggles with SQL storage.</Description>
<Copyright>Copyright (c) 2024 Code Shayk</Copyright>
<Copyright>Copyright (c) 2025 Code Shayk</Copyright>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/CodeShayk/FeatureOne</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>feature-toggle; feature-flag; feature-flags; feature-toggles; .net8.0; featureOne; SQL-Backend; SQL-Toggles; SQL</PackageTags>
<Version>5.0.0</Version>
<Version>5.0.1</Version>
<PackageLicenseFile>License.md</PackageLicenseFile>
<PackageIcon>ninja-icon-16.png</PackageIcon>
<PackageReleaseNotes>
Release Notes v5.0.0. - Targets .Net 9.0
Release Notes v5.0.1. - Targets .Net Framework 4.6.2, .NetStandard 2.1 and .Net 9.0
Library to Implement Feature Toggles to hide/show program features with SQL storage.
- Supports configuring all Db providers - MSSQL, SQLite, ODBC, OLEDB, MySQL, PostgreSQL.
- Provides Out of box Simple and Regex toggle conditions.
Expand Down
5 changes: 4 additions & 1 deletion src/FeatureOne/Core/Toggle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ public bool Run(IDictionary<string, string> claims)
if (Conditions == null)
return false;

claims ??= new Dictionary<string, string>();
if (claims == null)
{
claims = new Dictionary<string, string>();
}

return Operator == Operator.Any
? Conditions.Any(x => x.Evaluate(claims))
Expand Down
10 changes: 4 additions & 6 deletions src/FeatureOne/FeatureOne.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<TargetFrameworks>net462;netstandard2.1;net9.0</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<GeneratedAssemblyInfoFile>AssemblyInfo.cs</GeneratedAssemblyInfoFile>
Expand All @@ -18,16 +16,16 @@
<Company>Code Shayk</Company>
<Product>FeatureOne</Product>
<Description>.Net library to implement feature toggles.</Description>
<Copyright>Copyright (c) 2024 Code Shayk</Copyright>
<Copyright>Copyright (c) 2025 Code Shayk</Copyright>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/CodeShayk/FeatureOne</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>feature-toggle; feature-flag; feature-flags; feature-toggles; net8.0; featureOne</PackageTags>
<Version>5.0.0</Version>
<Version>5.0.1</Version>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageIcon>ninja-icon-16.png</PackageIcon>
<PackageReleaseNotes>
Release Notes v5.0.0 Core Functionality :- Targets .Net 9.0
Release Notes v5.0.1 Core Functionality :- Targets .Net Framework 4.6.2, .NetStandard 2.1 and .Net 9.0
Library to Implement Feature Toggles to hide/show program features. Does not contain storage provider.
- Provides Out of box Simple and Regex toggle conditions.
- Provides extensibility for custom implementations ie.
Expand Down
1 change: 0 additions & 1 deletion src/FeatureOne/Json/ConditionDeserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net.WebSockets;
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Nodes;
Expand Down
6 changes: 3 additions & 3 deletions src/FeatureOne/Json/NamePostFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ public class NamePostFix
{
public string Name { get; private set; }

public NamePostFix(string name, string postFix)
public NamePostFix(string name, params string[] postFix)
{
if (string.IsNullOrEmpty(name))
throw new ArgumentNullException("name");

var names = name.Split(postFix);
var names = name.Split(postFix, StringSplitOptions.RemoveEmptyEntries);
Name = names.Length >= 1
? $"{names[0]}{postFix}" : $"{name}{postFix}";
? $"{names[0]}{postFix[0]}" : $"{name}{postFix[0]}";
}
}
}

This file was deleted.

Loading
Loading