gem-release 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -2,4 +2,23 @@ h1. gem release
2
2
 
3
3
  This gem plugin adds a `release` command to the rubygems `gem` command which
4
4
 
5
- * builds
5
+ * builds a gem from your gemspec and
6
+ * pushes it to rubygems.org
7
+ * deletes the gem file
8
+
9
+ h2. Installation
10
+
11
+ Obviously ...
12
+
13
+ <pre>
14
+ $ gem install gem-release
15
+ </pre>
16
+
17
+ h2. Usage
18
+
19
+ <pre>
20
+ $ gem release path/to/your.gemspec
21
+ $ gem release
22
+ </pre>
23
+
24
+ If you don't specify a gemspec filename the first \*.gemspec file found in your current working directory will be used.
@@ -1,3 +1,3 @@
1
1
  module GemRelease
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -7,39 +7,39 @@ class Gem::Commands::ReleaseCommand < Gem::Command
7
7
  super 'release', 'Build a gem from a gemspec and push to rubygems.org'
8
8
  end
9
9
 
10
- def arguments # :nodoc:
10
+ def arguments
11
11
  "GEMSPEC_FILE optional (will use the first *.gemspec if not specified)"
12
12
  end
13
13
 
14
- def usage # :nodoc:
14
+ def usage
15
15
  "#{program_name} [GEMSPEC_FILE]"
16
16
  end
17
-
17
+
18
18
  def execute
19
19
  filename = build
20
20
  push(filename)
21
21
  remove(filename)
22
22
  say "All done, thanks buddy."
23
23
  end
24
-
24
+
25
25
  def build
26
26
  command = Gem::Commands::BuildCommand.new
27
27
  command.handle_options([gemspec])
28
28
  command.execute
29
- command.load_gemspecs(gemspec).first.filename
29
+ command.load_gemspecs(gemspec).first.file_name
30
30
  end
31
-
31
+
32
32
  def push(filename)
33
33
  command = Gem::Commands::PushCommand.new
34
34
  command.handle_options([filename])
35
35
  command.execute
36
36
  end
37
-
37
+
38
38
  def remove(filename)
39
39
  `rm #{filename}`
40
40
  say "Deleting left over gem file #{filename}"
41
41
  end
42
-
42
+
43
43
  def gemspec
44
44
  @gemspec ||= begin
45
45
  gemspec = Array(options[:args]).first
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sven Fuchs