ack_rails_admin_settings 1.2.1.1 → 1.2.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 883b01f403bc55cf93f0e0cc8651025ab498cdf7
4
- data.tar.gz: 5b9f3ba20824903e4e5caba7e3f468d221bb68cd
3
+ metadata.gz: b13bafa47596e52734635fa0c11fad17df62f733
4
+ data.tar.gz: 8b2dbfc4e5a4235cd504a79c1cf056f73b9ef93b
5
5
  SHA512:
6
- metadata.gz: dc4dd4f9033010ddcc65726fbe0163545e37925dd59f4129df13635caee06838e3841814309a599bddee92df4e3fd65b1e92a152bbb00f3d66d7d2b720fee9c9
7
- data.tar.gz: da0e9b3409c7c0796e537ff2d11f4727705a974b82e1aa950003ef6ad93741c5a4ee91771b62c05f9d01de24704453aeed262880ba0cc24a211bb7278e8f6a24
6
+ metadata.gz: 2f02b37b4b569bf9292cf65ea347868a6320f421a40137985027310a2e34b00282aac3fed4c35aefeeef92f1853b156dc6d574b47eff3596a10edf887cc6b0f2
7
+ data.tar.gz: 79af9165cb7fd402ded4bcf9389d8d5c73abdef0086e62bea6a781338b9cabfc51f6464c779a5eea7c7c439d8e2795cfa15f659cf50a39574462d9323ec5d8a7
data/Gemfile.lock CHANGED
@@ -1,130 +1,150 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ack_rails_admin_settings (1.2.1.1)
4
+ ack_rails_admin_settings (1.2.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- actionmailer (3.2.22.5)
10
- actionpack (= 3.2.22.5)
11
- mail (~> 2.5.4)
12
- actionpack (3.2.22.5)
13
- activemodel (= 3.2.22.5)
14
- activesupport (= 3.2.22.5)
15
- builder (~> 3.0.0)
9
+ actioncable (5.0.1)
10
+ actionpack (= 5.0.1)
11
+ nio4r (~> 1.2)
12
+ websocket-driver (~> 0.6.1)
13
+ actionmailer (5.0.1)
14
+ actionpack (= 5.0.1)
15
+ actionview (= 5.0.1)
16
+ activejob (= 5.0.1)
17
+ mail (~> 2.5, >= 2.5.4)
18
+ rails-dom-testing (~> 2.0)
19
+ actionpack (5.0.1)
20
+ actionview (= 5.0.1)
21
+ activesupport (= 5.0.1)
22
+ rack (~> 2.0)
23
+ rack-test (~> 0.6.3)
24
+ rails-dom-testing (~> 2.0)
25
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
26
+ actionview (5.0.1)
27
+ activesupport (= 5.0.1)
28
+ builder (~> 3.1)
16
29
  erubis (~> 2.7.0)
17
- journey (~> 1.0.4)
18
- rack (~> 1.4.5)
19
- rack-cache (~> 1.2)
20
- rack-test (~> 0.6.1)
21
- sprockets (~> 2.2.1)
22
- activemodel (3.2.22.5)
23
- activesupport (= 3.2.22.5)
24
- builder (~> 3.0.0)
25
- activerecord (3.2.22.5)
26
- activemodel (= 3.2.22.5)
27
- activesupport (= 3.2.22.5)
28
- arel (~> 3.0.2)
29
- tzinfo (~> 0.3.29)
30
- activeresource (3.2.22.5)
31
- activemodel (= 3.2.22.5)
32
- activesupport (= 3.2.22.5)
33
- activesupport (3.2.22.5)
34
- i18n (~> 0.6, >= 0.6.4)
35
- multi_json (~> 1.0)
30
+ rails-dom-testing (~> 2.0)
31
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
32
+ activejob (5.0.1)
33
+ activesupport (= 5.0.1)
34
+ globalid (>= 0.3.6)
35
+ activemodel (5.0.1)
36
+ activesupport (= 5.0.1)
37
+ activerecord (5.0.1)
38
+ activemodel (= 5.0.1)
39
+ activesupport (= 5.0.1)
40
+ arel (~> 7.0)
41
+ activesupport (5.0.1)
42
+ concurrent-ruby (~> 1.0, >= 1.0.2)
43
+ i18n (~> 0.7)
44
+ minitest (~> 5.1)
45
+ tzinfo (~> 1.1)
36
46
  addressable (2.5.0)
37
47
  public_suffix (~> 2.0, >= 2.0.2)
38
- arel (3.0.3)
39
- builder (3.0.4)
40
- carrierwave (0.10.0)
48
+ arel (7.1.4)
49
+ bson (3.2.6)
50
+ builder (3.2.3)
51
+ carrierwave (0.9.0)
41
52
  activemodel (>= 3.2.0)
42
53
  activesupport (>= 3.2.0)
43
54
  json (>= 1.7)
44
- mime-types (>= 1.16)
45
- climate_control (0.0.3)
46
- activesupport (>= 3.0)
55
+ climate_control (0.1.0)
47
56
  cocaine (0.5.8)
48
57
  climate_control (>= 0.0.3, < 1.0)
49
58
  coderay (1.1.1)
59
+ concurrent-ruby (1.0.4)
60
+ connection_pool (2.2.1)
50
61
  crass (1.0.2)
51
62
  database_cleaner (1.5.3)
52
- diff-lcs (1.2.5)
63
+ diff-lcs (1.3)
53
64
  docile (1.1.5)
54
65
  erubis (2.7.0)
55
66
  factory_girl (4.8.0)
56
67
  activesupport (>= 3.0.0)
57
68
  geocoder (1.4.1)
58
- glebtv-carrierwave-mongoid (0.8.0)
59
- carrierwave (>= 0.8.0, < 0.11.0)
60
- mongoid (>= 3.0, < 5.0)
61
- glebtv-mongoid-paperclip (0.4.1)
69
+ glebtv-carrierwave-mongoid (0.7.0)
70
+ carrierwave (~> 0.9.0)
71
+ mongoid (~> 4.0.0.alpha1)
72
+ glebtv-mongoid-paperclip (0.5.0)
62
73
  mongoid (>= 3.0, < 6.1)
63
- paperclip (~> 4.3.1)
64
- hike (1.2.3)
74
+ paperclip (~> 5.1.0)
75
+ globalid (0.3.7)
76
+ activesupport (>= 4.1.0)
65
77
  i18n (0.7.0)
66
- journey (1.0.4)
67
- json (1.8.3)
68
- mail (2.5.4)
69
- mime-types (~> 1.16)
70
- treetop (~> 1.4.8)
78
+ json (2.0.3)
79
+ loofah (2.0.3)
80
+ nokogiri (>= 1.5.9)
81
+ mail (2.6.4)
82
+ mime-types (>= 1.16, < 4)
71
83
  method_source (0.8.2)
72
- mime-types (1.25.1)
73
- mimemagic (0.3.0)
84
+ mime-types (3.1)
85
+ mime-types-data (~> 3.2015)
86
+ mime-types-data (3.2016.0521)
87
+ mimemagic (0.3.2)
74
88
  mini_portile2 (2.1.0)
75
- mongoid (3.1.7)
76
- activemodel (~> 3.2)
77
- moped (~> 1.4)
78
- origin (~> 1.0)
79
- tzinfo (~> 0.3.29)
80
- mongoid-rspec (1.13.0)
81
- mongoid (~> 3.1)
89
+ minitest (5.10.1)
90
+ mongoid (4.0.0.beta2)
91
+ activemodel (>= 4.0.0)
92
+ moped (~> 2.0.beta6)
93
+ origin (~> 2.1)
94
+ tzinfo (>= 0.3.37)
95
+ mongoid-rspec (1.10.0)
96
+ mongoid (>= 3.0.1)
82
97
  rake
83
- rspec (~> 3.1)
84
- moped (1.5.3)
85
- multi_json (1.12.1)
86
- nokogiri (1.6.8.1)
98
+ rspec (>= 2.14)
99
+ moped (2.0.7)
100
+ bson (~> 3.0)
101
+ connection_pool (~> 2.0)
102
+ optionable (~> 0.2.0)
103
+ nio4r (1.2.1)
104
+ nokogiri (1.7.0.1)
87
105
  mini_portile2 (~> 2.1.0)
88
106
  nokogumbo (1.4.10)
89
107
  nokogiri
90
- origin (1.1.0)
91
- paperclip (4.3.7)
92
- activemodel (>= 3.2.0)
93
- activesupport (>= 3.2.0)
108
+ optionable (0.2.0)
109
+ origin (2.3.0)
110
+ paperclip (5.1.0)
111
+ activemodel (>= 4.2.0)
112
+ activesupport (>= 4.2.0)
94
113
  cocaine (~> 0.5.5)
95
114
  mime-types
96
- mimemagic (= 0.3.0)
97
- polyglot (0.3.5)
115
+ mimemagic (~> 0.3.0)
98
116
  pry (0.10.4)
99
117
  coderay (~> 1.1.0)
100
118
  method_source (~> 0.8.1)
101
119
  slop (~> 3.4)
102
- public_suffix (2.0.4)
103
- rack (1.4.7)
104
- rack-cache (1.6.1)
105
- rack (>= 0.4)
106
- rack-ssl (1.3.4)
107
- rack
120
+ public_suffix (2.0.5)
121
+ rack (2.0.1)
108
122
  rack-test (0.6.3)
109
123
  rack (>= 1.0)
110
- rails (3.2.22.5)
111
- actionmailer (= 3.2.22.5)
112
- actionpack (= 3.2.22.5)
113
- activerecord (= 3.2.22.5)
114
- activeresource (= 3.2.22.5)
115
- activesupport (= 3.2.22.5)
116
- bundler (~> 1.0)
117
- railties (= 3.2.22.5)
118
- railties (3.2.22.5)
119
- actionpack (= 3.2.22.5)
120
- activesupport (= 3.2.22.5)
121
- rack-ssl (~> 1.3.2)
124
+ rails (5.0.1)
125
+ actioncable (= 5.0.1)
126
+ actionmailer (= 5.0.1)
127
+ actionpack (= 5.0.1)
128
+ actionview (= 5.0.1)
129
+ activejob (= 5.0.1)
130
+ activemodel (= 5.0.1)
131
+ activerecord (= 5.0.1)
132
+ activesupport (= 5.0.1)
133
+ bundler (>= 1.3.0, < 2.0)
134
+ railties (= 5.0.1)
135
+ sprockets-rails (>= 2.0.0)
136
+ rails-dom-testing (2.0.2)
137
+ activesupport (>= 4.2.0, < 6.0)
138
+ nokogiri (~> 1.6)
139
+ rails-html-sanitizer (1.0.3)
140
+ loofah (~> 2.0)
141
+ railties (5.0.1)
142
+ actionpack (= 5.0.1)
143
+ activesupport (= 5.0.1)
144
+ method_source
122
145
  rake (>= 0.8.7)
123
- rdoc (~> 3.4)
124
- thor (>= 0.14.6, < 2.0)
146
+ thor (>= 0.18.1, < 2.0)
125
147
  rake (12.0.0)
126
- rdoc (3.12.2)
127
- json (~> 1.4)
128
148
  rspec (3.5.0)
129
149
  rspec-core (~> 3.5.0)
130
150
  rspec-expectations (~> 3.5.0)
@@ -150,19 +170,22 @@ GEM
150
170
  simplecov-html (~> 0.10.0)
151
171
  simplecov-html (0.10.0)
152
172
  slop (3.6.0)
153
- sprockets (2.2.3)
154
- hike (~> 1.2)
155
- multi_json (~> 1.0)
156
- rack (~> 1.0)
157
- tilt (~> 1.1, != 1.3.0)
173
+ sprockets (3.7.1)
174
+ concurrent-ruby (~> 1.0)
175
+ rack (> 1, < 3)
176
+ sprockets-rails (3.2.0)
177
+ actionpack (>= 4.0)
178
+ activesupport (>= 4.0)
179
+ sprockets (>= 3.0.0)
158
180
  thor (0.19.4)
159
- tilt (1.4.1)
160
- treetop (1.4.15)
161
- polyglot
162
- polyglot (>= 0.3.1)
163
- tzinfo (0.3.52)
181
+ thread_safe (0.3.5)
182
+ tzinfo (1.2.2)
183
+ thread_safe (~> 0.1)
164
184
  validates_email_format_of (1.6.3)
165
185
  i18n
186
+ websocket-driver (0.6.4)
187
+ websocket-extensions (>= 0.1.0)
188
+ websocket-extensions (0.1.2)
166
189
 
167
190
  PLATFORMS
168
191
  ruby
@@ -176,7 +199,7 @@ DEPENDENCIES
176
199
  geocoder
177
200
  glebtv-carrierwave-mongoid
178
201
  glebtv-mongoid-paperclip
179
- mongoid (>= 3.0, < 6.0)
202
+ mongoid (>= 3.0, < 7.0)
180
203
  mongoid-rspec
181
204
  pry
182
205
  rails
@@ -4,14 +4,15 @@ module RailsAdminSettings
4
4
  require File.expand_path('../tasks', __FILE__)
5
5
  end
6
6
 
7
- initializer 'RailsAdminSettings Install after_filter' do |app|
7
+ initializer 'RailsAdminSettings Install after_action' do |app|
8
8
  require File.dirname(__FILE__) + '/../../app/models/rails_admin_settings/setting.rb'
9
9
 
10
10
  if defined?(ActionController) and defined?(ActionController::Base)
11
11
  ActionController::Base.class_eval do
12
- after_filter { Settings.unload! }
12
+ after_action { Settings.unload! }
13
13
  end
14
14
  end
15
+
15
16
  end
16
17
  end
17
18
  end
@@ -87,18 +87,17 @@ module RailsAdminSettings
87
87
  end
88
88
 
89
89
  options[:cache_keys] ||= options.delete :cache_key
90
+ _cache_keys = options.delete :cache_keys
90
91
 
91
- if options[:cache_keys].nil?
92
+ if _cache_keys.nil?
92
93
  if _cache
93
94
  options[:cache_keys_str] = name.underscore
94
95
  end
95
96
  else
96
- if options[:cache_keys].class.name == 'String'
97
- options[:cache_keys_str] = options.delete(:cache_keys)
98
- elsif options[:cache_keys].class.name == 'Array'
99
- options[:cache_keys_str] = options.delete(:cache_keys).map { |k| k.to_s }.join(" ")
97
+ if _cache_keys.is_a?(Array)
98
+ options[:cache_keys_str] = _cache_keys.map { |k| k.to_s }.join(" ")
100
99
  else
101
- options[:cache_keys_str] = options.delete(:cache_keys).to_s
100
+ options[:cache_keys_str] = _cache_keys.to_s
102
101
  end
103
102
  end
104
103
 
@@ -99,7 +99,9 @@ module RailsAdminSettings
99
99
 
100
100
  def process_text
101
101
  text = raw.dup
102
- text.gsub!('{{year}}', Time.now.strftime('%Y'))
102
+ text.gsub!'{{year}}' do
103
+ Time.now.strftime('%Y')
104
+ end
103
105
  text.gsub! /\{\{year\|([\d]{4})\}\}/ do
104
106
  if Time.now.strftime('%Y') == $1
105
107
  $1
@@ -13,10 +13,22 @@ module RailsAdminSettings
13
13
  else
14
14
  field :enabled
15
15
  end
16
- field :kind
17
- field :ns
16
+ field :kind do
17
+ searchable true
18
+ end
19
+ field :ns do
20
+ searchable true
21
+ end
18
22
  field :name
23
+ field :label do
24
+ visible false
25
+ searchable true
26
+ end
27
+ field :key do
28
+ searchable true
29
+ end
19
30
  field :raw do
31
+ searchable true
20
32
  pretty_value do
21
33
  if bindings[:object].file_kind?
22
34
  "<a href='#{CGI::escapeHTML(bindings[:object].file.url)}'>#{CGI::escapeHTML(bindings[:object].to_path)}</a>".html_safe.freeze
@@ -27,6 +39,9 @@ module RailsAdminSettings
27
39
  end
28
40
  end
29
41
  end
42
+ field :cache_keys_str, :text do
43
+ searchable true
44
+ end
30
45
  if ::Settings.table_exists?
31
46
  nss = ::RailsAdminSettings::Setting.pluck(:ns).uniq.map { |c| "ns_#{c.gsub('-', '_')}".to_sym }
32
47
  scopes([nil] + nss)
@@ -35,6 +50,14 @@ module RailsAdminSettings
35
50
 
36
51
  edit do
37
52
  field :enabled
53
+ field :ns do
54
+ read_only true
55
+ help false
56
+ end
57
+ field :key do
58
+ read_only true
59
+ help false
60
+ end
38
61
  field :label do
39
62
  read_only true
40
63
  help false
@@ -56,12 +79,14 @@ module RailsAdminSettings
56
79
  end
57
80
  end
58
81
  end
82
+
59
83
  field :cache_keys_str, :text do
60
84
  visible do
61
85
  render_object = (bindings[:controller] || bindings[:view])
62
86
  render_object and render_object.current_user.admin?
63
87
  end
64
88
  end
89
+
65
90
  end
66
91
  end
67
92
  else
@@ -1,3 +1,3 @@
1
1
  module RailsAdminSettings
2
- VERSION = "1.2.1.1".freeze
2
+ VERSION = "1.2.1.2".freeze
3
3
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
 
22
- spec.add_development_dependency "mongoid", [">= 3.0", "< 6.0"]
22
+ spec.add_development_dependency "mongoid", [">= 3.0", "< 7.0"]
23
23
  spec.add_development_dependency "rails"
24
24
  spec.add_development_dependency "bundler"
25
25
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ack_rails_admin_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1.1
4
+ version: 1.2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kiseliev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-18 00:00:00.000000000 Z
12
+ date: 2017-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '3.0'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '6.0'
23
+ version: '7.0'
24
24
  type: :development
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '3.0'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.0'
33
+ version: '7.0'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rails
36
36
  requirement: !ruby/object:Gem::Requirement