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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.0.6 2008-11-05
2
+
3
+ * Removed cucumber references in newgem's Rakefile, hopefully fixing #7
4
+
1
5
  == 1.0.5 2008-11-01
2
6
 
3
7
  * Oops, fixed cucumber dependency from 1.1.8 to 0.1.8
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- %w[rubygems rake rake/clean fileutils rubigen cucumber].each { |f| require f }
1
+ %w[rubygems rake rake/clean fileutils rubigen].each { |f| require f }
2
2
  require File.dirname(__FILE__) + '/lib/newgem'
3
3
 
4
4
  # Generate all the Rake tasks
@@ -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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
@@ -4,5 +4,5 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require "hoe-patched"
5
5
 
6
6
  module Newgem
7
- VERSION = '1.0.5'
7
+ VERSION = '1.0.6'
8
8
  end
@@ -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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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
- FileUtils.chdir @active_project_folder do
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.5</a>
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&#8217;s Blog</h2>
203
204
  <p><a href="http://www.drnicwilliams.com">http://www.drnicwilliams.com</a> &#8211; 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>, 31st October 2008<br>
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
 
@@ -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.5</a>
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.5
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-01 00:00:00 +10:00
12
+ date: 2008-11-05 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency