codacy-coverage 0.1.0 → 0.2.0

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: 8df817bbfce9af912bf497538caee4b17d9ddc48
4
- data.tar.gz: 36c282bdc01b51a807d3e692b8ba8ad38c7e2ba7
3
+ metadata.gz: e74d5ab16d5afc3db4c738274f217c511668351f
4
+ data.tar.gz: bf9faf6a52e102255a3617a9ee69c9e3c8594b01
5
5
  SHA512:
6
- metadata.gz: a266657f6cfd7a0284c20fc1058ed951e6b21d9d3f624ecea51b065f7e4a0c0db35d8f4d6c25403c8bbceecb4d1bb339ee6dea3c62ac5f529bbdbc106387d2bc
7
- data.tar.gz: 53788e77ea9a71963f8a3c87986bc0e516a3ce5c256aa76f309714bba75d172f8817fae868f41bc61b70d7453389e780fdcd22459d37cfa6bd249616eae983e8
6
+ metadata.gz: 70acf7c5aae1b04b6347a2964c1a2017f5e964220f92be9c2ea58e1b6e39b73aeb35f56be842f269160dc64f3aa1879e50bd55c6c6738c45e0bcc0f620783730
7
+ data.tar.gz: 1491f42552b486b76bef1769afe11f4ecabcbfd6b8055399323fbd86c67b468ed001127951aa949f88546c6767c9ed7aebe944583064a0da2701c08f48fe99bc
@@ -0,0 +1,41 @@
1
+ # ruby-codacy-coverage
2
+
3
+ Ruby coverage reporter for Codacy https://www.codacy.com
4
+
5
+ [![Codacy Badge](https://api.codacy.com/project/badge/72a7aaa0e3fd4a8db27607da159d3daa)](https://www.codacy.com/app/Codacy/ruby-codacy-coverage)
6
+ [![Build Status](https://circleci.com/gh/codacy/ruby-codacy-coverage.png?style=shield&circle-token=:circle-token)](https://circleci.com/gh/codacy/ruby-codacy-coverage)
7
+
8
+ Parses SimpleCov output and submits the result to Codacy
9
+
10
+ ## Setup
11
+
12
+ Include the gem in your project
13
+
14
+ ```
15
+ gem 'codacy-coverage', :require => false
16
+ ```
17
+
18
+ In the first line of your spec_helper initialize the reporter:
19
+
20
+ ```
21
+ require 'codacy-coverage'
22
+
23
+ Codacy::Reporter.start
24
+ ```
25
+
26
+
27
+ #### Configuration
28
+
29
+ To update Codacy, you will need your project API token. You can find the token in Project -> Settings -> Integrations -> Project API.
30
+
31
+ Then set it in your terminal, replacing %Project_Token% with your own token:
32
+
33
+ ```
34
+ export CODACY_PROJECT_TOKEN=%Project_Token%
35
+ ```
36
+
37
+ By default this plugin will not submit results if you run your tests in localhost. If you want to force the submission you can setup the following environment variable:
38
+
39
+ ```
40
+ export CODACY_RUN_LOCAL=true
41
+ ```
@@ -14,11 +14,12 @@ Gem::Specification.new do |gem|
14
14
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
15
  gem.name = "codacy-coverage"
16
16
  gem.require_paths = ["lib"]
17
- gem.version = '0.1.0'
17
+ gem.version = '0.2.0'
18
18
 
19
- gem.required_ruby_version = '>= 1.8.7'
19
+ gem.required_ruby_version = '>= 1.9.2'
20
20
 
21
21
  gem.add_dependency 'simplecov', '~> 0.10.0'
22
+ gem.add_dependency 'rest-client', '~> 1.8'
22
23
 
23
24
  gem.add_development_dependency 'bundler', '~> 1.7'
24
25
  end
@@ -21,7 +21,7 @@ module Codacy
21
21
  logger.error 'Could not find the current commit, make sure that you are running inside a git project.'
22
22
  false
23
23
  else
24
- logger.info('Posting ' + result.to_s.bytes.length.to_s + ' bytes to ' + url)
24
+ logger.info('Posting ' + result.to_s.length.to_s + ' bytes to ' + url)
25
25
  response = send_request(url, result, project_token)
26
26
 
27
27
  logger.info(response)
@@ -13,8 +13,6 @@ module Codacy
13
13
  commit
14
14
  end
15
15
 
16
- private
17
-
18
16
  def self.git_commit
19
17
  git("log -1 --pretty=format:'%H'")
20
18
  end
metadata CHANGED
@@ -1,41 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codacy-coverage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nuno Teixeira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-08 00:00:00.000000000 Z
11
+ date: 2015-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.10.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.10.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.8'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.8'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - ~>
45
+ - - "~>"
32
46
  - !ruby/object:Gem::Version
33
47
  version: '1.7'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - ~>
52
+ - - "~>"
39
53
  - !ruby/object:Gem::Version
40
54
  version: '1.7'
41
55
  description: Post code coverage results to Codacy.
@@ -45,8 +59,9 @@ executables: []
45
59
  extensions: []
46
60
  extra_rdoc_files: []
47
61
  files:
48
- - .gitignore
62
+ - ".gitignore"
49
63
  - Gemfile
64
+ - README.md
50
65
  - codacy-coverage.gemspec
51
66
  - lib/codacy-coverage.rb
52
67
  - lib/codacy/client.rb
@@ -68,17 +83,17 @@ require_paths:
68
83
  - lib
69
84
  required_ruby_version: !ruby/object:Gem::Requirement
70
85
  requirements:
71
- - - '>='
86
+ - - ">="
72
87
  - !ruby/object:Gem::Version
73
- version: 1.8.7
88
+ version: 1.9.2
74
89
  required_rubygems_version: !ruby/object:Gem::Requirement
75
90
  requirements:
76
- - - '>='
91
+ - - ">="
77
92
  - !ruby/object:Gem::Version
78
93
  version: '0'
79
94
  requirements: []
80
95
  rubyforge_project:
81
- rubygems_version: 2.0.14
96
+ rubygems_version: 2.4.6
82
97
  signing_key:
83
98
  specification_version: 4
84
99
  summary: Post code coverage results to Codacy.