squire 1.2.2 → 1.2.3

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.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 1.2.2
2
+ * Fix issue with existing methods in Settings.
3
+ * Add better accessor caching.
4
+
5
+ *Samuel Molnár*
6
+
1
7
  ### 1.2.1
2
8
 
3
9
  * Fix minor bug with ActiveSupport Hash#deep_merge! omitting block for false keys.
data/README.md CHANGED
@@ -111,13 +111,13 @@ Example uses Hash with 10 000 keys.
111
111
  Single access:
112
112
  ```
113
113
  Rehearsal -------------------------------------------------
114
- Squire 1.950000 0.030000 1.980000 ( 1.977590)
115
- Settingslogic 15.810000 0.100000 15.910000 ( 15.969627)
116
- --------------------------------------- total: 17.890000sec
114
+ Squire 0.740000 0.020000 0.760000 ( 0.761124)
115
+ Settingslogic 8.030000 0.040000 8.070000 ( 8.106668)
116
+ ---------------------------------------- total: 8.830000sec
117
117
 
118
118
  user system total real
119
- Squire 0.090000 0.000000 0.090000 ( 0.093573)
120
- Settingslogic 0.060000 0.000000 0.060000 ( 0.066079)
119
+ Squire 0.050000 0.000000 0.050000 ( 0.048144)
120
+ Settingslogic 0.040000 0.000000 0.040000 ( 0.045643)
121
121
  ```
122
122
 
123
123
  First access of key in `Settingslogic` is painfully slow, as you can see. But after defining accessor, the second access
@@ -11,8 +11,8 @@ module Squire
11
11
  def namespace(namespace = nil, options = {})
12
12
  return @namespace unless namespace
13
13
 
14
- @namespace = namespace if namespace
15
- @base_namespace = options[:base] if options[:base]
14
+ @namespace = namespace.to_sym if namespace
15
+ @base_namespace = options[:base].to_sym if options[:base]
16
16
  end
17
17
 
18
18
  ##
@@ -1,3 +1,3 @@
1
1
  module Squire
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squire
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: