has_metadata_column 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ N2ViMjZjNzgxZTMwOTQyN2QyMTc5ZTczZmU3YjNhY2JmZTE0MDc4YQ==
5
+ data.tar.gz: !binary |-
6
+ NjNkZDUwMWFhOTEwNjBmNzhjOGFkZDUzYWFmYzdlZDQyOGE5ODRmOQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NzAxOGE1NTg1Y2JhZTY4NDRmNTdkZWY4ZjM4NmM2MWM0OTdjOWZmY2RhZTE5
10
+ NTA5ZjAwMTQwNjZkYWY1NmI5NmM0Nzc1M2FhNzY5N2NmM2ZlOTI1MDQxM2Y3
11
+ OGU5NTc0NWEwYWE0NmZjMWI3N2E5YjQyNGE3ZDY2YjUyNmNmMTQ=
12
+ data.tar.gz: !binary |-
13
+ OWU0NDVmN2EwMDJkNzZhNWEwMzIzMDQ3ODIyN2Y2MWRiYzgzNzI0MTczZDNj
14
+ MmVjMWI3NzE3NDQ0M2RkNTZjY2VkNzdmOGEwMmUzYzFkMTA2OGJhYjVlMzVj
15
+ OGM3NGU3MzliZTY5OGU1ZTY4OGI1YjEwZTAwNWQ5ZTQzYWZkMTY=
data/README.md CHANGED
@@ -4,7 +4,7 @@ Has Metadata Column -- Keep your tables narrow
4
4
  | | |
5
5
  |:------------|:--------------------------------|
6
6
  | **Author** | Tim Morgan |
7
- | **Version** | 1.1.1 (Jul 25, 2013) |
7
+ | **Version** | 1.1.2 (Sep 3, 2013) |
8
8
  | **License** | Released under the MIT License. |
9
9
 
10
10
  About
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "has_metadata_column"
8
- s.version = "1.1.1"
8
+ s.version = "1.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tim Morgan"]
12
- s.date = "2013-07-25"
12
+ s.date = "2013-09-04"
13
13
  s.description = "Reduce your table width and migration overhead by moving non-indexed columns to a separate metadata column."
14
14
  s.email = "git@timothymorgan.info"
15
15
  s.extra_rdoc_files = [
@@ -25,11 +25,11 @@ Gem::Specification.new do |s|
25
25
  s.licenses = ["MIT"]
26
26
  s.require_paths = ["lib"]
27
27
  s.required_ruby_version = Gem::Requirement.new(">= 1.9")
28
- s.rubygems_version = "1.8.25"
28
+ s.rubygems_version = "2.0.6"
29
29
  s.summary = "Schemaless metadata using JSON columns"
30
30
 
31
31
  if s.respond_to? :specification_version then
32
- s.specification_version = 3
32
+ s.specification_version = 4
33
33
 
34
34
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
35
35
  s.add_runtime_dependency(%q<rails>, [">= 4.0"])
@@ -136,26 +136,19 @@ module HasMetadataColumn
136
136
  end
137
137
  end
138
138
 
139
- if !respond_to?(:define_attribute_methods_with_metadata) && !superclass.respond_to?(:define_attribute_methods_with_metadata) &&
140
- !respond_to?(:define_method_attribute_with_metadata) && !superclass.respond_to?(:define_method_attribute_with_metadata)
141
- class << self
142
- def define_attribute_methods_with_metadata
143
- define_attribute_methods_without_metadata
144
- metadata_column_fields.keys.each { |field| define_attribute_method field }
145
- end
146
-
147
- alias_method_chain :define_attribute_methods, :metadata
139
+ class << self
140
+ def define_attribute_methods
141
+ super
142
+ metadata_column_fields.keys.each { |field| define_attribute_method field }
143
+ end
148
144
 
149
- def define_method_attribute_with_metadata(attr_name)
150
- return define_method_attribute_without_metadata(attr_name) unless metadata_column_fields.include?(attr_name.to_sym)
151
- attribute_method_matchers.each do |matcher|
152
- method_name = matcher.method_name(attr_name)
153
- define_proxy_call true, generated_attribute_methods, method_name, matcher.method_missing_target, attr_name.to_s
154
- attribute_method_matchers_cache.clear
155
- end
145
+ def define_method_attribute(attr_name)
146
+ return super(attr_name) unless metadata_column_fields.include?(attr_name.to_sym)
147
+ attribute_method_matchers.each do |matcher|
148
+ method_name = matcher.method_name(attr_name)
149
+ define_proxy_call true, generated_attribute_methods, method_name, matcher.method_missing_target, attr_name.to_s
150
+ attribute_method_matchers_cache.clear
156
151
  end
157
-
158
- alias_method_chain :define_method_attribute, :metadata
159
152
  end
160
153
  end
161
154
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_metadata_column
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
5
- prerelease:
4
+ version: 1.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tim Morgan
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-25 00:00:00.000000000 Z
11
+ date: 2013-09-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: boolean
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: sqlite3
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: yard
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ! '>='
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ! '>='
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: redcarpet
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ! '>='
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ! '>='
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: jeweler
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ! '>='
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ! '>='
124
109
  - !ruby/object:Gem::Version
@@ -139,26 +124,25 @@ files:
139
124
  homepage: http://github.com/riscfuture/has_metadata_column
140
125
  licenses:
141
126
  - MIT
127
+ metadata: {}
142
128
  post_install_message:
143
129
  rdoc_options: []
144
130
  require_paths:
145
131
  - lib
146
132
  required_ruby_version: !ruby/object:Gem::Requirement
147
- none: false
148
133
  requirements:
149
134
  - - ! '>='
150
135
  - !ruby/object:Gem::Version
151
136
  version: '1.9'
152
137
  required_rubygems_version: !ruby/object:Gem::Requirement
153
- none: false
154
138
  requirements:
155
139
  - - ! '>='
156
140
  - !ruby/object:Gem::Version
157
141
  version: '0'
158
142
  requirements: []
159
143
  rubyforge_project:
160
- rubygems_version: 1.8.25
144
+ rubygems_version: 2.0.6
161
145
  signing_key:
162
- specification_version: 3
146
+ specification_version: 4
163
147
  summary: Schemaless metadata using JSON columns
164
148
  test_files: []