biggs 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
- biggs-*.*.*.gem
1
+ biggs-*.*.*.gem
2
+ Gemfile.lock
@@ -1,3 +1,7 @@
1
+ h3. biggs 0.2.2 - 2012-02-06
2
+
3
+ * Compatibility with ActiveRecord/Rails 3.2
4
+
1
5
  h3. biggs 0.2.1 - 2011-11-09
2
6
 
3
7
  * Fixed gemspec activerecord dependency
@@ -1,4 +1,4 @@
1
- require 'active_support/core_ext/class/inheritable_attributes'
1
+ require 'active_support/core_ext/class/attribute'
2
2
 
3
3
  module Biggs
4
4
  module ActiveRecordAdapter
@@ -9,7 +9,9 @@ module Biggs
9
9
 
10
10
  module InitialClassMethods
11
11
  def biggs(method_name=nil, options={})
12
- self.extend(ClassMethods)
12
+ self.class_attribute :biggs_value_methods
13
+ self.class_attribute :biggs_instance
14
+
13
15
  self.send(:include, Biggs::ActiveRecordAdapter::InstanceMethods)
14
16
  alias_method(method_name || :postal_address, :biggs_postal_address)
15
17
 
@@ -17,18 +19,9 @@ module Biggs
17
19
  Biggs::Formatter::FIELDS.each do |field|
18
20
  value_methods[field] = options.delete(field) if options[field]
19
21
  end
20
- write_inheritable_attribute(:biggs_value_methods, value_methods)
21
- write_inheritable_attribute(:biggs_formatter, Biggs::Formatter.new(options))
22
- end
23
- end
24
-
25
- module ClassMethods
26
- def biggs_value_methods
27
- read_inheritable_attribute(:biggs_value_methods) || write_inheritable_attribute(:biggs_value_methods, {})
28
- end
29
-
30
- def biggs_instance
31
- read_inheritable_attribute(:biggs_formatter) || write_inheritable_attribute(:biggs_formatter, Biggs::Formatter.new)
22
+
23
+ self.biggs_value_methods = value_methods
24
+ self.biggs_instance = Biggs::Formatter.new(options)
32
25
  end
33
26
  end
34
27
 
@@ -1,3 +1,3 @@
1
1
  module Biggs
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- segments_generated: true
10
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
11
10
  platform: ruby
12
11
  authors:
13
12
  - Sebastian Munz
@@ -15,11 +14,12 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-11-09 00:00:00 +01:00
17
+ date: 2012-02-06 00:00:00 +01:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: activerecord
22
+ prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
@@ -28,13 +28,12 @@ dependencies:
28
28
  segments:
29
29
  - 3
30
30
  - 0
31
- segments_generated: true
32
31
  version: "3.0"
33
32
  type: :runtime
34
- prerelease: false
35
33
  version_requirements: *id001
36
34
  - !ruby/object:Gem::Dependency
37
35
  name: rake
36
+ prerelease: false
38
37
  requirement: &id002 !ruby/object:Gem::Requirement
39
38
  none: false
40
39
  requirements:
@@ -42,13 +41,12 @@ dependencies:
42
41
  - !ruby/object:Gem::Version
43
42
  segments:
44
43
  - 0
45
- segments_generated: true
46
44
  version: "0"
47
45
  type: :development
48
- prerelease: false
49
46
  version_requirements: *id002
50
47
  - !ruby/object:Gem::Dependency
51
48
  name: rspec
49
+ prerelease: false
52
50
  requirement: &id003 !ruby/object:Gem::Requirement
53
51
  none: false
54
52
  requirements:
@@ -58,13 +56,12 @@ dependencies:
58
56
  - 2
59
57
  - 4
60
58
  - 0
61
- segments_generated: true
62
59
  version: 2.4.0
63
60
  type: :development
64
- prerelease: false
65
61
  version_requirements: *id003
66
62
  - !ruby/object:Gem::Dependency
67
63
  name: sqlite3-ruby
64
+ prerelease: false
68
65
  requirement: &id004 !ruby/object:Gem::Requirement
69
66
  none: false
70
67
  requirements:
@@ -72,10 +69,8 @@ dependencies:
72
69
  - !ruby/object:Gem::Version
73
70
  segments:
74
71
  - 0
75
- segments_generated: true
76
72
  version: "0"
77
73
  type: :development
78
- prerelease: false
79
74
  version_requirements: *id004
80
75
  description: biggs is a small ruby gem/rails plugin for formatting postal addresses from over 60 countries.
81
76
  email:
@@ -91,7 +86,6 @@ files:
91
86
  - .rvmrc
92
87
  - CHANGES.textile
93
88
  - Gemfile
94
- - Gemfile.lock
95
89
  - LICENSE
96
90
  - README.textile
97
91
  - Rakefile
@@ -119,20 +113,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
113
  requirements:
120
114
  - - ">="
121
115
  - !ruby/object:Gem::Version
122
- hash: -3060538130921833128
123
116
  segments:
124
117
  - 0
125
- segments_generated: true
126
118
  version: "0"
127
119
  required_rubygems_version: !ruby/object:Gem::Requirement
128
120
  none: false
129
121
  requirements:
130
122
  - - ">="
131
123
  - !ruby/object:Gem::Version
132
- hash: -3060538130921833128
133
124
  segments:
134
125
  - 0
135
- segments_generated: true
136
126
  version: "0"
137
127
  requirements: []
138
128
 
@@ -1,47 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- biggs (0.2.1)
5
- activerecord (~> 3.0)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- activemodel (3.1.1)
11
- activesupport (= 3.1.1)
12
- builder (~> 3.0.0)
13
- i18n (~> 0.6)
14
- activerecord (3.1.1)
15
- activemodel (= 3.1.1)
16
- activesupport (= 3.1.1)
17
- arel (~> 2.2.1)
18
- tzinfo (~> 0.3.29)
19
- activesupport (3.1.1)
20
- multi_json (~> 1.0)
21
- arel (2.2.1)
22
- builder (3.0.0)
23
- diff-lcs (1.1.3)
24
- i18n (0.6.0)
25
- multi_json (1.0.3)
26
- rake (0.9.2)
27
- rspec (2.6.0)
28
- rspec-core (~> 2.6.0)
29
- rspec-expectations (~> 2.6.0)
30
- rspec-mocks (~> 2.6.0)
31
- rspec-core (2.6.4)
32
- rspec-expectations (2.6.0)
33
- diff-lcs (~> 1.1.2)
34
- rspec-mocks (2.6.0)
35
- sqlite3 (1.3.4)
36
- sqlite3-ruby (1.3.3)
37
- sqlite3 (>= 1.3.3)
38
- tzinfo (0.3.30)
39
-
40
- PLATFORMS
41
- ruby
42
-
43
- DEPENDENCIES
44
- biggs!
45
- rake
46
- rspec (>= 2.4.0)
47
- sqlite3-ruby