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
@@ -1,15 +0,0 @@
|
|
1
|
-
module BetaFeature
|
2
|
-
module Generators
|
3
|
-
module Migration
|
4
|
-
# Implement the required interface for Rails::Generators::Migration.
|
5
|
-
def next_migration_number(dirname) #:nodoc:
|
6
|
-
next_migration_number = current_migration_number(dirname) + 1
|
7
|
-
if ::ActiveRecord::Base.timestamped_migrations
|
8
|
-
[Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
|
9
|
-
else
|
10
|
-
"%.3d" % next_migration_number
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module BetaFeature
|
2
|
-
module Generators
|
3
|
-
module MigrationHelper
|
4
|
-
def migration_parent
|
5
|
-
if Rails::VERSION::MAJOR == 4
|
6
|
-
'ActiveRecord::Migration'
|
7
|
-
else
|
8
|
-
"ActiveRecord::Migration[#{ActiveRecord::Migration.current_version}]"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class <%= migration_class_name %> < <%= migration_parent %>
|
2
|
-
def self.up
|
3
|
-
create_table :beta_feature_settings, force: true do |t|
|
4
|
-
t.bigint :betable_id, null: false
|
5
|
-
t.string :betable_type, null: false
|
6
|
-
t.string :betas, array: true, default: [], null: false
|
7
|
-
t.timestamps
|
8
|
-
|
9
|
-
t.index [:betable_type, :betable_id], unique: true
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :beta_feature_settings
|
15
|
-
end
|
16
|
-
end
|