newgem 1.0.5 → 1.0.6
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 +4 -0
- data/Rakefile +1 -1
- data/features/steps/common.rb +11 -6
- data/lib/newgem.rb +1 -1
- data/rubygems_generators/install_cucumber/templates/features/steps/common.rb +11 -6
- data/website/index.html +3 -2
- data/website/index.txt +1 -0
- data/website/rubyforge.html +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/features/steps/common.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
def in_project_folder(&block)
|
2
|
+
project_folder = @active_project_folder
|
3
|
+
FileUtils.chdir(project_folder, &block)
|
4
|
+
end
|
5
|
+
|
1
6
|
Given %r{^a safe folder} do
|
2
7
|
FileUtils.rm_rf @tmp_root = File.dirname(__FILE__) + "/../../tmp"
|
3
8
|
FileUtils.mkdir_p @tmp_root
|
@@ -27,7 +32,7 @@ def setup_active_project_folder project_name
|
|
27
32
|
end
|
28
33
|
|
29
34
|
Given /^'(.*)' folder is deleted/ do |folder|
|
30
|
-
|
35
|
+
in_project_folder do
|
31
36
|
FileUtils.rm_rf folder
|
32
37
|
end
|
33
38
|
end
|
@@ -58,19 +63,19 @@ When /^task 'rake (.*)' is invoked$/ do |task|
|
|
58
63
|
end
|
59
64
|
|
60
65
|
Then %r{^folder '(.*)' is created} do |folder|
|
61
|
-
|
66
|
+
in_project_folder do
|
62
67
|
File.exists?(folder).should be_true
|
63
68
|
end
|
64
69
|
end
|
65
70
|
|
66
71
|
Then %r{^file '(.*)' (is|is not) created} do |file, is|
|
67
|
-
|
72
|
+
in_project_folder do
|
68
73
|
File.exists?(file).should(is == 'is' ? be_true : be_false)
|
69
74
|
end
|
70
75
|
end
|
71
76
|
|
72
77
|
Then /^file matching '(.*)' is created/ do |pattern|
|
73
|
-
|
78
|
+
in_project_folder do
|
74
79
|
Dir[pattern].should_not be_empty
|
75
80
|
end
|
76
81
|
end
|
@@ -122,7 +127,7 @@ Then /^all (\d+) examples pass$/ do |expected_test_count|
|
|
122
127
|
end
|
123
128
|
|
124
129
|
Then /^yaml file '(.*)' contains (\{.*\})/ do |file, yaml|
|
125
|
-
|
130
|
+
in_project_folder do
|
126
131
|
yaml = eval yaml
|
127
132
|
YAML.load(File.read(file)).should == yaml
|
128
133
|
end
|
@@ -145,7 +150,7 @@ Then /^task 'rake (.*)' is executed successfully$/ do |task|
|
|
145
150
|
end
|
146
151
|
|
147
152
|
Then /^gem spec key '(.*)' contains \/(.*)\/$/ do |key, regex|
|
148
|
-
|
153
|
+
in_project_folder do
|
149
154
|
gem_file = Dir["pkg/*.gem"].first
|
150
155
|
gem_spec = Gem::Specification.from_yaml(`gem spec #{gem_file}`)
|
151
156
|
spec_value = gem_spec.send(key.to_sym)
|
data/lib/newgem.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
def in_project_folder(&block)
|
2
|
+
project_folder = @active_project_folder
|
3
|
+
FileUtils.chdir(project_folder, &block)
|
4
|
+
end
|
5
|
+
|
1
6
|
Given %r{^a safe folder} do
|
2
7
|
FileUtils.rm_rf @tmp_root = File.dirname(__FILE__) + "/../../tmp"
|
3
8
|
FileUtils.mkdir_p @tmp_root
|
@@ -27,7 +32,7 @@ def setup_active_project_folder project_name
|
|
27
32
|
end
|
28
33
|
|
29
34
|
Given /^'(.*)' folder is deleted/ do |folder|
|
30
|
-
|
35
|
+
in_project_folder do
|
31
36
|
FileUtils.rm_rf folder
|
32
37
|
end
|
33
38
|
end
|
@@ -58,19 +63,19 @@ When /^task 'rake (.*)' is invoked$/ do |task|
|
|
58
63
|
end
|
59
64
|
|
60
65
|
Then %r{^folder '(.*)' is created} do |folder|
|
61
|
-
|
66
|
+
in_project_folder do
|
62
67
|
File.exists?(folder).should be_true
|
63
68
|
end
|
64
69
|
end
|
65
70
|
|
66
71
|
Then %r{^file '(.*)' (is|is not) created} do |file, is|
|
67
|
-
|
72
|
+
in_project_folder do
|
68
73
|
File.exists?(file).should(is == 'is' ? be_true : be_false)
|
69
74
|
end
|
70
75
|
end
|
71
76
|
|
72
77
|
Then /^file matching '(.*)' is created/ do |pattern|
|
73
|
-
|
78
|
+
in_project_folder do
|
74
79
|
Dir[pattern].should_not be_empty
|
75
80
|
end
|
76
81
|
end
|
@@ -122,7 +127,7 @@ Then /^all (\d+) examples pass$/ do |expected_test_count|
|
|
122
127
|
end
|
123
128
|
|
124
129
|
Then /^yaml file '(.*)' contains (\{.*\})/ do |file, yaml|
|
125
|
-
|
130
|
+
in_project_folder do
|
126
131
|
yaml = eval yaml
|
127
132
|
YAML.load(File.read(file)).should == yaml
|
128
133
|
end
|
@@ -145,7 +150,7 @@ Then /^task 'rake (.*)' is executed successfully$/ do |task|
|
|
145
150
|
end
|
146
151
|
|
147
152
|
Then /^gem spec key '(.*)' contains \/(.*)\/$/ do |key, regex|
|
148
|
-
|
153
|
+
in_project_folder do
|
149
154
|
gem_file = Dir["pkg/*.gem"].first
|
150
155
|
gem_spec = Gem::Specification.from_yaml(`gem spec #{gem_file}`)
|
151
156
|
spec_value = gem_spec.send(key.to_sym)
|
data/website/index.html
CHANGED
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
<div id="version"> <!-- class="clickable" onclick='document.location = "http://rubyforge.org/projects/newgem"; return true' -->
|
41
41
|
<p>Get Version</p>
|
42
|
-
<a href="http://rubyforge.org/projects/newgem" class="numbers">1.0.
|
42
|
+
<a href="http://rubyforge.org/projects/newgem" class="numbers">1.0.6</a>
|
43
43
|
<p>Featured in</p>
|
44
44
|
<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FBeginning-Ruby-Novice-Professional-Experts%2Fdp%2F1590597664%2F&tag=drnic-20&linkCode=ur2&camp=1789&creative=9325" class="book"><img src="images/beginning-ruby.jpg" /></a>
|
45
45
|
</div>
|
@@ -198,6 +198,7 @@ But when they are ready, everyone will be able to download and install your gem
|
|
198
198
|
<li><a href="http://nubyonrails.com/articles/2007/06/15/tutorial-publishing-rubygems-with-hoe">Tutorial: Publishing RubyGems with Hoe</a> by <a href="http://geoffreygrosenbach.com/">Geoffrey Grosenbach</a></li>
|
199
199
|
<li><a href="http://codeconversations.blogspot.com/2007/07/using-new-gem-generator-in-windows_8009.html">Using New Gem Generator in Windows</a> by <a href="http://codeconversations.blogspot.com/">Jorge Cangas</a></li>
|
200
200
|
<li><a href="http://bogojoker.com/blog/2008/05/building-a-ruby-gem/">Building a Ruby Gem</a> by <a href="http://bogojoker.com/">Joseph Pecoraro</a> (includes a Problems/Troubleshooting section!!)</li>
|
201
|
+
<li><a href="http://blog.emson.co.uk/2008/06/an-almost-fix-for-creating-rubygems-on-windows/">An Almost Fix for Creating RubyGems on Windows</a> by <a href="http://blog.emson.co.uk/">Ben Emson</a></li>
|
201
202
|
</ul>
|
202
203
|
<h2>Dr Nic’s Blog</h2>
|
203
204
|
<p><a href="http://www.drnicwilliams.com">http://www.drnicwilliams.com</a> – for future announcements and<br />
|
@@ -224,7 +225,7 @@ rake install_gem</pre>
|
|
224
225
|
<h2>Contact</h2>
|
225
226
|
<p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a>.</p>
|
226
227
|
<p class="coda">
|
227
|
-
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>,
|
228
|
+
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 5th November 2008<br>
|
228
229
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
229
230
|
</p>
|
230
231
|
</div>
|
data/website/index.txt
CHANGED
@@ -206,6 +206,7 @@ h2. Related articles
|
|
206
206
|
* "Tutorial: Publishing RubyGems with Hoe":http://nubyonrails.com/articles/2007/06/15/tutorial-publishing-rubygems-with-hoe by "Geoffrey Grosenbach":http://geoffreygrosenbach.com/
|
207
207
|
* "Using New Gem Generator in Windows":http://codeconversations.blogspot.com/2007/07/using-new-gem-generator-in-windows_8009.html by "Jorge Cangas":http://codeconversations.blogspot.com/
|
208
208
|
* "Building a Ruby Gem":http://bogojoker.com/blog/2008/05/building-a-ruby-gem/ by "Joseph Pecoraro":http://bogojoker.com/ (includes a Problems/Troubleshooting section!!)
|
209
|
+
* "An Almost Fix for Creating RubyGems on Windows":http://blog.emson.co.uk/2008/06/an-almost-fix-for-creating-rubygems-on-windows/ by "Ben Emson":http://blog.emson.co.uk/
|
209
210
|
|
210
211
|
h2. Dr Nic's Blog
|
211
212
|
|
data/website/rubyforge.html
CHANGED
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
<div id="version"> <!-- class="clickable" onclick='document.location = "http://rubyforge.org/projects/newgem"; return true' -->
|
41
41
|
<p>Get Version</p>
|
42
|
-
<a href="http://rubyforge.org/projects/newgem" class="numbers">1.0.
|
42
|
+
<a href="http://rubyforge.org/projects/newgem" class="numbers">1.0.6</a>
|
43
43
|
<p>Featured in</p>
|
44
44
|
<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FBeginning-Ruby-Novice-Professional-Experts%2Fdp%2F1590597664%2F&tag=drnic-20&linkCode=ur2&camp=1789&creative=9325" class="book"><img src="images/beginning-ruby.jpg" /></a>
|
45
45
|
</div>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newgem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-05 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|