rubyforge 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/rubyforge.rb +8 -5
- metadata +2 -2
data/History.txt
CHANGED
data/lib/rubyforge.rb
CHANGED
@@ -9,12 +9,10 @@ require 'rubyforge/client'
|
|
9
9
|
|
10
10
|
$TESTING = false unless defined? $TESTING
|
11
11
|
|
12
|
-
$DEBUG=false
|
13
|
-
|
14
12
|
class RubyForge
|
15
13
|
|
16
14
|
# :stopdoc:
|
17
|
-
VERSION = '2.0.
|
15
|
+
VERSION = '2.0.3'
|
18
16
|
HOME = ENV["HOME"] || ENV["HOMEPATH"] || File::expand_path("~")
|
19
17
|
RUBYFORGE_D = File::join HOME, ".rubyforge"
|
20
18
|
CONFIG_F = File::join RUBYFORGE_D, "user-config.yml"
|
@@ -71,7 +69,12 @@ class RubyForge
|
|
71
69
|
end
|
72
70
|
|
73
71
|
def uri
|
74
|
-
|
72
|
+
uri = @userconfig['uri']
|
73
|
+
abort "Using new REST api, but uri isn't api.rubyforge.org.
|
74
|
+
run `rubyforge setup` and fix please" if
|
75
|
+
uri =~ /rubyforge.org/ and uri !~ /api.rubyforge.org/
|
76
|
+
|
77
|
+
@uri ||= URI.parse uri
|
75
78
|
end
|
76
79
|
|
77
80
|
def setup
|
@@ -110,7 +113,7 @@ class RubyForge
|
|
110
113
|
end
|
111
114
|
|
112
115
|
def get_via_rest_api(path)
|
113
|
-
url = "#{
|
116
|
+
url = "#{self.uri}#{path}"
|
114
117
|
puts "Hitting REST API: #{url}" if $DEBUG
|
115
118
|
JSON.parse(client.get_content(url, {}, {}, @userconfig))
|
116
119
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyforge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-10-
|
15
|
+
date: 2009-10-11 00:00:00 -04:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|