settingson 1.7.10 → 1.7.11

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: f386d06c5ca9c9f4bc53680acde702b3c220b9dc
4
- data.tar.gz: 0dd5979d1f284281186bf6bfb5c53fe4df11cd4a
2
+ SHA256:
3
+ metadata.gz: '029f4b7934884ec49504aa25070f056bd41c303cc4aa60e268f9874ef2135dbd'
4
+ data.tar.gz: 73c561c6fbd85eb06e4d65548228e0c287bfa801a58b7f3d28c9e25246639e7c
5
5
  SHA512:
6
- metadata.gz: 28731bc9f03371ff13bfaa45dcf3ab0bea0b896d532607c55ec3df27aeae7cbcdf254714f13bb71e4eb58aac45cf357d1f55f8db3adf7a6076606e63b1924e3d
7
- data.tar.gz: 7b901c14b6d6d31409fe334db1fd7266ebad1b5206527f45f681cd4ae0a845261ad2a7d215af470fe40a16e4456ed87e7925c82c8e6bfbd450bde1b5fb7295b8
6
+ metadata.gz: f48a3d9ddee9b3c729b6c4ebf4301dbcef3913cf75d349510cd2555bf9d0699e2e18e5826c52cefc3242daac87c6d248c7debbdcad06e558e1b980eab6f279c8
7
+ data.tar.gz: 12df9a647182c640647ac6242021e18e6bd0a67fa7e393b737eb96a9d35a4fa1b93dcb8137912d1ded6af3a41298359ab9189e092c4668050e4a09c5828cc40e
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.2
10
- - 2.4.1
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.0"
2
+ gem "rails", "~> 4.2"
3
3
  end
4
4
 
5
5
  appraise "5.0" do
6
- gem "rails", "~> 5.0.0"
6
+ gem "rails", "~> 5.0"
7
7
  end
8
8
 
9
9
  appraise "5.1" do
10
- gem "rails", "~> 5.1.0"
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 |conf|
124
- conf.server.smtp.host = 'host'
125
- conf.server.smtp.port = 25
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 (default: true)
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
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "codeclimate-test-reporter", group: :test, require: nil
6
- gem "rails", "~> 4.2.0"
6
+ gem "rails", "~> 4.2"
7
7
 
8
8
  gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- settingson (1.7.9)
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.0)
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.15.4
161
+ 1.16.6
data/gemfiles/5.0.gemfile CHANGED
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "codeclimate-test-reporter", group: :test, require: nil
6
- gem "rails", "~> 5.0.0"
6
+ gem "rails", "~> 5.0"
7
7
 
8
8
  gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- settingson (1.7.9)
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.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.15.4
168
+ 1.16.6
data/gemfiles/5.1.gemfile CHANGED
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "codeclimate-test-reporter", group: :test, require: nil
6
- gem "rails", "~> 5.1.0"
6
+ gem "rails", "~> 5.1"
7
7
 
8
8
  gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- settingson (1.7.9)
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.0)
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.15.4
168
+ 1.16.6
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "codeclimate-test-reporter", group: :test, require: nil
6
+ gem "rails", "~> 5.1"
7
+
8
+ gemspec path: "../"
@@ -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
@@ -28,8 +28,9 @@ class SettingsonGenerator < Rails::Generators::NamedBase
28
28
 
29
29
  private
30
30
  def settingson_inject_lines(name)
31
- if File.readlines("app/models/#{name.downcase}.rb").grep(/\A\s*include Settingson::Base\z/).blank?
32
- inject_into_class "app/models/#{name.downcase}.rb", name.camelize, "\tinclude Settingson::Base\n"
31
+ file = Rails.root.join("app/models/#{name.downcase}.rb")
32
+ if File.readlines(file).grep(/\A\s*include Settingson::Base\z/).blank?
33
+ inject_into_class file, name.camelize, "\tinclude Settingson::Base\n"
33
34
  end
34
35
  end
35
- end
36
+ end
@@ -1,3 +1,3 @@
1
1
  module Settingson
2
- VERSION = "1.7.10"
2
+ VERSION = "1.7.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settingson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.10
4
+ version: 1.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - dan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-25 00:00:00.000000000 Z
11
+ date: 2021-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -161,6 +161,8 @@ files:
161
161
  - gemfiles/5.0.gemfile.lock
162
162
  - gemfiles/5.1.gemfile
163
163
  - gemfiles/5.1.gemfile.lock
164
+ - gemfiles/5.2.gemfile
165
+ - gemfiles/5.2.gemfile.lock
164
166
  - lib/generators/settingson/settingson_generator.rb
165
167
  - lib/generators/settingson/templates/migrations/rename_name_to_key_on_settings.rb
166
168
  - lib/settingson.rb
@@ -243,8 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
245
  - !ruby/object:Gem::Version
244
246
  version: '0'
245
247
  requirements: []
246
- rubyforge_project:
247
- rubygems_version: 2.6.14
248
+ rubygems_version: 3.2.22
248
249
  signing_key:
249
250
  specification_version: 4
250
251
  summary: Settings management for Ruby on Rails applications (with ActiveRecord)