modalfields 1.1.2 → 1.1.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/VERSION +1 -1
- data/lib/modalfields/modalfields.rb +4 -0
- data/modalfields.gemspec +3 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
@@ -290,10 +290,14 @@ module ModalFields
|
|
290
290
|
existing_undeclared_fields << f
|
291
291
|
end
|
292
292
|
end
|
293
|
+
implicit_fields = (association_fields + pk_fields).reject{|name|
|
294
|
+
existing_declared_fields.detect{|df| df.name.to_s==name}
|
295
|
+
}
|
293
296
|
deleted_fields = declared_fields.reject{|f|
|
294
297
|
name = f.name.to_s
|
295
298
|
existing_declared_fields.detect{|df| df.name.to_s==name}
|
296
299
|
}
|
300
|
+
deleted_fields += implicit_fields.map{|name| FieldDeclaration.new(name.to_sym, :integer, [], {}) }
|
297
301
|
modified_fields = (declared_fields - deleted_fields).map{ |field_declaration|
|
298
302
|
column = existing_declared_fields.detect{|f| f.name.to_s == field_declaration.name.to_s}
|
299
303
|
identical = false
|
data/modalfields.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "modalfields"
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Javier Goizueta"]
|
12
|
-
s.date = "2012-04-
|
12
|
+
s.date = "2012-04-25"
|
13
13
|
s.description = "ModelFields is a Rails plugin that adds fields declarations to your models."
|
14
14
|
s.email = "jgoizueta@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -56,7 +56,7 @@ Gem::Specification.new do |s|
|
|
56
56
|
s.homepage = "http://github.com/jgoizueta/modalfields"
|
57
57
|
s.licenses = ["MIT"]
|
58
58
|
s.require_paths = ["lib"]
|
59
|
-
s.rubygems_version = "1.8.
|
59
|
+
s.rubygems_version = "1.8.23"
|
60
60
|
s.summary = "Model annotator with Ruby (Hobo-like) syntax and hooks."
|
61
61
|
|
62
62
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modalfields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -213,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
segments:
|
215
215
|
- 0
|
216
|
-
hash:
|
216
|
+
hash: -689930643889495966
|
217
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
218
|
none: false
|
219
219
|
requirements:
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
version: '0'
|
223
223
|
requirements: []
|
224
224
|
rubyforge_project:
|
225
|
-
rubygems_version: 1.8.
|
225
|
+
rubygems_version: 1.8.23
|
226
226
|
signing_key:
|
227
227
|
specification_version: 3
|
228
228
|
summary: Model annotator with Ruby (Hobo-like) syntax and hooks.
|