store_configurable 3.2.1 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ = 3.2.2
3
+
4
+ * Fix new object inspect by hooking into #read_attribute. Fixes #2.
5
+
6
+
7
+ = 3.2.1
8
+
9
+ * Fix rubygems homepage link.
10
+
11
+
2
12
  = 3.2.0
3
13
 
4
14
  * Initial release. Works with ActiveRecord 3.2.x
@@ -50,5 +50,11 @@ module StoreConfigurable
50
50
  super
51
51
  end
52
52
 
53
+ # An override to ActiveRecord's low level read_attribute so we can setup the config object.
54
+ def read_attribute(attr_name)
55
+ config if attr_name.to_s == '_config'
56
+ super
57
+ end
58
+
53
59
  end
54
60
  end
@@ -1,6 +1,6 @@
1
1
  module StoreConfigurable
2
2
 
3
3
  # We track ActiveRecord's major and minor version and follow semantic versioning.
4
- VERSION = '3.2.1'
4
+ VERSION = '3.2.2'
5
5
 
6
6
  end
@@ -6,6 +6,10 @@ class StoreConfigurable::BaseTest < StoreConfigurable::TestCase
6
6
  new_user.config.wont_be_nil
7
7
  end
8
8
 
9
+ it 'can inspect a new user' do
10
+ new_user.inspect
11
+ end
12
+
9
13
  it 'can set and get root attributes' do
10
14
  new_user.config.foo = 'foo'
11
15
  new_user.config.foo.must_equal 'foo'
@@ -140,6 +144,12 @@ class StoreConfigurable::BaseTest < StoreConfigurable::TestCase
140
144
  @user.config.must_be :blank?
141
145
  end
142
146
 
147
+ it 'can pass off nodes and still work properly' do
148
+ need = @user.config.you.should.never.need
149
+ need.moar = 'winning'
150
+ @user.must_be :config_changed?
151
+ end
152
+
143
153
  end
144
154
 
145
155
 
metadata CHANGED
@@ -1,95 +1,67 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: store_configurable
3
- version: !ruby/object:Gem::Version
4
- hash: 13
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.2.2
5
5
  prerelease:
6
- segments:
7
- - 3
8
- - 2
9
- - 1
10
- version: 3.2.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ken Collins
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-03-10 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-03-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: activerecord
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70288304643160 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 15
29
- segments:
30
- - 3
31
- - 2
32
- - 0
20
+ - !ruby/object:Gem::Version
33
21
  version: 3.2.0
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: sqlite3
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70288304643160
25
+ - !ruby/object:Gem::Dependency
26
+ name: sqlite3
27
+ requirement: &70288304642660 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
29
+ requirements:
42
30
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 9
45
- segments:
46
- - 1
47
- - 3
48
- version: "1.3"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.3'
49
33
  type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: rake
53
34
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70288304642660
36
+ - !ruby/object:Gem::Dependency
37
+ name: rake
38
+ requirement: &70288304642200 !ruby/object:Gem::Requirement
55
39
  none: false
56
- requirements:
40
+ requirements:
57
41
  - - ~>
58
- - !ruby/object:Gem::Version
59
- hash: 63
60
- segments:
61
- - 0
62
- - 9
63
- - 2
42
+ - !ruby/object:Gem::Version
64
43
  version: 0.9.2
65
44
  type: :development
66
- version_requirements: *id003
67
- - !ruby/object:Gem::Dependency
68
- name: minitest
69
45
  prerelease: false
70
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70288304642200
47
+ - !ruby/object:Gem::Dependency
48
+ name: minitest
49
+ requirement: &70288304641740 !ruby/object:Gem::Requirement
71
50
  none: false
72
- requirements:
51
+ requirements:
73
52
  - - ~>
74
- - !ruby/object:Gem::Version
75
- hash: 45
76
- segments:
77
- - 2
78
- - 8
79
- - 1
53
+ - !ruby/object:Gem::Version
80
54
  version: 2.8.1
81
55
  type: :development
82
- version_requirements: *id004
56
+ prerelease: false
57
+ version_requirements: *70288304641740
83
58
  description: Grown up ActiveRecord::Store config options!
84
- email:
59
+ email:
85
60
  - ken@metaskills.net
86
61
  executables: []
87
-
88
62
  extensions: []
89
-
90
63
  extra_rdoc_files: []
91
-
92
- files:
64
+ files:
93
65
  - .gitignore
94
66
  - .travis.yml
95
67
  - CHANGELOG
@@ -108,37 +80,30 @@ files:
108
80
  - test/helper.rb
109
81
  homepage: http://github.com/metaskills/store_configurable/
110
82
  licenses: []
111
-
112
83
  post_install_message:
113
- rdoc_options:
84
+ rdoc_options:
114
85
  - --charset=UTF-8
115
- require_paths:
86
+ require_paths:
116
87
  - lib
117
- required_ruby_version: !ruby/object:Gem::Requirement
88
+ required_ruby_version: !ruby/object:Gem::Requirement
118
89
  none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 3
123
- segments:
124
- - 0
125
- version: "0"
126
- required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
95
  none: false
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- hash: 3
132
- segments:
133
- - 0
134
- version: "0"
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
135
100
  requirements: []
136
-
137
101
  rubyforge_project:
138
102
  rubygems_version: 1.8.17
139
103
  signing_key:
140
104
  specification_version: 3
141
- summary: A zero-configuration recursive Hash for storing a tree of options in a serialized ActiveRecord column.
142
- test_files:
105
+ summary: A zero-configuration recursive Hash for storing a tree of options in a serialized
106
+ ActiveRecord column.
107
+ test_files:
143
108
  - test/cases/base_test.rb
144
109
  - test/helper.rb