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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +59 -4
  4. data/Rakefile +7 -2
  5. data/app/controllers/beta_feature/application_controller.rb +4 -0
  6. data/app/controllers/beta_feature/configurations_controller.rb +9 -0
  7. data/app/controllers/beta_feature/settings_controller.rb +59 -0
  8. data/app/models/beta_feature/application_record.rb +5 -0
  9. data/{lib → app/models}/beta_feature/setting.rb +4 -8
  10. data/app/views/layouts/beta_feature/application.html.erb +15 -0
  11. data/config/routes.rb +10 -0
  12. data/db/migrate/20210102124824_create_beta_feature_settings.rb +18 -0
  13. data/lib/beta_feature.rb +3 -9
  14. data/lib/beta_feature/engine.rb +25 -0
  15. data/lib/beta_feature/flagger.rb +10 -6
  16. data/lib/beta_feature/version.rb +1 -1
  17. data/lib/generators/beta_feature/install_generator.rb +1 -12
  18. data/lib/generators/beta_feature/templates/beta_features.yml +1 -2
  19. data/lib/tasks/beta_feature_tasks.rake +4 -0
  20. metadata +27 -109
  21. data/.gitignore +0 -18
  22. data/.rspec +0 -3
  23. data/.rubycop.yml +0 -24
  24. data/.travis.yml +0 -57
  25. data/Appraisals +0 -18
  26. data/CHANGELOG.md +0 -0
  27. data/CODE_OF_CONDUCT.md +0 -74
  28. data/Gemfile +0 -6
  29. data/LICENSE.txt +0 -21
  30. data/beta_feature.gemspec +0 -52
  31. data/bin/console +0 -14
  32. data/bin/setup +0 -8
  33. data/gemfiles/rails50.gemfile +0 -7
  34. data/gemfiles/rails50.gemfile.lock +0 -175
  35. data/gemfiles/rails51.gemfile +0 -7
  36. data/gemfiles/rails51.gemfile.lock +0 -175
  37. data/gemfiles/rails52.gemfile +0 -7
  38. data/gemfiles/rails52.gemfile.lock +0 -183
  39. data/gemfiles/rails60.gemfile +0 -7
  40. data/gemfiles/rails60.gemfile.lock +0 -199
  41. data/lib/generators/beta_feature/migration.rb +0 -15
  42. data/lib/generators/beta_feature/migration_helper.rb +0 -13
  43. 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