gemcutter 0.3.0.pre → 0.3.0

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/Rakefile CHANGED
@@ -13,7 +13,7 @@ begin
13
13
  require 'jeweler'
14
14
  Jeweler::Tasks.new do |gem|
15
15
  gem.name = "gemcutter"
16
- gem.version = "0.3.0.pre"
16
+ gem.version = "0.3.0"
17
17
  gem.summary = "Commands to interact with gemcutter.org"
18
18
  gem.description = "Adds several commands to RubyGems for managing gems and more on Gemcutter.org."
19
19
  gem.email = "nick@quaran.to"
@@ -2,12 +2,10 @@ class Gem::Commands::WebhookCommand < Gem::AbstractCommand
2
2
 
3
3
  def description
4
4
  <<-EOF
5
- Register a webhook that will be called any time a gem is updated on Gemcutter.
6
-
7
5
  Webhooks can be created for either specific gems or all gems. In both cases
8
6
  you'll get a POST request of the gem in JSON format at the URL you specify in
9
- the command. You can also use this command to test fire a webhook.
10
- EOF
7
+ the command. You can also use this command to test fire a webhook for any gem.
8
+ EOF
11
9
  end
12
10
 
13
11
  def arguments
@@ -15,11 +13,11 @@ the command. You can also use this command to test fire a webhook.
15
13
  end
16
14
 
17
15
  def usage
18
- "#{program_name} GEM_NAME"
16
+ "#{program_name} [GEM_NAME]"
19
17
  end
20
18
 
21
19
  def initialize
22
- super 'webhook', description
20
+ super 'webhook', "Register a webhook that will be called any time a gem is updated on Gemcutter."
23
21
  option_text = "The URL of the webhook to"
24
22
 
25
23
  add_option('-a', '--add URL', "#{option_text} add") do |value, options|
@@ -31,8 +31,8 @@ class PushCommandTest < CommandTest
31
31
  stub(@command).options { {:args => [@gem_path]} }
32
32
  stub(Gem).read_binary(@gem_path) { @gem_binary }
33
33
  stub_config({ :rubygems_api_key => "key" })
34
- WebMock.stub_request(:post, @url).to_return(:body => "Success!")
35
-
34
+ stub_request(:post, @url).to_return(:body => "Success!")
35
+
36
36
  @command.send_gem
37
37
  end
38
38
 
@@ -43,14 +43,14 @@ class PushCommandTest < CommandTest
43
43
 
44
44
  should "post to api" do
45
45
  # webmock doesn't pass body params on correctly :[
46
- WebMock.assert_requested(:post, @url,
47
- :times => 1)
48
- WebMock.assert_requested(:post, @url,
49
- :headers => { 'Authorization' => 'key' })
50
- WebMock.assert_requested(:post, @url,
51
- :headers => { 'Content-Length' => @gem_binary.size })
52
- WebMock.assert_requested(:post, @url,
53
- :headers => { 'Content-Type' => 'application/octet-stream' })
46
+ assert_requested(:post, @url,
47
+ :times => 1)
48
+ assert_requested(:post, @url,
49
+ :headers => {'Authorization' => 'key' })
50
+ assert_requested(:post, @url,
51
+ :headers => {'Content-Length' => @gem_binary.size})
52
+ assert_requested(:post, @url,
53
+ :headers => {'Content-Type' => 'application/octet-stream'})
54
54
  end
55
55
  end
56
56
  end
@@ -148,7 +148,6 @@ EOF
148
148
  should "dump out with error message" do
149
149
  assert_received(@command) do |command|
150
150
  command.say("There was a problem parsing the data:")
151
- command.say(/unexpected token at 'fubar'/)
152
151
  end
153
152
  end
154
153
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemcutter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.pre
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Quaranto
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-03 00:00:00 -05:00
12
+ date: 2010-01-05 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency