beta_feature 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -0
- data/README.md +59 -4
- data/Rakefile +7 -2
- data/app/controllers/beta_feature/application_controller.rb +4 -0
- data/app/controllers/beta_feature/configurations_controller.rb +9 -0
- data/app/controllers/beta_feature/settings_controller.rb +59 -0
- data/app/models/beta_feature/application_record.rb +5 -0
- data/{lib → app/models}/beta_feature/setting.rb +4 -8
- data/app/views/layouts/beta_feature/application.html.erb +15 -0
- data/config/routes.rb +10 -0
- data/db/migrate/20210102124824_create_beta_feature_settings.rb +18 -0
- data/lib/beta_feature.rb +3 -9
- data/lib/beta_feature/engine.rb +25 -0
- data/lib/beta_feature/flagger.rb +10 -6
- data/lib/beta_feature/version.rb +1 -1
- data/lib/generators/beta_feature/install_generator.rb +1 -12
- data/lib/generators/beta_feature/templates/beta_features.yml +1 -2
- data/lib/tasks/beta_feature_tasks.rake +4 -0
- metadata +27 -109
- data/.gitignore +0 -18
- data/.rspec +0 -3
- data/.rubycop.yml +0 -24
- data/.travis.yml +0 -57
- data/Appraisals +0 -18
- data/CHANGELOG.md +0 -0
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -6
- data/LICENSE.txt +0 -21
- data/beta_feature.gemspec +0 -52
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/gemfiles/rails50.gemfile +0 -7
- data/gemfiles/rails50.gemfile.lock +0 -175
- data/gemfiles/rails51.gemfile +0 -7
- data/gemfiles/rails51.gemfile.lock +0 -175
- data/gemfiles/rails52.gemfile +0 -7
- data/gemfiles/rails52.gemfile.lock +0 -183
- data/gemfiles/rails60.gemfile +0 -7
- data/gemfiles/rails60.gemfile.lock +0 -199
- data/lib/generators/beta_feature/migration.rb +0 -15
- data/lib/generators/beta_feature/migration_helper.rb +0 -13
- data/lib/generators/beta_feature/templates/install.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c7cc5f5d623ddf43ab03437b7d4e3d60a809efcbb4d005d23d11c5d45c23855
|
4
|
+
data.tar.gz: 86b211c78cbed4a06948920161baf3c4be571063d71f92c5913f96e74c8cf9da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 268c70d2c0b799cde5e5ffe057e85a822413e09b4de51ed08a59647c3c71d737ecbccd80691f855e4b47e94ea04e3dc99cf8edd6b1628d434cc2636e74c93d8e
|
7
|
+
data.tar.gz: cf3d62887f7dcaabfb1f13b6d3830998d0584feaccac5494a6dce1eb65404f9c46410d8d43c0615919634082565ef108c9365a8712f92ecd42686b6a22776448
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2021 Ryan Lv
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# beta_feature
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![CircleCI Build Status](https://circleci.com/gh/helloworld1812/beta_feature.svg?style=svg)](https://circleci.com/gh/helloworld1812/beta_feature)
|
4
4
|
|
5
5
|
**beta_feature** is a database-based feature flag tool for Ruby on Rails, which allows you check in incomplete features without affecting users.
|
6
6
|
|
@@ -33,6 +33,13 @@ Or install it yourself as:
|
|
33
33
|
$ gem install beta_feature
|
34
34
|
|
35
35
|
|
36
|
+
Then, To make the engine's functionality accessible from within an application, it needs to be mounted in that application's config/routes.rb file:
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
mount BetaFeature::Engine, at: "/beta_feature"
|
40
|
+
```
|
41
|
+
|
42
|
+
|
36
43
|
Then, from your Rails app directory, run the following command to complete the setup.
|
37
44
|
|
38
45
|
|
@@ -112,13 +119,13 @@ The instance of Company will have the ability to toggle feature in company level
|
|
112
119
|
company = Company.find(2)
|
113
120
|
|
114
121
|
#enable the feature flag dark_mode for this company.
|
115
|
-
|
122
|
+
company.enable_beta!(:dark_mode)
|
116
123
|
|
117
124
|
#remove the feature flag landing_page_ux_improvement from this company's feature flags.
|
118
|
-
|
125
|
+
company.remove_beta!(:landing_page_ux_improvement)
|
119
126
|
|
120
127
|
# check whether a feature is active for this company.
|
121
|
-
|
128
|
+
company.can_access_beta?(:dark_mode) # => true/false
|
122
129
|
```
|
123
130
|
|
124
131
|
Controll the logic based on feature flag.
|
@@ -171,7 +178,55 @@ dark_mode:
|
|
171
178
|
user.can_access_beta?(:dark_mode) # => always return true
|
172
179
|
```
|
173
180
|
|
181
|
+
## API
|
182
|
+
|
183
|
+
this engine provides three API for the frontend to list all available betas or toggle beta features for a paticular class.
|
184
|
+
|
185
|
+
### List all available beta features in the beta_features.yml
|
186
|
+
|
187
|
+
GET /beta_feature/all
|
188
|
+
|
189
|
+
Response
|
190
|
+
|
191
|
+
```json
|
192
|
+
{
|
193
|
+
"landing_page_ux_improvement": {
|
194
|
+
"developer": "ryan@corp.com",
|
195
|
+
"qa": "windy@corp.com",
|
196
|
+
"status": "in_progress",
|
197
|
+
"description": "This is a demo feature flag."
|
198
|
+
},
|
199
|
+
"dark_mode": {
|
200
|
+
"developer": "max@corp.com",
|
201
|
+
"qa": "daniel@corp.com",
|
202
|
+
"status": "in_progress",
|
203
|
+
"description": "Build dark mode on our website."
|
204
|
+
},
|
205
|
+
"custom_domain": {
|
206
|
+
"developer": "max@corp.com",
|
207
|
+
"qa": "daniel@corp.com",
|
208
|
+
"status": "released",
|
209
|
+
"description": "Support custom domain for Pro user."
|
210
|
+
}
|
211
|
+
}
|
212
|
+
```
|
213
|
+
|
214
|
+
### List all enabled beta features for a particular object.
|
215
|
+
|
216
|
+
GET /beta_feature/:object_class/:object_id/setting
|
174
217
|
|
218
|
+
### toggle beta feature
|
219
|
+
|
220
|
+
PUT /beta_feature/:object_class/:object_id/setting
|
221
|
+
|
222
|
+
Parameter
|
223
|
+
```json
|
224
|
+
{
|
225
|
+
"betas": {
|
226
|
+
"landing_page_ux_improvement": true,
|
227
|
+
"dark_mode": false
|
228
|
+
}
|
229
|
+
```
|
175
230
|
|
176
231
|
## Alternative
|
177
232
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
+
require "bundler/setup"
|
1
2
|
require "bundler/gem_tasks"
|
2
3
|
require "rspec/core/rake_task"
|
3
|
-
|
4
|
+
|
5
|
+
APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
|
6
|
+
|
7
|
+
load "rails/tasks/engine.rake"
|
8
|
+
load "rails/tasks/statistics.rake"
|
4
9
|
|
5
10
|
RSpec::Core::RakeTask.new(:spec)
|
6
11
|
|
7
|
-
task :default => :spec
|
12
|
+
task :default => :spec
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require_dependency "beta_feature/application_controller"
|
2
|
+
|
3
|
+
module BetaFeature
|
4
|
+
class SettingsController < ApplicationController
|
5
|
+
before_action :set_object
|
6
|
+
|
7
|
+
rescue_from ActiveRecord::RecordNotFound do |e|
|
8
|
+
msg = "Couldn't find this record: #{params[:object_class]}/#{params[:object_id]}"
|
9
|
+
render json: { error: msg }, status: :not_found
|
10
|
+
end
|
11
|
+
|
12
|
+
# GET /beta_feature/:object_class/:object_id/setting
|
13
|
+
def show
|
14
|
+
render json: {
|
15
|
+
object_class: @object_class,
|
16
|
+
object_id: @object_id,
|
17
|
+
betas: @object.all_betas
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# PUT /beta_feature/:object_class/:object_id/setting
|
22
|
+
# Params:
|
23
|
+
# {
|
24
|
+
# betas: {
|
25
|
+
# custom_domain: true,
|
26
|
+
# dark_mode: false,
|
27
|
+
# ux_improvement_2021: true
|
28
|
+
# }
|
29
|
+
# }
|
30
|
+
def update
|
31
|
+
betas = params.permit![:betas]
|
32
|
+
|
33
|
+
enabled_betas = betas.select {|k, v| v.to_s == "true"}.keys
|
34
|
+
disabled_betas = betas.select {|k, v| v.to_s == "false"}.keys
|
35
|
+
|
36
|
+
@object.enable_beta!(*enabled_betas) if enabled_betas.present?
|
37
|
+
@object.remove_beta!(*disabled_betas) if disabled_betas.present?
|
38
|
+
|
39
|
+
render json: {
|
40
|
+
object_class: @object_class,
|
41
|
+
object_id: @object_id,
|
42
|
+
betas: @object.all_betas
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def set_object
|
49
|
+
@object_class = params.require(:object_class)
|
50
|
+
@object_id = params.require(:object_id)
|
51
|
+
|
52
|
+
@klass = @object_class.constantize
|
53
|
+
@object = @klass.find(@object_id)
|
54
|
+
rescue NameError
|
55
|
+
msg = "class '#{params[:object_class]}' does not exist."
|
56
|
+
render json: { error: msg}, status: :unprocessable_entity
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -1,16 +1,12 @@
|
|
1
|
-
|
2
1
|
module BetaFeature
|
3
|
-
class Setting <
|
4
|
-
self.table_name = "beta_feature_settings"
|
5
|
-
|
2
|
+
class Setting < ApplicationRecord
|
6
3
|
validates :betable_type, presence: true
|
7
4
|
validates :betable_id, presence: true, uniqueness: { scope: :betable_type }
|
8
5
|
|
9
6
|
belongs_to :betable, polymorphic: true
|
10
7
|
|
11
|
-
|
12
|
-
|
13
|
-
#TODO
|
8
|
+
def clean_invalid_betas
|
9
|
+
# TODO
|
14
10
|
end
|
15
11
|
end
|
16
|
-
end
|
12
|
+
end
|
data/config/routes.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
BetaFeature::Engine.routes.draw do
|
2
|
+
# list all beta features
|
3
|
+
get "all", to: 'configurations#index'
|
4
|
+
|
5
|
+
# list all betas of a particular object
|
6
|
+
get ":object_class/:object_id/setting", to: 'settings#show'
|
7
|
+
|
8
|
+
# toggle betas for a particular object
|
9
|
+
put ":object_class/:object_id/setting", to: 'settings#update'
|
10
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateBetaFeatureSettings < ActiveRecord::Migration[5.1]
|
2
|
+
def up
|
3
|
+
if !ActiveRecord::Base.connection.data_source_exists? 'beta_feature_settings'
|
4
|
+
create_table :beta_feature_settings, if_not_exists: true do |t|
|
5
|
+
t.bigint :betable_id, null: false
|
6
|
+
t.string :betable_type, null: false
|
7
|
+
t.string :betas, array: true, default: [], null: false
|
8
|
+
t.timestamps
|
9
|
+
|
10
|
+
t.index [:betable_type, :betable_id], unique: true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def down
|
16
|
+
drop_table :beta_feature_settings if ActiveRecord::Base.connection.data_source_exists? 'beta_feature_settings'
|
17
|
+
end
|
18
|
+
end
|
data/lib/beta_feature.rb
CHANGED
@@ -1,15 +1,11 @@
|
|
1
|
-
require 'active_record'
|
2
|
-
require 'active_support'
|
3
|
-
require 'yaml'
|
4
|
-
|
5
1
|
require "beta_feature/version"
|
6
|
-
require "beta_feature/
|
7
|
-
require "beta_feature/setting"
|
2
|
+
require "beta_feature/engine"
|
8
3
|
require "beta_feature/error"
|
4
|
+
require "beta_feature/flagger"
|
9
5
|
|
10
6
|
module BetaFeature
|
11
7
|
def self.all_betas
|
12
|
-
@@all_betas ||= YAML.load_file("#{Rails.root}/config/beta_features.yml")
|
8
|
+
@@all_betas ||= YAML.load_file("#{Rails.root}/config/beta_features.yml").with_indifferent_access
|
13
9
|
end
|
14
10
|
|
15
11
|
def self.in_progress
|
@@ -20,5 +16,3 @@ module BetaFeature
|
|
20
16
|
@@released_betas ||= all_betas.select {|k, v| v["status"] == 'released'}
|
21
17
|
end
|
22
18
|
end
|
23
|
-
|
24
|
-
::ActiveRecord::Base.send :include, BetaFeature::Flagger
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module BetaFeature
|
2
|
+
class Engine < ::Rails::Engine
|
3
|
+
isolate_namespace BetaFeature
|
4
|
+
|
5
|
+
initializer :append_migrations do |app|
|
6
|
+
unless app.root.to_s.match(root.to_s)
|
7
|
+
config.paths["db/migrate"].expanded.each do |expanded_path|
|
8
|
+
app.config.paths["db/migrate"] << expanded_path
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
config.generators do |g|
|
14
|
+
g.test_framework :rspec
|
15
|
+
g.fixture_replacement :factory_bot
|
16
|
+
g.factory_bot dir: 'spec/factories'
|
17
|
+
g.assets false
|
18
|
+
g.helper false
|
19
|
+
end
|
20
|
+
|
21
|
+
config.after_initialize do
|
22
|
+
::ActiveRecord::Base.send :include, BetaFeature::Flagger
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/beta_feature/flagger.rb
CHANGED
@@ -26,9 +26,8 @@ module BetaFeature
|
|
26
26
|
def enable_beta!(*betas)
|
27
27
|
betas = betas.map(&:to_s)
|
28
28
|
validate_beta_name(*betas)
|
29
|
-
betas = (find_or_create_beta_feature_setting.betas + betas)
|
29
|
+
betas = clean_betas(find_or_create_beta_feature_setting.betas + betas)
|
30
30
|
beta_feature_setting.update(betas: betas)
|
31
|
-
|
32
31
|
flush_beta_cache
|
33
32
|
end
|
34
33
|
|
@@ -36,8 +35,7 @@ module BetaFeature
|
|
36
35
|
def remove_beta!(*betas)
|
37
36
|
betas = betas.map(&:to_s)
|
38
37
|
validate_beta_name(*betas)
|
39
|
-
|
40
|
-
betas = (find_or_create_beta_feature_setting.betas - betas).uniq
|
38
|
+
betas = clean_betas(find_or_create_beta_feature_setting.betas - betas)
|
41
39
|
beta_feature_setting.update(betas: betas)
|
42
40
|
|
43
41
|
flush_beta_cache
|
@@ -45,7 +43,7 @@ module BetaFeature
|
|
45
43
|
|
46
44
|
def all_betas
|
47
45
|
@__all_betas__ ||= begin
|
48
|
-
find_or_create_beta_feature_setting.betas
|
46
|
+
clean_betas(find_or_create_beta_feature_setting.betas + BetaFeature.released.keys).to_set
|
49
47
|
end
|
50
48
|
end
|
51
49
|
|
@@ -67,6 +65,12 @@ module BetaFeature
|
|
67
65
|
def flush_beta_cache
|
68
66
|
remove_instance_variable(:@__all_betas__) if defined? @__all_betas__
|
69
67
|
end
|
68
|
+
|
69
|
+
def clean_betas(betas)
|
70
|
+
betas.map(&:to_s).uniq.compact.select{ |beta| BetaFeature.all_betas.key?(beta) }
|
71
|
+
end
|
70
72
|
end
|
71
73
|
end
|
72
|
-
end
|
74
|
+
end
|
75
|
+
|
76
|
+
::ActiveRecord::Base.send :include, BetaFeature::Flagger
|
data/lib/beta_feature/version.rb
CHANGED
@@ -1,24 +1,13 @@
|
|
1
1
|
require 'rails/generators'
|
2
|
-
require 'rails/generators/migration'
|
3
|
-
require 'active_record'
|
4
|
-
require 'rails/generators/active_record'
|
5
|
-
require 'generators/beta_feature/migration'
|
6
|
-
require 'generators/beta_feature/migration_helper'
|
7
|
-
|
8
2
|
|
9
3
|
module BetaFeature
|
10
4
|
module Generators
|
11
5
|
class InstallGenerator < Rails::Generators::Base
|
12
|
-
include Rails::Generators::Migration
|
13
|
-
include BetaFeature::Generators::MigrationHelper
|
14
|
-
extend BetaFeature::Generators::Migration
|
15
|
-
|
16
6
|
source_root File.expand_path("../templates", __FILE__)
|
17
7
|
|
18
8
|
def copy_migrateion
|
19
|
-
migration_template 'install.rb', 'db/migrate/install_beta_feature.rb'
|
20
9
|
copy_file 'beta_features.yml', 'config/beta_features.yml'
|
21
10
|
end
|
22
11
|
end
|
23
12
|
end
|
24
|
-
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beta_feature
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Lv
|
8
|
-
|
9
|
-
|
10
|
-
bindir: exe
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
@@ -17,22 +16,16 @@ dependencies:
|
|
17
16
|
requirements:
|
18
17
|
- - ">="
|
19
18
|
- !ruby/object:Gem::Version
|
20
|
-
version: '4.
|
21
|
-
- - "<"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '6.1'
|
19
|
+
version: '4.0'
|
24
20
|
type: :runtime
|
25
21
|
prerelease: false
|
26
22
|
version_requirements: !ruby/object:Gem::Requirement
|
27
23
|
requirements:
|
28
24
|
- - ">="
|
29
25
|
- !ruby/object:Gem::Version
|
30
|
-
version: '4.
|
31
|
-
- - "<"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '6.1'
|
26
|
+
version: '4.0'
|
34
27
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
28
|
+
name: rspec-rails
|
36
29
|
requirement: !ruby/object:Gem::Requirement
|
37
30
|
requirements:
|
38
31
|
- - ">="
|
@@ -46,33 +39,33 @@ dependencies:
|
|
46
39
|
- !ruby/object:Gem::Version
|
47
40
|
version: '0'
|
48
41
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
42
|
+
name: pg
|
50
43
|
requirement: !ruby/object:Gem::Requirement
|
51
44
|
requirements:
|
52
45
|
- - ">="
|
53
46
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
47
|
+
version: '0'
|
55
48
|
type: :development
|
56
49
|
prerelease: false
|
57
50
|
version_requirements: !ruby/object:Gem::Requirement
|
58
51
|
requirements:
|
59
52
|
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
54
|
+
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
56
|
+
name: factory_bot_rails
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
58
|
requirements:
|
66
59
|
- - ">="
|
67
60
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
61
|
+
version: '0'
|
69
62
|
type: :development
|
70
63
|
prerelease: false
|
71
64
|
version_requirements: !ruby/object:Gem::Requirement
|
72
65
|
requirements:
|
73
66
|
- - ">="
|
74
67
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
68
|
+
version: '0'
|
76
69
|
- !ruby/object:Gem::Dependency
|
77
70
|
name: pry
|
78
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,68 +80,6 @@ dependencies:
|
|
87
80
|
- - ">="
|
88
81
|
- !ruby/object:Gem::Version
|
89
82
|
version: '0'
|
90
|
-
- !ruby/object:Gem::Dependency
|
91
|
-
name: rake
|
92
|
-
requirement: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 12.3.3
|
97
|
-
type: :development
|
98
|
-
prerelease: false
|
99
|
-
version_requirements: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 12.3.3
|
104
|
-
- !ruby/object:Gem::Dependency
|
105
|
-
name: rubocop
|
106
|
-
requirement: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.54.0
|
111
|
-
type: :development
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 0.54.0
|
118
|
-
- !ruby/object:Gem::Dependency
|
119
|
-
name: mysql2
|
120
|
-
requirement: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.3.20
|
125
|
-
type: :development
|
126
|
-
prerelease: false
|
127
|
-
version_requirements: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 0.3.20
|
132
|
-
- !ruby/object:Gem::Dependency
|
133
|
-
name: pg
|
134
|
-
requirement: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0.18'
|
139
|
-
- - "<"
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '2.0'
|
142
|
-
type: :development
|
143
|
-
prerelease: false
|
144
|
-
version_requirements: !ruby/object:Gem::Requirement
|
145
|
-
requirements:
|
146
|
-
- - ">="
|
147
|
-
- !ruby/object:Gem::Version
|
148
|
-
version: '0.18'
|
149
|
-
- - "<"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '2.0'
|
152
83
|
description: Rails feature toggle for trunk based development.
|
153
84
|
email:
|
154
85
|
- tech@workstream.is
|
@@ -156,38 +87,25 @@ executables: []
|
|
156
87
|
extensions: []
|
157
88
|
extra_rdoc_files: []
|
158
89
|
files:
|
159
|
-
-
|
160
|
-
- ".rspec"
|
161
|
-
- ".rubycop.yml"
|
162
|
-
- ".travis.yml"
|
163
|
-
- Appraisals
|
164
|
-
- CHANGELOG.md
|
165
|
-
- CODE_OF_CONDUCT.md
|
166
|
-
- Gemfile
|
167
|
-
- LICENSE.txt
|
90
|
+
- MIT-LICENSE
|
168
91
|
- README.md
|
169
92
|
- Rakefile
|
170
|
-
- beta_feature.
|
171
|
-
-
|
172
|
-
-
|
173
|
-
-
|
174
|
-
-
|
175
|
-
-
|
176
|
-
-
|
177
|
-
-
|
178
|
-
- gemfiles/rails52.gemfile.lock
|
179
|
-
- gemfiles/rails60.gemfile
|
180
|
-
- gemfiles/rails60.gemfile.lock
|
93
|
+
- app/controllers/beta_feature/application_controller.rb
|
94
|
+
- app/controllers/beta_feature/configurations_controller.rb
|
95
|
+
- app/controllers/beta_feature/settings_controller.rb
|
96
|
+
- app/models/beta_feature/application_record.rb
|
97
|
+
- app/models/beta_feature/setting.rb
|
98
|
+
- app/views/layouts/beta_feature/application.html.erb
|
99
|
+
- config/routes.rb
|
100
|
+
- db/migrate/20210102124824_create_beta_feature_settings.rb
|
181
101
|
- lib/beta_feature.rb
|
102
|
+
- lib/beta_feature/engine.rb
|
182
103
|
- lib/beta_feature/error.rb
|
183
104
|
- lib/beta_feature/flagger.rb
|
184
|
-
- lib/beta_feature/setting.rb
|
185
105
|
- lib/beta_feature/version.rb
|
186
106
|
- lib/generators/beta_feature/install_generator.rb
|
187
|
-
- lib/generators/beta_feature/migration.rb
|
188
|
-
- lib/generators/beta_feature/migration_helper.rb
|
189
107
|
- lib/generators/beta_feature/templates/beta_features.yml
|
190
|
-
- lib/
|
108
|
+
- lib/tasks/beta_feature_tasks.rake
|
191
109
|
homepage: https://github.com/helloworld1812/beta_feature
|
192
110
|
licenses:
|
193
111
|
- MIT
|
@@ -195,7 +113,7 @@ metadata:
|
|
195
113
|
homepage_uri: https://github.com/helloworld1812/beta_feature
|
196
114
|
source_code_uri: https://github.com/helloworld1812/beta_feature
|
197
115
|
changelog_uri: https://github.com/helloworld1812/beta_feature/blob/master/CHANGELOG.md
|
198
|
-
post_install_message:
|
116
|
+
post_install_message:
|
199
117
|
rdoc_options: []
|
200
118
|
require_paths:
|
201
119
|
- lib
|
@@ -203,7 +121,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
121
|
requirements:
|
204
122
|
- - ">="
|
205
123
|
- !ruby/object:Gem::Version
|
206
|
-
version:
|
124
|
+
version: '0'
|
207
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
126
|
requirements:
|
209
127
|
- - ">="
|
@@ -211,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
129
|
version: '0'
|
212
130
|
requirements: []
|
213
131
|
rubygems_version: 3.0.6
|
214
|
-
signing_key:
|
132
|
+
signing_key:
|
215
133
|
specification_version: 4
|
216
134
|
summary: Rails feature toggle for trunk based development.
|
217
135
|
test_files: []
|