has_metadata_column 1.1.4 → 1.1.5

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: 715f3196bfe6c4a0095d6d3b5312fcbd2f2b5505
4
- data.tar.gz: 06dc70288bb43367343e1e0e8b882d33192780e1
3
+ metadata.gz: 76fe1f392ba5d8e28fcfa3961f48226ff67a7150
4
+ data.tar.gz: 49a78d081bbc71cf5142918018b4af1adc9ab4b4
5
5
  SHA512:
6
- metadata.gz: 2bbcd59919ae3ab2f637615e74f45525fb65b6c488814a4d14ca95743930eaaa1f76f6c350934afa538d5263f294f4391092ce922c6f74f1375e50560c9905fa
7
- data.tar.gz: 3c54c5e31b45115daa896e0a9f0dc7af056f157c797f3f02d022a161b5ffa33f34fbe017327846eb9245adc24a95c679537dc3e9c6015499f9c45075df48ebc4
6
+ metadata.gz: 44662900d5ab1d8c6d8bd47849077bd51be7bf22bbe8f588e1545c9740da78c329a1bcd57ac0e552b38c7bba7ad3f1fb3cb771fe514235704dd24c7ce73e5f37
7
+ data.tar.gz: b61ac7b2115c382ac708e6444552349247ea25f5477c56a12c61fa6fafd2144ac190dac9125a4e4831e7e2430abc184fa01907c5ff3d1643f44eb904d328415d
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: has_metadata_column 1.1.4 ruby lib
5
+ # stub: has_metadata_column 1.1.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "has_metadata_column"
9
- s.version = "1.1.4"
9
+ s.version = "1.1.5"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Tim Morgan"]
14
- s.date = "2014-05-03"
14
+ s.date = "2014-12-20"
15
15
  s.description = "Reduce your table width and migration overhead by moving non-indexed columns to a separate metadata column."
16
16
  s.email = "git@timothymorgan.info"
17
17
  s.extra_rdoc_files = [
@@ -26,14 +26,14 @@ Gem::Specification.new do |s|
26
26
  s.homepage = "http://github.com/riscfuture/has_metadata_column"
27
27
  s.licenses = ["MIT"]
28
28
  s.required_ruby_version = Gem::Requirement.new(">= 1.9")
29
- s.rubygems_version = "2.2.2"
29
+ s.rubygems_version = "2.4.5"
30
30
  s.summary = "Schemaless metadata using JSON columns"
31
31
 
32
32
  if s.respond_to? :specification_version then
33
33
  s.specification_version = 4
34
34
 
35
35
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
36
- s.add_runtime_dependency(%q<rails>, [">= 4.1"])
36
+ s.add_runtime_dependency(%q<rails>, [">= 4.2"])
37
37
  s.add_runtime_dependency(%q<boolean>, [">= 0"])
38
38
  s.add_development_dependency(%q<rspec>, [">= 0"])
39
39
  s.add_development_dependency(%q<sqlite3>, [">= 0"])
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
41
41
  s.add_development_dependency(%q<redcarpet>, [">= 0"])
42
42
  s.add_development_dependency(%q<jeweler>, [">= 0"])
43
43
  else
44
- s.add_dependency(%q<rails>, [">= 4.1"])
44
+ s.add_dependency(%q<rails>, [">= 4.2"])
45
45
  s.add_dependency(%q<boolean>, [">= 0"])
46
46
  s.add_dependency(%q<rspec>, [">= 0"])
47
47
  s.add_dependency(%q<sqlite3>, [">= 0"])
@@ -50,7 +50,7 @@ Gem::Specification.new do |s|
50
50
  s.add_dependency(%q<jeweler>, [">= 0"])
51
51
  end
52
52
  else
53
- s.add_dependency(%q<rails>, [">= 4.1"])
53
+ s.add_dependency(%q<rails>, [">= 4.2"])
54
54
  s.add_dependency(%q<boolean>, [">= 0"])
55
55
  s.add_dependency(%q<rspec>, [">= 0"])
56
56
  s.add_dependency(%q<sqlite3>, [">= 0"])
@@ -110,6 +110,7 @@ module HasMetadataColumn
110
110
  alias_method_chain :attribute_before_type_cast, :metadata
111
111
  alias_method_chain :attribute=, :metadata
112
112
  alias_method_chain :query_attribute, :metadata
113
+ alias_method_chain :keys_for_partial_write, :metadata
113
114
  else
114
115
  raise "Cannot redefine existing metadata column #{self.metadata_column}" if column && column != self.metadata_column
115
116
  if metadata_column_fields.slice(*fields.keys) != fields
@@ -293,4 +294,8 @@ module HasMetadataColumn
293
294
  def attribute_method_with_metadata?(attr)
294
295
  self.class.metadata_column_fields.include?(attr.to_sym) || attribute_method_without_metadata?(attr)
295
296
  end
297
+
298
+ def keys_for_partial_write_with_metadata
299
+ keys_for_partial_write_without_metadata - self.class.metadata_column_fields.keys.map(&:to_s)
300
+ end
296
301
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_metadata_column
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-03 00:00:00.000000000 Z
11
+ date: 2014-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.1'
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: boolean
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yard
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: redcarpet
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: jeweler
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: Reduce your table width and migration overhead by moving non-indexed
@@ -131,17 +131,17 @@ require_paths:
131
131
  - lib
132
132
  required_ruby_version: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - '>='
134
+ - - ">="
135
135
  - !ruby/object:Gem::Version
136
136
  version: '1.9'
137
137
  required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - '>='
139
+ - - ">="
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubyforge_project:
144
- rubygems_version: 2.2.2
144
+ rubygems_version: 2.4.5
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Schemaless metadata using JSON columns