settingson 1.5.13 → 1.5.14

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
2
  SHA1:
3
- metadata.gz: 5d23c773994266c94a820579a66bb9f6a52557de
4
- data.tar.gz: c45a02eeed59386308c4c1a04e51d73818bd262a
3
+ metadata.gz: 1e51070968a75427fd22aaf7f1d5ad0c0e67224c
4
+ data.tar.gz: 4d4a8ba87b4c9c30f00c3b54cadc97f65ed2ced4
5
5
  SHA512:
6
- metadata.gz: fd31eada454e60e180d938b8635f28b0c76f92c831b7e12aa318090fbc38b355aa467b813a93c8468117458e101cbac51ae7eee5001f6123cc5d6096ee4d3004
7
- data.tar.gz: 14c94d1ceb3dc6bf93b51e796bc35bdc7195bf000fd1be70242a0463044c8ea2838a14d4cb46ed2f4ad9be955c13f5d2bb11b8e7edfc570279e7ab08bb1a8df8
6
+ metadata.gz: 1ad608ad7214de9ff8c8a03aefea29595d5bf8680771d860ecdb010c2ea77f45e1d582a955d0a602edc11de59dd3e03d29bb355615f9686a4bf199ee0c531c51
7
+ data.tar.gz: d832c44e479667e036cc6a5e65f46c77a7e976c1701c47188a58862d3cadf92b74bee5e266e59a327f016d5dea490dd440c2f5633df8e156143d5096068238fb
data/.travis.yml CHANGED
@@ -1,7 +1,13 @@
1
1
  language: ruby
2
+
2
3
  sudo: false
4
+ cache: bundler
5
+
6
+ script: bundle exec rspec
7
+
3
8
  rvm:
4
- - 2.0
5
- - 2.1
6
- - 2.2
7
- script: rspec
9
+ - 2.2.2
10
+
11
+ gemfile:
12
+ - gemfiles/4.2.gemfile
13
+ - gemfiles/5.0.gemfile
data/Appraisals ADDED
@@ -0,0 +1,7 @@
1
+ appraise "4.2" do
2
+ gem "rails", "~> 4.2.0"
3
+ end
4
+
5
+ appraise "5.0" do
6
+ gem "rails", "~> 5.0.0"
7
+ end
data/Rakefile CHANGED
@@ -1,2 +1,3 @@
1
1
  require "bundler/gem_tasks"
2
+ require "appraisal"
2
3
  #require "rails/dummy/tasks"
@@ -36,6 +36,13 @@ module Settingson::Base
36
36
  true
37
37
  end
38
38
 
39
+ # Settings.delete_all
40
+ # Delete cached items before super
41
+ def delete_all
42
+ Rails.cache.delete_matched(/#{self.configure.cache.namespace}/)
43
+ super
44
+ end
45
+
39
46
  # Settings.from_hash('smtp.host' => 'host')
40
47
 
41
48
  def cached(*args)
@@ -66,8 +73,8 @@ module Settingson::Base
66
73
  end # module ClassMethods
67
74
 
68
75
  included do
69
- attr_accessor :settingson
70
- serialize :value
76
+ attr_accessor :settingson
77
+ serialize :value
71
78
  before_destroy :delete_cached
72
79
  end
73
80
 
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.2.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,158 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ settingson (1.5.14)
5
+ rails (>= 4.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionmailer (4.2.7.1)
11
+ actionpack (= 4.2.7.1)
12
+ actionview (= 4.2.7.1)
13
+ activejob (= 4.2.7.1)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ actionpack (4.2.7.1)
17
+ actionview (= 4.2.7.1)
18
+ activesupport (= 4.2.7.1)
19
+ rack (~> 1.6)
20
+ rack-test (~> 0.6.2)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
+ actionview (4.2.7.1)
24
+ activesupport (= 4.2.7.1)
25
+ builder (~> 3.1)
26
+ erubis (~> 2.7.0)
27
+ rails-dom-testing (~> 1.0, >= 1.0.5)
28
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
+ activejob (4.2.7.1)
30
+ activesupport (= 4.2.7.1)
31
+ globalid (>= 0.3.0)
32
+ activemodel (4.2.7.1)
33
+ activesupport (= 4.2.7.1)
34
+ builder (~> 3.1)
35
+ activerecord (4.2.7.1)
36
+ activemodel (= 4.2.7.1)
37
+ activesupport (= 4.2.7.1)
38
+ arel (~> 6.0)
39
+ activesupport (4.2.7.1)
40
+ i18n (~> 0.7)
41
+ json (~> 1.7, >= 1.7.7)
42
+ minitest (~> 5.1)
43
+ thread_safe (~> 0.3, >= 0.3.4)
44
+ tzinfo (~> 1.1)
45
+ appraisal (2.1.0)
46
+ bundler
47
+ rake
48
+ thor (>= 0.14.0)
49
+ arel (6.0.3)
50
+ builder (3.2.2)
51
+ concurrent-ruby (1.0.2)
52
+ database_cleaner (1.5.3)
53
+ diff-lcs (1.2.5)
54
+ erubis (2.7.0)
55
+ faker (1.6.6)
56
+ i18n (~> 0.5)
57
+ globalid (0.3.7)
58
+ activesupport (>= 4.1.0)
59
+ i18n (0.7.0)
60
+ json (1.8.3)
61
+ loofah (2.0.3)
62
+ nokogiri (>= 1.5.9)
63
+ mail (2.6.4)
64
+ mime-types (>= 1.16, < 4)
65
+ mime-types (3.1)
66
+ mime-types-data (~> 3.2015)
67
+ mime-types-data (3.2016.0521)
68
+ mini_portile2 (2.1.0)
69
+ minitest (5.9.0)
70
+ nokogiri (1.6.8)
71
+ mini_portile2 (~> 2.1.0)
72
+ pkg-config (~> 1.1.7)
73
+ pkg-config (1.1.7)
74
+ rack (1.6.4)
75
+ rack-test (0.6.3)
76
+ rack (>= 1.0)
77
+ rails (4.2.7.1)
78
+ actionmailer (= 4.2.7.1)
79
+ actionpack (= 4.2.7.1)
80
+ actionview (= 4.2.7.1)
81
+ activejob (= 4.2.7.1)
82
+ activemodel (= 4.2.7.1)
83
+ activerecord (= 4.2.7.1)
84
+ activesupport (= 4.2.7.1)
85
+ bundler (>= 1.3.0, < 2.0)
86
+ railties (= 4.2.7.1)
87
+ sprockets-rails
88
+ rails-deprecated_sanitizer (1.0.3)
89
+ activesupport (>= 4.2.0.alpha)
90
+ rails-dom-testing (1.0.7)
91
+ activesupport (>= 4.2.0.beta, < 5.0)
92
+ nokogiri (~> 1.6.0)
93
+ rails-deprecated_sanitizer (>= 1.0.1)
94
+ rails-dummy (0.0.4)
95
+ rails
96
+ rails-html-sanitizer (1.0.3)
97
+ loofah (~> 2.0)
98
+ railties (4.2.7.1)
99
+ actionpack (= 4.2.7.1)
100
+ activesupport (= 4.2.7.1)
101
+ rake (>= 0.8.7)
102
+ thor (>= 0.18.1, < 2.0)
103
+ rake (11.2.2)
104
+ rspec (3.5.0)
105
+ rspec-core (~> 3.5.0)
106
+ rspec-expectations (~> 3.5.0)
107
+ rspec-mocks (~> 3.5.0)
108
+ rspec-core (3.5.3)
109
+ rspec-support (~> 3.5.0)
110
+ rspec-expectations (3.5.0)
111
+ diff-lcs (>= 1.2.0, < 2.0)
112
+ rspec-support (~> 3.5.0)
113
+ rspec-mocks (3.5.0)
114
+ diff-lcs (>= 1.2.0, < 2.0)
115
+ rspec-support (~> 3.5.0)
116
+ rspec-rails (3.5.2)
117
+ actionpack (>= 3.0)
118
+ activesupport (>= 3.0)
119
+ railties (>= 3.0)
120
+ rspec-core (~> 3.5.0)
121
+ rspec-expectations (~> 3.5.0)
122
+ rspec-mocks (~> 3.5.0)
123
+ rspec-support (~> 3.5.0)
124
+ rspec-support (3.5.0)
125
+ spring (1.7.2)
126
+ spring-commands-rspec (1.0.4)
127
+ spring (>= 0.9.1)
128
+ sprockets (3.7.0)
129
+ concurrent-ruby (~> 1.0)
130
+ rack (> 1, < 3)
131
+ sprockets-rails (3.2.0)
132
+ actionpack (>= 4.0)
133
+ activesupport (>= 4.0)
134
+ sprockets (>= 3.0.0)
135
+ sqlite3 (1.3.11)
136
+ thor (0.19.1)
137
+ thread_safe (0.3.5)
138
+ tzinfo (1.2.2)
139
+ thread_safe (~> 0.1)
140
+
141
+ PLATFORMS
142
+ ruby
143
+
144
+ DEPENDENCIES
145
+ appraisal
146
+ bundler (>= 1.6)
147
+ database_cleaner
148
+ faker
149
+ rails (~> 4.2.0)
150
+ rails-dummy
151
+ rspec (~> 3.5)
152
+ rspec-rails (~> 3.5)
153
+ settingson!
154
+ spring-commands-rspec
155
+ sqlite3
156
+
157
+ BUNDLED WITH
158
+ 1.12.5
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.0.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,163 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ settingson (1.5.14)
5
+ rails (>= 4.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (5.0.0.1)
11
+ actionpack (= 5.0.0.1)
12
+ nio4r (~> 1.2)
13
+ websocket-driver (~> 0.6.1)
14
+ actionmailer (5.0.0.1)
15
+ actionpack (= 5.0.0.1)
16
+ actionview (= 5.0.0.1)
17
+ activejob (= 5.0.0.1)
18
+ mail (~> 2.5, >= 2.5.4)
19
+ rails-dom-testing (~> 2.0)
20
+ actionpack (5.0.0.1)
21
+ actionview (= 5.0.0.1)
22
+ activesupport (= 5.0.0.1)
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.0.0.1)
28
+ activesupport (= 5.0.0.1)
29
+ builder (~> 3.1)
30
+ erubis (~> 2.7.0)
31
+ rails-dom-testing (~> 2.0)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
33
+ activejob (5.0.0.1)
34
+ activesupport (= 5.0.0.1)
35
+ globalid (>= 0.3.6)
36
+ activemodel (5.0.0.1)
37
+ activesupport (= 5.0.0.1)
38
+ activerecord (5.0.0.1)
39
+ activemodel (= 5.0.0.1)
40
+ activesupport (= 5.0.0.1)
41
+ arel (~> 7.0)
42
+ activesupport (5.0.0.1)
43
+ concurrent-ruby (~> 1.0, >= 1.0.2)
44
+ i18n (~> 0.7)
45
+ minitest (~> 5.1)
46
+ tzinfo (~> 1.1)
47
+ appraisal (2.1.0)
48
+ bundler
49
+ rake
50
+ thor (>= 0.14.0)
51
+ arel (7.1.2)
52
+ builder (3.2.2)
53
+ concurrent-ruby (1.0.2)
54
+ database_cleaner (1.5.3)
55
+ diff-lcs (1.2.5)
56
+ erubis (2.7.0)
57
+ faker (1.6.6)
58
+ i18n (~> 0.5)
59
+ globalid (0.3.7)
60
+ activesupport (>= 4.1.0)
61
+ i18n (0.7.0)
62
+ loofah (2.0.3)
63
+ nokogiri (>= 1.5.9)
64
+ mail (2.6.4)
65
+ mime-types (>= 1.16, < 4)
66
+ method_source (0.8.2)
67
+ mime-types (3.1)
68
+ mime-types-data (~> 3.2015)
69
+ mime-types-data (3.2016.0521)
70
+ mini_portile2 (2.1.0)
71
+ minitest (5.9.0)
72
+ nio4r (1.2.1)
73
+ nokogiri (1.6.8)
74
+ mini_portile2 (~> 2.1.0)
75
+ pkg-config (~> 1.1.7)
76
+ pkg-config (1.1.7)
77
+ rack (2.0.1)
78
+ rack-test (0.6.3)
79
+ rack (>= 1.0)
80
+ rails (5.0.0.1)
81
+ actioncable (= 5.0.0.1)
82
+ actionmailer (= 5.0.0.1)
83
+ actionpack (= 5.0.0.1)
84
+ actionview (= 5.0.0.1)
85
+ activejob (= 5.0.0.1)
86
+ activemodel (= 5.0.0.1)
87
+ activerecord (= 5.0.0.1)
88
+ activesupport (= 5.0.0.1)
89
+ bundler (>= 1.3.0, < 2.0)
90
+ railties (= 5.0.0.1)
91
+ sprockets-rails (>= 2.0.0)
92
+ rails-dom-testing (2.0.1)
93
+ activesupport (>= 4.2.0, < 6.0)
94
+ nokogiri (~> 1.6.0)
95
+ rails-dummy (0.0.4)
96
+ rails
97
+ rails-html-sanitizer (1.0.3)
98
+ loofah (~> 2.0)
99
+ railties (5.0.0.1)
100
+ actionpack (= 5.0.0.1)
101
+ activesupport (= 5.0.0.1)
102
+ method_source
103
+ rake (>= 0.8.7)
104
+ thor (>= 0.18.1, < 2.0)
105
+ rake (11.2.2)
106
+ rspec (3.5.0)
107
+ rspec-core (~> 3.5.0)
108
+ rspec-expectations (~> 3.5.0)
109
+ rspec-mocks (~> 3.5.0)
110
+ rspec-core (3.5.3)
111
+ rspec-support (~> 3.5.0)
112
+ rspec-expectations (3.5.0)
113
+ diff-lcs (>= 1.2.0, < 2.0)
114
+ rspec-support (~> 3.5.0)
115
+ rspec-mocks (3.5.0)
116
+ diff-lcs (>= 1.2.0, < 2.0)
117
+ rspec-support (~> 3.5.0)
118
+ rspec-rails (3.5.2)
119
+ actionpack (>= 3.0)
120
+ activesupport (>= 3.0)
121
+ railties (>= 3.0)
122
+ rspec-core (~> 3.5.0)
123
+ rspec-expectations (~> 3.5.0)
124
+ rspec-mocks (~> 3.5.0)
125
+ rspec-support (~> 3.5.0)
126
+ rspec-support (3.5.0)
127
+ spring (1.7.2)
128
+ spring-commands-rspec (1.0.4)
129
+ spring (>= 0.9.1)
130
+ sprockets (3.7.0)
131
+ concurrent-ruby (~> 1.0)
132
+ rack (> 1, < 3)
133
+ sprockets-rails (3.2.0)
134
+ actionpack (>= 4.0)
135
+ activesupport (>= 4.0)
136
+ sprockets (>= 3.0.0)
137
+ sqlite3 (1.3.11)
138
+ thor (0.19.1)
139
+ thread_safe (0.3.5)
140
+ tzinfo (1.2.2)
141
+ thread_safe (~> 0.1)
142
+ websocket-driver (0.6.4)
143
+ websocket-extensions (>= 0.1.0)
144
+ websocket-extensions (0.1.2)
145
+
146
+ PLATFORMS
147
+ ruby
148
+
149
+ DEPENDENCIES
150
+ appraisal
151
+ bundler (>= 1.6)
152
+ database_cleaner
153
+ faker
154
+ rails (~> 5.0.0)
155
+ rails-dummy
156
+ rspec (~> 3.5)
157
+ rspec-rails (~> 3.5)
158
+ settingson!
159
+ spring-commands-rspec
160
+ sqlite3
161
+
162
+ BUNDLED WITH
163
+ 1.12.5
@@ -1,3 +1,3 @@
1
1
  module Settingson
2
- VERSION = "1.5.13"
2
+ VERSION = "1.5.14"
3
3
  end
data/settingson.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'settingson/version'
4
+ require "settingson/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "settingson"
@@ -18,11 +18,13 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib", "app/models/concerns"]
20
20
 
21
- spec.required_ruby_version = '>= 2.0'
22
- spec.add_runtime_dependency 'rails', '>= 4.0'
21
+ spec.required_ruby_version = ">= 2.0"
22
+ spec.add_runtime_dependency "rails", ">= 4.0"
23
+ spec.add_development_dependency "appraisal"
23
24
  spec.add_development_dependency "bundler", ">= 1.6"
24
25
  spec.add_development_dependency "rails-dummy"
25
- spec.add_development_dependency "rspec-rails"
26
+ spec.add_development_dependency "rspec", "~> 3.5"
27
+ spec.add_development_dependency "rspec-rails", "~> 3.5"
26
28
  spec.add_development_dependency "sqlite3"
27
29
  spec.add_development_dependency "spring-commands-rspec"
28
30
  spec.add_development_dependency "database_cleaner"
@@ -79,7 +79,19 @@ describe Settings do
79
79
  it 'returns empty value after destroy' do
80
80
  Settings.some.hello = Faker::Lorem.word
81
81
  Settings.all.each{|e| e.destroy! }
82
- expect( Settings.some.hello.to_s ).to be_empty
82
+ expect( Settings.some.hello ).to be_empty
83
+ end
84
+
85
+ it 'clear cache on ::delete_all for simple key' do
86
+ Settings.hello = Faker::Lorem.word
87
+ Settings.delete_all
88
+ expect( Settings.hello ).to be_empty
89
+ end
90
+
91
+ it 'clear cache on ::delete_all for complex key' do
92
+ Settings.some.hello = Faker::Lorem.word
93
+ Settings.delete_all
94
+ expect( Settings.some.hello ).to be_empty
83
95
  end
84
96
  end
85
97
 
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.5.13
4
+ version: 1.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - dan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-06 00:00:00.000000000 Z
11
+ date: 2016-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: appraisal
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +66,34 @@ dependencies:
52
66
  - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.5'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.5'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: rspec-rails
57
85
  requirement: !ruby/object:Gem::Requirement
58
86
  requirements:
59
- - - ">="
87
+ - - "~>"
60
88
  - !ruby/object:Gem::Version
61
- version: '0'
89
+ version: '3.5'
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - ">="
94
+ - - "~>"
67
95
  - !ruby/object:Gem::Version
68
- version: '0'
96
+ version: '3.5'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: sqlite3
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -132,12 +160,17 @@ files:
132
160
  - ".gitignore"
133
161
  - ".rspec"
134
162
  - ".travis.yml"
163
+ - Appraisals
135
164
  - Gemfile
136
165
  - LICENSE.txt
137
166
  - README.md
138
167
  - Rakefile
139
168
  - app/models/concerns/settingson/base.rb
140
169
  - config/spring.rb
170
+ - gemfiles/4.2.gemfile
171
+ - gemfiles/4.2.gemfile.lock
172
+ - gemfiles/5.0.gemfile
173
+ - gemfiles/5.0.gemfile.lock
141
174
  - lib/generators/settingson/settingson_generator.rb
142
175
  - lib/generators/settingson/templates/migrations/rename_name_to_key_on_settings.rb
143
176
  - lib/settingson.rb
@@ -215,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
248
  version: '0'
216
249
  requirements: []
217
250
  rubyforge_project:
218
- rubygems_version: 2.4.8
251
+ rubygems_version: 2.5.1
219
252
  signing_key:
220
253
  specification_version: 4
221
254
  summary: Settings management for Ruby on Rails 4 applications (ActiveRecord)