gem-manage-sources 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.6
|
@@ -12,7 +12,7 @@ module Gem
|
|
12
12
|
|
13
13
|
def initialize
|
14
14
|
super('manage_sources', 'Manage the sources RubyGems use to search for gems. (USE INSTEAD OF: sources)')
|
15
|
-
defaults.merge!(:sources_to_add => [], :sources_to_remove => [], :check_sources? => false, :init? => false)
|
15
|
+
defaults.merge!(:sources_to_add => [], :sources_to_remove => [], :check_sources? => false, :init? => false, :verbose? => false)
|
16
16
|
|
17
17
|
add_option('-a', '--add SOURCE_URL', 'Add a gem source') do |value, options|
|
18
18
|
options[:sources_to_add] << value
|
@@ -71,7 +71,7 @@ module Gem
|
|
71
71
|
gemspec_path = uri.path[-1,1] == '/' ? "specs.4.8.gz" : "/specs.4.8.gz"
|
72
72
|
response = nil
|
73
73
|
Net::HTTP.start(uri.host, uri.port) {|http| response = http.head(uri.path + gemspec_path)}
|
74
|
-
response.is_a?(Net::HTTPOK)
|
74
|
+
response.is_a?(Net::HTTPOK) || response.is_a?(Net::HTTPFound)
|
75
75
|
rescue
|
76
76
|
false
|
77
77
|
end
|
@@ -152,4 +152,31 @@ describe Gem::Commands::ManageSourcesCommand do
|
|
152
152
|
@list.active.should == ['http://active.example.com']
|
153
153
|
end
|
154
154
|
end
|
155
|
+
|
156
|
+
describe "verbosity" do
|
157
|
+
before(:each) do
|
158
|
+
@sources = ['http://active.example.com','http://inactive.example.com']
|
159
|
+
@list = Gem::Sources::List.new(:unchecked => @sources)
|
160
|
+
|
161
|
+
@list.stub!(:sync)
|
162
|
+
@list.stub!(:source_available?) do |source|
|
163
|
+
source == 'http://active.example.com'
|
164
|
+
end
|
165
|
+
@list.verify
|
166
|
+
@list.dump(@test_sources_file)
|
167
|
+
|
168
|
+
@sources << 'http://another.example.com'
|
169
|
+
@command.stub!(:currently_loaded_sources).and_return(@sources)
|
170
|
+
@command.stub!(:sources).and_return(@list)
|
171
|
+
|
172
|
+
@command.invoke('-c')
|
173
|
+
@list = Gem::Sources::List.load_file(@test_sources_file)
|
174
|
+
end
|
175
|
+
|
176
|
+
it "should be verbose" do
|
177
|
+
|
178
|
+
pp @command.options
|
179
|
+
pending
|
180
|
+
end
|
181
|
+
end
|
155
182
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-manage-sources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Britt Crawford
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-23 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|