view_mapper 0.2.0 → 0.3.0

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.
Files changed (40) hide show
  1. data/Rakefile +5 -3
  2. data/VERSION +1 -1
  3. data/generators/view_for/view_for_generator.rb +4 -37
  4. data/lib/view_mapper/has_many_templates/controller.rb +85 -0
  5. data/lib/view_mapper/has_many_templates/fixtures.yml +19 -0
  6. data/lib/view_mapper/has_many_templates/functional_test.rb +45 -0
  7. data/lib/view_mapper/has_many_templates/helper.rb +18 -0
  8. data/lib/view_mapper/has_many_templates/helper_test.rb +4 -0
  9. data/lib/view_mapper/has_many_templates/layout.html.erb +19 -0
  10. data/lib/view_mapper/has_many_templates/migration.rb +16 -0
  11. data/lib/view_mapper/has_many_templates/model.rb +23 -0
  12. data/lib/view_mapper/has_many_templates/nested_attributes.js +13 -0
  13. data/lib/view_mapper/has_many_templates/style.css +58 -0
  14. data/lib/view_mapper/has_many_templates/unit_test.rb +8 -0
  15. data/lib/view_mapper/has_many_templates/view_child_form.html.erb +12 -0
  16. data/lib/view_mapper/has_many_templates/view_edit.html.erb +11 -0
  17. data/lib/view_mapper/has_many_templates/view_form.html.erb +20 -0
  18. data/lib/view_mapper/has_many_templates/view_index.html.erb +24 -0
  19. data/lib/view_mapper/has_many_templates/view_new.html.erb +10 -0
  20. data/lib/view_mapper/has_many_templates/view_show.html.erb +22 -0
  21. data/lib/view_mapper/has_many_view.rb +124 -0
  22. data/lib/view_mapper/model_info.rb +157 -0
  23. data/lib/view_mapper/paperclip_view.rb +5 -40
  24. data/lib/view_mapper/view_mapper.rb +2 -2
  25. data/lib/view_mapper.rb +2 -0
  26. data/test/expected_templates/has_many/_form.html.erb +26 -0
  27. data/test/expected_templates/has_many/_person.html.erb +18 -0
  28. data/test/expected_templates/has_many/create_parents.rb +15 -0
  29. data/test/expected_templates/has_many/edit.html.erb +11 -0
  30. data/test/expected_templates/has_many/index.html.erb +20 -0
  31. data/test/expected_templates/has_many/new.html.erb +10 -0
  32. data/test/expected_templates/has_many/parent.rb +14 -0
  33. data/test/expected_templates/has_many/show.html.erb +33 -0
  34. data/test/has_many_view_test.rb +405 -0
  35. data/test/model_info_test.rb +81 -0
  36. data/test/paperclip_view_test.rb +4 -27
  37. data/test/test_helper.rb +82 -9
  38. data/test/view_mapper_test.rb +2 -2
  39. data/view_mapper.gemspec +41 -5
  40. metadata +48 -5
data/view_mapper.gemspec CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{view_mapper}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Pat Shaughnessy"]
12
- s.date = %q{2009-10-16}
13
- s.description = %q{Generate complex view code for your models}
12
+ s.date = %q{2009-11-09}
13
+ s.description = %q{View_mapper will generate scaffolding for new or existing models, customized for the plugins you use in your app.}
14
14
  s.email = %q{pat@patshaughnessy.net}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
@@ -40,6 +40,25 @@ Gem::Specification.new do |s|
40
40
  "lib/view_mapper/auto_complete_templates/view_show.html.erb",
41
41
  "lib/view_mapper/auto_complete_view.rb",
42
42
  "lib/view_mapper/editable_manifest.rb",
43
+ "lib/view_mapper/has_many_templates/controller.rb",
44
+ "lib/view_mapper/has_many_templates/fixtures.yml",
45
+ "lib/view_mapper/has_many_templates/functional_test.rb",
46
+ "lib/view_mapper/has_many_templates/helper.rb",
47
+ "lib/view_mapper/has_many_templates/helper_test.rb",
48
+ "lib/view_mapper/has_many_templates/layout.html.erb",
49
+ "lib/view_mapper/has_many_templates/migration.rb",
50
+ "lib/view_mapper/has_many_templates/model.rb",
51
+ "lib/view_mapper/has_many_templates/nested_attributes.js",
52
+ "lib/view_mapper/has_many_templates/style.css",
53
+ "lib/view_mapper/has_many_templates/unit_test.rb",
54
+ "lib/view_mapper/has_many_templates/view_child_form.html.erb",
55
+ "lib/view_mapper/has_many_templates/view_edit.html.erb",
56
+ "lib/view_mapper/has_many_templates/view_form.html.erb",
57
+ "lib/view_mapper/has_many_templates/view_index.html.erb",
58
+ "lib/view_mapper/has_many_templates/view_new.html.erb",
59
+ "lib/view_mapper/has_many_templates/view_show.html.erb",
60
+ "lib/view_mapper/has_many_view.rb",
61
+ "lib/view_mapper/model_info.rb",
43
62
  "lib/view_mapper/paperclip_templates/controller.rb",
44
63
  "lib/view_mapper/paperclip_templates/fixtures.yml",
45
64
  "lib/view_mapper/paperclip_templates/functional_test.rb",
@@ -68,6 +87,14 @@ Gem::Specification.new do |s|
68
87
  "test/expected_templates/auto_complete/standard_routes.rb",
69
88
  "test/expected_templates/auto_complete/testies.html.erb",
70
89
  "test/expected_templates/auto_complete/testies_controller.rb",
90
+ "test/expected_templates/has_many/_form.html.erb",
91
+ "test/expected_templates/has_many/_person.html.erb",
92
+ "test/expected_templates/has_many/create_parents.rb",
93
+ "test/expected_templates/has_many/edit.html.erb",
94
+ "test/expected_templates/has_many/index.html.erb",
95
+ "test/expected_templates/has_many/new.html.erb",
96
+ "test/expected_templates/has_many/parent.rb",
97
+ "test/expected_templates/has_many/show.html.erb",
71
98
  "test/expected_templates/paperclip/create_testies.rb",
72
99
  "test/expected_templates/paperclip/edit.html.erb",
73
100
  "test/expected_templates/paperclip/index.html.erb",
@@ -76,6 +103,8 @@ Gem::Specification.new do |s|
76
103
  "test/expected_templates/paperclip/testy.rb",
77
104
  "test/fake/fake_generator.rb",
78
105
  "test/fake_view.rb",
106
+ "test/has_many_view_test.rb",
107
+ "test/model_info_test.rb",
79
108
  "test/paperclip_view_test.rb",
80
109
  "test/rails_generator.rb",
81
110
  "test/rails_generator/base.rb",
@@ -99,21 +128,25 @@ Gem::Specification.new do |s|
99
128
  "test/view_mapper_test.rb",
100
129
  "view_mapper.gemspec"
101
130
  ]
