rabal 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,4 +1,7 @@
1
1
  = Changelog
2
+ === Version 0.2.3
3
+
4
+ * fix compatibility bug with main 2.8.0
2
5
 
3
6
  === Version 0.2.2
4
7
 
data/README CHANGED
@@ -151,6 +151,7 @@ See the README.PLUGIN for information on how to develop your own.
151
151
  * rake
152
152
  * rspec
153
153
  * rcov
154
+ * mktemp
154
155
 
155
156
  == BUGS
156
157
 
@@ -16,9 +16,9 @@ module Rabal
16
16
  attr_accessor :app_argv
17
17
 
18
18
  # used for testing mainly
19
- attr_reader :stdin
20
- attr_reader :stdout
21
- attr_reader :stderr
19
+ attr_reader :stdin
20
+ attr_reader :stdout
21
+ attr_reader :stderr
22
22
 
23
23
 
24
24
  def initialize(stdin = $stdin, stdout = $stdout, stderr = $stderr)
@@ -93,6 +93,7 @@ module Rabal
93
93
  def main
94
94
  return @main if @main
95
95
  @main = Main.new(app_argv) {
96
+
96
97
  description Rabal::SPEC.description
97
98
  author Rabal::SPEC.author
98
99
  version Rabal::VERSION
@@ -100,6 +101,7 @@ module Rabal
100
101
  # Project, the whole reason rabal exists
101
102
  argument("project") {
102
103
  description "The project on which rabal is executing."
104
+ required
103
105
  }
104
106
 
105
107
  # Global Options
@@ -233,10 +235,10 @@ module Rabal
233
235
  # if the params for the logfile were given then open them up and
234
236
  #
235
237
  def logfile_and_level_if_necessary
236
- if @main.params[:logfile].given? then
238
+ if main.params['logfile'].given? then
237
239
  Log.logger = main.params["logfile"].value
238
240
  end
239
- Log.logger.level = ::Logger::SEV_LABEL.index(main.params[:verbosity].value)
241
+ Log.logger.level = ::Logger::SEV_LABEL.index(main.params['verbosity'].value)
240
242
  Log.debug "Logger initialized"
241
243
  end
242
244
  end
@@ -31,7 +31,7 @@ module Rabal
31
31
  spec.files = spec.test_files + spec.extra_rdoc_files +
32
32
  FileList["lib/**/*.rb", "resources/**/*"]
33
33
 
34
- spec.add_dependency("main", ">= 0.0.2")
34
+ spec.add_dependency("main", ">= 2.8.0")
35
35
  spec.add_dependency("gem_plugin", ">= 0.2.1")
36
36
  spec.add_dependency("highline", ">= 1.2.9")
37
37
  spec.required_ruby_version = ">= 1.8.5"
@@ -11,26 +11,19 @@ module Rabal
11
11
  class Usage
12
12
 
13
13
  attr_reader :app
14
- attr_reader :old_usage
15
14
 
16
15
  def initialize(app)
17
16
  @app = app
18
- @old_usage = {}
19
- app.main.usage.each_pair do |key,value|
20
- @old_usage[key] = value
21
- end
22
17
  end
23
18
 
24
19
  # some of the generated usage is quite useful, others we want
25
20
  # to dump, or rename
26
21
  def to_s
27
22
  u = ::Main::Usage.new
28
- # just transfer directly over these chunks
29
- %w[name synopsis].each do |chunk|
30
- u[chunk.dup] = old_usage[chunk].to_s
31
- end
32
23
 
33
- u['description'] = ::Main::Util.columnize(old_usage['description'].to_s, :indent => 6, :width => 78)
24
+ u['name'] = "#{app.main.name} v#{app.main.version}"
25
+ u['synopsis'] = app.main.synopsis
26
+ u['description'] = ::Main::Util.columnize(app.main.description, :indent => 6, :width => 78)
34
27
 
35
28
  arguments = app.main.parameters.select{|p| p.type == :argument}
36
29
  global_options = app.main.parameters.select{|p| p.type == :option and app.global_option_names.include?(p.name) }
@@ -68,7 +61,10 @@ module Rabal
68
61
 
69
62
  module_options.each { |k,v| u[k] = v }
70
63
 
71
- u['author'] = old_usage['author']
64
+
65
+ u['author'] = app.main.author
66
+ # fake out usage so that it allows no parameters
67
+ u.main = OpenStruct.new( { :parameters => [] } )
72
68
  u.to_s
73
69
  end
74
70
 
@@ -4,7 +4,7 @@ module Rabal
4
4
  class Version
5
5
  MAJOR = 0
6
6
  MINOR = 2
7
- BUILD = 2
7
+ BUILD = 3
8
8
 
9
9
  class << self
10
10
  def to_a
@@ -6,12 +6,19 @@ describe Rabal::Application do
6
6
  before(:each) do
7
7
  @working_dir = my_temp_dir
8
8
  @before = Dir.pwd
9
- @base_tree = Set.new(%w(README Rakefile CHANGES LICENSE lib lib/spec-proj lib/new_spec_proj.rb lib/spec-proj/version.rb lib/spec-proj/specification.rb lib/spec-proj/gemspec.rb))
9
+ @base_tree = Set.new(%w[README Rakefile CHANGES LICENSE
10
+ lib lib/spec-proj lib/spec_proj.rb lib/spec-proj/version.rb lib/spec-proj/specification.rb lib/spec-proj/gemspec.rb
11
+ tasks tasks/announce.rake tasks/distribution.rake tasks/documentation.rake tasks/setup.rb])
10
12
  @stdin = StringIO.new
11
13
  @stdout = StringIO.new
12
14
  @stderr = StringIO.new
13
- @application = Rabal::Application.new(@stdin,@stdout,@stderr)
15
+
14
16
  Dir.chdir(@working_dir)
17
+
18
+ # this must come after chdir
19
+ @application = Rabal::Application.new(@stdin,@stdout,@stderr)
20
+
21
+ Rabal.application = @application
15
22
  end
16
23
 
17
24
  after(:each) do
@@ -19,38 +26,38 @@ describe Rabal::Application do
19
26
  FileUtils.rm_rf @working_dir
20
27
  end
21
28
 
22
- it "should exit 0 on --help" do
29
+ it "should have a good default tree " do
23
30
  begin
24
- @application.run(%w[--help])
31
+ @application.run(%w[--core-author=Testing --core-email=testing@example.com --license-flavor=mit spec-proj])
25
32
  rescue SystemExit => se
26
33
  se.status.should == 0
34
+ find_in("spec-proj").sort.should == @base_tree.sort
27
35
  end
28
36
  end
29
37
 
30
- it "should output to stderr on bad parameters" do
31
- begin
32
- @application.run(%w[--blah])
33
- rescue SystemExit => se
34
- se.status.should == 1
35
- @stderr.string.should =~ /unrecognized option `--blah'/m
36
- end
37
- end
38
-
39
- it "should have allow for plugin options" do
40
- begin
41
- @application.run(%w[--use-all --help])
42
- rescue SystemExit => se
43
- se.status.should == 0
44
- end
45
- end
46
-
47
- # it "should have a good default tree " do
48
- # begin
49
- # Rabal::Application.new(@stdin,@stdout,@stderr).run(%w[--core-author=Testing --core-email=testing@example.com --license-flavor=mit new-rabal-proj])
50
- # rescue SystemExit => se
51
- # se.status.should == 0
52
- # find_in("new-rabal-proj").sort.should == @base_tree.sort
53
- # end
54
- # end
38
+ it "should exit 1 on --help" do
39
+ begin
40
+ @application.run(%w[--help])
41
+ rescue SystemExit => se
42
+ se.status.should == 1
43
+ end
44
+ end
45
+
46
+ it "should output to stderr on bad parameters" do
47
+ begin
48
+ @application.run(%w[--blah])
49
+ rescue SystemExit => se
50
+ se.status.should == 1
51
+ #@stderr.string.should =~ /unrecognized option `--blah'/m
52
+ end
53
+ end
54
+
55
+ it "should have allow for plugin options" do
56
+ begin
57
+ @application.run(%w[--use-all --help])
58
+ rescue SystemExit => se
59
+ se.status.should == 1
60
+ end
61
+ end
55
62
  end
56
63
 
metadata CHANGED
@@ -1,33 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
3
- specification_version: 1
4
2
  name: rabal
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.2.2
7
- date: 2007-11-07 00:00:00 -07:00
8
- summary: A tool for bootstrapping project development
9
- require_paths:
10
- - lib
11
- email: jeremy@hinegardner.org
12
- homepage: http://copiousfreetime.rubyforge.org/rabal/
13
- rubyforge_project: copiousfreetime
14
- description: Ruby Architecture for Building Applications and Libraries. Rabal is a commandline application for bootstrapping, packaging and distributing ruby projects.
15
- autorequire:
16
- default_executable: rabal
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: 1.8.5
24
- version:
25
- platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
4
+ version: 0.2.3
5
+ platform: ""
29
6
  authors:
30
7
  - Jeremy Hinegardner
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-02-10 00:00:00 -07:00
13
+ default_executable: rabal
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: main
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.8.0
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: gem_plugin
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.2.1
32
+ version:
33
+ - !ruby/object:Gem::Dependency
34
+ name: highline
35
+ version_requirement:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.2.9
41
+ version:
42
+ description: Ruby Architecture for Building Applications and Libraries. Rabal is a commandline application for bootstrapping, packaging and distributing ruby projects.
43
+ email: jeremy@hinegardner.org
44
+ executables:
45
+ - rabal
46
+ extensions: []
47
+
48
+ extra_rdoc_files:
49
+ - CHANGES
50
+ - COPYING
51
+ - LICENSE
52
+ - Rakefile
53
+ - README
54
+ - README.PLUGIN
31
55
  files:
32
56
  - spec/action_tree_spec.rb
33
57
  - spec/application_spec.rb
@@ -128,6 +152,37 @@ files:
128
152
  - resources/trees/website/tasks/site.rake.erb
129
153
  - resources/trees/website/website
130
154
  - bin/rabal
155
+ has_rdoc: true
156
+ homepage: http://copiousfreetime.rubyforge.org/rabal/
157
+ post_install_message:
158
+ rdoc_options:
159
+ - --line-numbers
160
+ - --inline-source
161
+ - --main
162
+ - README
163
+ - --title
164
+ - "'rabal -- A tool for bootstrapping project development'"
165
+ require_paths:
166
+ - lib
167
+ required_ruby_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ version: 1.8.5
172
+ version:
173
+ required_rubygems_version: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: "0"
178
+ version:
179
+ requirements: []
180
+
181
+ rubyforge_project: copiousfreetime
182
+ rubygems_version: 0.9.5
183
+ signing_key:
184
+ specification_version: 2
185
+ summary: A tool for bootstrapping project development
131
186
  test_files:
132
187
  - spec/action_tree_spec.rb
133
188
  - spec/application_spec.rb
@@ -144,51 +199,3 @@ test_files:
144
199
  - spec/tree_spec.rb
145
200
  - spec/utils_spec.rb
146
201
  - spec/version_spec.rb
147
- rdoc_options:
148
- - --line-numbers
149
- - --inline-source
150
- - --main
151
- - README
152
- - --title
153
- - "'rabal -- A tool for bootstrapping project development'"
154
- extra_rdoc_files:
155
- - CHANGES
156
- - COPYING
157
- - LICENSE
158
- - Rakefile
159
- - README
160
- - README.PLUGIN
161
- executables:
162
- - rabal
163
- extensions: []
164
-
165
- requirements: []
166
-
167
- dependencies:
168
- - !ruby/object:Gem::Dependency
169
- name: main
170
- version_requirement:
171
- version_requirements: !ruby/object:Gem::Version::Requirement
172
- requirements:
173
- - - ">="
174
- - !ruby/object:Gem::Version
175
- version: 0.0.2
176
- version:
177
- - !ruby/object:Gem::Dependency
178
- name: gem_plugin
179
- version_requirement:
180
- version_requirements: !ruby/object:Gem::Version::Requirement
181
- requirements:
182
- - - ">="
183
- - !ruby/object:Gem::Version
184
- version: 0.2.1
185
- version:
186
- - !ruby/object:Gem::Dependency
187
- name: highline
188
- version_requirement:
189
- version_requirements: !ruby/object:Gem::Version::Requirement
190
- requirements:
191
- - - ">="
192
- - !ruby/object:Gem::Version
193
- version: 1.2.9
194
- version: