microclimate 0.0.2 → 0.0.3
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c82b3c12bfd8f56bbe968938ed1294898673e3e
|
4
|
+
data.tar.gz: c11a6efb39cba29627e5ead5c399f58e91d85fd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 029d06cf210d599427a513eda38f772416653762936bc6ab01fe86c39bda85505841aea941fd6d33f20d8d6fec0d6f4ed59bf06ab677a6ba9972efe7f6e65d95
|
7
|
+
data.tar.gz: e683c537c2144f5b7d57b292dc26fddb13935610cb83bc0b84feb5543f42c85e087625b17efd4c6762e07a853b2b67810813bd7134c58444adf88d928758c8ee
|
@@ -22,8 +22,7 @@ module Microclimate
|
|
22
22
|
# Force Code Climate to refresh this repository (at the master branch)
|
23
23
|
def refresh!
|
24
24
|
output = connection.post resource_refresh_url, :api_token => api_token
|
25
|
-
|
26
|
-
Response.new JSON.parse(json)
|
25
|
+
output.success?
|
27
26
|
end
|
28
27
|
|
29
28
|
def ready?
|
data/lib/microclimate/version.rb
CHANGED
@@ -42,9 +42,10 @@ describe Microclimate::Branch do
|
|
42
42
|
|
43
43
|
describe "#refresh!" do
|
44
44
|
let(:url) { "#{base_url}/refresh" }
|
45
|
+
let(:response) { "some html text" }
|
45
46
|
|
46
47
|
it "hits the branch Code Climate URL with a POST" do
|
47
|
-
stub_request(:post, url).with(:api_token => api_token).to_return(:body =>
|
48
|
+
stub_request(:post, url).with(:api_token => api_token).to_return(:body => response.to_json)
|
48
49
|
subject.refresh!
|
49
50
|
|
50
51
|
expect(a_request(:post, url)).to have_been_made
|
@@ -57,12 +57,12 @@ describe Microclimate::Repository do
|
|
57
57
|
|
58
58
|
describe "#refresh!" do
|
59
59
|
let(:url) { subject.host + "/api/repos/" + repo_id + "/refresh" }
|
60
|
-
let(:
|
61
|
-
|
60
|
+
let(:response) do
|
61
|
+
"some html text"
|
62
62
|
end
|
63
63
|
|
64
64
|
before :each do
|
65
|
-
stub_request(:post, url).with(:api_token => api_token).to_return(:body =>
|
65
|
+
stub_request(:post, url).with(:api_token => api_token).to_return(:body => response.to_json)
|
66
66
|
end
|
67
67
|
|
68
68
|
it "POSTs to /api/repos/:repo_id/refresh" do
|