settingson 1.4.0 → 1.4.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
2
  SHA1:
3
- metadata.gz: fe05f0f361a5568a359fb45b6fa141efcc09b14a
4
- data.tar.gz: 01c34a1af2329cc4eaa44f0384a7c508f4f643cf
3
+ metadata.gz: 0d855dba93399013f3232112fb5c387ec630a2d2
4
+ data.tar.gz: 7f82756e384c88d1da5c9e94447f675196edd1ae
5
5
  SHA512:
6
- metadata.gz: f970836ba3dc03f7f711a9cf21a5c855bf920d6a1b095bdaba08ff9d34a18ad0a2722d3b416426afdcbf2432ff6cd1a89f7f79cd8a7c6ff95875d9acbc50ebc1
7
- data.tar.gz: 4d566c47608e3f53eb34ca609e023d4f870191322deb298bb47d41986ad96b0e169defa470d4505d39e221968f0d47a88da7abda924906f169fc141ffd618ee6
6
+ metadata.gz: cd0c3532cd6169d0e581b9e7bcf9d7d71802f6e4ee63d2dc4704fa13f4665c84f64625eea004b1e87959ff9c39c60655dae49f63a7b1dc2912be7ce209e866d1
7
+ data.tar.gz: 547abb27ae4c7000997ec3d682a6f3e280aaf8f2151500d850ecea675c4b78cad0faaa7e2871b1985666a8ff106a4caaf75caf7495de31bb603c0617be61e75b
data/README.md CHANGED
@@ -67,6 +67,14 @@ Settings.cached(30.minutes).hello.world # => 'message'
67
67
  Settings.cached(1800).hello.world # => 'message'
68
68
  ```
69
69
 
70
+ Benchmark results:
71
+ ```ruby
72
+ puts Benchmark.measure { 1.upto(10000){ Settings.hello.world }}
73
+ # => 36.210000 0.680000 36.890000 ( 37.372218)
74
+ puts Benchmark.measure { 1.upto(10000){ Settings.cached.hello.world }}
75
+ # => 7.140000 0.060000 7.200000 ( 7.246746)
76
+ ```
77
+
70
78
  ### Using with [Simple Form](https://github.com/plataformatec/simple_form) and [Haml](https://github.com/haml/haml)
71
79
  in view:
72
80
  ```ruby
@@ -29,7 +29,7 @@ module Settingson::Base
29
29
  self.class.find_by(key: @settingson)
30
30
  end
31
31
 
32
- def _settingson_cached(expires_in:)
32
+ def _settingson_cached(expires_in)
33
33
  @_settingson_cached = expires_in
34
34
  self
35
35
  end
@@ -158,7 +158,7 @@ module Settingson::Base
158
158
  end
159
159
 
160
160
  def cached(expires_in = 10.seconds)
161
- new._settingson_cached(expires_in: expires_in)
161
+ new._settingson_cached(expires_in)
162
162
  end
163
163
 
164
164
  end # module ClassMethods
@@ -1,3 +1,3 @@
1
1
  module Settingson
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settingson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dan