view_mapper 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +4 -2
- data/VERSION +1 -1
- data/generators/scaffold_for_view/scaffold_for_view_generator.rb +2 -6
- data/generators/view_for/view_for_generator.rb +1 -5
- data/lib/view_mapper/{has_many_view.rb → has_many_child_models.rb} +33 -37
- data/lib/view_mapper/model_info.rb +8 -0
- data/lib/view_mapper/view_mapper.rb +15 -2
- data/lib/view_mapper/views/auto_complete/auto_complete_view.rb +77 -0
- data/lib/view_mapper/{auto_complete_templates → views/auto_complete/templates}/controller.rb +3 -1
- data/lib/view_mapper/{auto_complete_templates → views/auto_complete/templates}/layout.html.erb +0 -0
- data/lib/view_mapper/{auto_complete_templates → views/auto_complete/templates}/view_edit.html.erb +1 -1
- data/lib/view_mapper/{auto_complete_templates → views/auto_complete/templates}/view_new.html.erb +1 -1
- data/lib/view_mapper/views/has_many/has_many_view.rb +28 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/helper.rb +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/layout.html.erb +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/model.rb +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/nested_attributes.js +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/style.css +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/view_child_form.html.erb +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/view_edit.html.erb +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/view_form.html.erb +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/view_new.html.erb +0 -0
- data/lib/view_mapper/{has_many_templates → views/has_many/templates}/view_show.html.erb +0 -0
- data/lib/view_mapper/{paperclip_view.rb → views/paperclip/paperclip_view.rb} +6 -2
- data/lib/view_mapper/{paperclip_templates → views/paperclip/templates}/migration.rb +1 -1
- data/lib/view_mapper/{paperclip_templates → views/paperclip/templates}/model.rb +0 -0
- data/lib/view_mapper/{paperclip_templates → views/paperclip/templates}/view_edit.html.erb +0 -0
- data/lib/view_mapper/{paperclip_templates → views/paperclip/templates}/view_new.html.erb +0 -0
- data/lib/view_mapper/{paperclip_templates → views/paperclip/templates}/view_show.html.erb +0 -0
- data/lib/view_mapper.rb +4 -3
- data/test/{fake → generators/fake}/fake_generator.rb +0 -0
- data/test/generators/fake/templates/fake_template1.html.erb +1 -0
- data/test/generators/fake/templates/fake_template2.html.erb +1 -0
- data/test/{scaffold_for_view_generator_test.rb → generators/scaffold_for_view/scaffold_for_view_generator_test.rb} +2 -2
- data/test/{view_for_generator_test.rb → generators/view_for/view_for_generator_test.rb} +0 -0
- data/test/model_info_test.rb +12 -3
- data/test/test_helper.rb +12 -8
- data/test/view_mapper_test.rb +13 -2
- data/test/{auto_complete_test.rb → views/auto_complete/auto_complete_test.rb} +63 -40
- data/test/{expected_templates/auto_complete/index.html.erb → views/auto_complete/expected_templates/actual_index} +2 -0
- data/test/{expected_templates/auto_complete → views/auto_complete/expected_templates}/edit.html.erb +7 -3
- data/test/{expected_templates/auto_complete → views/auto_complete/expected_templates}/expected_routes.rb +0 -0
- data/test/{expected_templates/paperclip → views/auto_complete/expected_templates}/index.html.erb +3 -1
- data/test/{expected_templates/auto_complete → views/auto_complete/expected_templates}/new.html.erb +7 -3
- data/test/{expected_templates/auto_complete → views/auto_complete/expected_templates}/show.html.erb +6 -1
- data/test/{expected_templates/auto_complete → views/auto_complete/expected_templates}/standard_routes.rb +0 -0
- data/test/{expected_templates/auto_complete → views/auto_complete/expected_templates}/testies.html.erb +0 -0
- data/test/{expected_templates/auto_complete → views/auto_complete/expected_templates}/testies_controller.rb +2 -1
- data/test/views/fake/fake_view.rb +7 -0
- data/test/views/fake/templates/fake_template1.html.erb +1 -0
- data/test/{expected_templates/has_many → views/has_many/expected_templates}/_form.html.erb +0 -0
- data/test/{expected_templates/has_many → views/has_many/expected_templates}/_person.html.erb +4 -0
- data/test/{expected_templates/has_many → views/has_many/expected_templates}/create_parents.rb +4 -3
- data/test/{expected_templates/has_many → views/has_many/expected_templates}/edit.html.erb +0 -0
- data/test/{expected_templates/has_many → views/has_many/expected_templates}/index.html.erb +1 -1
- data/test/{expected_templates/has_many → views/has_many/expected_templates}/new.html.erb +0 -0
- data/test/{expected_templates/has_many → views/has_many/expected_templates}/parent.rb +2 -1
- data/test/{expected_templates/has_many → views/has_many/expected_templates}/show.html.erb +4 -0
- data/test/{has_many_view_test.rb → views/has_many/has_many_view_test.rb} +17 -17
- data/test/{expected_templates/paperclip → views/paperclip/expected_templates}/create_testies.rb +4 -3
- data/test/{expected_templates/paperclip → views/paperclip/expected_templates}/edit.html.erb +4 -0
- data/test/views/paperclip/expected_templates/index.html.erb +26 -0
- data/test/{expected_templates/paperclip → views/paperclip/expected_templates}/new.html.erb +4 -0
- data/test/{expected_templates/paperclip → views/paperclip/expected_templates}/show.html.erb +5 -0
- data/test/{expected_templates/paperclip → views/paperclip/expected_templates}/testy.rb +0 -0
- data/test/{paperclip_view_test.rb → views/paperclip/paperclip_view_test.rb} +17 -9
- data/view_mapper.gemspec +77 -124
- metadata +72 -120
- data/lib/view_mapper/auto_complete_templates/functional_test.rb +0 -45
- data/lib/view_mapper/auto_complete_templates/helper.rb +0 -2
- data/lib/view_mapper/auto_complete_templates/helper_test.rb +0 -4
- data/lib/view_mapper/auto_complete_templates/style.css +0 -54
- data/lib/view_mapper/auto_complete_templates/view_index.html.erb +0 -24
- data/lib/view_mapper/auto_complete_templates/view_show.html.erb +0 -10
- data/lib/view_mapper/auto_complete_view.rb +0 -44
- data/lib/view_mapper/has_many_templates/controller.rb +0 -85
- data/lib/view_mapper/has_many_templates/fixtures.yml +0 -19
- data/lib/view_mapper/has_many_templates/functional_test.rb +0 -45
- data/lib/view_mapper/has_many_templates/helper_test.rb +0 -4
- data/lib/view_mapper/has_many_templates/migration.rb +0 -16
- data/lib/view_mapper/has_many_templates/unit_test.rb +0 -8
- data/lib/view_mapper/has_many_templates/view_index.html.erb +0 -24
- data/lib/view_mapper/paperclip_templates/controller.rb +0 -85
- data/lib/view_mapper/paperclip_templates/fixtures.yml +0 -19
- data/lib/view_mapper/paperclip_templates/functional_test.rb +0 -45
- data/lib/view_mapper/paperclip_templates/helper.rb +0 -2
- data/lib/view_mapper/paperclip_templates/helper_test.rb +0 -4
- data/lib/view_mapper/paperclip_templates/layout.html.erb +0 -17
- data/lib/view_mapper/paperclip_templates/style.css +0 -54
- data/lib/view_mapper/paperclip_templates/unit_test.rb +0 -8
- data/lib/view_mapper/paperclip_templates/view_index.html.erb +0 -24
- data/test/database.yml +0 -3
- data/test/fake_view.rb +0 -7
- data/test/rails_generator/base.rb +0 -266
- data/test/rails_generator/commands.rb +0 -621
- data/test/rails_generator/generated_attribute.rb +0 -46
- data/test/rails_generator/generators/components/model/model_generator.rb +0 -45
- data/test/rails_generator/generators/components/scaffold/scaffold_generator.rb +0 -102
- data/test/rails_generator/lookup.rb +0 -249
- data/test/rails_generator/manifest.rb +0 -53
- data/test/rails_generator/options.rb +0 -150
- data/test/rails_generator/scripts/destroy.rb +0 -29
- data/test/rails_generator/scripts/generate.rb +0 -7
- data/test/rails_generator/scripts/update.rb +0 -12
- data/test/rails_generator/scripts.rb +0 -89
- data/test/rails_generator/secret_key_generator.rb +0 -24
- data/test/rails_generator/simple_logger.rb +0 -46
- data/test/rails_generator/spec.rb +0 -44
data/view_mapper.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{view_mapper}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
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-11-
|
12
|
+
s.date = %q{2009-11-25}
|
13
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 = [
|
@@ -28,104 +28,71 @@ Gem::Specification.new do |s|
|
|
28
28
|
"generators/view_for/USAGE",
|
29
29
|
"generators/view_for/view_for_generator.rb",
|
30
30
|
"lib/view_mapper.rb",
|
31
|
-
"lib/view_mapper/auto_complete_templates/controller.rb",
|
32
|
-
"lib/view_mapper/auto_complete_templates/functional_test.rb",
|
33
|
-
"lib/view_mapper/auto_complete_templates/helper.rb",
|
34
|
-
"lib/view_mapper/auto_complete_templates/helper_test.rb",
|
35
|
-
"lib/view_mapper/auto_complete_templates/layout.html.erb",
|
36
|
-
"lib/view_mapper/auto_complete_templates/style.css",
|
37
|
-
"lib/view_mapper/auto_complete_templates/view_edit.html.erb",
|
38
|
-
"lib/view_mapper/auto_complete_templates/view_index.html.erb",
|
39
|
-
"lib/view_mapper/auto_complete_templates/view_new.html.erb",
|
40
|
-
"lib/view_mapper/auto_complete_templates/view_show.html.erb",
|
41
|
-
"lib/view_mapper/auto_complete_view.rb",
|
42
31
|
"lib/view_mapper/editable_manifest.rb",
|
43
|
-
"lib/view_mapper/
|
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",
|
32
|
+
"lib/view_mapper/has_many_child_models.rb",
|
61
33
|
"lib/view_mapper/model_info.rb",
|
62
|
-
"lib/view_mapper/paperclip_templates/controller.rb",
|
63
|
-
"lib/view_mapper/paperclip_templates/fixtures.yml",
|
64
|
-
"lib/view_mapper/paperclip_templates/functional_test.rb",
|
65
|
-
"lib/view_mapper/paperclip_templates/helper.rb",
|
66
|
-
"lib/view_mapper/paperclip_templates/helper_test.rb",
|
67
|
-
"lib/view_mapper/paperclip_templates/layout.html.erb",
|
68
|
-
"lib/view_mapper/paperclip_templates/migration.rb",
|
69
|
-
"lib/view_mapper/paperclip_templates/model.rb",
|
70
|
-
"lib/view_mapper/paperclip_templates/style.css",
|
71
|
-
"lib/view_mapper/paperclip_templates/unit_test.rb",
|
72
|
-
"lib/view_mapper/paperclip_templates/view_edit.html.erb",
|
73
|
-
"lib/view_mapper/paperclip_templates/view_index.html.erb",
|
74
|
-
"lib/view_mapper/paperclip_templates/view_new.html.erb",
|
75
|
-
"lib/view_mapper/paperclip_templates/view_show.html.erb",
|
76
|
-
"lib/view_mapper/paperclip_view.rb",
|
77
34
|
"lib/view_mapper/route_action.rb",
|
78
35
|
"lib/view_mapper/view_mapper.rb",
|
79
|
-
"
|
80
|
-
"
|
36
|
+
"lib/view_mapper/views/auto_complete/auto_complete_view.rb",
|
37
|
+
"lib/view_mapper/views/auto_complete/templates/controller.rb",
|
38
|
+
"lib/view_mapper/views/auto_complete/templates/layout.html.erb",
|
39
|
+
"lib/view_mapper/views/auto_complete/templates/view_edit.html.erb",
|
40
|
+
"lib/view_mapper/views/auto_complete/templates/view_new.html.erb",
|
41
|
+
"lib/view_mapper/views/has_many/has_many_view.rb",
|
42
|
+
"lib/view_mapper/views/has_many/templates/helper.rb",
|
43
|
+
"lib/view_mapper/views/has_many/templates/layout.html.erb",
|
44
|
+
"lib/view_mapper/views/has_many/templates/model.rb",
|
45
|
+
"lib/view_mapper/views/has_many/templates/nested_attributes.js",
|
46
|
+
"lib/view_mapper/views/has_many/templates/style.css",
|
47
|
+
"lib/view_mapper/views/has_many/templates/view_child_form.html.erb",
|
48
|
+
"lib/view_mapper/views/has_many/templates/view_edit.html.erb",
|
49
|
+
"lib/view_mapper/views/has_many/templates/view_form.html.erb",
|
50
|
+
"lib/view_mapper/views/has_many/templates/view_new.html.erb",
|
51
|
+
"lib/view_mapper/views/has_many/templates/view_show.html.erb",
|
52
|
+
"lib/view_mapper/views/paperclip/paperclip_view.rb",
|
53
|
+
"lib/view_mapper/views/paperclip/templates/migration.rb",
|
54
|
+
"lib/view_mapper/views/paperclip/templates/model.rb",
|
55
|
+
"lib/view_mapper/views/paperclip/templates/view_edit.html.erb",
|
56
|
+
"lib/view_mapper/views/paperclip/templates/view_new.html.erb",
|
57
|
+
"lib/view_mapper/views/paperclip/templates/view_show.html.erb",
|
81
58
|
"test/editable_manifest_test.rb",
|
82
|
-
"test/
|
83
|
-
"test/
|
84
|
-
"test/
|
85
|
-
"test/
|
86
|
-
"test/
|
87
|
-
"test/expected_templates/auto_complete/standard_routes.rb",
|
88
|
-
"test/expected_templates/auto_complete/testies.html.erb",
|
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",
|
98
|
-
"test/expected_templates/paperclip/create_testies.rb",
|
99
|
-
"test/expected_templates/paperclip/edit.html.erb",
|
100
|
-
"test/expected_templates/paperclip/index.html.erb",
|
101
|
-
"test/expected_templates/paperclip/new.html.erb",
|
102
|
-
"test/expected_templates/paperclip/show.html.erb",
|
103
|
-
"test/expected_templates/paperclip/testy.rb",
|
104
|
-
"test/fake/fake_generator.rb",
|
105
|
-
"test/fake_view.rb",
|
106
|
-
"test/has_many_view_test.rb",
|
59
|
+
"test/generators/fake/fake_generator.rb",
|
60
|
+
"test/generators/fake/templates/fake_template1.html.erb",
|
61
|
+
"test/generators/fake/templates/fake_template2.html.erb",
|
62
|
+
"test/generators/scaffold_for_view/scaffold_for_view_generator_test.rb",
|
63
|
+
"test/generators/view_for/view_for_generator_test.rb",
|
107
64
|
"test/model_info_test.rb",
|
108
|
-
"test/paperclip_view_test.rb",
|
109
65
|
"test/rails_generator.rb",
|
110
|
-
"test/rails_generator/base.rb",
|
111
|
-
"test/rails_generator/commands.rb",
|
112
|
-
"test/rails_generator/generated_attribute.rb",
|
113
|
-
"test/rails_generator/generators/components/model/model_generator.rb",
|
114
|
-
"test/rails_generator/generators/components/scaffold/scaffold_generator.rb",
|
115
|
-
"test/rails_generator/lookup.rb",
|
116
|
-
"test/rails_generator/manifest.rb",
|
117
|
-
"test/rails_generator/options.rb",
|
118
|
-
"test/rails_generator/scripts.rb",
|
119
|
-
"test/rails_generator/scripts/destroy.rb",
|
120
|
-
"test/rails_generator/scripts/generate.rb",
|
121
|
-
"test/rails_generator/scripts/update.rb",
|
122
|
-
"test/rails_generator/secret_key_generator.rb",
|
123
|
-
"test/rails_generator/simple_logger.rb",
|
124
|
-
"test/rails_generator/spec.rb",
|
125
|
-
"test/scaffold_for_view_generator_test.rb",
|
126
66
|
"test/test_helper.rb",
|
127
|
-
"test/view_for_generator_test.rb",
|
128
67
|
"test/view_mapper_test.rb",
|
68
|
+
"test/views/auto_complete/auto_complete_test.rb",
|
69
|
+
"test/views/auto_complete/expected_templates/actual_index",
|
70
|
+
"test/views/auto_complete/expected_templates/edit.html.erb",
|
71
|
+
"test/views/auto_complete/expected_templates/expected_routes.rb",
|
72
|
+
"test/views/auto_complete/expected_templates/index.html.erb",
|
73
|
+
"test/views/auto_complete/expected_templates/new.html.erb",
|
74
|
+
"test/views/auto_complete/expected_templates/show.html.erb",
|
75
|
+
"test/views/auto_complete/expected_templates/standard_routes.rb",
|
76
|
+
"test/views/auto_complete/expected_templates/testies.html.erb",
|
77
|
+
"test/views/auto_complete/expected_templates/testies_controller.rb",
|
78
|
+
"test/views/fake/fake_view.rb",
|
79
|
+
"test/views/fake/templates/fake_template1.html.erb",
|
80
|
+
"test/views/has_many/expected_templates/_form.html.erb",
|
81
|
+
"test/views/has_many/expected_templates/_person.html.erb",
|
82
|
+
"test/views/has_many/expected_templates/create_parents.rb",
|
83
|
+
"test/views/has_many/expected_templates/edit.html.erb",
|
84
|
+
"test/views/has_many/expected_templates/index.html.erb",
|
85
|
+
"test/views/has_many/expected_templates/new.html.erb",
|
86
|
+
"test/views/has_many/expected_templates/parent.rb",
|
87
|
+
"test/views/has_many/expected_templates/show.html.erb",
|
88
|
+
"test/views/has_many/has_many_view_test.rb",
|
89
|
+
"test/views/paperclip/expected_templates/create_testies.rb",
|
90
|
+
"test/views/paperclip/expected_templates/edit.html.erb",
|
91
|
+
"test/views/paperclip/expected_templates/index.html.erb",
|
92
|
+
"test/views/paperclip/expected_templates/new.html.erb",
|
93
|
+
"test/views/paperclip/expected_templates/show.html.erb",
|
94
|
+
"test/views/paperclip/expected_templates/testy.rb",
|
95
|
+
"test/views/paperclip/paperclip_view_test.rb",
|
129
96
|
"view_mapper.gemspec"
|
130
97
|
]
|
131
98
|
s.homepage = %q{http://patshaughnessy.net/view_mapper}
|
@@ -134,40 +101,25 @@ Gem::Specification.new do |s|
|
|
134
101
|
s.rubygems_version = %q{1.3.5}
|
135
102
|
s.summary = %q{Scaffolding for your models and plugins}
|
136
103
|
s.test_files = [
|
137
|
-
"test/
|
138
|
-
"test/
|
139
|
-
"test/
|
140
|
-
"test/
|
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",
|
144
|
-
"test/expected_templates/paperclip/create_testies.rb",
|
145
|
-
"test/expected_templates/paperclip/testy.rb",
|
146
|
-
"test/fake/fake_generator.rb",
|
147
|
-
"test/fake_view.rb",
|
148
|
-
"test/has_many_view_test.rb",
|
104
|
+
"test/editable_manifest_test.rb",
|
105
|
+
"test/generators/fake/fake_generator.rb",
|
106
|
+
"test/generators/scaffold_for_view/scaffold_for_view_generator_test.rb",
|
107
|
+
"test/generators/view_for/view_for_generator_test.rb",
|
149
108
|
"test/model_info_test.rb",
|
150
|
-
"test/paperclip_view_test.rb",
|
151
|
-
"test/rails_generator/base.rb",
|
152
|
-
"test/rails_generator/commands.rb",
|
153
|
-
"test/rails_generator/generated_attribute.rb",
|
154
|
-
"test/rails_generator/generators/components/model/model_generator.rb",
|
155
|
-
"test/rails_generator/generators/components/scaffold/scaffold_generator.rb",
|
156
|
-
"test/rails_generator/lookup.rb",
|
157
|
-
"test/rails_generator/manifest.rb",
|
158
|
-
"test/rails_generator/options.rb",
|
159
|
-
"test/rails_generator/scripts/destroy.rb",
|
160
|
-
"test/rails_generator/scripts/generate.rb",
|
161
|
-
"test/rails_generator/scripts/update.rb",
|
162
|
-
"test/rails_generator/scripts.rb",
|
163
|
-
"test/rails_generator/secret_key_generator.rb",
|
164
|
-
"test/rails_generator/simple_logger.rb",
|
165
|
-
"test/rails_generator/spec.rb",
|
166
109
|
"test/rails_generator.rb",
|
167
|
-
"test/scaffold_for_view_generator_test.rb",
|
168
110
|
"test/test_helper.rb",
|
169
|
-
"test/
|
170
|
-
"test/
|
111
|
+
"test/view_mapper_test.rb",
|
112
|
+
"test/views/auto_complete/auto_complete_test.rb",
|
113
|
+
"test/views/auto_complete/expected_templates/expected_routes.rb",
|
114
|
+
"test/views/auto_complete/expected_templates/standard_routes.rb",
|
115
|
+
"test/views/auto_complete/expected_templates/testies_controller.rb",
|
116
|
+
"test/views/fake/fake_view.rb",
|
117
|
+
"test/views/has_many/expected_templates/create_parents.rb",
|
118
|
+
"test/views/has_many/expected_templates/parent.rb",
|
119
|
+
"test/views/has_many/has_many_view_test.rb",
|
120
|
+
"test/views/paperclip/expected_templates/create_testies.rb",
|
121
|
+
"test/views/paperclip/expected_templates/testy.rb",
|
122
|
+
"test/views/paperclip/paperclip_view_test.rb"
|
171
123
|
]
|
172
124
|
|
173
125
|
if s.respond_to? :specification_version then
|
@@ -186,3 +138,4 @@ Gem::Specification.new do |s|
|
|
186
138
|
s.add_dependency(%q<mocha>, [">= 0"])
|
187
139
|
end
|
188
140
|
end
|
141
|
+
|
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.3.
|
4
|
+
version: 0.3.1
|
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-11-
|
12
|
+
date: 2009-11-25 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -53,104 +53,71 @@ files:
|
|
53
53
|
- generators/view_for/USAGE
|
54
54
|
- generators/view_for/view_for_generator.rb
|
55
55
|
- lib/view_mapper.rb
|
56
|
-
- lib/view_mapper/auto_complete_templates/controller.rb
|
57
|
-
- lib/view_mapper/auto_complete_templates/functional_test.rb
|
58
|
-
- lib/view_mapper/auto_complete_templates/helper.rb
|
59
|
-
- lib/view_mapper/auto_complete_templates/helper_test.rb
|
60
|
-
- lib/view_mapper/auto_complete_templates/layout.html.erb
|
61
|
-
- lib/view_mapper/auto_complete_templates/style.css
|
62
|
-
- lib/view_mapper/auto_complete_templates/view_edit.html.erb
|
63
|
-
- lib/view_mapper/auto_complete_templates/view_index.html.erb
|
64
|
-
- lib/view_mapper/auto_complete_templates/view_new.html.erb
|
65
|
-
- lib/view_mapper/auto_complete_templates/view_show.html.erb
|
66
|
-
- lib/view_mapper/auto_complete_view.rb
|
67
56
|
- lib/view_mapper/editable_manifest.rb
|
68
|
-
- lib/view_mapper/
|
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
|
57
|
+
- lib/view_mapper/has_many_child_models.rb
|
86
58
|
- lib/view_mapper/model_info.rb
|
87
|
-
- lib/view_mapper/paperclip_templates/controller.rb
|
88
|
-
- lib/view_mapper/paperclip_templates/fixtures.yml
|
89
|
-
- lib/view_mapper/paperclip_templates/functional_test.rb
|
90
|
-
- lib/view_mapper/paperclip_templates/helper.rb
|
91
|
-
- lib/view_mapper/paperclip_templates/helper_test.rb
|
92
|
-
- lib/view_mapper/paperclip_templates/layout.html.erb
|
93
|
-
- lib/view_mapper/paperclip_templates/migration.rb
|
94
|
-
- lib/view_mapper/paperclip_templates/model.rb
|
95
|
-
- lib/view_mapper/paperclip_templates/style.css
|
96
|
-
- lib/view_mapper/paperclip_templates/unit_test.rb
|
97
|
-
- lib/view_mapper/paperclip_templates/view_edit.html.erb
|
98
|
-
- lib/view_mapper/paperclip_templates/view_index.html.erb
|
99
|
-
- lib/view_mapper/paperclip_templates/view_new.html.erb
|
100
|
-
- lib/view_mapper/paperclip_templates/view_show.html.erb
|
101
|
-
- lib/view_mapper/paperclip_view.rb
|
102
59
|
- lib/view_mapper/route_action.rb
|
103
60
|
- lib/view_mapper/view_mapper.rb
|
104
|
-
-
|
105
|
-
-
|
61
|
+
- lib/view_mapper/views/auto_complete/auto_complete_view.rb
|
62
|
+
- lib/view_mapper/views/auto_complete/templates/controller.rb
|
63
|
+
- lib/view_mapper/views/auto_complete/templates/layout.html.erb
|
64
|
+
- lib/view_mapper/views/auto_complete/templates/view_edit.html.erb
|
65
|
+
- lib/view_mapper/views/auto_complete/templates/view_new.html.erb
|
66
|
+
- lib/view_mapper/views/has_many/has_many_view.rb
|
67
|
+
- lib/view_mapper/views/has_many/templates/helper.rb
|
68
|
+
- lib/view_mapper/views/has_many/templates/layout.html.erb
|
69
|
+
- lib/view_mapper/views/has_many/templates/model.rb
|
70
|
+
- lib/view_mapper/views/has_many/templates/nested_attributes.js
|
71
|
+
- lib/view_mapper/views/has_many/templates/style.css
|
72
|
+
- lib/view_mapper/views/has_many/templates/view_child_form.html.erb
|
73
|
+
- lib/view_mapper/views/has_many/templates/view_edit.html.erb
|
74
|
+
- lib/view_mapper/views/has_many/templates/view_form.html.erb
|
75
|
+
- lib/view_mapper/views/has_many/templates/view_new.html.erb
|
76
|
+
- lib/view_mapper/views/has_many/templates/view_show.html.erb
|
77
|
+
- lib/view_mapper/views/paperclip/paperclip_view.rb
|
78
|
+
- lib/view_mapper/views/paperclip/templates/migration.rb
|
79
|
+
- lib/view_mapper/views/paperclip/templates/model.rb
|
80
|
+
- lib/view_mapper/views/paperclip/templates/view_edit.html.erb
|
81
|
+
- lib/view_mapper/views/paperclip/templates/view_new.html.erb
|
82
|
+
- lib/view_mapper/views/paperclip/templates/view_show.html.erb
|
106
83
|
- test/editable_manifest_test.rb
|
107
|
-
- test/
|
108
|
-
- test/
|
109
|
-
- test/
|
110
|
-
- test/
|
111
|
-
- test/
|
112
|
-
- test/expected_templates/auto_complete/standard_routes.rb
|
113
|
-
- test/expected_templates/auto_complete/testies.html.erb
|
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
|
123
|
-
- test/expected_templates/paperclip/create_testies.rb
|
124
|
-
- test/expected_templates/paperclip/edit.html.erb
|
125
|
-
- test/expected_templates/paperclip/index.html.erb
|
126
|
-
- test/expected_templates/paperclip/new.html.erb
|
127
|
-
- test/expected_templates/paperclip/show.html.erb
|
128
|
-
- test/expected_templates/paperclip/testy.rb
|
129
|
-
- test/fake/fake_generator.rb
|
130
|
-
- test/fake_view.rb
|
131
|
-
- test/has_many_view_test.rb
|
84
|
+
- test/generators/fake/fake_generator.rb
|
85
|
+
- test/generators/fake/templates/fake_template1.html.erb
|
86
|
+
- test/generators/fake/templates/fake_template2.html.erb
|
87
|
+
- test/generators/scaffold_for_view/scaffold_for_view_generator_test.rb
|
88
|
+
- test/generators/view_for/view_for_generator_test.rb
|
132
89
|
- test/model_info_test.rb
|
133
|
-
- test/paperclip_view_test.rb
|
134
90
|
- test/rails_generator.rb
|
135
|
-
- test/rails_generator/base.rb
|
136
|
-
- test/rails_generator/commands.rb
|
137
|
-
- test/rails_generator/generated_attribute.rb
|
138
|
-
- test/rails_generator/generators/components/model/model_generator.rb
|
139
|
-
- test/rails_generator/generators/components/scaffold/scaffold_generator.rb
|
140
|
-
- test/rails_generator/lookup.rb
|
141
|
-
- test/rails_generator/manifest.rb
|
142
|
-
- test/rails_generator/options.rb
|
143
|
-
- test/rails_generator/scripts.rb
|
144
|
-
- test/rails_generator/scripts/destroy.rb
|
145
|
-
- test/rails_generator/scripts/generate.rb
|
146
|
-
- test/rails_generator/scripts/update.rb
|
147
|
-
- test/rails_generator/secret_key_generator.rb
|
148
|
-
- test/rails_generator/simple_logger.rb
|
149
|
-
- test/rails_generator/spec.rb
|
150
|
-
- test/scaffold_for_view_generator_test.rb
|
151
91
|
- test/test_helper.rb
|
152
|
-
- test/view_for_generator_test.rb
|
153
92
|
- test/view_mapper_test.rb
|
93
|
+
- test/views/auto_complete/auto_complete_test.rb
|
94
|
+
- test/views/auto_complete/expected_templates/actual_index
|
95
|
+
- test/views/auto_complete/expected_templates/edit.html.erb
|
96
|
+
- test/views/auto_complete/expected_templates/expected_routes.rb
|
97
|
+
- test/views/auto_complete/expected_templates/index.html.erb
|
98
|
+
- test/views/auto_complete/expected_templates/new.html.erb
|
99
|
+
- test/views/auto_complete/expected_templates/show.html.erb
|
100
|
+
- test/views/auto_complete/expected_templates/standard_routes.rb
|
101
|
+
- test/views/auto_complete/expected_templates/testies.html.erb
|
102
|
+
- test/views/auto_complete/expected_templates/testies_controller.rb
|
103
|
+
- test/views/fake/fake_view.rb
|
104
|
+
- test/views/fake/templates/fake_template1.html.erb
|
105
|
+
- test/views/has_many/expected_templates/_form.html.erb
|
106
|
+
- test/views/has_many/expected_templates/_person.html.erb
|
107
|
+
- test/views/has_many/expected_templates/create_parents.rb
|
108
|
+
- test/views/has_many/expected_templates/edit.html.erb
|
109
|
+
- test/views/has_many/expected_templates/index.html.erb
|
110
|
+
- test/views/has_many/expected_templates/new.html.erb
|
111
|
+
- test/views/has_many/expected_templates/parent.rb
|
112
|
+
- test/views/has_many/expected_templates/show.html.erb
|
113
|
+
- test/views/has_many/has_many_view_test.rb
|
114
|
+
- test/views/paperclip/expected_templates/create_testies.rb
|
115
|
+
- test/views/paperclip/expected_templates/edit.html.erb
|
116
|
+
- test/views/paperclip/expected_templates/index.html.erb
|
117
|
+
- test/views/paperclip/expected_templates/new.html.erb
|
118
|
+
- test/views/paperclip/expected_templates/show.html.erb
|
119
|
+
- test/views/paperclip/expected_templates/testy.rb
|
120
|
+
- test/views/paperclip/paperclip_view_test.rb
|
154
121
|
- view_mapper.gemspec
|
155
122
|
has_rdoc: true
|
156
123
|
homepage: http://patshaughnessy.net/view_mapper
|
@@ -181,37 +148,22 @@ signing_key:
|
|
181
148
|
specification_version: 3
|
182
149
|
summary: Scaffolding for your models and plugins
|
183
150
|
test_files:
|
184
|
-
- test/auto_complete_test.rb
|
185
151
|
- test/editable_manifest_test.rb
|
186
|
-
- test/
|
187
|
-
- test/
|
188
|
-
- test/
|
189
|
-
- test/expected_templates/has_many/create_parents.rb
|
190
|
-
- test/expected_templates/has_many/parent.rb
|
191
|
-
- test/expected_templates/paperclip/create_testies.rb
|
192
|
-
- test/expected_templates/paperclip/testy.rb
|
193
|
-
- test/fake/fake_generator.rb
|
194
|
-
- test/fake_view.rb
|
195
|
-
- test/has_many_view_test.rb
|
152
|
+
- test/generators/fake/fake_generator.rb
|
153
|
+
- test/generators/scaffold_for_view/scaffold_for_view_generator_test.rb
|
154
|
+
- test/generators/view_for/view_for_generator_test.rb
|
196
155
|
- test/model_info_test.rb
|
197
|
-
- test/paperclip_view_test.rb
|
198
|
-
- test/rails_generator/base.rb
|
199
|
-
- test/rails_generator/commands.rb
|
200
|
-
- test/rails_generator/generated_attribute.rb
|
201
|
-
- test/rails_generator/generators/components/model/model_generator.rb
|
202
|
-
- test/rails_generator/generators/components/scaffold/scaffold_generator.rb
|
203
|
-
- test/rails_generator/lookup.rb
|
204
|
-
- test/rails_generator/manifest.rb
|
205
|
-
- test/rails_generator/options.rb
|
206
|
-
- test/rails_generator/scripts/destroy.rb
|
207
|
-
- test/rails_generator/scripts/generate.rb
|
208
|
-
- test/rails_generator/scripts/update.rb
|
209
|
-
- test/rails_generator/scripts.rb
|
210
|
-
- test/rails_generator/secret_key_generator.rb
|
211
|
-
- test/rails_generator/simple_logger.rb
|
212
|
-
- test/rails_generator/spec.rb
|
213
156
|
- test/rails_generator.rb
|
214
|
-
- test/scaffold_for_view_generator_test.rb
|
215
157
|
- test/test_helper.rb
|
216
|
-
- test/view_for_generator_test.rb
|
217
158
|
- test/view_mapper_test.rb
|
159
|
+
- test/views/auto_complete/auto_complete_test.rb
|
160
|
+
- test/views/auto_complete/expected_templates/expected_routes.rb
|
161
|
+
- test/views/auto_complete/expected_templates/standard_routes.rb
|
162
|
+
- test/views/auto_complete/expected_templates/testies_controller.rb
|
163
|
+
- test/views/fake/fake_view.rb
|
164
|
+
- test/views/has_many/expected_templates/create_parents.rb
|
165
|
+
- test/views/has_many/expected_templates/parent.rb
|
166
|
+
- test/views/has_many/has_many_view_test.rb
|
167
|
+
- test/views/paperclip/expected_templates/create_testies.rb
|
168
|
+
- test/views/paperclip/expected_templates/testy.rb
|
169
|
+
- test/views/paperclip/paperclip_view_test.rb
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class <%= controller_class_name %>ControllerTest < ActionController::TestCase
|
4
|
-
test "should get index" do
|
5
|
-
get :index
|
6
|
-
assert_response :success
|
7
|
-
assert_not_nil assigns(:<%= table_name %>)
|
8
|
-
end
|
9
|
-
|
10
|
-
test "should get new" do
|
11
|
-
get :new
|
12
|
-
assert_response :success
|
13
|
-
end
|
14
|
-
|
15
|
-
test "should create <%= file_name %>" do
|
16
|
-
assert_difference('<%= class_name %>.count') do
|
17
|
-
post :create, :<%= file_name %> => { }
|
18
|
-
end
|
19
|
-
|
20
|
-
assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>))
|
21
|
-
end
|
22
|
-
|
23
|
-
test "should show <%= file_name %>" do
|
24
|
-
get :show, :id => <%= table_name %>(:one).to_param
|
25
|
-
assert_response :success
|
26
|
-
end
|
27
|
-
|
28
|
-
test "should get edit" do
|
29
|
-
get :edit, :id => <%= table_name %>(:one).to_param
|
30
|
-
assert_response :success
|
31
|
-
end
|
32
|
-
|
33
|
-
test "should update <%= file_name %>" do
|
34
|
-
put :update, :id => <%= table_name %>(:one).to_param, :<%= file_name %> => { }
|
35
|
-
assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>))
|
36
|
-
end
|
37
|
-
|
38
|
-
test "should destroy <%= file_name %>" do
|
39
|
-
assert_difference('<%= class_name %>.count', -1) do
|
40
|
-
delete :destroy, :id => <%= table_name %>(:one).to_param
|
41
|
-
end
|
42
|
-
|
43
|
-
assert_redirected_to <%= table_name %>_path
|
44
|
-
end
|
45
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
body { background-color: #fff; color: #333; }
|
2
|
-
|
3
|
-
body, p, ol, ul, td {
|
4
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
-
font-size: 13px;
|
6
|
-
line-height: 18px;
|
7
|
-
}
|
8
|
-
|
9
|
-
pre {
|
10
|
-
background-color: #eee;
|
11
|
-
padding: 10px;
|
12
|
-
font-size: 11px;
|
13
|
-
}
|
14
|
-
|
15
|
-
a { color: #000; }
|
16
|
-
a:visited { color: #666; }
|
17
|
-
a:hover { color: #fff; background-color:#000; }
|
18
|
-
|
19
|
-
.fieldWithErrors {
|
20
|
-
padding: 2px;
|
21
|
-
background-color: red;
|
22
|
-
display: table;
|
23
|
-
}
|
24
|
-
|
25
|
-
#errorExplanation {
|
26
|
-
width: 400px;
|
27
|
-
border: 2px solid red;
|
28
|
-
padding: 7px;
|
29
|
-
padding-bottom: 12px;
|
30
|
-
margin-bottom: 20px;
|
31
|
-
background-color: #f0f0f0;
|
32
|
-
}
|
33
|
-
|
34
|
-
#errorExplanation h2 {
|
35
|
-
text-align: left;
|
36
|
-
font-weight: bold;
|
37
|
-
padding: 5px 5px 5px 15px;
|
38
|
-
font-size: 12px;
|
39
|
-
margin: -7px;
|
40
|
-
background-color: #c00;
|
41
|
-
color: #fff;
|
42
|
-
}
|
43
|
-
|
44
|
-
#errorExplanation p {
|
45
|
-
color: #333;
|
46
|
-
margin-bottom: 0;
|
47
|
-
padding: 5px;
|
48
|
-
}
|
49
|
-
|
50
|
-
#errorExplanation ul li {
|
51
|
-
font-size: 12px;
|
52
|
-
list-style: square;
|
53
|
-
}
|
54
|
-
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<h1>Listing <%= plural_name %></h1>
|
2
|
-
|
3
|
-
<table>
|
4
|
-
<tr>
|
5
|
-
<% for attribute in attributes -%>
|
6
|
-
<th><%= attribute.column.human_name %></th>
|
7
|
-
<% end -%>
|
8
|
-
</tr>
|
9
|
-
|
10
|
-
<%% @<%= plural_name %>.each do |<%= singular_name %>| %>
|
11
|
-
<tr>
|
12
|
-
<% for attribute in attributes -%>
|
13
|
-
<td><%%=h <%= singular_name %>.<%= attribute.name %> %></td>
|
14
|
-
<% end -%>
|
15
|
-
<td><%%= link_to 'Show', <%= singular_name %> %></td>
|
16
|
-
<td><%%= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
|
17
|
-
<td><%%= link_to 'Destroy', <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete %></td>
|
18
|
-
</tr>
|
19
|
-
<%% end %>
|
20
|
-
</table>
|
21
|
-
|
22
|
-
<br />
|
23
|
-
|
24
|
-
<%%= link_to 'New <%= singular_name %>', new_<%= singular_name %>_path %>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<% for attribute in attributes -%>
|
2
|
-
<p>
|
3
|
-
<b><%= attribute.column.human_name %>:</b>
|
4
|
-
<%%=h @<%= singular_name %>.<%= attribute.name %> %>
|
5
|
-
</p>
|
6
|
-
|
7
|
-
<% end -%>
|
8
|
-
|
9
|
-
<%%= link_to 'Edit', edit_<%= singular_name %>_path(@<%= singular_name %>) %> |
|
10
|
-
<%%= link_to 'Back', <%= plural_name %>_path %>
|