merb-gen 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,10 +30,9 @@ module Merb::Generators
30
30
  template :controller_none, :orm => :none do |template|
31
31
  template.source = "app/controllers/%file_name%.rb"
32
32
  template.destination = "app/controllers" / base_path / "#{file_name}.rb"
33
-
34
- self.add_resource_route(self.plural_model)
33
+ self.add_resource_route(self.plural_model) unless skip_route_definition?
35
34
  end
36
-
35
+
37
36
  [:index, :show, :edit, :new].each do |view|
38
37
  template "view_#{view}_none".to_sym, :template_engine => :erb, :orm => :none do |template|
39
38
  template.source = "app/views/%file_name%/#{view}.html.erb"
@@ -86,7 +85,11 @@ module Merb::Generators
86
85
  def properties
87
86
  []
88
87
  end
89
-
88
+
89
+ def skip_route_definition?
90
+ options[:pretend] || options[:delete]
91
+ end
92
+
90
93
  end
91
94
 
92
95
  add :resource_controller, ResourceControllerGenerator
@@ -78,7 +78,7 @@ end
78
78
 
79
79
  class ::Gem::SpecFetcher
80
80
  alias old_fetch fetch
81
- def fetch(dependency, all = false, matching_platform = true)
81
+ def fetch(dependency, all = false, matching_platform = true, prerelease = false)
82
82
  idx = Gem::SourceIndex.from_installed_gems
83
83
 
84
84
  reqs = dependency.version_requirements.requirements
@@ -95,7 +95,8 @@ module Merb
95
95
  end
96
96
  rescue ::Gem::LoadError => e
97
97
  self.class.error "Configuration could not be confirmed: #{e.message}"
98
- self.class.rollback_trans
98
+ # Don't rollback since its possibly the confirmation is just broken
99
+ # self.class.rollback_trans
99
100
  end
100
101
  self.class.info "Confirmed"
101
102
  end
@@ -0,0 +1,2 @@
1
+ --format specdoc
2
+ --colour
@@ -4,6 +4,10 @@
4
4
  use_test :<%= testing_framework %>
5
5
  use_template_engine :<%= template_engine %>
6
6
 
7
+ # If you need to use dependency immediately in this file you must add :immediate => true
8
+ # to dependency definition:
9
+ # dependency "merb-slices", :immediate => true
10
+ #
7
11
  # Specify a specific version of a dependency
8
12
  # dependency "RedCloth", "> 3.0"
9
13
 
@@ -1,7 +1,7 @@
1
1
  # dependencies are generated using a strict version, don't forget to edit the dependency versions when upgrading.
2
2
  merb_gems_version = "<%= merb_gems_version %>"
3
- dm_gems_version = "<%= dm_gems_version %>"
4
- do_gems_version = "<%= do_gems_version %>"
3
+ dm_gems_version = "~> <%= dm_gems_version %>"
4
+ do_gems_version = "~> <%= do_gems_version %>"
5
5
 
6
6
  # For more information about each component, please read http://wiki.merbivore.com/faqs/merb_components
7
7
  dependency "merb-core", merb_gems_version
@@ -0,0 +1,2 @@
1
+ --format specdoc
2
+ --colour
@@ -33,6 +33,13 @@
33
33
  <%= "# " unless template_engine == :erb %>use_template_engine :erb
34
34
  <%= "# " unless template_engine == :haml %>use_template_engine :haml
35
35
 
36
+ # If you need to use dependency immediately in this file you must add :immediate => true
37
+ # to dependency definition:
38
+ # dependency "merb-slices", :immediate => true
39
+ #
40
+ # Specify a specific version of a dependency
41
+ # dependency "RedCloth", "> 3.0"
42
+
36
43
  Merb::Config.use { |c|
37
44
  c[:framework] = { :public => [Merb.root / "public", nil] }
38
45
  c[:session_store] = 'none'
@@ -56,4 +63,4 @@ class <%= class_name %> < Merb::Controller
56
63
  def index
57
64
  "Hi, I am 'very flat' Merb application. I have everything in one single file and well suited for dynamic stub pages."
58
65
  end
59
- end
66
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-30 00:00:00 -07:00
12
+ date: 2009-11-03 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.0.12
23
+ version: 1.0.13
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: templater
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  requirements: []
236
236
 
237
237
  rubyforge_project: merb
238
- rubygems_version: 1.3.2
238
+ rubygems_version: 1.3.5
239
239
  signing_key:
240
240
  specification_version: 3
241
241
  summary: Generators suite for Merb.