rubygems-tasks 0.2.2 → 0.2.3

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.
@@ -1,3 +1,13 @@
1
+ ### 0.2.3 / 2012-04-30
2
+
3
+ * {Gem::Tasks::Printing#status} and {Gem::Tasks::Printing#debug} will not
4
+ produce output if `Rake.verbose` is false.
5
+ * Added specs for {Gem::Tasks::Sign::PGP}.
6
+
7
+ #### sign:pgp
8
+
9
+ * Generate detached PGP signatures using `--detach-sign`.
10
+
1
11
  ### 0.2.2 / 2012-04-29
2
12
 
3
13
  * Added {Gem::Tasks::Task#invoke}.
@@ -1,5 +1,5 @@
1
1
  name: rubygems-tasks
2
- version: 0.2.2
2
+ version: 0.2.3
3
3
  summary: Rake tasks for managing and releasing Ruby Gems.
4
4
  description:
5
5
  Agnostic and unobtrusive Rake tasks for managing and releasing Ruby Gems.
@@ -52,7 +52,9 @@ module Gem
52
52
  # The message to print.
53
53
  #
54
54
  def status(message)
55
- $stdout.puts "#{STATUS_PREFIX} #{message}"
55
+ if Rake.verbose
56
+ $stdout.puts "#{STATUS_PREFIX} #{message}"
57
+ end
56
58
  end
57
59
 
58
60
  #
@@ -62,7 +64,7 @@ module Gem
62
64
  # The message to print.
63
65
  #
64
66
  def debug(message)
65
- if Rake.application.options.trace
67
+ if (Rake.verbose && Rake.application.options.trace)
66
68
  $stderr.puts "#{DEBUG_PREFIX} #{message}"
67
69
  end
68
70
  end
@@ -41,7 +41,7 @@ module Gem
41
41
  def sign(path)
42
42
  status "Signing #{File.basename(path)} ..."
43
43
 
44
- run 'gpg', '-a', '--sign', path
44
+ run 'gpg', '--sign', '--detach-sign', '--armor', path
45
45
  end
46
46
 
47
47
  end
@@ -2,5 +2,9 @@ require 'rake'
2
2
 
3
3
  shared_context "rake" do
4
4
  let(:rake) { Rake::Application.new }
5
- before(:all) { Rake.application = rake }
5
+
6
+ before(:all) do
7
+ Rake.verbose(false)
8
+ Rake.application = rake
9
+ end
6
10
  end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+ require 'rake_context'
3
+
4
+ require 'rubygems/tasks/sign/pgp'
5
+
6
+ describe Gem::Tasks::Sign::PGP do
7
+ describe "#sign" do
8
+ include_context "rake"
9
+
10
+ let(:path) { File.join('pkg','foo-1.2.3.gem') }
11
+
12
+ it "should run `gpg --sign --detach-sign --armor ...`" do
13
+ subject.should_receive(:run).with(
14
+ 'gpg', '--sign', '--detach-sign', '--armor', path
15
+ )
16
+
17
+ subject.sign(path)
18
+ end
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -92,6 +92,7 @@ files:
92
92
  - spec/scm/push_spec.rb
93
93
  - spec/scm/status_spec.rb
94
94
  - spec/scm/tag_spec.rb
95
+ - spec/sign/pgp_spec.rb
95
96
  - spec/spec_helper.rb
96
97
  - spec/tasks_spec.rb
97
98
  homepage: https://github.com/postmodern/rubygems-tasks
@@ -126,4 +127,5 @@ test_files:
126
127
  - spec/scm/push_spec.rb
127
128
  - spec/scm/status_spec.rb
128
129
  - spec/scm/tag_spec.rb
130
+ - spec/sign/pgp_spec.rb
129
131
  - spec/tasks_spec.rb