gem-manage-sources 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -27,9 +27,13 @@ To remove a source
|
|
27
27
|
|
28
28
|
gem manage_sources --remove http://source.com
|
29
29
|
|
30
|
+
== Links
|
31
|
+
|
32
|
+
* Bugtracker: http://github.com/britt/gem-manage-sources/issues
|
33
|
+
* Code Metrics: http://bit.ly/6CJtPx
|
34
|
+
|
30
35
|
== TODO
|
31
36
|
|
32
|
-
* Sources are not being removed when they go active...doh.
|
33
37
|
* Documentation
|
34
38
|
* JRuby (and *Ruby) support
|
35
39
|
* Find a better name
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
@@ -54,7 +54,7 @@ module Gem
|
|
54
54
|
list
|
55
55
|
end
|
56
56
|
|
57
|
-
def check_sources
|
57
|
+
def check_sources
|
58
58
|
sources.unchecked.concat(currently_loaded_sources)
|
59
59
|
sources.verify
|
60
60
|
sources.sync
|
@@ -65,9 +65,9 @@ module Gem
|
|
65
65
|
def add_sources(sources_to_add)
|
66
66
|
sources_to_add.each do |source|
|
67
67
|
if sources.add(source)
|
68
|
-
|
68
|
+
say "Added #{source} to gem sources."
|
69
69
|
else
|
70
|
-
|
70
|
+
say "** #{source} Unavailable ** Added to the list of inactive sources. "
|
71
71
|
end
|
72
72
|
end
|
73
73
|
sources.dump(ManageSourcesCommand.sources_file)
|
@@ -76,21 +76,21 @@ module Gem
|
|
76
76
|
def remove_sources(sources_to_remove)
|
77
77
|
sources_to_remove.each do |source|
|
78
78
|
sources.remove(source)
|
79
|
-
|
79
|
+
say "Removed #{source} from gem sources."
|
80
80
|
end
|
81
81
|
sources.dump(ManageSourcesCommand.sources_file)
|
82
82
|
end
|
83
83
|
|
84
84
|
def list
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
sources.active.each { |source|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
sources.inactive.each { |source|
|
85
|
+
say "*** CURRENT SOURCES ***"
|
86
|
+
say ""
|
87
|
+
say "** ACTIVE SOURCES **"
|
88
|
+
say ""
|
89
|
+
sources.active.each { |source| say source }
|
90
|
+
say ""
|
91
|
+
say "** INACTIVE SOURCES **"
|
92
|
+
say ""
|
93
|
+
sources.inactive.each { |source| say source }
|
94
94
|
end
|
95
95
|
|
96
96
|
private
|
@@ -98,6 +98,10 @@ module Gem
|
|
98
98
|
def sources
|
99
99
|
@sources ||= Gem::Sources::List.load_file(ManageSourcesCommand.sources_file)
|
100
100
|
end
|
101
|
+
|
102
|
+
def say(message)
|
103
|
+
super(message) unless ENV['QUIET']
|
104
|
+
end
|
101
105
|
end
|
102
106
|
end
|
103
107
|
end
|
@@ -5,7 +5,7 @@ describe Gem::Sources do
|
|
5
5
|
|
6
6
|
describe "#currently_loaded_sources" do
|
7
7
|
it "should load all of the sources from 'gem sources'" do
|
8
|
-
currently_loaded_sources.should == `gem sources`.split("\n").select { |s|
|
8
|
+
currently_loaded_sources.should == `gem sources`.split("\n").select { |s| /http/ =~ s }
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
data/spec/spec_helper.rb
CHANGED