gemstache 0.2.2 → 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.
@@ -0,0 +1 @@
1
+ require 'rubygems/gemstache_fetcher'
@@ -33,8 +33,16 @@ class Gem::Commands::StacheCommand < Gem::Command
33
33
  if options[:configure]
34
34
  configure_credentials
35
35
  else
36
+ domain = nil
37
+ if config.keys.count > 1 && !$gemstache_domain
38
+ say "Which stache would you like to upload to?\n"
39
+ config.keys.each_with_index { |k,i| say " #{i+1}) #{k}" }
40
+ index = ask "Selection: "
41
+ $gemstache_domain = config.keys[index.to_i-1]
42
+ end
43
+
36
44
  get_all_gem_names.each do |gemfile|
37
- upload_gem(gemfile)
45
+ upload_gem(gemfile, $gemstache_domain)
38
46
  end
39
47
  end
40
48
  end
@@ -67,16 +75,8 @@ class Gem::Commands::StacheCommand < Gem::Command
67
75
  end
68
76
  end
69
77
 
70
- def upload_gem(name)
71
- config = self.class.read_gemstache_config
72
- domain = config.keys.first
73
- if config.keys.count > 1
74
- say "Which stache would you like to upload to?\n"
75
- config.keys.each_with_index { |k,i| say " #{i+1}) #{k}" }
76
- index = ask "Selection: "
77
- domain = config.keys[index.to_i-1]
78
- end
79
-
78
+ def upload_gem(name, domain=nil)
79
+ domain = config.keys.first unless domain
80
80
  say "Pushing gem to Gemstache..."
81
81
 
82
82
  old_host = ENV['RUBYGEMS_HOST']
@@ -92,6 +92,10 @@ class Gem::Commands::StacheCommand < Gem::Command
92
92
  with_response response
93
93
  end
94
94
 
95
+ def config
96
+ @config ||= self.class.read_gemstache_config
97
+ end
98
+
95
99
  def self.read_gemstache_config
96
100
  File.exists?(gemstache_config_file) ? YAML.load_file(gemstache_config_file) : {}
97
101
  end
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 2
10
- version: 0.2.2
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ken Robertson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-14 00:00:00 -07:00
18
+ date: 2011-06-28 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -29,6 +29,7 @@ extra_rdoc_files: []
29
29
 
30
30
  files:
31
31
  - LICENSE
32
+ - lib/gemstache/bundler.rb
32
33
  - lib/rubygems/commands/stache_command.rb
33
34
  - lib/rubygems/gemstache_fetcher.rb
34
35
  - lib/rubygems_plugin.rb
@@ -65,10 +66,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
66
  requirements:
66
67
  - - ">="
67
68
  - !ruby/object:Gem::Version
68
- hash: 3
69
+ hash: 23
69
70
  segments:
70
- - 0
71
- version: "0"
71
+ - 1
72
+ - 3
73
+ - 6
74
+ version: 1.3.6
72
75
  requirements: []
73
76
 
74
77
  rubyforge_project: