gemcutter 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -10,23 +10,7 @@ h2. Purpose
10
10
 
11
11
  h2. Concerns
12
12
 
13
- *How annoying will this be to upgrade?*<br />
14
- The plan is to use Gemcutter as your canonical gem repository. All of the same gems that were available on RubyForge will be ready for your consumption. The gemcutter gem will hopefully make this very easy to switch over.
15
-
16
- *How can the process for publishing gems get any easier?*<br />
17
- Through one command- @gem push awesome-0.0.0.gem@.
18
-
19
- *Will the process change for consumers?*<br />
20
- No. In fact it will make their lives better: it will be easier to get to project pages with clearer information and the same data they're used to.
21
-
22
- *Why is this better than GitHub gem hosting?*<br />
23
- GitHub's gem system is great, but it's not the canonical source by default. The nice part is that it takes the approval process out, but the namespacing on gems makes it hard for those new to the community to determine what is the right copy to use. Also, the goals here are much different and the site as a whole can be improved over time by the community.
24
-
25
- *How can I gain access of my gem that was available through RubyForge?*<br />
26
- The full process is coming soon!
27
-
28
- *How can I help?*<br />
29
- Fork away, and read the next section! Feel free to bug qrush via a message or on FreeNode if you're interested.
13
+ These have been moved on to the "FAQ":http://gemcutter.org/pages/faq.
30
14
 
31
15
  h2. Contributions
32
16
 
@@ -8,11 +8,7 @@ class Gem::AbstractCommand < Gem::Command
8
8
  end
9
9
 
10
10
  def gemcutter_url
11
- if ENV['test']
12
- "http://gemcutter.local"
13
- else
14
- "https://gemcutter.heroku.com"
15
- end
11
+ ENV['GEMCUTTER_URL'] || 'https://gemcutter.heroku.com'
16
12
  end
17
13
 
18
14
  def setup
@@ -43,7 +43,7 @@ class Gem::Commands::MigrateCommand < Gem::AbstractCommand
43
43
  def get_token
44
44
  say "Starting migration of #{rubygem["name"]} from RubyForge..."
45
45
 
46
- response = make_request(:post, "gems/#{rubygem["slug"]}/migrate") do |request|
46
+ response = make_request(:post, "gems/#{rubygem["name"]}/migrate") do |request|
47
47
  request.add_field("Content-Length", 0)
48
48
  request.add_field("Authorization", api_key)
49
49
  end
@@ -84,7 +84,7 @@ class Gem::Commands::MigrateCommand < Gem::AbstractCommand
84
84
  def check_for_approved
85
85
  say "Asking Gemcutter to verify the upload..."
86
86
 
87
- response = make_request(:put, "gems/#{rubygem["slug"]}/migrate") do |request|
87
+ response = make_request(:put, "gems/#{rubygem["name"]}/migrate") do |request|
88
88
  request.add_field("Content-Length", 0)
89
89
  request.add_field("Authorization", api_key)
90
90
  end
@@ -50,7 +50,7 @@ class MigrateCommandTest < CommandTest
50
50
  stub(@command).terminate_interaction
51
51
 
52
52
  @name = "rails"
53
- @json = "{\"downloads\":4,\"name\":\"rails\",\"slug\":\"rails\",\"authors\":\"David Heinemeier Hansson\",\"version\":\"2.3.3\",\"rubyforge_project\":\"rails\",\"info\":\"Rails is a framework for building web-application using CGI, FCGI, mod_ruby, or WEBrick on top of either MySQL, PostgreSQL, SQLite, DB2, SQL Server, or Oracle with eRuby- or Builder-based templates.\"}"
53
+ @json = "{\"downloads\":4,\"name\":\"rails\",\"authors\":\"David Heinemeier Hansson\",\"version\":\"2.3.3\",\"rubyforge_project\":\"rails\",\"info\":\"Rails is a framework for building web-application using CGI, FCGI, mod_ruby, or WEBrick on top of either MySQL, PostgreSQL, SQLite, DB2, SQL Server, or Oracle with eRuby- or Builder-based templates.\"}"
54
54
  end
55
55
 
56
56
  should "find gem info if it exists" do
@@ -78,27 +78,26 @@ class MigrateCommandTest < CommandTest
78
78
  setup do
79
79
  @command = Gem::Commands::MigrateCommand.new
80
80
  @name = "SomeGem"
81
- @name = "somegem"
82
81
  stub(@command).say
83
82
  stub(@command).terminate_interaction
84
- stub(@command).rubygem { { "name" => @name, "slug" => @slug } }
83
+ stub(@command).rubygem { { "name" => @name } }
85
84
  end
86
85
 
87
86
  should "ask gemcutter to start the migration" do
88
87
  token = "SECRET TOKEN"
89
- FakeWeb.register_uri :post, "https://gemcutter.heroku.com/gems/#{@slug}/migrate", :body => token
88
+ FakeWeb.register_uri :post, "https://gemcutter.heroku.com/gems/#{@name}/migrate", :body => token
90
89
  assert_equal token, @command.get_token
91
90
  end
92
91
 
93
92
  should "dump out if gem could not be found" do
94
- FakeWeb.register_uri :post, "https://gemcutter.heroku.com/gems/#{@slug}/migrate", :status => 404, :body => "not found"
93
+ FakeWeb.register_uri :post, "https://gemcutter.heroku.com/gems/#{@name}/migrate", :status => 404, :body => "not found"
95
94
  @command.get_token
96
95
  assert_received(@command) { |subject| subject.say("not found") }
97
96
  assert_received(@command) { |subject| subject.terminate_interaction }
98
97
  end
99
98
 
100
99
  should "dump out if migration has already been completed" do
101
- FakeWeb.register_uri :post, "https://gemcutter.heroku.com/gems/#{@slug}/migrate", :status => 403, :body => "already migrated"
100
+ FakeWeb.register_uri :post, "https://gemcutter.heroku.com/gems/#{@name}/migrate", :status => 403, :body => "already migrated"
102
101
  @command.get_token
103
102
  assert_received(@command) { |subject| subject.say("already migrated") }
104
103
  assert_received(@command) { |subject| subject.terminate_interaction }
@@ -127,14 +126,14 @@ class MigrateCommandTest < CommandTest
127
126
  context "checking if the rubygem was approved" do
128
127
  setup do
129
128
  @command = Gem::Commands::MigrateCommand.new
130
- @slug = "rails"
129
+ @name = "rails"
131
130
 
132
131
  stub(@command).say
133
- stub(@command).rubygem { { "slug" => @slug } }
132
+ stub(@command).rubygem { { "name" => @name } }
134
133
  end
135
134
 
136
135
  should "let the server decide the status" do
137
- FakeWeb.register_uri :put, "https://gemcutter.heroku.com/gems/#{@slug}/migrate", :body => "Success!", :status => 400
136
+ FakeWeb.register_uri :put, "https://gemcutter.heroku.com/gems/#{@name}/migrate", :body => "Success!", :status => 400
138
137
  @command.check_for_approved
139
138
  assert_received(@command) { |subject| subject.say("Success!") }
140
139
  end
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.0.8
4
+ version: 0.0.9
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: 2009-08-11 00:00:00 -04:00
12
+ date: 2009-08-17 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,7 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: "0"
34
34
  version:
35
- description:
35
+ description: Adds several commands for using gemcutter.org, such as pushing new gems, migrating gems from RubyForge, and more.
36
36
  email: nick@quaran.to
37
37
  executables: []
38
38
 
@@ -81,13 +81,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  requirements: []
82
82
 
83
83
  rubyforge_project: gemcutter
84
- rubygems_version: 1.3.3
84
+ rubygems_version: 1.3.4
85
85
  signing_key:
86
86
  specification_version: 3
87
- summary: Awesome gem hosting
87
+ summary: Commands to interact with gemcutter.org
88
88
  test_files:
89
89
  - test/command_helper.rb
90
+ - test/commands/abstract_command_test.rb
90
91
  - test/commands/migrate_command_test.rb
91
- - test/commands/tumble_command_test.rb
92
92
  - test/commands/push_command_test.rb
93
- - test/commands/abstract_command_test.rb
93
+ - test/commands/tumble_command_test.rb