modalfields 1.4.7 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -22,11 +22,6 @@ is readily available.
22
22
 
23
23
  Primary keys named are also not annotated (unless the ModalFields.show_primary_keys property is changed)
24
24
 
25
- The annotations are kept up to date by the migration tasks (currently only if the plugin is installed under vendor)
26
- Comments and validation, etc. specifications modified manually are preserved, at least
27
- if the field block syntax is kept as generated (one line per field, one line for the
28
- block start and end...)
29
-
30
25
  Custom type fields and hooks can be define in files (e.g. fields.rb) in config/initializers/
31
26
 
32
27
  == Rake Tasks
@@ -39,6 +34,31 @@ Under Rails 2, you need to add this to your Rakefile to make the tasks available
39
34
 
40
35
  require 'modalfields/tasks'
41
36
 
37
+ == Use Scenarios
38
+
39
+ There are two basic alternative strategies:
40
+
41
+ === Define schema modifications with migrations first
42
+
43
+ To help with this strategy, the rake fields:update task can be made to be automatically called after each migration.
44
+
45
+ To activate this functionality, this must be added to your Rakefile:
46
+
47
+ require 'modalfields/migrate_tasks'
48
+
49
+ To alter the DB schema migrations are prepared; when the migrations are executed the field
50
+ declarations are automatically updated. Further customization of the field declarations can be
51
+ done before committing the changes.
52
+
53
+ Comments and validation, etc. specifications modified manually are preserved, at least
54
+ if the field block syntax is kept as generated (one line per field, one line for the
55
+ block start and end...)
56
+
57
+ === Maintain schema via field declarations
58
+
59
+ If the preferred strategy is to define changes in the field declarations,
60
+ rake fields:migration can be used to help write the necessary migration.
61
+
42
62
  == Some customization examples:
43
63
 
44
64
  ModalFields.hook do
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.7
1
+ 1.5.0
File without changes
data/modalfields.gemspec CHANGED
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{modalfields}
8
- s.version = "1.4.7"
7
+ s.name = "modalfields"
8
+ s.version = "1.5.0"
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 = %q{2012-10-18}
13
- s.description = %q{ModelFields is a Rails plugin that adds fields declarations to your models.}
14
- s.email = %q{jgoizueta@gmail.com}
12
+ s.date = "2012-10-18"
13
+ s.description = "ModelFields is a Rails plugin that adds fields declarations to your models."
14
+ s.email = "jgoizueta@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
17
  "README.rdoc",
@@ -26,13 +26,13 @@ Gem::Specification.new do |s|
26
26
  "Rakefile",
27
27
  "TODO",
28
28
  "VERSION",
29
+ "lib/migrate_tasks/migrate.rake",
29
30
  "lib/modalfields.rb",
30
31
  "lib/modalfields/modalfields.rb",
31
32
  "lib/modalfields/standardfields.rb",
32
33
  "lib/modalfields/tasks.rb",
33
34
  "lib/tasks/check.rake",
34
35
  "lib/tasks/csv.rake",
35
- "lib/tasks/migrate.rake",
36
36
  "lib/tasks/migration.rake",
37
37
  "lib/tasks/report.rake",
38
38
  "lib/tasks/update.rake",
@@ -56,14 +56,13 @@ Gem::Specification.new do |s|
56
56
  "test/test_diff.rb",
57
57
  "test/test_update.rb"
58
58
  ]
59
- s.homepage = %q{http://github.com/jgoizueta/modalfields}
59
+ s.homepage = "http://github.com/jgoizueta/modalfields"
60
60
  s.licenses = ["MIT"]
61
61
  s.require_paths = ["lib"]
62
- s.rubygems_version = %q{1.3.7}
63
- s.summary = %q{Model annotator with Ruby (Hobo-like) syntax and hooks.}
62
+ s.rubygems_version = "1.8.23"
63
+ s.summary = "Model annotator with Ruby (Hobo-like) syntax and hooks."
64
64
 
65
65
  if s.respond_to? :specification_version then
66
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
67
66
  s.specification_version = 3
68
67
 
69
68
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,172 +1,185 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: modalfields
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 4
8
- - 7
9
- version: 1.4.7
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Javier Goizueta
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2012-10-18 00:00:00 +02:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-10-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: modalsettings
22
- requirement: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
30
22
  type: :runtime
31
23
  prerelease: false
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
34
31
  name: activesupport
35
- requirement: &id002 !ruby/object:Gem::Requirement
36
- none: false
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 2
42
- - 3
43
- - 5
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
44
37
  version: 2.3.5
45
38
  type: :runtime
46
39
  prerelease: false
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.3.5
46
+ - !ruby/object:Gem::Dependency
49
47
  name: activerecord
50
- requirement: &id003 !ruby/object:Gem::Requirement
51
- none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 2
57
- - 3
58
- - 5
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
59
53
  version: 2.3.5
60
54
  type: :runtime
61
55
  prerelease: false
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 2.3.5
62
+ - !ruby/object:Gem::Dependency
64
63
  name: shoulda
65
- requirement: &id004 !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- segments:
71
- - 0
72
- version: "0"
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
73
70
  type: :development
74
71
  prerelease: false
75
- version_requirements: *id004
76
- - !ruby/object:Gem::Dependency
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
77
79
  name: rdoc
78
- requirement: &id005 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
79
81
  none: false
80
- requirements:
82
+ requirements:
81
83
  - - ~>
82
- - !ruby/object:Gem::Version
83
- segments:
84
- - 3
85
- - 12
86
- version: "3.12"
84
+ - !ruby/object:Gem::Version
85
+ version: '3.12'
87
86
  type: :development
88
87
  prerelease: false
89
- version_requirements: *id005
90
- - !ruby/object:Gem::Dependency
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '3.12'
94
+ - !ruby/object:Gem::Dependency
91
95
  name: bundler
92
- requirement: &id006 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
93
97
  none: false
94
- requirements:
98
+ requirements:
95
99
  - - ~>
96
- - !ruby/object:Gem::Version
97
- segments:
98
- - 1
99
- version: "1"
100
+ - !ruby/object:Gem::Version
101
+ version: '1'
100
102
  type: :development
101
103
  prerelease: false
102
- version_requirements: *id006
103
- - !ruby/object:Gem::Dependency
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: '1'
110
+ - !ruby/object:Gem::Dependency
104
111
  name: jeweler
105
- requirement: &id007 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
106
113
  none: false
107
- requirements:
114
+ requirements:
108
115
  - - ~>
109
- - !ruby/object:Gem::Version
110
- segments:
111
- - 1
112
- - 8
113
- - 3
116
+ - !ruby/object:Gem::Version
114
117
  version: 1.8.3
115
118
  type: :development
116
119
  prerelease: false
117
- version_requirements: *id007
118
- - !ruby/object:Gem::Dependency
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 1.8.3
126
+ - !ruby/object:Gem::Dependency
119
127
  name: sqlite3
120
- requirement: &id008 !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- segments:
126
- - 0
127
- version: "0"
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
128
134
  type: :development
129
135
  prerelease: false
130
- version_requirements: *id008
131
- - !ruby/object:Gem::Dependency
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ - !ruby/object:Gem::Dependency
132
143
  name: pg
133
- requirement: &id009 !ruby/object:Gem::Requirement
134
- none: false
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- segments:
139
- - 0
140
- version: "0"
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
141
150
  type: :development
142
151
  prerelease: false
143
- version_requirements: *id009
144
- - !ruby/object:Gem::Dependency
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
145
159
  name: rails
146
- requirement: &id010 !ruby/object:Gem::Requirement
147
- none: false
148
- requirements:
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- segments:
152
- - 2
153
- - 3
154
- - 0
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
155
165
  version: 2.3.0
156
166
  type: :runtime
157
167
  prerelease: false
158
- version_requirements: *id010
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: 2.3.0
159
174
  description: ModelFields is a Rails plugin that adds fields declarations to your models.
160
175
  email: jgoizueta@gmail.com
161
176
  executables: []
162
-
163
177
  extensions: []
164
-
165
- extra_rdoc_files:
178
+ extra_rdoc_files:
166
179
  - LICENSE.txt
167
180
  - README.rdoc
168
181
  - TODO
169
- files:
182
+ files:
170
183
  - .document
171
184
  - Gemfile
172
185
  - Gemfile.lock
@@ -175,13 +188,13 @@ files:
175
188
  - Rakefile
176
189
  - TODO
177
190
  - VERSION
191
+ - lib/migrate_tasks/migrate.rake
178
192
  - lib/modalfields.rb
179
193
  - lib/modalfields/modalfields.rb
180
194
  - lib/modalfields/standardfields.rb
181
195
  - lib/modalfields/tasks.rb
182
196
  - lib/tasks/check.rake
183
197
  - lib/tasks/csv.rake
184
- - lib/tasks/migrate.rake
185
198
  - lib/tasks/migration.rake
186
199
  - lib/tasks/report.rake
187
200
  - lib/tasks/update.rake
@@ -204,38 +217,32 @@ files:
204
217
  - test/schema.rb
205
218
  - test/test_diff.rb
206
219
  - test/test_update.rb
207
- has_rdoc: true
208
220
  homepage: http://github.com/jgoizueta/modalfields
209
- licenses:
221
+ licenses:
210
222
  - MIT
211
223
  post_install_message:
212
224
  rdoc_options: []
213
-
214
- require_paths:
225
+ require_paths:
215
226
  - lib
216
- required_ruby_version: !ruby/object:Gem::Requirement
227
+ required_ruby_version: !ruby/object:Gem::Requirement
217
228
  none: false
218
- requirements:
219
- - - ">="
220
- - !ruby/object:Gem::Version
221
- hash: -658293137
222
- segments:
229
+ requirements:
230
+ - - ! '>='
231
+ - !ruby/object:Gem::Version
232
+ version: '0'
233
+ segments:
223
234
  - 0
224
- version: "0"
225
- required_rubygems_version: !ruby/object:Gem::Requirement
235
+ hash: 4179480650066635593
236
+ required_rubygems_version: !ruby/object:Gem::Requirement
226
237
  none: false
227
- requirements:
228
- - - ">="
229
- - !ruby/object:Gem::Version
230
- segments:
231
- - 0
232
- version: "0"
238
+ requirements:
239
+ - - ! '>='
240
+ - !ruby/object:Gem::Version
241
+ version: '0'
233
242
  requirements: []
234
-
235
243
  rubyforge_project:
236
- rubygems_version: 1.3.7
244
+ rubygems_version: 1.8.23
237
245
  signing_key:
238
246
  specification_version: 3
239
247
  summary: Model annotator with Ruby (Hobo-like) syntax and hooks.
240
248
  test_files: []
241
-