102
- s.homepage = %q{http://github.com/patshaughnessy/view_mapper}
131
+ s.homepage = %q{http://patshaughnessy.net/view_mapper}
103
132
  s.rdoc_options = ["--charset=UTF-8"]
104
133
  s.require_paths = ["lib"]
105
134
  s.rubygems_version = %q{1.3.5}
106
- s.summary = %q{Generate complex view code for your models}
135
+ s.summary = %q{Scaffolding for your models and plugins}
107
136
  s.test_files = [
108
137
  "test/auto_complete_test.rb",
109
138
  "test/editable_manifest_test.rb",
110
139
  "test/expected_templates/auto_complete/expected_routes.rb",
111
140
  "test/expected_templates/auto_complete/standard_routes.rb",
112
141
  "test/expected_templates/auto_complete/testies_controller.rb",
142
+ "test/expected_templates/has_many/create_parents.rb",
143
+ "test/expected_templates/has_many/parent.rb",
113
144
  "test/expected_templates/paperclip/create_testies.rb",
114
145
  "test/expected_templates/paperclip/testy.rb",
115
146
  "test/fake/fake_generator.rb",
116
147
  "test/fake_view.rb",
148
+ "test/has_many_view_test.rb",
149
+ "test/model_info_test.rb",
117
150
  "test/paperclip_view_test.rb",
118
151
  "test/rails_generator/base.rb",
119
152
  "test/rails_generator/commands.rb",
@@ -143,10 +176,13 @@ Gem::Specification.new do |s|
143
176
 
144
177
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
145
178
  s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
179
+ s.add_development_dependency(%q<mocha>, [">= 0"])
146
180
  else
147
181
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
182
+ s.add_dependency(%q<mocha>, [">= 0"])
148
183
  end
149
184
  else
150
185
  s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
186
+ s.add_dependency(%q<mocha>, [">= 0"])
151
187
  end
152
188
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Shaughnessy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-16 00:00:00 -04:00
12
+ date: 2009-11-09 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,7 +22,17 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
- description: Generate complex view code for your models
25
+ - !ruby/object:Gem::Dependency
26
+ name: mocha
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ description: View_mapper will generate scaffolding for new or existing models, customized for the plugins you use in your app.
26
36
  email: pat@patshaughnessy.net
27
37
  executables: []
28
38
 
@@ -55,6 +65,25 @@ files:
55
65
  - lib/view_mapper/auto_complete_templates/view_show.html.erb
56
66
  - lib/view_mapper/auto_complete_view.rb
57
67
  - lib/view_mapper/editable_manifest.rb
68
+ - lib/view_mapper/has_many_templates/controller.rb
69
+ - lib/view_mapper/has_many_templates/fixtures.yml
70
+ - lib/view_mapper/has_many_templates/functional_test.rb
71
+ - lib/view_mapper/has_many_templates/helper.rb
72
+ - lib/view_mapper/has_many_templates/helper_test.rb
73
+ - lib/view_mapper/has_many_templates/layout.html.erb
74
+ - lib/view_mapper/has_many_templates/migration.rb
75
+ - lib/view_mapper/has_many_templates/model.rb
76
+ - lib/view_mapper/has_many_templates/nested_attributes.js
77
+ - lib/view_mapper/has_many_templates/style.css
78
+ - lib/view_mapper/has_many_templates/unit_test.rb
79
+ - lib/view_mapper/has_many_templates/view_child_form.html.erb
80
+ - lib/view_mapper/has_many_templates/view_edit.html.erb
81
+ - lib/view_mapper/has_many_templates/view_form.html.erb
82
+ - lib/view_mapper/has_many_templates/view_index.html.erb
83
+ - lib/view_mapper/has_many_templates/view_new.html.erb
84
+ - lib/view_mapper/has_many_templates/view_show.html.erb
85
+ - lib/view_mapper/has_many_view.rb
86
+ - lib/view_mapper/model_info.rb
58
87
  - lib/view_mapper/paperclip_templates/controller.rb
59
88
  - lib/view_mapper/paperclip_templates/fixtures.yml
60
89
  - lib/view_mapper/paperclip_templates/functional_test.rb
@@ -83,6 +112,14 @@ files:
83
112
  - test/expected_templates/auto_complete/standard_routes.rb
84
113
  - test/expected_templates/auto_complete/testies.html.erb
85
114
  - test/expected_templates/auto_complete/testies_controller.rb
115
+ - test/expected_templates/has_many/_form.html.erb
116
+ - test/expected_templates/has_many/_person.html.erb
117
+ - test/expected_templates/has_many/create_parents.rb
118
+ - test/expected_templates/has_many/edit.html.erb
119
+ - test/expected_templates/has_many/index.html.erb
120
+ - test/expected_templates/has_many/new.html.erb
121
+ - test/expected_templates/has_many/parent.rb
122
+ - test/expected_templates/has_many/show.html.erb
86
123
  - test/expected_templates/paperclip/create_testies.rb
87
124
  - test/expected_templates/paperclip/edit.html.erb
88
125
  - test/expected_templates/paperclip/index.html.erb
@@ -91,6 +128,8 @@ files:
91
128
  - test/expected_templates/paperclip/testy.rb
92
129
  - test/fake/fake_generator.rb
93
130
  - test/fake_view.rb
131
+ - test/has_many_view_test.rb
132
+ - test/model_info_test.rb
94
133
  - test/paperclip_view_test.rb
95
134
  - test/rails_generator.rb
96
135
  - test/rails_generator/base.rb
@@ -114,7 +153,7 @@ files:
114
153
  - test/view_mapper_test.rb
115
154
  - view_mapper.gemspec
116
155
  has_rdoc: true
117
- homepage: http://github.com/patshaughnessy/view_mapper
156
+ homepage: http://patshaughnessy.net/view_mapper
118
157
  licenses: []
119
158
 
120
159
  post_install_message:
@@ -140,17 +179,21 @@ rubyforge_project:
140
179
  rubygems_version: 1.3.5
141
180
  signing_key:
142
181
  specification_version: 3
143
- summary: Generate complex view code for your models
182
+ summary: Scaffolding for your models and plugins
144
183
  test_files:
145
184
  - test/auto_complete_test.rb
146
185
  - test/editable_manifest_test.rb
147
186
  - test/expected_templates/auto_complete/expected_routes.rb
148
187
  - test/expected_templates/auto_complete/standard_routes.rb
149
188
  - test/expected_templates/auto_complete/testies_controller.rb
189
+ - test/expected_templates/has_many/create_parents.rb
190
+ - test/expected_templates/has_many/parent.rb
150
191
  - test/expected_templates/paperclip/create_testies.rb
151
192
  - test/expected_templates/paperclip/testy.rb
152
193
  - test/fake/fake_generator.rb
153
194
  - test/fake_view.rb
195
+ - test/has_many_view_test.rb
196
+ - test/model_info_test.rb
154
197
  - test/paperclip_view_test.rb
155
198
  - test/rails_generator/base.rb
156
199
  - test/rails_generator/commands.rb