feature_setting 1.6.1 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4dd7ae1353890c307f9d541449ac74a837ed18d0
4
- data.tar.gz: 1031913c095a4a36c60f17e2b0111e56b8f5e0bc
2
+ SHA256:
3
+ metadata.gz: bc9ce0a91fa49c7c49d2e0abf9d15e636220934e0edb0ec6bec6de2e9ca8c9f3
4
+ data.tar.gz: 236b4539436772ff6d041e7b0e4b485debb59ffc7e2a2a0b96aee43a2d56c37a
5
5
  SHA512:
6
- metadata.gz: bfa04192028b2195d06bfab8830259296128a9e08b9b3aaf20a2a26a0c746c35eb60c4fd79ada8bacb5ed41303f23aa96a13b516ec2d2a271deffb4ce6c026e6
7
- data.tar.gz: d7077dcc66b4b37176b8b460fe1a39f26e4a5b1d28df2f65db01b522a74a364dcc7168670c2243c8b7cdc6c7256655223672f0ae7e5f618db73d6ed31785cb83
6
+ metadata.gz: 8a1b7325cfd5dbb39e3ec03d3de42e31733759282e9b952bc0aa2298584bfaeb0243623fd520424756073fde22f5da850ade263777672d95c2824120113dc513
7
+ data.tar.gz: bdbe4980d868e7e0727748c34ddb255b54ba417e02b102b92c0af974be3f96297127509c2e1e77fe720d53e39b623fa9b17085f03d77240cb1fd977ae4767866
data/.rubocop.yml ADDED
@@ -0,0 +1,28 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.6
7
+ NewCops: enable
8
+
9
+ Style/FrozenStringLiteralComment:
10
+ Enabled: false
11
+ Metrics/BlockLength:
12
+ Exclude:
13
+ - 'spec/**/*'
14
+ - 'feature_setting.gemspec'
15
+ RSpec/MultipleExpectations:
16
+ Max: 3
17
+ RSpec/ExampleLength:
18
+ Max: 10
19
+ RSpec/MessageSpies:
20
+ EnforcedStyle: receive
21
+ Style/Documentation:
22
+ Enabled: false
23
+ Metrics/ClassLength:
24
+ Max: 105
25
+ Metrics/MethodLength:
26
+ Max: 12
27
+ Exclude:
28
+ - 'lib/generators/**/**'
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # feature_setting
2
2
 
3
3
  [![Gem
4
- Version](https://badge.fury.io/rb/feature_setting.svg)](http://badge.fury.io/rb/feature_setting)
4
+ Version](https://badge.fury.io/rb/feature_setting.svg)](https://badge.fury.io/rb/feature_setting)
5
5
  [![Code
6
6
  Climate](https://codeclimate.com/github/indrode/feature_setting/badges/gpa.svg)](https://codeclimate.com/github/indrode/feature_setting)
7
7
  [![Test
8
8
  Coverage](https://codeclimate.com/github/indrode/feature_setting/badges/coverage.svg)](https://codeclimate.com/github/indrode/feature_setting/coverage)
9
- [![security](https://hakiri.io/github/indrode/feature_setting/master.svg)](https://hakiri.io/github/indrode/feature_setting/master) [![Build Status](https://travis-ci.org/indrode/feature_setting.svg?branch=master)](https://travis-ci.org/indrode/feature_setting)
9
+ [![security](https://hakiri.io/github/indrode/feature_setting/master.svg)](https://hakiri.io/github/indrode/feature_setting/master)
10
10
 
11
11
  This gem introduces the concept of "features" and "settings" to your Rails app. It provides an easy way to define such features and settings with default values right in your code and will persist them in the database.
12
12
 
@@ -30,8 +30,8 @@ if Setting.error_threshold > 500
30
30
  # do this
31
31
  end
32
32
 
33
- if Setting.allowed_users.include?(current_user)
34
- # to that
33
+ if Setting.allowed_users.include?(current_user.id)
34
+ # do that
35
35
  end
36
36
  ```
37
37
 
@@ -53,7 +53,6 @@ This generates a migration file. To run this migration:
53
53
 
54
54
  The next step is to define your Feature and/or Setting classes.
55
55
 
56
-
57
56
  ## Usage
58
57
 
59
58
  ### Features
@@ -90,7 +89,6 @@ Features.disable_newfeature!
90
89
 
91
90
  Default values for features are defined in your class and current values are persisted in the database.
92
91
 
93
-
94
92
  ### Settings
95
93
 
96
94
  To create a new Setting class, inherit a class from `FeatureSetting::Setting` (if using a gem version prior to `1.2.0` use `FeatureSetting::FsSetting`). Then define your settings in a hash called `SETTINGS` and call `init_settings!`. The following example shows the setup and some possible definitions.
@@ -102,7 +100,7 @@ class Settings < FeatureSetting::Setting
102
100
  setting_two: 'some string',
103
101
  setting_three: %w(one two three),
104
102
  setting_four: ENV['SETTING_FOUR'],
105
- setting_five: { key1: 'value1', key2: 'value2' }
103
+ setting_five: { key1: 'value1', key2: 'value2' },
106
104
  setting_six: true
107
105
  }
108
106
 
@@ -187,7 +185,6 @@ Notes:
187
185
  - Contributions without tests won't be accepted.
188
186
  - Please don't update the gem version.
189
187
 
190
-
191
188
  ## License
192
189
 
193
190
  The MIT License (MIT)
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "feature_setting"
3
+ require 'bundler/setup'
4
+ require 'feature_setting'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "feature_setting"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start
@@ -1,29 +1,36 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'feature_setting/version'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = 'feature_setting'
8
- spec.version = FeatureSetting::VERSION
9
- spec.licenses = ['MIT']
10
- spec.authors = ['Indro De']
11
- spec.email = ['indro.de@gmail.com']
6
+ spec.required_ruby_version = '>= 2.6.0'
7
+ spec.name = 'feature_setting'
8
+ spec.version = FeatureSetting::VERSION
9
+ spec.licenses = ['MIT']
10
+ spec.authors = ['Indro De']
11
+ spec.email = ['indro.de@gmail.com']
12
12
 
13
- spec.summary = 'A lightweight feature/setting DSL for Rails applications.'
14
- spec.description = 'This gem introduces the concept of "features" and "settings" to your Rails app. It provides an easy way to define such features and settings with default values right in your code and will persist them in the database.'
15
- spec.homepage = 'https://github.com/indrode/feature_setting'
13
+ spec.summary = 'A lightweight feature/setting DSL for Rails applications.'
14
+ spec.description = <<-DESCRIPTION
15
+ This gem introduces the concept of "features" and "settings" to your Rails app.
16
+ It provides an easy way to define such features and settings with default values
17
+ right in your code and will persist them in the database.
18
+ DESCRIPTION
19
+ spec.homepage = 'https://github.com/indrode/feature_setting'
16
20
 
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.require_paths = ['lib']
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.require_paths = ['lib']
19
23
 
20
- spec.add_runtime_dependency 'activesupport', '>= 4.0'
21
- spec.add_runtime_dependency 'activerecord', '>= 4.0'
24
+ spec.add_runtime_dependency 'activerecord', '>= 5.2.4.5'
25
+ spec.add_runtime_dependency 'activesupport', '>= 5.2.4.3'
22
26
  spec.add_runtime_dependency 'hashie', '>= 3.4.3'
23
27
  spec.add_development_dependency 'bundler', '>= 1.9'
28
+ spec.add_development_dependency 'byebug'
24
29
  spec.add_development_dependency 'rake', '>= 10.0'
25
30
  spec.add_development_dependency 'rspec', '>= 3.0'
26
- spec.add_development_dependency 'sqlite3', '~> 1.3.6'
27
- spec.add_development_dependency 'byebug'
31
+ spec.add_development_dependency 'rubocop', '>= 1.17.0'
32
+ spec.add_development_dependency 'rubocop-rake'
33
+ spec.add_development_dependency 'rubocop-rspec'
28
34
  spec.add_development_dependency 'simplecov'
35
+ spec.add_development_dependency 'sqlite3'
29
36
  end
@@ -4,7 +4,7 @@ module FeatureSetting
4
4
  class FsFeature < ActiveRecord::Base
5
5
  FEATURES = {
6
6
  test: false
7
- }
7
+ }.freeze
8
8
 
9
9
  def features
10
10
  self.class::FEATURES
@@ -15,25 +15,25 @@ module FeatureSetting
15
15
  end
16
16
 
17
17
  class << self
18
- def method_missing(m, *args)
18
+ def method_missing(_method, *_args)
19
19
  false
20
20
  end
21
21
 
22
- def respond_to_missing?(*args)
22
+ def respond_to_missing?(*_args)
23
23
  true
24
24
  end
25
25
 
26
26
  def features
27
- self.new.features
27
+ new.features
28
28
  end
29
29
 
30
30
  def klass
31
- self.new.klass.to_s
31
+ new.klass.to_s
32
32
  end
33
33
 
34
- def init_features!(remove_old_features = false)
34
+ def init_features!(remove_old_features: false)
35
35
  features.each do |key, value|
36
- self.create_with(key: key, enabled: value, klass: klass).find_or_create_by(klass: klass, key: key)
36
+ create_feature(key, value)
37
37
  define_checker_method(key)
38
38
  define_enabler_method(key)
39
39
  define_disabler_method(key)
@@ -43,8 +43,8 @@ module FeatureSetting
43
43
 
44
44
  def cache_features!
45
45
  features.each do |key, value|
46
- self.create_with(key: key, enabled: value, klass: klass).find_or_create_by(klass: klass, key: key)
47
- value = self.where(key: key, klass: klass).first.enabled
46
+ create_feature(key, value)
47
+ value = find_by(key: key, klass: klass).enabled
48
48
  define_checker_method(key) { value }
49
49
  define_enabler_method(key) { false }
50
50
  define_disabler_method(key) { false }
@@ -52,48 +52,52 @@ module FeatureSetting
52
52
  end
53
53
 
54
54
  def define_checker_method(key, &block)
55
- block = Proc.new do
56
- record = self.where(key: key, klass: klass).first
57
- record.enabled
58
- end unless block_given?
55
+ unless block_given?
56
+ block = proc do
57
+ find_by(key: key, klass: klass)&.enabled ? true : false
58
+ end
59
+ end
59
60
  define_singleton_method("#{key}_enabled?") { block.call }
60
61
  end
61
62
 
62
63
  def define_enabler_method(key, &block)
63
- block = Proc.new do
64
- enable!(key)
65
- end unless block_given?
64
+ unless block_given?
65
+ block = proc do
66
+ enable!(key)
67
+ end
68
+ end
66
69
  define_singleton_method("enable_#{key}!") { block.call }
67
70
  end
68
71
 
69
72
  def define_disabler_method(key, &block)
70
- block = Proc.new do
71
- disable!(key)
72
- end unless block_given?
73
+ unless block_given?
74
+ block = proc do
75
+ disable!(key)
76
+ end
77
+ end
73
78
  define_singleton_method("disable_#{key}!") { block.call }
74
79
  end
75
80
 
76
81
  def remove_old_features!
77
- self.where(key: all_stored_features - defined_features).destroy_all
82
+ where(key: all_stored_features - defined_features).destroy_all
78
83
  end
79
84
 
80
85
  def reset_features!
81
- self.where(klass: klass).destroy_all
82
- init_features!
86
+ init_features! if where(klass: klass).delete_all
83
87
  end
84
88
 
85
89
  def enable!(key)
86
- if features.key?(key.to_sym)
87
- record = self.where(key: key, klass: klass).first
88
- record.update_attributes(enabled: true)
89
- end
90
+ return unless features.key?(key.to_sym)
91
+
92
+ record = find_by(key: key, klass: klass)
93
+ record.update(enabled: true)
90
94
  end
91
95
 
92
96
  def disable!(key)
93
- if features.key?(key.to_sym)
94
- record = self.where(key: key, klass: klass).first
95
- record.update_attributes(enabled: false)
96
- end
97
+ return unless features.key?(key.to_sym)
98
+
99
+ record = find_by(key: key, klass: klass)
100
+ record.update(enabled: false)
97
101
  end
98
102
 
99
103
  def defined_features
@@ -103,7 +107,18 @@ module FeatureSetting
103
107
  private
104
108
 
105
109
  def all_stored_features
106
- self.all.pluck(:key)
110
+ all.pluck(:key)
111
+ end
112
+
113
+ def create_feature(key, value)
114
+ create_with(
115
+ key: key,
116
+ enabled: value,
117
+ klass: klass
118
+ ).find_or_create_by(
119
+ klass: klass,
120
+ key: key
121
+ )
107
122
  end
108
123
  end
109
124
  end
@@ -1,8 +1,21 @@
1
1
  require 'active_record'
2
2
  require 'json'
3
+ require_relative './../../../helpers/convert_value'
3
4
 
4
5
  module FeatureSetting
5
6
  class FsSetting < ActiveRecord::Base
7
+ class SettingKeyNotFoundError < StandardError
8
+ def message
9
+ 'Key is missing or does not exist.'
10
+ end
11
+ end
12
+
13
+ class SettingTypeMismatchError < StandardError
14
+ def message
15
+ 'The value for a setting of type Hash must be a Hash.'
16
+ end
17
+ end
18
+
6
19
  SETTINGS = {
7
20
  test: 'value'
8
21
  }.freeze
@@ -24,9 +37,9 @@ module FeatureSetting
24
37
  new.klass.to_s
25
38
  end
26
39
 
27
- def init_settings!(remove_old_settings = false)
40
+ def init_settings!(remove_old_settings: false)
28
41
  settings.each do |key, value|
29
- create_with(key: key, value: convert_to_string(value, value.class.to_s), value_type: value.class.to_s, klass: klass).find_or_create_by(klass: klass, key: key)
42
+ create_setting(key, value)
30
43
  define_getter_method(key)
31
44
  define_setter_method(key)
32
45
  end
@@ -35,18 +48,20 @@ module FeatureSetting
35
48
 
36
49
  def cache_settings!
37
50
  settings.each do |key, value|
38
- create_with(key: key, value: convert_to_string(value, value.class.to_s), value_type: value.class.to_s, klass: klass).find_or_create_by(klass: klass, key: key)
39
- record = where(key: key, klass: klass).first
40
- value = convert_to_type(record.value, record.value_type)
51
+ create_setting(key, value)
52
+ record = find_by(key: key, klass: klass)
53
+ value = ConvertValue.convert_to_type(record.value, record.value_type)
41
54
  define_getter_method(key) { value }
42
55
  end
43
56
  end
44
57
 
45
58
  def define_getter_method(key, &block)
46
- block = Proc.new do
47
- record = where(key: key, klass: klass).first
48
- convert_to_type(record.value, record.value_type)
49
- end unless block_given?
59
+ unless block_given?
60
+ block = proc do
61
+ record = find_by(key: key, klass: klass)
62
+ ConvertValue.convert_to_type(record.value, record.value_type)
63
+ end
64
+ end
50
65
 
51
66
  define_singleton_method(key.to_s) { block.call }
52
67
  end
@@ -58,22 +73,22 @@ module FeatureSetting
58
73
  end
59
74
 
60
75
  def remove_old_settings!
61
- where(klass: klass, key: all_stored_keys - defined_keys).destroy_all
76
+ where(klass: klass, key: all_stored_keys - defined_keys).delete_all
62
77
  end
63
78
 
64
79
  def reset_settings!
65
- where(klass: klass).destroy_all
66
- init_settings!
80
+ init_settings! if where(klass: klass).delete_all
67
81
  end
68
82
 
83
+ # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
69
84
  def set!(key = nil, value = nil)
70
- raise 'ERROR: FsSetting key is missing or does not exist.' unless defined_keys.include?(key.to_s)
85
+ raise SettingNotExistsError unless defined_keys.include?(key.to_s)
71
86
 
72
- record = where(key: key.to_s, klass: klass).first
73
- old_value = convert_to_type(record.value, record.value_type)
87
+ record = find_by(key: key.to_s, klass: klass)
88
+ old_value = ConvertValue.convert_to_type(record.value, record.value_type)
74
89
 
75
90
  if record.value_type == 'Hash'
76
- raise 'ERROR: The value for a setting of type Hash must be a Hash.' unless value.is_a?(Hash)
91
+ raise SettingTypeMismatchError unless value.is_a?(Hash)
77
92
 
78
93
  new_value = old_value.update(value)
79
94
  value_type = 'Hash'
@@ -82,17 +97,19 @@ module FeatureSetting
82
97
  value_type = value.class.to_s
83
98
  end
84
99
 
85
- record.update_attributes(
86
- value: convert_to_string(new_value, new_value.class.to_s),
100
+ record.update(
101
+ value: ConvertValue.convert_to_string(new_value, new_value.class.to_s),
87
102
  value_type: value_type
88
103
  )
89
104
  end
90
- alias_method :update!, :set!
105
+ alias update! set!
106
+ # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
91
107
 
92
108
  def existing_key(key = nil, hash = {})
93
- settings.key?(hash.keys.first) || settings.key?(key.to_sym)
109
+ return unless settings.key?(hash.keys.first) || settings.key?(key.to_sym)
110
+
94
111
  hash.keys.first || key.to_sym
95
- rescue
112
+ rescue StandardError
96
113
  nil
97
114
  end
98
115
 
@@ -103,7 +120,7 @@ module FeatureSetting
103
120
  def stored_settings
104
121
  hash = {}
105
122
  where(klass: klass).each do |record|
106
- hash[record.key.to_sym] = convert_to_type(record.value, record.value_type)
123
+ hash[record.key.to_sym] = ConvertValue.convert_to_type(record.value, record.value_type)
107
124
  end
108
125
 
109
126
  hash
@@ -115,40 +132,16 @@ module FeatureSetting
115
132
  all.pluck(:key)
116
133
  end
117
134
 
118
- def convert_to_type(value, type)
119
- case type
120
- when 'String'
121
- value.to_s
122
- when 'TrueClass'
123
- true
124
- when 'NilClass'
125
- false
126
- when 'FalseClass'
127
- false
128
- when 'Fixnum'
129
- value.to_i
130
- when 'Integer'
131
- value.to_i
132
- when 'Float'
133
- value.to_f
134
- when 'Symbol'
135
- value.to_sym
136
- when 'Array'
137
- value.split('|||')
138
- when 'Hash'
139
- Hashie::Mash.new(JSON.parse(value))
140
- end
141
- end
142
-
143
- def convert_to_string(value, type)
144
- case type
145
- when 'Hash', 'Hashie::Mash'
146
- value.to_json
147
- when 'Array'
148
- value.join('|||')
149
- else
150
- value.to_s
151
- end
135
+ def create_setting(key, value)
136
+ create_with(
137
+ key: key,
138
+ value: ConvertValue.convert_to_string(value, value.class.to_s),
139
+ value_type: value.class.to_s,
140
+ klass: klass
141
+ ).find_or_create_by(
142
+ klass: klass,
143
+ key: key
144
+ )
152
145
  end
153
146
  end
154
147
  end
@@ -1,3 +1,3 @@
1
1
  module FeatureSetting
2
- VERSION = "1.6.1"
2
+ VERSION = '1.7.1'.freeze
3
3
  end
@@ -13,7 +13,7 @@ module FeatureSetting
13
13
  end
14
14
 
15
15
  desc 'Generates database tables for feature_settings'
16
- source_root File.expand_path('../templates', __FILE__)
16
+ source_root File.expand_path('templates', __dir__)
17
17
 
18
18
  def create_migrations
19
19
  migration_name = 'create_fs_tables.rb'
@@ -0,0 +1,37 @@
1
+ module ConvertValue
2
+ class << self
3
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength
4
+ def convert_to_type(value, type)
5
+ case type
6
+ when 'String'
7
+ value.to_s
8
+ when 'TrueClass'
9
+ true
10
+ when 'NilClass', 'FalseClass'
11
+ false
12
+ when 'Fixnum', 'Integer'
13
+ value.to_i
14
+ when 'Float'
15
+ value.to_f
16
+ when 'Symbol'
17
+ value.to_sym
18
+ when 'Array'
19
+ value.split('|||')
20
+ when 'Hash'
21
+ Hashie::Mash.new(JSON.parse(value))
22
+ end
23
+ end
24
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/MethodLength
25
+
26
+ def convert_to_string(value, type)
27
+ case type
28
+ when 'Hash', 'Hashie::Mash'
29
+ value.to_json
30
+ when 'Array'
31
+ value.join('|||')
32
+ else
33
+ value.to_s
34
+ end
35
+ end
36
+ end
37
+ end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feature_setting
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Indro De
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-20 00:00:00.000000000 Z
11
+ date: 2021-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activesupport
14
+ name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: 5.2.4.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: 5.2.4.5
27
27
  - !ruby/object:Gem::Dependency
28
- name: activerecord
28
+ name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
33
+ version: 5.2.4.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '4.0'
40
+ version: 5.2.4.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: hashie
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.9'
69
+ - !ruby/object:Gem::Dependency
70
+ name: byebug
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rake
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -95,21 +109,35 @@ dependencies:
95
109
  - !ruby/object:Gem::Version
96
110
  version: '3.0'
97
111
  - !ruby/object:Gem::Dependency
98
- name: sqlite3
112
+ name: rubocop
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - "~>"
115
+ - - ">="
102
116
  - !ruby/object:Gem::Version
103
- version: 1.3.6
117
+ version: 1.17.0
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - "~>"
122
+ - - ">="
109
123
  - !ruby/object:Gem::Version
110
- version: 1.3.6
124
+ version: 1.17.0
111
125
  - !ruby/object:Gem::Dependency
112
- name: byebug
126
+ name: rubocop-rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-rspec
113
141
  requirement: !ruby/object:Gem::Requirement
114
142
  requirements:
115
143
  - - ">="
@@ -136,9 +164,24 @@ dependencies:
136
164
  - - ">="
137
165
  - !ruby/object:Gem::Version
138
166
  version: '0'
139
- description: This gem introduces the concept of "features" and "settings" to your
140
- Rails app. It provides an easy way to define such features and settings with default
141
- values right in your code and will persist them in the database.
167
+ - !ruby/object:Gem::Dependency
168
+ name: sqlite3
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ description: |2
182
+ This gem introduces the concept of "features" and "settings" to your Rails app.
183
+ It provides an easy way to define such features and settings with default values
184
+ right in your code and will persist them in the database.
142
185
  email:
143
186
  - indro.de@gmail.com
144
187
  executables: []
@@ -147,6 +190,7 @@ extra_rdoc_files: []
147
190
  files:
148
191
  - ".gitignore"
149
192
  - ".rspec"
193
+ - ".rubocop.yml"
150
194
  - ".travis.yml"
151
195
  - CHANGELOG.md
152
196
  - Gemfile
@@ -162,11 +206,12 @@ files:
162
206
  - lib/feature_setting/version.rb
163
207
  - lib/generators/feature_setting/install/install_generator.rb
164
208
  - lib/generators/feature_setting/install/templates/migrations/create_fs_tables.rb
209
+ - lib/helpers/convert_value.rb
165
210
  homepage: https://github.com/indrode/feature_setting
166
211
  licenses:
167
212
  - MIT
168
213
  metadata: {}
169
- post_install_message:
214
+ post_install_message:
170
215
  rdoc_options: []
171
216
  require_paths:
172
217
  - lib
@@ -174,16 +219,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
219
  requirements:
175
220
  - - ">="
176
221
  - !ruby/object:Gem::Version
177
- version: '0'
222
+ version: 2.6.0
178
223
  required_rubygems_version: !ruby/object:Gem::Requirement
179
224
  requirements:
180
225
  - - ">="
181
226
  - !ruby/object:Gem::Version
182
227
  version: '0'
183
228
  requirements: []
184
- rubyforge_project:
185
- rubygems_version: 2.6.11
186
- signing_key:
229
+ rubygems_version: 3.2.3
230
+ signing_key:
187
231
  specification_version: 4
188
232
  summary: A lightweight feature/setting DSL for Rails applications.
189
233
  test_files: []