cc_cover_report 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: 50694ac7b474f1b2027c1662d5a1204eaee9eb34
4
- data.tar.gz: d07c79ba463a66e86626f57ae562e9fc18303f8d
3
+ metadata.gz: 5b4f40f8f4219ed13d65bcd9f9e6747455fae366
4
+ data.tar.gz: 2e6bfd8bd054de4149bbe59c3f45c96732d747f1
5
5
  SHA512:
6
- metadata.gz: 2503ac677ff346e0a01b31e2a3b34a88bbbfbc9fb5428983b91840e8d43e851ff0ec1ff74ee2c1d79929b25a38939223685c17fa145ebfe0c66bc99d58bd2c45
7
- data.tar.gz: 8ea737d2182d16033b6e87c637eae7791a4e4aab7900751045c72f7cf9112213ad7d34a542495026fdfb9afc47b3ce84ea474568772d31594d5e18e4ea67d3a2
6
+ metadata.gz: 9cf161597f5ecc4864b78e6d7477a476fd7ff45ac8f4753498a6ff1e06900945364e0db94903dd8d15c5718b329c2e8e61e2579184a25b132f81c3254009bf3c
7
+ data.tar.gz: c69b7fffd58e778f72c901b8c08a5f0ea9b99df1348d3cf10475ffe06f18868e56d829ebe0678d11a43d295228ff1aa596aa6003d0bdda4a36093f4c11a6095f
@@ -1,3 +1,3 @@
1
1
  class CcCoverReport
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,11 +1,11 @@
1
1
  require "cc_cover_report/version"
2
+ require 'rest_client'
2
3
 
3
4
  class CcCoverReport
4
5
  def self.report(repo_key = nil)
5
6
  begin
6
7
  repo_key ||= ENV['CC_REPO_KEY']
7
8
  if repo_key.present?
8
- require 'rest_client'
9
9
  index_file = SimpleCov.coverage_path + "/index.html"
10
10
  if SimpleCov.running
11
11
  silence_stream(STDOUT) do
@@ -13,18 +13,20 @@ class CcCoverReport
13
13
  end
14
14
  end
15
15
  if File.exist?(index_file)
16
- RestClient.post('https://codecop.encore.io/api/coverage.json',
17
- :commit => `git log --pretty=%P -n 1`.chomp,
18
- :repo_key => repo_key,
19
- :coverage_file => File.new(index_file)
20
- )
21
- puts "Pushed coverage report to CC"
16
+ RestClient::Request.execute(:url => 'https://codecop.encore.io/api/coverage.json', :method => :post, :verify_ssl => false,
17
+ :payload => {
18
+ :commit => `git log --pretty=%P -n 1`.chomp,
19
+ :repo_key => repo_key,
20
+ :coverage_file => File.new(index_file)}
21
+ )
22
+ puts "Pushed coverage report to CC"
23
+ end
24
+ else
25
+ # No index file found - cannot upload coverage report
22
26
  end
23
- else
24
- # No index file found - cannot upload coverage report
27
+ rescue Exception
28
+ # Don't break any builds - just fail
25
29
  end
26
- rescue Exception
27
- # Don't break any builds - just fail
28
30
  end
29
31
  end
30
- end
32
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cc_cover_report
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
  - Encore