heroku-nav 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/heroku-nav.gemspec +1 -1
- data/lib/heroku/nav.rb +1 -6
- metadata +2 -2
data/Rakefile
CHANGED
@@ -21,7 +21,7 @@ begin
|
|
21
21
|
gemspec.add_dependency(%q<rest-client>, [">= 1.0"])
|
22
22
|
gemspec.add_dependency(%q<json>, [">= 0"])
|
23
23
|
|
24
|
-
gemspec.version = '0.1.
|
24
|
+
gemspec.version = '0.1.15'
|
25
25
|
end
|
26
26
|
rescue LoadError
|
27
27
|
puts "Jeweler not available. Install it with: gem install jeweler"
|
data/heroku-nav.gemspec
CHANGED
data/lib/heroku/nav.rb
CHANGED
@@ -102,9 +102,7 @@ module Heroku
|
|
102
102
|
class << self
|
103
103
|
def fetch
|
104
104
|
Timeout.timeout(4) do
|
105
|
-
|
106
|
-
puts "fetched: #{x.inspect}"
|
107
|
-
x
|
105
|
+
RestClient.get(resource_url).to_s
|
108
106
|
end
|
109
107
|
rescue => e
|
110
108
|
STDERR.puts "Failed to fetch the Heroku #{resource}: #{e.class.name} - #{e.message}"
|
@@ -123,11 +121,8 @@ module Heroku
|
|
123
121
|
|
124
122
|
def insert!
|
125
123
|
if @nav
|
126
|
-
puts @body.inspect
|
127
124
|
@body.send(@body_accessor).gsub!(/(<body.*?>)/i, "\\1#{@nav}")
|
128
125
|
@headers['Content-Length'] = @body.send(@body_accessor).size.to_s
|
129
|
-
puts "-------"
|
130
|
-
puts @body.inspect
|
131
126
|
end
|
132
127
|
end
|
133
128
|
end
|