rubigen 1.1.1 → 1.2.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.
data/History.txt CHANGED
@@ -1,3 +1,12 @@
1
+ == 1.2.0 2008-02-14
2
+
3
+ * application_generator's bin now looks for generator within local source, not
4
+ within an install gem - so the bin/foo can be run in development without
5
+ requiring installation.
6
+ * New collision option *i* - ignore all collisions; works like *a* which forces
7
+ all collisions to overwrite existing files; i skips all collisions.
8
+ * Supported test scope for install_rubigen_scripts: javascript_test
9
+
1
10
  == 1.1.1 2007-11-08
2
11
 
3
12
  * active_support is now a dependency of this gem on install (it was being used
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env ruby -wKU
2
+
1
3
  require 'rubygems'
2
4
  require 'rubigen'
3
5
 
data/bin/ruby_app CHANGED
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env ruby -wKU
2
+
1
3
  require File.dirname(__FILE__) + '/../lib/rubigen/version'
2
4
  if %w(--version -v).include? ARGV.first
3
5
  puts "Rails #{RubiGen::VERSION::STRING}"
@@ -64,7 +64,7 @@ EOS
64
64
  end
65
65
 
66
66
  def default_scopes
67
- if (scopes.map { |s| s.to_s } & %w[test_unit rspec test_spec mini_spec]).blank?
67
+ if (scopes.map { |s| s.to_s } & %w[test_unit rspec test_spec mini_spec javascript_test]).blank?
68
68
  scopes << :test_unit
69
69
  end
70
70
  end
@@ -92,7 +92,7 @@ module RubiGen
92
92
  private
93
93
  # Ask the user interactively whether to force collision.
94
94
  def force_file_collision?(destination, src, dst, file_options = {}, &block)
95
- $stdout.print "overwrite #{destination}? [Ynaqd] "
95
+ $stdout.print "overwrite #{destination}? [Ynaiqd] "
96
96
  case $stdin.gets
97
97
  when /d/i
98
98
  Tempfile.open(File.basename(destination), File.dirname(dst)) do |temp|
@@ -105,11 +105,15 @@ module RubiGen
105
105
  when /a/i
106
106
  $stdout.puts "forcing #{spec.name}"
107
107
  options[:collision] = :force
108
+ when /i/i
109
+ $stdout.puts "ignoring #{spec.name}"
110
+ options[:collision] = :skip
108
111
  when /q/i
109
112
  $stdout.puts "aborting #{spec.name}"
110
113
  raise SystemExit
111
114
  when /n/i then :skip
112
- else :force
115
+ when /y/i then :force
116
+ else force_file_collision?(destination, src, dst, file_options, &block)
113
117
  end
114
118
  rescue
115
119
  retry
@@ -6,7 +6,7 @@ module RubiGen::Scripts
6
6
 
7
7
  protected
8
8
  def banner
9
- "Usage: #{$0} [options] scaffold"
9
+ "Usage: #{$0} [options] generator"
10
10
  end
11
11
  end
12
12
  end
@@ -1,8 +1,8 @@
1
1
  module Rubigen #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
- MINOR = 1
5
- TINY = 1
4
+ MINOR = 2
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -8,5 +8,8 @@ if %w(-v --version).include? ARGV.first
8
8
  end
9
9
 
10
10
  require 'rubigen/scripts/generate'
11
- RubiGen::Base.use_application_sources! <%= name.to_sym.inspect %>
11
+ source = RubiGen::PathSource.new(:application,
12
+ File.join(File.dirname(__FILE__), "../app_generators"))
13
+ RubiGen::Base.reset_sources
14
+ RubiGen::Base.append_sources source
12
15
  RubiGen::Scripts::Generate.new.run(ARGV, :generator => '<%= name %>')
data/website/index.html CHANGED
@@ -31,7 +31,7 @@
31
31
  <h1>rubigen</h1>
32
32
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rubigen"; return false'>
33
33
  <p>Get Version</p>
34
- <a href="http://rubyforge.org/projects/rubigen" class="numbers">1.1.1</a>
34
+ <a href="http://rubyforge.org/projects/rubigen" class="numbers">1.2.0</a>
35
35
  </div>
36
36
  <h1>Ruby Generator Framework</h1>
37
37
 
@@ -1,3 +1,3 @@
1
1
  // Announcement JS file
2
- var version = "1.1.1";
2
+ var version = "1.2.0";
3
3
  MagicAnnouncement.show('compositekeys', version);
data/website/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // Version JS file
2
- var version = "1.1.1";
2
+ var version = "1.2.0";
3
3
 
4
4
  document.write(" - " + version);
metadata CHANGED
@@ -1,34 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4.3
3
- specification_version: 1
4
2
  name: rubigen
5
3
  version: !ruby/object:Gem::Version
6
- version: 1.1.1
7
- date: 2007-11-08 00:00:00 +10:00
8
- summary: "A framework to allow Ruby applications to generate file/folder stubs (like the rails command does for Ruby on Rails, and the \xE2\x80\x98script/generate\xE2\x80\x99 command within a Rails application during development)."
9
- require_paths:
10
- - lib
11
- email: drnicwilliams@gmail.com
12
- homepage: http://rubigen.rubyforge.org
13
- rubyforge_project: rubigen
14
- description: "A framework to allow Ruby applications to generate file/folder stubs (like the rails command does for Ruby on Rails, and the \xE2\x80\x98script/generate\xE2\x80\x99 command within a Rails application during development)."
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 1.2.0
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Dr Nic Williams
31
8
  - Jeremy Kemper
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2008-02-14 00:00:00 +10:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: activesupport
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.4.4
24
+ version:
25
+ description: "A framework to allow Ruby applications to generate file/folder stubs (like the rails command does for Ruby on Rails, and the \xE2\x80\x98script/generate\xE2\x80\x99 command within a Rails application during development)."
26
+ email: drnicwilliams@gmail.com
27
+ executables:
28
+ - install_rubigen_scripts
29
+ - ruby_app
30
+ extensions: []
31
+
32
+ extra_rdoc_files:
33
+ - History.txt
34
+ - License.txt
35
+ - Manifest.txt
36
+ - README.txt
37
+ - Todo.txt
38
+ - app_generators/ruby_app/templates/README.txt
39
+ - website/index.txt
40
+ - website/version-raw.txt
41
+ - website/version.txt
32
42
  files:
33
43
  - History.txt
34
44
  - License.txt
@@ -114,6 +124,33 @@ files:
114
124
  - website/version-raw.txt
115
125
  - website/version.js
116
126
  - website/version.txt
127
+ has_rdoc: true
128
+ homepage: http://rubigen.rubyforge.org
129
+ post_install_message:
130
+ rdoc_options:
131
+ - --main
132
+ - README.txt
133
+ require_paths:
134
+ - lib
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: "0"
140
+ version:
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: "0"
146
+ version:
147
+ requirements: []
148
+
149
+ rubyforge_project: rubigen
150
+ rubygems_version: 1.0.1
151
+ signing_key:
152
+ specification_version: 2
153
+ summary: "A framework to allow Ruby applications to generate file/folder stubs (like the rails command does for Ruby on Rails, and the \xE2\x80\x98script/generate\xE2\x80\x99 command within a Rails application during development)."
117
154
  test_files:
118
155
  - test/examples_from_rails/test_rails_resource_generator.rb
119
156
  - test/examples_from_rails/test_rails_scaffold_generator.rb
@@ -125,33 +162,3 @@ test_files:
125
162
  - test/test_helper.rb
126
163
  - test/test_install_rubigen_scripts_generator.rb
127
164
  - test/test_lookup.rb
128
- rdoc_options:
129
- - --main
130
- - README.txt
131
- extra_rdoc_files:
132
- - History.txt
133
- - License.txt
134
- - Manifest.txt
135
- - README.txt
136
- - Todo.txt
137
- - app_generators/ruby_app/templates/README.txt
138
- - website/index.txt
139
- - website/version-raw.txt
140
- - website/version.txt
141
- executables:
142
- - install_rubigen_scripts
143
- - ruby_app
144
- extensions: []
145
-
146
- requirements: []
147
-
148
- dependencies:
149
- - !ruby/object:Gem::Dependency
150
- name: activesupport
151
- version_requirement:
152
- version_requirements: !ruby/object:Gem::Version::Requirement
153
- requirements:
154
- - - ">="
155
- - !ruby/object:Gem::Version
156
- version: 1.4.4
157
- version: