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: 2e0de1768bee072ce732eb28fae3b04fb8ff7d83
4
- data.tar.gz: 268d9016f167a3556edf177f6d1b848d20b9fe13
3
+ metadata.gz: 6c82b3c12bfd8f56bbe968938ed1294898673e3e
4
+ data.tar.gz: c11a6efb39cba29627e5ead5c399f58e91d85fd8
5
5
  SHA512:
6
- metadata.gz: 1d618813c2af2521081ccd0d61b66264c354891ef43a39bffe7d67572eb413db5baaeeceefbbbb4e9a62afded30ec0af89e073e55761946f7cc4c915cb308068
7
- data.tar.gz: 2631080a51f263209ca65dfd3de02aaed49ba32c9acb8d916619cd6c81ae3906770cd841f180fe02023ff04a97f4c5778b0364475917c5e756c305178f281756
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
- json = output.body
26
- Response.new JSON.parse(json)
25
+ output.success?
27
26
  end
28
27
 
29
28
  def ready?
@@ -1,3 +1,3 @@
1
1
  module Microclimate
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -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 => json_response.to_json)
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(:json_response) do
61
- {"hello" => "world"}
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 => json_response.to_json)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microclimate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hao