microclimate 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0096c592c6f7279a55f05381d18103fd67f691b1
4
- data.tar.gz: 8da822d376c07c89971159caa79da12283c1e187
3
+ metadata.gz: 2e0de1768bee072ce732eb28fae3b04fb8ff7d83
4
+ data.tar.gz: 268d9016f167a3556edf177f6d1b848d20b9fe13
5
5
  SHA512:
6
- metadata.gz: 72c8591f8fa758262c3922401ca5f59ccdeacc12dda26c2a5876ec90cf32286919b01d7e931d4bd58490d3b9c81bacb386747b1ab1373731cdb291032d3affbc
7
- data.tar.gz: 8c293998df2a1c43258e8559655230839f97e7b98a19d6990d4fbf0c2d64679dc8acd10e7339b0f64369b4409afd89cf2514fd750b2bcc24da92b7e294b56e51
6
+ metadata.gz: 1d618813c2af2521081ccd0d61b66264c354891ef43a39bffe7d67572eb413db5baaeeceefbbbb4e9a62afded30ec0af89e073e55761946f7cc4c915cb308068
7
+ data.tar.gz: 2631080a51f263209ca65dfd3de02aaed49ba32c9acb8d916619cd6c81ae3906770cd841f180fe02023ff04a97f4c5778b0364475917c5e756c305178f281756
@@ -10,6 +10,10 @@ module Microclimate
10
10
 
11
11
  delegate :repo_id => :parent_repo
12
12
 
13
+ def www_url
14
+ "https://codeclimate.com/repos/#{repo_id}/compare/#{name}"
15
+ end
16
+
13
17
  protected
14
18
 
15
19
  def resource_url
@@ -40,6 +40,10 @@ module Microclimate
40
40
  Branch.new(client, self, branch_name)
41
41
  end
42
42
 
43
+ def www_url
44
+ "https://codeclimate.com/repos/#{repo_id}"
45
+ end
46
+
43
47
  protected
44
48
 
45
49
  def last_snapshot
@@ -1,3 +1,3 @@
1
1
  module Microclimate
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -33,6 +33,13 @@ describe Microclimate::Branch do
33
33
  end
34
34
  end
35
35
 
36
+ describe "#www_url" do
37
+ it "returns the branch compare view" do
38
+ url = "https://codeclimate.com/repos/#{repo_id}/compare/#{name}"
39
+ expect(subject.www_url).to eq url
40
+ end
41
+ end
42
+
36
43
  describe "#refresh!" do
37
44
  let(:url) { "#{base_url}/refresh" }
38
45
 
@@ -72,6 +72,13 @@ describe Microclimate::Repository do
72
72
  end
73
73
  end
74
74
 
75
+ describe "#www_url" do
76
+ it "returns the Code Climate HTML report" do
77
+ url = "https://codeclimate.com/repos/#{repo_id}"
78
+ expect(subject.www_url).to eq url
79
+ end
80
+ end
81
+
75
82
  describe "#id" do
76
83
  before :each do
77
84
  stub_request(:get, url).with(:api_token => api_token).to_return(:body => json_response.to_json)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microclimate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-07 00:00:00.000000000 Z
11
+ date: 2014-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler