shoe 0.6.0 → 0.6.1
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/CHANGELOG.rdoc +8 -0
- data/bin/shoe +1 -1
- data/data/shoe/templates/gemspec.erb +3 -1
- data/data/shoe/templates/manpage.erb +3 -3
- data/data/shoe/templates/test_helper.erb +7 -0
- data/features/generator.feature +1 -1
- data/lib/shoe.rb +2 -2
- data/lib/shoe/extensions/option_parser.rb +37 -8
- data/lib/shoe/extensions/pathname.rb +1 -1
- data/lib/shoe/tasks/cucumber.rb +1 -1
- data/lib/shoe/tasks/release.rb +1 -1
- data/lib/shoe/tasks/ronn.rb +1 -1
- metadata +5 -5
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== 0.6.1 -- 2010 April 22
|
2
|
+
|
3
|
+
* Reformat warning messages.
|
4
|
+
* Sample-require redgreen in the generated test/helper.
|
5
|
+
* Include common dvelopment dependencies in the generated gemspec.
|
6
|
+
* Fix a couple of typos.
|
7
|
+
* Document extensions to OptionParser.
|
8
|
+
|
1
9
|
== 0.6.0 -- 2010 April 20
|
2
10
|
|
3
11
|
* Add --webcvs to rdoc_options in generated gemspec.
|
data/bin/shoe
CHANGED
@@ -20,8 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
# You may find these helpful:
|
21
21
|
# spec.requirements = ['git'] # If your library shells out to git
|
22
22
|
# spec.required_rubygems_version = ">= 1.3.6" # If you depend on prerelease gems
|
23
|
-
# spec.add_bundler_dependencies # I'm not sure how to use this yet...
|
24
23
|
# spec.add_runtime_dependency 'nokogiri' # Or what have you
|
24
|
+
# spec.add_development_dependency 'cucumber'
|
25
|
+
# spec.add_development_dependency 'redgreen'
|
26
|
+
# spec.add_development_dependency 'ronn'
|
25
27
|
spec.add_development_dependency 'shoe'
|
26
28
|
|
27
29
|
# This may not be the best way to select files for inclusion in your gem, but
|
@@ -11,14 +11,14 @@ Write your description here.
|
|
11
11
|
|
12
12
|
## OPTIONS
|
13
13
|
|
14
|
-
`<%= name %>` also responds to the
|
14
|
+
`<%= name %>` also responds to the following standard options:
|
15
15
|
|
16
16
|
* `-h`, `--help`:
|
17
17
|
Print a help message and exit.
|
18
18
|
|
19
19
|
* `-v`, `--version`[=all]:
|
20
|
-
Print
|
21
|
-
version numbers of
|
20
|
+
Print `<%= name %>`'s version number and exit. If `=all` is given, also print
|
21
|
+
version numbers of `<%= name %>`'s dependencies. (This is standard `optparse` behavior
|
22
22
|
that deserves more attention!)
|
23
23
|
|
24
24
|
## AUTHOR
|
@@ -1,2 +1,9 @@
|
|
1
1
|
require 'test/unit'
|
2
2
|
require '<%= name %>'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'redgreen' if $stdout.tty?
|
6
|
+
rescue LoadError
|
7
|
+
# It's nice not to have hard dependencies on any gems for testing, so that
|
8
|
+
# it's super-easy for your users to run `gem check --test <%= name %>.`
|
9
|
+
end
|
data/features/generator.feature
CHANGED
@@ -27,6 +27,6 @@ Feature: Getting started
|
|
27
27
|
Given I have created a directory called "my_project"
|
28
28
|
And I have created a file called "my_project/Rakefile" containing "# RAKEFILE CONTENTS"
|
29
29
|
When I run shoe inside "my_project"
|
30
|
-
Then I should see "
|
30
|
+
Then I should see "WARN: not clobbering existing Rakefile" on standard error
|
31
31
|
And the contents of "my_project/Rakefile" should still be "# RAKEFILE CONTENTS"
|
32
32
|
|
data/lib/shoe.rb
CHANGED
@@ -3,7 +3,7 @@ require 'rbconfig'
|
|
3
3
|
require 'rbconfig/datadir'
|
4
4
|
|
5
5
|
module Shoe
|
6
|
-
VERSION = '0.6.
|
6
|
+
VERSION = '0.6.1'
|
7
7
|
|
8
8
|
autoload :Extensions, 'shoe/extensions'
|
9
9
|
autoload :Generator, 'shoe/generator'
|
@@ -13,7 +13,7 @@ module Shoe
|
|
13
13
|
@@datadir ||= begin
|
14
14
|
datadir = RbConfig.datadir('shoe')
|
15
15
|
if !File.exist?(datadir)
|
16
|
-
warn "#{datadir} does not exist
|
16
|
+
warn "WARN: #{datadir} does not exist.\n Trying again with relative data directory..."
|
17
17
|
datadir = File.expand_path('../../data/shoe', __FILE__)
|
18
18
|
end
|
19
19
|
Pathname.new(datadir)
|
@@ -1,23 +1,52 @@
|
|
1
1
|
module Shoe
|
2
2
|
module Extensions
|
3
3
|
|
4
|
+
# This extension allows for default options in OptionParser, processing
|
5
|
+
# them before any given options and appending them nicely to the help
|
6
|
+
# message. (It also does the conventional thing and errors with usage when
|
7
|
+
# there's trouble parsing options.)
|
8
|
+
#
|
9
|
+
# Note that it's important to use #order rather than #permute, to ensure
|
10
|
+
# that the given options have a chance to override the defaults. (These are
|
11
|
+
# <tt>POSIX</tt>-ly correct semantics.)
|
12
|
+
#
|
13
|
+
# To use:
|
14
|
+
# parser = OptionsParser.new do |opts|
|
15
|
+
# opts.extend(Shoe::Extensions::OptionParser)
|
16
|
+
# opts.defaults = %w(--foo --no-bar --baz=5)
|
17
|
+
# # ... and so on ...
|
18
|
+
# end
|
19
|
+
#
|
20
|
+
# parser.order(ARGV)
|
4
21
|
module OptionParser
|
5
|
-
|
22
|
+
attr_reader :defaults
|
23
|
+
|
24
|
+
def defaults=(defaults)
|
25
|
+
@defaults = defaults.extend(Defaults)
|
26
|
+
end
|
6
27
|
|
7
28
|
def order(*args, &block)
|
8
29
|
begin
|
9
|
-
super(defaults.
|
30
|
+
super(*defaults.followed_by(*args), &block)
|
10
31
|
rescue ::OptionParser::ParseError
|
11
32
|
abort($!)
|
12
33
|
end
|
13
34
|
end
|
14
35
|
|
15
|
-
def
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
36
|
+
def help
|
37
|
+
defaults.help(super, summary_indent)
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
module Defaults #:nodoc:
|
43
|
+
def followed_by(*args)
|
44
|
+
dup.concat(*args)
|
45
|
+
end
|
46
|
+
|
47
|
+
def help(before, indent)
|
48
|
+
"#{before}\nDefaults:\n#{indent}#{join ' '}"
|
49
|
+
end
|
21
50
|
end
|
22
51
|
end
|
23
52
|
|
data/lib/shoe/tasks/cucumber.rb
CHANGED
data/lib/shoe/tasks/release.rb
CHANGED
@@ -39,7 +39,7 @@ module Shoe
|
|
39
39
|
sh "git tag #{version_tag(spec.version)}"
|
40
40
|
|
41
41
|
if there_is_no_tag_for('semver')
|
42
|
-
warn "
|
42
|
+
warn "WARN: Please `git tag semver`. <http://semver.org/>"
|
43
43
|
end
|
44
44
|
|
45
45
|
if there_is_a_remote_called('origin')
|
data/lib/shoe/tasks/ronn.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 0.6.
|
8
|
+
- 1
|
9
|
+
version: 0.6.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Matthew Todd
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-22 00:00:00 +03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -142,10 +142,10 @@ rdoc_options:
|
|
142
142
|
- --main
|
143
143
|
- README.rdoc
|
144
144
|
- --title
|
145
|
-
- shoe-0.6.
|
145
|
+
- shoe-0.6.1
|
146
146
|
- --inline-source
|
147
147
|
- --webcvs
|
148
|
-
- http://github.com/matthewtodd/shoe/blob/v0.6.
|
148
|
+
- http://github.com/matthewtodd/shoe/blob/v0.6.1/
|
149
149
|
require_paths:
|
150
150
|
- lib
|
151
151
|
required_ruby_version: !ruby/object:Gem::Requirement
|