qrush-gemcutter 0.0.5 → 0.0.6

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.
@@ -0,0 +1,32 @@
1
+ class Gem::Commands::TumbleCommand < Gem::Command
2
+ def description
3
+ 'Enable or disable Gemcutter as your primary gem source.'
4
+ end
5
+
6
+ def initialize
7
+ super 'tumble', description
8
+ end
9
+
10
+ def execute
11
+ say "Thanks for using Gemcutter!"
12
+ tumble
13
+ show_sources
14
+ end
15
+
16
+ def tumble
17
+ if Gem.sources.include?(URL)
18
+ Gem.sources.delete URL
19
+ Gem.configuration.write
20
+ else
21
+ Gem.sources.unshift URL
22
+ Gem.configuration.write
23
+ end
24
+ end
25
+
26
+ def show_sources
27
+ puts "Your gem sources are now:"
28
+ Gem.sources.each do |source|
29
+ puts "- #{source}"
30
+ end
31
+ end
32
+ end
@@ -2,12 +2,10 @@ $:.unshift File.dirname(__FILE__) # For use/testing when no gem is installed
2
2
 
3
3
  require 'rubygems/command_manager'
4
4
 
5
- require 'commands/downgrade'
6
5
  require 'commands/push'
7
- require 'commands/upgrade'
6
+ require 'commands/tumble'
8
7
 
9
- Gem::CommandManager.instance.register_command :downgrade
10
8
  Gem::CommandManager.instance.register_command :push
11
- Gem::CommandManager.instance.register_command :upgrade
9
+ Gem::CommandManager.instance.register_command :tumble
12
10
 
13
11
  URL = "http://gemcutter.org" unless defined?(URL)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qrush-gemcutter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
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-07-25 00:00:00 -07:00
12
+ date: 2009-07-28 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -22,14 +22,19 @@ extensions: []
22
22
  extra_rdoc_files:
23
23
  - README.textile
24
24
  files:
25
- - lib/commands/downgrade.rb
26
25
  - lib/commands/push.rb
27
- - lib/commands/upgrade.rb
26
+ - lib/commands/tumble.rb
28
27
  - lib/rubygems_plugin.rb
29
28
  - README.textile
30
29
  has_rdoc: false
31
30
  homepage: http://github.com/qrush/gemcutter
32
- post_install_message:
31
+ licenses:
32
+ post_install_message: |+
33
+
34
+ =======================================================================
35
+ Thanks for installing Gemcutter! To get started, please run: gem tumble
36
+ =======================================================================
37
+
33
38
  rdoc_options:
34
39
  - --charset=UTF-8
35
40
  require_paths:
@@ -49,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
54
  requirements: []
50
55
 
51
56
  rubyforge_project: gemcutter
52
- rubygems_version: 1.2.0
57
+ rubygems_version: 1.3.5
53
58
  signing_key:
54
59
  specification_version: 3
55
60
  summary: Awesome gem hosting
@@ -1,15 +0,0 @@
1
- class Gem::Commands::DowngradeCommand < Gem::Command
2
- def description
3
- 'Return to using RubyForge as your primary gem source'
4
- end
5
-
6
- def initialize
7
- super 'downgrade', description
8
- end
9
-
10
- def execute
11
- say "Your primary gem source is now gems.rubyforge.org"
12
- Gem.sources.delete URL
13
- Gem.configuration.write
14
- end
15
- end
@@ -1,19 +0,0 @@
1
- class Gem::Commands::UpgradeCommand < Gem::Command
2
- def description
3
- 'Upgrade your gem source to Gemcutter'
4
- end
5
-
6
- def initialize
7
- super 'upgrade', description
8
- end
9
-
10
- def execute
11
- if Gem.sources.include?(URL)
12
- say "Gemcutter is already your primary gem source. Please use `gem downgrade` if you wish to no longer use Gemcutter."
13
- else
14
- Gem.sources.unshift URL
15
- Gem.configuration.write
16
- say "Your primary gem source is now gemcutter.org"
17
- end
18
- end
19
- end