shoe 0.1.9 → 0.1.10
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/README.rdoc +9 -7
- data/Rakefile +1 -1
- data/bin/shoe +1 -1
- data/features/cucumber.feature +20 -1
- data/features/step_definitions/shoe_steps.rb +4 -0
- data/lib/shoe.rb +18 -2
- data/shoe.gemspec +3 -3
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -16,13 +16,15 @@ Here's how your Rakefile looks:
|
|
16
16
|
|
17
17
|
And here's what you get, at most:
|
18
18
|
|
19
|
-
rake clean
|
20
|
-
rake cucumber
|
21
|
-
rake
|
22
|
-
rake
|
23
|
-
rake
|
24
|
-
rake
|
25
|
-
rake
|
19
|
+
rake clean # Remove ignored files
|
20
|
+
rake cucumber # Run features
|
21
|
+
rake cucumber:wip # Run work-in-progress features
|
22
|
+
rake default # Run features
|
23
|
+
rake gemspec # Show latest gemspec contents
|
24
|
+
rake rdoc # Generate documentation
|
25
|
+
rake release # Release myproject-0.1.0
|
26
|
+
rake shell # Run an irb console
|
27
|
+
rake test # Run tests
|
26
28
|
|
27
29
|
Most of the time, though, you won't see all of these: when possible, tasks are conditionally defined.
|
28
30
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
2
2
|
require 'shoe'
|
3
3
|
|
4
|
-
Shoe.tie('shoe', '0.1.
|
4
|
+
Shoe.tie('shoe', '0.1.10', 'Another take on hoe, jeweler & friends.') do |spec|
|
5
5
|
spec.remove_development_dependency_on_shoe
|
6
6
|
spec.requirements = ['git']
|
7
7
|
spec.add_runtime_dependency 'cucumber'
|
data/bin/shoe
CHANGED
@@ -18,7 +18,7 @@ rescue LoadError
|
|
18
18
|
abort 'Please `gem install shoe` to get started.'
|
19
19
|
end
|
20
20
|
|
21
|
-
Shoe.tie('NAME', '0.
|
21
|
+
Shoe.tie('NAME', '0.0.0', 'TODO write a summary of NAME here.') do |spec|
|
22
22
|
# spec.add_development_dependency 'shoulda'
|
23
23
|
end
|
24
24
|
END
|
data/features/cucumber.feature
CHANGED
@@ -11,7 +11,26 @@ Feature: Cucumber
|
|
11
11
|
|
12
12
|
Scenario: Running rake --tasks in a shoe project with Cucumber features
|
13
13
|
Given I have created a directory called "my_project"
|
14
|
-
|
14
|
+
And I have created a directory called "my_project/features"
|
15
15
|
And I have run shoe inside "my_project"
|
16
16
|
When I run rake --tasks inside "my_project"
|
17
17
|
Then I should see "rake cucumber" on standard out
|
18
|
+
And I should not see "rake cucumber:wip" on standard out
|
19
|
+
|
20
|
+
Scenario: Running rake --tasks in a shoe project with work-in-progress Cucumber features
|
21
|
+
Given I have created a directory called "my_project"
|
22
|
+
And I have created a directory called "my_project/features"
|
23
|
+
And I have created a file called "my_project/features/some.feature" containing:
|
24
|
+
"""
|
25
|
+
Feature: Cucumber
|
26
|
+
In order to use cucumber conveniently
|
27
|
+
As a developer
|
28
|
+
I want shoe to give me a rake task
|
29
|
+
|
30
|
+
@wip
|
31
|
+
Scenario: Running rake --tasks in a shoe project with work-in-progress Cucumber features
|
32
|
+
Given I have created a directory called "my_project"
|
33
|
+
"""
|
34
|
+
And I have run shoe inside "my_project"
|
35
|
+
When I run rake --tasks inside "my_project"
|
36
|
+
Then I should see "rake cucumber:wip" on standard out
|
@@ -6,6 +6,10 @@ Given /^I have created a file called "([^\"]*)" containing "([^\"]*)"$/ do |path
|
|
6
6
|
create_file(path, contents)
|
7
7
|
end
|
8
8
|
|
9
|
+
Given /^I have created a file called "([^\"]*)" containing:$/ do |path, contents|
|
10
|
+
create_file(path, contents)
|
11
|
+
end
|
12
|
+
|
9
13
|
When /^I (?:have )?run (.*) inside "([^\"]*)"$/ do |command, path|
|
10
14
|
run(command, path)
|
11
15
|
end
|
data/lib/shoe.rb
CHANGED
@@ -85,8 +85,14 @@ class Shoe
|
|
85
85
|
|
86
86
|
if File.directory?('features')
|
87
87
|
require 'cucumber/rake/task'
|
88
|
-
Cucumber::Rake::Task.new(:cucumber, 'Run features')
|
88
|
+
Cucumber::Rake::Task.new(:cucumber, 'Run features') { |task| task.cucumber_opts = '--tags ~@wip' }
|
89
89
|
default_depends_on(:cucumber)
|
90
|
+
|
91
|
+
if there_are_any_work_in_progress_features
|
92
|
+
namespace :cucumber do
|
93
|
+
Cucumber::Rake::Task.new(:wip, 'Run work-in-progress features') { |task| task.cucumber_opts = '--tags @wip --wip' }
|
94
|
+
end
|
95
|
+
end
|
90
96
|
end
|
91
97
|
|
92
98
|
desc 'Show latest gemspec contents'
|
@@ -94,7 +100,7 @@ class Shoe
|
|
94
100
|
puts spec.to_ruby
|
95
101
|
end
|
96
102
|
|
97
|
-
if there_is_no_tag_for_the_current_version && we_are_on_the_master_branch && we_have_already_pushed_the_master_branch_to_a_remote_called_origin
|
103
|
+
if the_current_version_is_not_zero && there_is_no_tag_for_the_current_version && we_are_on_the_master_branch && we_have_already_pushed_the_master_branch_to_a_remote_called_origin
|
98
104
|
desc "Release #{spec.name}-#{spec.version}"
|
99
105
|
task :release do
|
100
106
|
File.open("#{spec.name}.gemspec", 'w') { |f| f.write spec.to_ruby }
|
@@ -120,6 +126,16 @@ class Shoe
|
|
120
126
|
File.directory?('bin') ? Dir.entries('bin') - ['.', '..'] : []
|
121
127
|
end
|
122
128
|
|
129
|
+
def the_current_version_is_not_zero
|
130
|
+
spec.version != '0.0.0'
|
131
|
+
end
|
132
|
+
|
133
|
+
def there_are_any_work_in_progress_features
|
134
|
+
Dir.glob('features/**/*.feature').detect do |path|
|
135
|
+
File.read(path).include?('@wip')
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
123
139
|
def there_is_no_tag_for_the_current_version
|
124
140
|
!File.file?(".git/refs/tags/#{spec.version}")
|
125
141
|
end
|
data/shoe.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{shoe}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.10"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Matthew Todd"]
|
9
|
-
s.date = %q{2009-10-
|
9
|
+
s.date = %q{2009-10-19}
|
10
10
|
s.default_executable = %q{shoe}
|
11
11
|
s.email = %q{matthew.todd@gmail.com}
|
12
12
|
s.executables = ["shoe"]
|
13
13
|
s.extra_rdoc_files = ["README.rdoc"]
|
14
14
|
s.files = ["Rakefile", "shoe.gemspec", "README.rdoc", "bin/shoe", "features/cucumber.feature", "features/getting_started.feature", "features/step_definitions", "features/step_definitions/shoe_steps.rb", "features/support", "features/support/env.rb", "lib/shoe.rb"]
|
15
|
-
s.rdoc_options = ["--main", "README.rdoc", "--title", "shoe-0.1.
|
15
|
+
s.rdoc_options = ["--main", "README.rdoc", "--title", "shoe-0.1.10", "--inline-source"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.requirements = ["git"]
|
18
18
|
s.rubygems_version = %q{1.3.5}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Todd
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-19 00:00:00 +03:00
|
13
13
|
default_executable: shoe
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -69,7 +69,7 @@ rdoc_options:
|
|
69
69
|
- --main
|
70
70
|
- README.rdoc
|
71
71
|
- --title
|
72
|
-
- shoe-0.1.
|
72
|
+
- shoe-0.1.10
|
73
73
|
- --inline-source
|
74
74
|
require_paths:
|
75
75
|
- lib
|