settingson 1.7.10 → 1.7.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +6 -2
- data/Appraisals +7 -3
- data/README.md +9 -6
- data/app/models/concerns/settingson/base.rb +1 -1
- data/gemfiles/4.2.gemfile +1 -1
- data/gemfiles/4.2.gemfile.lock +3 -3
- data/gemfiles/5.0.gemfile +1 -1
- data/gemfiles/5.0.gemfile.lock +3 -3
- data/gemfiles/5.1.gemfile +1 -1
- data/gemfiles/5.1.gemfile.lock +3 -3
- data/gemfiles/5.2.gemfile +8 -0
- data/gemfiles/5.2.gemfile.lock +168 -0
- data/lib/generators/{settingson/settingson_generator.rb → settingson_generator.rb} +7 -12
- data/lib/settingson/version.rb +1 -1
- data/settingson.gemspec +1 -1
- metadata +8 -11
- data/lib/generators/settingson/templates/migrations/rename_name_to_key_on_settings.rb +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 77416ee44fa51d80f97005138cfa2a6a10ab2e50f02e076842521bfe322ae5bc
|
|
4
|
+
data.tar.gz: e92a08a7ccb71b9330cce083f5792642eab0d97d9af740f40587e9eb375fb976
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 135b6c8757682993c6f7fced3bd4cf89ea4cbc1543ef4218bbe2ec903e9e1831fe85604f1aedbe0f2f4ba4d42ccff8acc43be12235147ba26d7d437acbfdd529
|
|
7
|
+
data.tar.gz: 8cdfeb69e3bd6da679c0614792dff85c0bddacc5950f5faccd9daa5d606e960d7b123a7427b296945aa55538c53a1166d02d9fe21250e7facaad2aeaf2059eb9
|
data/.travis.yml
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
language: ruby
|
|
2
|
+
cache: bundler
|
|
2
3
|
|
|
3
4
|
sudo: false
|
|
4
5
|
#cache: bundler
|
|
@@ -6,13 +7,16 @@ sudo: false
|
|
|
6
7
|
script: "bundle exec rspec && bundle exec codeclimate-test-reporter"
|
|
7
8
|
|
|
8
9
|
rvm:
|
|
9
|
-
- 2.2
|
|
10
|
-
- 2.
|
|
10
|
+
- 2.2
|
|
11
|
+
- 2.3
|
|
12
|
+
- 2.4
|
|
13
|
+
- 2.6
|
|
11
14
|
|
|
12
15
|
gemfile:
|
|
13
16
|
- gemfiles/4.2.gemfile
|
|
14
17
|
- gemfiles/5.0.gemfile
|
|
15
18
|
- gemfiles/5.1.gemfile
|
|
19
|
+
- gemfiles/5.2.gemfile
|
|
16
20
|
|
|
17
21
|
env:
|
|
18
22
|
- CODECLIMATE_REPO_TOKEN=620b22e287791de2c9f8a522182ddf57098302ff8958768f8192eaaa7d8a685d
|
data/Appraisals
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
appraise "4.2" do
|
|
2
|
-
gem "rails", "~> 4.2
|
|
2
|
+
gem "rails", "~> 4.2"
|
|
3
3
|
end
|
|
4
4
|
|
|
5
5
|
appraise "5.0" do
|
|
6
|
-
gem "rails", "~> 5.0
|
|
6
|
+
gem "rails", "~> 5.0"
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
appraise "5.1" do
|
|
10
|
-
gem "rails", "~> 5.1
|
|
10
|
+
gem "rails", "~> 5.1"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
appraise "5.2" do
|
|
14
|
+
gem "rails", "~> 5.1"
|
|
11
15
|
end
|
data/README.md
CHANGED
|
@@ -120,9 +120,9 @@ end
|
|
|
120
120
|
## The initial values
|
|
121
121
|
in config/initializers/settingson.rb
|
|
122
122
|
```ruby
|
|
123
|
-
Settings.defaults do |
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
Settings.defaults do |default|
|
|
124
|
+
default.server.smtp.host = 'host'
|
|
125
|
+
default.server.smtp.port = 25
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
Settings.server.smtp.host # => 'host'
|
|
@@ -136,11 +136,14 @@ in config/initializers/settingson.rb
|
|
|
136
136
|
if Rails.env.development?
|
|
137
137
|
Settings.configure.debug = true
|
|
138
138
|
Settings.configure.trace = 3
|
|
139
|
-
Settings.configure.cache.enabled = false
|
|
139
|
+
Settings.configure.cache.enabled = false # default: true
|
|
140
140
|
end
|
|
141
|
-
|
|
142
|
-
Caching is disabled by default only in test environment.
|
|
143
141
|
```
|
|
142
|
+
Caching is disabled by default only in test environment.
|
|
143
|
+
|
|
144
|
+
## TODO:
|
|
145
|
+
* Skip key search when assignment requested
|
|
146
|
+
|
|
144
147
|
|
|
145
148
|
## Contributing
|
|
146
149
|
|
data/gemfiles/4.2.gemfile
CHANGED
data/gemfiles/4.2.gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
settingson (1.7.
|
|
4
|
+
settingson (1.7.10)
|
|
5
5
|
rails (>= 4.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -150,7 +150,7 @@ DEPENDENCIES
|
|
|
150
150
|
codeclimate-test-reporter
|
|
151
151
|
database_cleaner
|
|
152
152
|
faker
|
|
153
|
-
rails (~> 4.2
|
|
153
|
+
rails (~> 4.2)
|
|
154
154
|
rails-dummy
|
|
155
155
|
rspec (~> 3.5)
|
|
156
156
|
rspec-rails (~> 3.5)
|
|
@@ -158,4 +158,4 @@ DEPENDENCIES
|
|
|
158
158
|
sqlite3
|
|
159
159
|
|
|
160
160
|
BUNDLED WITH
|
|
161
|
-
1.
|
|
161
|
+
1.16.6
|
data/gemfiles/5.0.gemfile
CHANGED
data/gemfiles/5.0.gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
settingson (1.7.
|
|
4
|
+
settingson (1.7.10)
|
|
5
5
|
rails (>= 4.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -157,7 +157,7 @@ DEPENDENCIES
|
|
|
157
157
|
codeclimate-test-reporter
|
|
158
158
|
database_cleaner
|
|
159
159
|
faker
|
|
160
|
-
rails (~> 5.0
|
|
160
|
+
rails (~> 5.0)
|
|
161
161
|
rails-dummy
|
|
162
162
|
rspec (~> 3.5)
|
|
163
163
|
rspec-rails (~> 3.5)
|
|
@@ -165,4 +165,4 @@ DEPENDENCIES
|
|
|
165
165
|
sqlite3
|
|
166
166
|
|
|
167
167
|
BUNDLED WITH
|
|
168
|
-
1.
|
|
168
|
+
1.16.6
|
data/gemfiles/5.1.gemfile
CHANGED
data/gemfiles/5.1.gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
settingson (1.7.
|
|
4
|
+
settingson (1.7.10)
|
|
5
5
|
rails (>= 4.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -157,7 +157,7 @@ DEPENDENCIES
|
|
|
157
157
|
codeclimate-test-reporter
|
|
158
158
|
database_cleaner
|
|
159
159
|
faker
|
|
160
|
-
rails (~> 5.1
|
|
160
|
+
rails (~> 5.1)
|
|
161
161
|
rails-dummy
|
|
162
162
|
rspec (~> 3.5)
|
|
163
163
|
rspec-rails (~> 3.5)
|
|
@@ -165,4 +165,4 @@ DEPENDENCIES
|
|
|
165
165
|
sqlite3
|
|
166
166
|
|
|
167
167
|
BUNDLED WITH
|
|
168
|
-
1.
|
|
168
|
+
1.16.6
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: ..
|
|
3
|
+
specs:
|
|
4
|
+
settingson (1.7.10)
|
|
5
|
+
rails (>= 4.0)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
actioncable (5.1.4)
|
|
11
|
+
actionpack (= 5.1.4)
|
|
12
|
+
nio4r (~> 2.0)
|
|
13
|
+
websocket-driver (~> 0.6.1)
|
|
14
|
+
actionmailer (5.1.4)
|
|
15
|
+
actionpack (= 5.1.4)
|
|
16
|
+
actionview (= 5.1.4)
|
|
17
|
+
activejob (= 5.1.4)
|
|
18
|
+
mail (~> 2.5, >= 2.5.4)
|
|
19
|
+
rails-dom-testing (~> 2.0)
|
|
20
|
+
actionpack (5.1.4)
|
|
21
|
+
actionview (= 5.1.4)
|
|
22
|
+
activesupport (= 5.1.4)
|
|
23
|
+
rack (~> 2.0)
|
|
24
|
+
rack-test (>= 0.6.3)
|
|
25
|
+
rails-dom-testing (~> 2.0)
|
|
26
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
27
|
+
actionview (5.1.4)
|
|
28
|
+
activesupport (= 5.1.4)
|
|
29
|
+
builder (~> 3.1)
|
|
30
|
+
erubi (~> 1.4)
|
|
31
|
+
rails-dom-testing (~> 2.0)
|
|
32
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
33
|
+
activejob (5.1.4)
|
|
34
|
+
activesupport (= 5.1.4)
|
|
35
|
+
globalid (>= 0.3.6)
|
|
36
|
+
activemodel (5.1.4)
|
|
37
|
+
activesupport (= 5.1.4)
|
|
38
|
+
activerecord (5.1.4)
|
|
39
|
+
activemodel (= 5.1.4)
|
|
40
|
+
activesupport (= 5.1.4)
|
|
41
|
+
arel (~> 8.0)
|
|
42
|
+
activesupport (5.1.4)
|
|
43
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
44
|
+
i18n (~> 0.7)
|
|
45
|
+
minitest (~> 5.1)
|
|
46
|
+
tzinfo (~> 1.1)
|
|
47
|
+
appraisal (2.2.0)
|
|
48
|
+
bundler
|
|
49
|
+
rake
|
|
50
|
+
thor (>= 0.14.0)
|
|
51
|
+
arel (8.0.0)
|
|
52
|
+
builder (3.2.3)
|
|
53
|
+
codeclimate-test-reporter (1.0.8)
|
|
54
|
+
simplecov (<= 0.13)
|
|
55
|
+
concurrent-ruby (1.0.5)
|
|
56
|
+
crass (1.0.3)
|
|
57
|
+
database_cleaner (1.6.2)
|
|
58
|
+
diff-lcs (1.3)
|
|
59
|
+
docile (1.1.5)
|
|
60
|
+
erubi (1.7.0)
|
|
61
|
+
faker (1.8.4)
|
|
62
|
+
i18n (~> 0.5)
|
|
63
|
+
globalid (0.4.1)
|
|
64
|
+
activesupport (>= 4.2.0)
|
|
65
|
+
i18n (0.9.1)
|
|
66
|
+
concurrent-ruby (~> 1.0)
|
|
67
|
+
json (2.1.0)
|
|
68
|
+
loofah (2.1.1)
|
|
69
|
+
crass (~> 1.0.2)
|
|
70
|
+
nokogiri (>= 1.5.9)
|
|
71
|
+
mail (2.7.0)
|
|
72
|
+
mini_mime (>= 0.1.1)
|
|
73
|
+
method_source (0.9.0)
|
|
74
|
+
mini_mime (1.0.0)
|
|
75
|
+
mini_portile2 (2.3.0)
|
|
76
|
+
minitest (5.11.3)
|
|
77
|
+
nio4r (2.1.0)
|
|
78
|
+
nokogiri (1.8.1)
|
|
79
|
+
mini_portile2 (~> 2.3.0)
|
|
80
|
+
rack (2.0.3)
|
|
81
|
+
rack-test (0.8.2)
|
|
82
|
+
rack (>= 1.0, < 3)
|
|
83
|
+
rails (5.1.4)
|
|
84
|
+
actioncable (= 5.1.4)
|
|
85
|
+
actionmailer (= 5.1.4)
|
|
86
|
+
actionpack (= 5.1.4)
|
|
87
|
+
actionview (= 5.1.4)
|
|
88
|
+
activejob (= 5.1.4)
|
|
89
|
+
activemodel (= 5.1.4)
|
|
90
|
+
activerecord (= 5.1.4)
|
|
91
|
+
activesupport (= 5.1.4)
|
|
92
|
+
bundler (>= 1.3.0)
|
|
93
|
+
railties (= 5.1.4)
|
|
94
|
+
sprockets-rails (>= 2.0.0)
|
|
95
|
+
rails-dom-testing (2.0.3)
|
|
96
|
+
activesupport (>= 4.2.0)
|
|
97
|
+
nokogiri (>= 1.6)
|
|
98
|
+
rails-dummy (0.0.4)
|
|
99
|
+
rails
|
|
100
|
+
rails-html-sanitizer (1.0.3)
|
|
101
|
+
loofah (~> 2.0)
|
|
102
|
+
railties (5.1.4)
|
|
103
|
+
actionpack (= 5.1.4)
|
|
104
|
+
activesupport (= 5.1.4)
|
|
105
|
+
method_source
|
|
106
|
+
rake (>= 0.8.7)
|
|
107
|
+
thor (>= 0.18.1, < 2.0)
|
|
108
|
+
rake (12.3.2)
|
|
109
|
+
rspec (3.7.0)
|
|
110
|
+
rspec-core (~> 3.7.0)
|
|
111
|
+
rspec-expectations (~> 3.7.0)
|
|
112
|
+
rspec-mocks (~> 3.7.0)
|
|
113
|
+
rspec-core (3.7.0)
|
|
114
|
+
rspec-support (~> 3.7.0)
|
|
115
|
+
rspec-expectations (3.7.0)
|
|
116
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
117
|
+
rspec-support (~> 3.7.0)
|
|
118
|
+
rspec-mocks (3.7.0)
|
|
119
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
120
|
+
rspec-support (~> 3.7.0)
|
|
121
|
+
rspec-rails (3.7.2)
|
|
122
|
+
actionpack (>= 3.0)
|
|
123
|
+
activesupport (>= 3.0)
|
|
124
|
+
railties (>= 3.0)
|
|
125
|
+
rspec-core (~> 3.7.0)
|
|
126
|
+
rspec-expectations (~> 3.7.0)
|
|
127
|
+
rspec-mocks (~> 3.7.0)
|
|
128
|
+
rspec-support (~> 3.7.0)
|
|
129
|
+
rspec-support (3.7.0)
|
|
130
|
+
simplecov (0.13.0)
|
|
131
|
+
docile (~> 1.1.0)
|
|
132
|
+
json (>= 1.8, < 3)
|
|
133
|
+
simplecov-html (~> 0.10.0)
|
|
134
|
+
simplecov-html (0.10.2)
|
|
135
|
+
sprockets (3.7.1)
|
|
136
|
+
concurrent-ruby (~> 1.0)
|
|
137
|
+
rack (> 1, < 3)
|
|
138
|
+
sprockets-rails (3.2.1)
|
|
139
|
+
actionpack (>= 4.0)
|
|
140
|
+
activesupport (>= 4.0)
|
|
141
|
+
sprockets (>= 3.0.0)
|
|
142
|
+
sqlite3 (1.3.13)
|
|
143
|
+
thor (0.20.0)
|
|
144
|
+
thread_safe (0.3.6)
|
|
145
|
+
tzinfo (1.2.4)
|
|
146
|
+
thread_safe (~> 0.1)
|
|
147
|
+
websocket-driver (0.6.5)
|
|
148
|
+
websocket-extensions (>= 0.1.0)
|
|
149
|
+
websocket-extensions (0.1.3)
|
|
150
|
+
|
|
151
|
+
PLATFORMS
|
|
152
|
+
ruby
|
|
153
|
+
|
|
154
|
+
DEPENDENCIES
|
|
155
|
+
appraisal
|
|
156
|
+
bundler (>= 1.6)
|
|
157
|
+
codeclimate-test-reporter
|
|
158
|
+
database_cleaner
|
|
159
|
+
faker
|
|
160
|
+
rails (~> 5.1)
|
|
161
|
+
rails-dummy
|
|
162
|
+
rspec (~> 3.5)
|
|
163
|
+
rspec-rails (~> 3.5)
|
|
164
|
+
settingson!
|
|
165
|
+
sqlite3
|
|
166
|
+
|
|
167
|
+
BUNDLED WITH
|
|
168
|
+
1.17.2
|
|
@@ -8,18 +8,12 @@ class SettingsonGenerator < Rails::Generators::NamedBase
|
|
|
8
8
|
def settingson_migration
|
|
9
9
|
klass = name.camelize
|
|
10
10
|
say "Searching for #{klass} class"
|
|
11
|
-
if Object.const_defined?(klass)
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if klass.constantize.column_names.include?('name')
|
|
16
|
-
migration_template 'migrations/rename_name_to_key_on_settings.rb', 'db/migrate/rename_name_to_key_on_settings.rb'
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
else
|
|
12
|
+
unless Object.const_defined?(klass)
|
|
20
13
|
generate(:model, "#{klass} key:string:uniq value:text --force-plural")
|
|
21
|
-
settingson_inject_lines(name)
|
|
22
14
|
end
|
|
15
|
+
|
|
16
|
+
settingson_inject_lines(name)
|
|
23
17
|
end
|
|
24
18
|
|
|
25
19
|
def self.next_migration_number dirname
|
|
@@ -28,8 +22,9 @@ class SettingsonGenerator < Rails::Generators::NamedBase
|
|
|
28
22
|
|
|
29
23
|
private
|
|
30
24
|
def settingson_inject_lines(name)
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
file = Rails.root.join("app/models/#{name.downcase}.rb")
|
|
26
|
+
if File.readlines(file).grep(/\A\s*include Settingson::Base\z/).blank?
|
|
27
|
+
inject_into_class file, name.camelize, "\tinclude Settingson::Base\n"
|
|
33
28
|
end
|
|
34
29
|
end
|
|
35
|
-
end
|
|
30
|
+
end
|
data/lib/settingson/version.rb
CHANGED
data/settingson.gemspec
CHANGED
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.require_paths = ["lib", "app/models/concerns"]
|
|
20
20
|
|
|
21
21
|
spec.required_ruby_version = ">= 2.0"
|
|
22
|
-
spec.add_runtime_dependency "rails", ">=
|
|
22
|
+
spec.add_runtime_dependency "rails", ">= 7.1"
|
|
23
23
|
spec.add_development_dependency "appraisal"
|
|
24
24
|
spec.add_development_dependency "bundler", ">= 1.6"
|
|
25
25
|
spec.add_development_dependency "rails-dummy"
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: settingson
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dan
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rails
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
18
|
+
version: '7.1'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
25
|
+
version: '7.1'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: appraisal
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -161,8 +160,9 @@ files:
|
|
|
161
160
|
- gemfiles/5.0.gemfile.lock
|
|
162
161
|
- gemfiles/5.1.gemfile
|
|
163
162
|
- gemfiles/5.1.gemfile.lock
|
|
164
|
-
-
|
|
165
|
-
-
|
|
163
|
+
- gemfiles/5.2.gemfile
|
|
164
|
+
- gemfiles/5.2.gemfile.lock
|
|
165
|
+
- lib/generators/settingson_generator.rb
|
|
166
166
|
- lib/settingson.rb
|
|
167
167
|
- lib/settingson/config.rb
|
|
168
168
|
- lib/settingson/default.rb
|
|
@@ -227,7 +227,6 @@ homepage: https://github.com/daanforever/settingson
|
|
|
227
227
|
licenses:
|
|
228
228
|
- MIT
|
|
229
229
|
metadata: {}
|
|
230
|
-
post_install_message:
|
|
231
230
|
rdoc_options: []
|
|
232
231
|
require_paths:
|
|
233
232
|
- lib
|
|
@@ -243,9 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
243
242
|
- !ruby/object:Gem::Version
|
|
244
243
|
version: '0'
|
|
245
244
|
requirements: []
|
|
246
|
-
|
|
247
|
-
rubygems_version: 2.6.14
|
|
248
|
-
signing_key:
|
|
245
|
+
rubygems_version: 3.6.9
|
|
249
246
|
specification_version: 4
|
|
250
247
|
summary: Settings management for Ruby on Rails applications (with ActiveRecord)
|
|
251
248
|
test_files:
|