gem-release 0.0.23 → 0.0.24

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.
@@ -67,5 +67,15 @@ module GemRelease
67
67
  def gemspec_dirs
68
68
  Dir.glob('**/*.gemspec').map { |spec| File.dirname(spec) }
69
69
  end
70
+
71
+ def in_bootstrapped_dir
72
+ dir = Array(options[:args]).first rescue nil
73
+ if dir
74
+ Dir.mkdir dir
75
+ Dir.chdir(dir) { yield }
76
+ else
77
+ yield
78
+ end
79
+ end
70
80
  end
71
81
  end
@@ -1,5 +1,5 @@
1
1
  module GemRelease
2
- VERSION = '0.0.23'
2
+ VERSION = '0.0.24'
3
3
 
4
4
  class Version < Template
5
5
  attr_reader :version
@@ -23,12 +23,17 @@ class Gem::Commands::BootstrapCommand < Gem::Command
23
23
  option :scaffold, '-s', 'Scaffold lib/[gem_name]/version.rb README test/'
24
24
  option :github, '-h', 'Bootstrap a git repo, create on github and push'
25
25
  option :quiet, '-q', 'Do not output status messages'
26
+
27
+ @arguments = "gemname - option name of the gem, will use the current directory if not specified"
28
+ @usage = "#{program_name} [gemname]"
26
29
  end
27
30
 
28
31
  def execute
29
- write_scaffold if options[:scaffold]
30
- write_gemspec if options[:gemspec]
31
- create_repo if options[:github]
32
+ in_bootstrapped_dir do
33
+ write_scaffold if options[:scaffold]
34
+ write_gemspec if options[:gemspec]
35
+ create_repo if options[:github]
36
+ end
32
37
  end
33
38
 
34
39
  def write_gemspec
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-release
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 47
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 23
10
- version: 0.0.23
9
+ - 24
10
+ version: 0.0.24
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Fuchs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-24 00:00:00 -04:00
18
+ date: 2011-10-02 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency