merb-gen 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -40
- data/lib/generators/templates/application/common/Gemfile +6 -0
- data/lib/generators/templates/application/common/merb +1 -1
- data/lib/generators/templates/application/merb_core/config/init.rb +3 -3
- data/lib/generators/templates/application/merb_core/config/rack.rb +1 -1
- data/lib/generators/templates/application/merb_core/spec/spec_helper.rb +2 -0
- data/lib/generators/templates/application/merb_flat/config/init.rb +3 -2
- data/lib/generators/templates/application/merb_flat/spec/spec_helper.rb +2 -0
- data/lib/generators/templates/application/merb_stack/Gemfile +6 -0
- data/lib/generators/templates/application/merb_stack/config/rack.rb +1 -1
- data/lib/generators/templates/application/merb_stack/spec/spec_helper.rb +2 -0
- data/lib/generators/templates/application/merb_very_flat/application.rbt +5 -7
- data/lib/generators/templates/application/merb_very_flat/spec/spec_helper.rb +2 -0
- data/lib/merb-gen/version.rb +1 -1
- metadata +34 -23
data/Rakefile
CHANGED
@@ -1,49 +1,9 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
|
4
|
-
# Assume a typical dev checkout to fetch the current merb-core version
|
5
|
-
require File.expand_path('../../merb-core/lib/merb-core/version', __FILE__)
|
6
|
-
|
7
4
|
# Load this library's version information
|
8
5
|
require File.expand_path('../lib/merb-gen/version', __FILE__)
|
9
6
|
|
10
|
-
begin
|
11
|
-
|
12
|
-
gem 'jeweler', '~> 1.4'
|
13
|
-
require 'jeweler'
|
14
|
-
|
15
|
-
Jeweler::Tasks.new do |gemspec|
|
16
|
-
|
17
|
-
gemspec.version = Merb::Generators::VERSION.dup
|
18
|
-
|
19
|
-
gemspec.name = "merb-gen"
|
20
|
-
gemspec.description = "Merb plugin containing useful code generators"
|
21
|
-
gemspec.summary = "Merb plugin that provides a suite of code generators for Merb."
|
22
|
-
|
23
|
-
gemspec.authors = [ "Jonas Nicklas" ]
|
24
|
-
gemspec.email = "jonas.nicklas@gmail.com"
|
25
|
-
gemspec.homepage = "http://merbivore.com/"
|
26
|
-
|
27
|
-
gemspec.files = %w(LICENSE Rakefile README TODO) + Dir['{bin,lib,spec}/**/*']
|
28
|
-
|
29
|
-
# Runtime dependencies
|
30
|
-
gemspec.add_dependency('merb-core', "~> #{Merb::VERSION}")
|
31
|
-
gemspec.add_dependency "templater", ">= 1.0.0"
|
32
|
-
|
33
|
-
# Development dependencies
|
34
|
-
gemspec.add_development_dependency 'rspec', '>= 1.2.9'
|
35
|
-
|
36
|
-
# Executable files
|
37
|
-
gemspec.executables = 'merb-gen'
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
Jeweler::GemcutterTasks.new
|
42
|
-
|
43
|
-
rescue LoadError
|
44
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
45
|
-
end
|
46
|
-
|
47
7
|
require 'spec/rake/spectask'
|
48
8
|
Spec::Rake::SpecTask.new(:spec) do |spec|
|
49
9
|
spec.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
|
@@ -1,3 +1,5 @@
|
|
1
|
+
source :rubygems
|
2
|
+
|
1
3
|
# dependencies are generated using a strict version, don't forget to edit the dependency versions when upgrading.
|
2
4
|
merb_gems_version = "<%= merb_gems_version %>"
|
3
5
|
|
@@ -7,6 +9,10 @@ merb_gems_version = "<%= merb_gems_version %>"
|
|
7
9
|
gem "json_pure", ">= 1.1.7", :require => "json"
|
8
10
|
gem "merb-core", merb_gems_version
|
9
11
|
|
12
|
+
# Change to server of your choice
|
13
|
+
gem "thin"
|
14
|
+
|
10
15
|
<%= gems_for_orm(orm) %>
|
11
16
|
<%= gems_for_template_engine(template_engine) %>
|
12
17
|
<%= gems_for_testing_framework(testing_framework) %>
|
18
|
+
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# Go to http://wiki.merbivore.com/pages/init-rb
|
2
2
|
|
3
|
-
# Specify your dependencies in the Gemfile
|
4
|
-
<%= "
|
3
|
+
# Specify your dependencies in the Gemfile but require them explicitly
|
4
|
+
<%= "require 'merb_#{orm}'" unless orm == :none %>
|
5
5
|
use_test :<%= testing_framework %>
|
6
|
-
|
6
|
+
<%= "require 'merb-haml'" if template_engine == :haml %>
|
7
7
|
|
8
8
|
Merb::Config.use do |c|
|
9
9
|
c[:use_mutex] = false
|
@@ -19,4 +19,6 @@ Spec::Runner.configure do |config|
|
|
19
19
|
config.include(Merb::Test::ViewHelper)
|
20
20
|
config.include(Merb::Test::RouteHelper)
|
21
21
|
config.include(Merb::Test::ControllerHelper)
|
22
|
+
# You don't need this if you don't use Webrat directly in your specs
|
23
|
+
config.include(Merb::Test::WebratHelper)
|
22
24
|
end
|
@@ -1,8 +1,9 @@
|
|
1
1
|
# Go to http://wiki.merbivore.com/pages/init-rb
|
2
2
|
|
3
|
-
|
3
|
+
# Specify your dependencies in the Gemfile but require them explicitly
|
4
|
+
<%= "require 'merb_#{orm}'" unless orm == :none %>
|
4
5
|
use_test :<%= testing_framework %>
|
5
|
-
|
6
|
+
<%= "require 'merb-haml'" if template_engine == :haml %>
|
6
7
|
|
7
8
|
# Specify your dependencies in the Gemfile
|
8
9
|
|
@@ -23,4 +23,6 @@ Spec::Runner.configure do |config|
|
|
23
23
|
config.include(Merb::Test::ViewHelper)
|
24
24
|
config.include(Merb::Test::RouteHelper)
|
25
25
|
config.include(Merb::Test::ControllerHelper)
|
26
|
+
# You don't need this if you don't use Webrat directly in your specs
|
27
|
+
config.include(Merb::Test::WebratHelper)
|
26
28
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
source :rubygems
|
2
|
+
|
1
3
|
# Dependencies are generated using a strict version,
|
2
4
|
# Don't forget to edit the dependency versions when upgrading.
|
3
5
|
|
@@ -32,6 +34,9 @@ gem("merb-cache", merb_gems_version) do
|
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
37
|
+
# Change to server of your choice
|
38
|
+
gem "thin"
|
39
|
+
|
35
40
|
gem "data_objects", do_gems_version
|
36
41
|
gem "do_sqlite3", do_gems_version # If using another database, replace this
|
37
42
|
gem "dm-core", dm_gems_version
|
@@ -46,3 +51,4 @@ gem "dm-constraints", dm_gems_version
|
|
46
51
|
gem "merb_datamapper", merb_gems_version
|
47
52
|
<%= gems_for_template_engine(template_engine) %>
|
48
53
|
<%= gems_for_testing_framework(testing_framework) %>
|
54
|
+
|
@@ -19,6 +19,8 @@ Spec::Runner.configure do |config|
|
|
19
19
|
config.include(Merb::Test::ViewHelper)
|
20
20
|
config.include(Merb::Test::RouteHelper)
|
21
21
|
config.include(Merb::Test::ControllerHelper)
|
22
|
+
# You don't need this if you don't use Webrat directly in your specs
|
23
|
+
config.include(Merb::Test::WebratHelper)
|
22
24
|
|
23
25
|
config.before(:all) do
|
24
26
|
DataMapper.auto_migrate! if Merb.orm == :datamapper
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# run very flat apps with merb -I <app file>.
|
2
2
|
|
3
3
|
# Uncomment for DataMapper ORM
|
4
|
-
<%= "# " unless orm == :datamapper %>
|
4
|
+
<%= "# " unless orm == :datamapper %>require 'merb_datamapper'
|
5
5
|
|
6
6
|
# Uncomment for ActiveRecord ORM
|
7
|
-
<%= "# " unless orm == :activerecord %>
|
7
|
+
<%= "# " unless orm == :activerecord %>require 'merb_activerecord'
|
8
8
|
|
9
9
|
# Uncomment for Sequel ORM
|
10
|
-
<%= "# " unless orm == :sequel %>
|
10
|
+
<%= "# " unless orm == :sequel %>require 'merb_sequel'
|
11
11
|
|
12
12
|
|
13
13
|
#
|
@@ -29,9 +29,7 @@
|
|
29
29
|
#
|
30
30
|
|
31
31
|
# Merb can generate views for different template engines, choose your favourite as the default.
|
32
|
-
|
33
|
-
<%= "# " unless template_engine == :erb %>use_template_engine :erb
|
34
|
-
<%= "# " unless template_engine == :haml %>use_template_engine :haml
|
32
|
+
<%= "# " unless template_engine == :haml %>require 'merb-haml'
|
35
33
|
|
36
34
|
Merb::Config.use { |c|
|
37
35
|
c[:framework] = { :public => [Merb.root / "public", nil] }
|
@@ -56,4 +54,4 @@ class <%= class_name %> < Merb::Controller
|
|
56
54
|
def index
|
57
55
|
"Hi, I am 'very flat' Merb application. I have everything in one single file and well suited for dynamic stub pages."
|
58
56
|
end
|
59
|
-
end
|
57
|
+
end
|
@@ -23,4 +23,6 @@ Spec::Runner.configure do |config|
|
|
23
23
|
config.include(Merb::Test::ViewHelper)
|
24
24
|
config.include(Merb::Test::RouteHelper)
|
25
25
|
config.include(Merb::Test::ControllerHelper)
|
26
|
+
# You don't need this if you don't use Webrat directly in your specs
|
27
|
+
config.include(Merb::Test::WebratHelper)
|
26
28
|
end
|
data/lib/merb-gen/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jonas Nicklas
|
@@ -14,30 +15,34 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
-
default_executable:
|
18
|
+
date: 2010-06-15 00:00:00 +01:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: merb-core
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ~>
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 17
|
27
30
|
segments:
|
28
31
|
- 1
|
29
32
|
- 1
|
30
|
-
-
|
31
|
-
version: 1.1.
|
33
|
+
- 1
|
34
|
+
version: 1.1.1
|
32
35
|
type: :runtime
|
33
36
|
version_requirements: *id001
|
34
37
|
- !ruby/object:Gem::Dependency
|
35
38
|
name: templater
|
36
39
|
prerelease: false
|
37
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
38
42
|
requirements:
|
39
43
|
- - ">="
|
40
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 23
|
41
46
|
segments:
|
42
47
|
- 1
|
43
48
|
- 0
|
@@ -49,9 +54,11 @@ dependencies:
|
|
49
54
|
name: rspec
|
50
55
|
prerelease: false
|
51
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
52
58
|
requirements:
|
53
59
|
- - ">="
|
54
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 13
|
55
62
|
segments:
|
56
63
|
- 1
|
57
64
|
- 2
|
@@ -66,14 +73,11 @@ executables:
|
|
66
73
|
extensions: []
|
67
74
|
|
68
75
|
extra_rdoc_files:
|
69
|
-
- LICENSE
|
70
76
|
- README
|
77
|
+
- LICENSE
|
71
78
|
- TODO
|
72
79
|
files:
|
73
|
-
- LICENSE
|
74
|
-
- README
|
75
80
|
- Rakefile
|
76
|
-
- TODO
|
77
81
|
- bin/merb-gen
|
78
82
|
- lib/generators/controller.rb
|
79
83
|
- lib/generators/fcgi.rb
|
@@ -91,11 +95,11 @@ files:
|
|
91
95
|
- lib/generators/resource.rb
|
92
96
|
- lib/generators/resource_controller.rb
|
93
97
|
- lib/generators/session_migration.rb
|
94
|
-
- lib/generators/templates/application/common/Gemfile
|
95
|
-
- lib/generators/templates/application/common/Rakefile
|
96
98
|
- lib/generators/templates/application/common/dotgitignore
|
99
|
+
- lib/generators/templates/application/common/Gemfile
|
97
100
|
- lib/generators/templates/application/common/jquery.js
|
98
101
|
- lib/generators/templates/application/common/merb
|
102
|
+
- lib/generators/templates/application/common/Rakefile
|
99
103
|
- lib/generators/templates/application/merb_core/app/controllers/application.rb
|
100
104
|
- lib/generators/templates/application/merb_core/app/controllers/exceptions.rb
|
101
105
|
- lib/generators/templates/application/merb_core/app/helpers/global_helpers.rb
|
@@ -128,24 +132,23 @@ files:
|
|
128
132
|
- lib/generators/templates/application/merb_core/spec/spec.opts
|
129
133
|
- lib/generators/templates/application/merb_core/spec/spec_helper.rb
|
130
134
|
- lib/generators/templates/application/merb_core/test/test_helper.rb
|
131
|
-
- lib/generators/templates/application/merb_flat/README.txt
|
132
135
|
- lib/generators/templates/application/merb_flat/application.rbt
|
133
136
|
- lib/generators/templates/application/merb_flat/config/framework.rb
|
134
137
|
- lib/generators/templates/application/merb_flat/config/init.rb
|
138
|
+
- lib/generators/templates/application/merb_flat/README.txt
|
135
139
|
- lib/generators/templates/application/merb_flat/spec/spec_helper.rb
|
136
140
|
- lib/generators/templates/application/merb_flat/test/test_helper.rb
|
137
141
|
- lib/generators/templates/application/merb_flat/views/foo.html.erb
|
142
|
+
- lib/generators/templates/application/merb_plugin/lib/%base_name%/merbtasks.rb
|
143
|
+
- lib/generators/templates/application/merb_plugin/lib/%base_name%.rb
|
138
144
|
- lib/generators/templates/application/merb_plugin/LICENSE
|
139
|
-
- lib/generators/templates/application/merb_plugin/README
|
140
145
|
- lib/generators/templates/application/merb_plugin/Rakefile
|
141
|
-
- lib/generators/templates/application/merb_plugin/
|
142
|
-
- lib/generators/templates/application/merb_plugin/lib/%base_name%.rb
|
143
|
-
- lib/generators/templates/application/merb_plugin/lib/%base_name%/merbtasks.rb
|
146
|
+
- lib/generators/templates/application/merb_plugin/README
|
144
147
|
- lib/generators/templates/application/merb_plugin/spec/%base_name%_spec.rb
|
145
148
|
- lib/generators/templates/application/merb_plugin/spec/spec_helper.rb
|
146
149
|
- lib/generators/templates/application/merb_plugin/test/%base_name%_test.rb
|
147
150
|
- lib/generators/templates/application/merb_plugin/test/test_helper.rb
|
148
|
-
- lib/generators/templates/application/
|
151
|
+
- lib/generators/templates/application/merb_plugin/TODO
|
149
152
|
- lib/generators/templates/application/merb_stack/app/controllers/application.rb
|
150
153
|
- lib/generators/templates/application/merb_stack/app/controllers/exceptions.rb
|
151
154
|
- lib/generators/templates/application/merb_stack/app/helpers/global_helpers.rb
|
@@ -155,7 +158,6 @@ files:
|
|
155
158
|
- lib/generators/templates/application/merb_stack/autotest/discover.rb
|
156
159
|
- lib/generators/templates/application/merb_stack/autotest/merb.rb
|
157
160
|
- lib/generators/templates/application/merb_stack/autotest/merb_rspec.rb
|
158
|
-
- lib/generators/templates/application/merb_stack/config.ru
|
159
161
|
- lib/generators/templates/application/merb_stack/config/database.yml
|
160
162
|
- lib/generators/templates/application/merb_stack/config/environments/development.rb
|
161
163
|
- lib/generators/templates/application/merb_stack/config/environments/production.rb
|
@@ -165,6 +167,7 @@ files:
|
|
165
167
|
- lib/generators/templates/application/merb_stack/config/init.rb
|
166
168
|
- lib/generators/templates/application/merb_stack/config/rack.rb
|
167
169
|
- lib/generators/templates/application/merb_stack/config/router.rb
|
170
|
+
- lib/generators/templates/application/merb_stack/config.ru
|
168
171
|
- lib/generators/templates/application/merb_stack/doc/rdoc/generators/merb_generator.rb
|
169
172
|
- lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/api_grease.js
|
170
173
|
- lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/index.html.erb
|
@@ -172,6 +175,7 @@ files:
|
|
172
175
|
- lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb.rb
|
173
176
|
- lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/merb_doc_styles.css
|
174
177
|
- lib/generators/templates/application/merb_stack/doc/rdoc/generators/template/merb/prototype.js
|
178
|
+
- lib/generators/templates/application/merb_stack/Gemfile
|
175
179
|
- lib/generators/templates/application/merb_stack/merb/merb-auth/setup.rb
|
176
180
|
- lib/generators/templates/application/merb_stack/merb/merb-auth/strategies.rb
|
177
181
|
- lib/generators/templates/application/merb_stack/merb/session/session.rb
|
@@ -207,13 +211,13 @@ files:
|
|
207
211
|
- lib/generators/templates/component/resource_controller/app/views/%file_name%/show.html.erb
|
208
212
|
- lib/generators/templates/component/resource_controller/spec/requests/%file_name%_spec.rb
|
209
213
|
- lib/generators/templates/component/resource_controller/test/controllers/%file_name%_test.rb
|
210
|
-
- lib/merb-gen.rb
|
211
214
|
- lib/merb-gen/app_generator.rb
|
212
215
|
- lib/merb-gen/generator.rb
|
213
216
|
- lib/merb-gen/named_generator.rb
|
214
217
|
- lib/merb-gen/namespaced_generator.rb
|
215
218
|
- lib/merb-gen/templater.rb
|
216
219
|
- lib/merb-gen/version.rb
|
220
|
+
- lib/merb-gen.rb
|
217
221
|
- spec/controller_spec.rb
|
218
222
|
- spec/fcgi_spec.rb
|
219
223
|
- spec/fixtures/results/no_modules.test
|
@@ -238,33 +242,40 @@ files:
|
|
238
242
|
- spec/session_migration_spec.rb
|
239
243
|
- spec/spec.opts
|
240
244
|
- spec/spec_helper.rb
|
245
|
+
- README
|
246
|
+
- LICENSE
|
247
|
+
- TODO
|
241
248
|
has_rdoc: true
|
242
249
|
homepage: http://merbivore.com/
|
243
250
|
licenses: []
|
244
251
|
|
245
252
|
post_install_message:
|
246
|
-
rdoc_options:
|
247
|
-
|
253
|
+
rdoc_options: []
|
254
|
+
|
248
255
|
require_paths:
|
249
256
|
- lib
|
250
257
|
required_ruby_version: !ruby/object:Gem::Requirement
|
258
|
+
none: false
|
251
259
|
requirements:
|
252
260
|
- - ">="
|
253
261
|
- !ruby/object:Gem::Version
|
262
|
+
hash: 3
|
254
263
|
segments:
|
255
264
|
- 0
|
256
265
|
version: "0"
|
257
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
|
+
none: false
|
258
268
|
requirements:
|
259
269
|
- - ">="
|
260
270
|
- !ruby/object:Gem::Version
|
271
|
+
hash: 3
|
261
272
|
segments:
|
262
273
|
- 0
|
263
274
|
version: "0"
|
264
275
|
requirements: []
|
265
276
|
|
266
277
|
rubyforge_project:
|
267
|
-
rubygems_version: 1.3.
|
278
|
+
rubygems_version: 1.3.7
|
268
279
|
signing_key:
|
269
280
|
specification_version: 3
|
270
281
|
summary: Merb plugin that provides a suite of code generators for Merb.
|