codeclimate-services 1.11.0 → 1.11.1

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
  SHA256:
3
- metadata.gz: 849571797dc28b6279e4281c3d1b5e356a9fc8150845690d82eced4fc0c000c1
4
- data.tar.gz: e944d253acde61ff799b0f07f31fb8d8aca97eda479351ff304ab8188b769dfc
3
+ metadata.gz: 8980a3e6294016d7483aedd981ee4c54f56c45f8526274e9516013825d9f626a
4
+ data.tar.gz: ef2aaaa203bc911dbb348b5e4f1d3e0b7b6a7eaab0e7857156e4318d6c6ac74b
5
5
  SHA512:
6
- metadata.gz: 6ef756b1698fba1341bac6e6f05b4fdbd1286ae0afc14320245a89938392d9bfd2871035a09b9acf5529231da28f2ab955df4e11a30b5ea70941f6e12873b883
7
- data.tar.gz: 7795015fad0cb95435b0a1492b90438534b0821f698715dc0d986f845a6d4c6726aec744ed9f62063e178e107579b8771f8ac85914314488683c0bc65732784b
6
+ metadata.gz: bcf20aee515217c99ab7d09ee592bba7b3ec16f732e9bd7ffd3698b18d3a6e5bab3ab7c6f5dcf1bb0806d6e0c4f4179b551de756a545a2d93ccaef0467e7b87d
7
+ data.tar.gz: 3941929485b68f39e67ee5c02f03faad637e3273b16c87dc92c7b85fcf8c6025a17c40e62a1306b64b2d9ddc4d7d33e63ae4b8de5a59abd1c1d009415962673e
@@ -0,0 +1,16 @@
1
+ version: 2
2
+
3
+ jobs:
4
+ test:
5
+ machine:
6
+ docker_layer_caching: true
7
+ working_directory: ~/codeclimate/codeclimate-services
8
+ steps:
9
+ - checkout
10
+ - run: bundle install && bundle exec rake && bundle exec codeclimate-test-reporter
11
+
12
+ workflows:
13
+ version: 2
14
+ test:
15
+ jobs:
16
+ - test
@@ -36,9 +36,11 @@ module CC
36
36
  def coverage_message
37
37
  message = "#{formatted_percent(@covered_percent)}%"
38
38
 
39
- if @covered_percent_delta > 0
39
+ return message if @covered_percent_delta.nil?
40
+
41
+ if @covered_percent_delta.round(2) > 0
40
42
  message += " (+#{formatted_percent(@covered_percent_delta)}%)"
41
- elsif @covered_percent_delta < 0
43
+ elsif @covered_percent_delta.round(2) < 0
42
44
  message += " (#{formatted_percent(@covered_percent_delta)}%)"
43
45
  end
44
46
 
@@ -3,7 +3,7 @@ require "base64"
3
3
  class CC::Service::Jira < CC::Service
4
4
  class Config < CC::Service::Config
5
5
  attribute :domain, Axiom::Types::String,
6
- description: "Your JIRA host domain (e.g. yourjira.com:PORT, please exclude https://)"
6
+ description: "Your JIRA host domain (e.g. yourjira.com[:PORT], please exclude https:// and only add PORT if you are using a different port number to access your own server that is not the default)"
7
7
 
8
8
  attribute :username, Axiom::Types::String,
9
9
  description: "Must exactly match the 'username' that appears on your JIRA profile page."
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Services
3
- VERSION = "1.11.0".freeze
3
+ VERSION = "1.11.1".freeze
4
4
  end
5
5
  end
@@ -30,12 +30,20 @@ describe CC::Service::PullRequestsPresenter, type: :service do
30
30
  expect("85%").to eq(build_presenter({}, "covered_percent" => 85, "covered_percent_delta" => 0).coverage_message)
31
31
  end
32
32
 
33
+ it "message coverage without delta" do
34
+ expect("85%").to eq(build_presenter({}, "covered_percent" => 85, "covered_percent_delta" => nil).coverage_message)
35
+ end
36
+
37
+ it "message coverage the same when rounded" do
38
+ expect("85%").to eq(build_presenter({}, "covered_percent" => 85, "covered_percent_delta" => 0.0005).coverage_message)
39
+ end
40
+
33
41
  it "message coverage up" do
34
42
  expect("85.5% (+2.46%)").to eq(build_presenter({}, "covered_percent" => 85.5, "covered_percent_delta" => 2.4567).coverage_message)
35
43
  end
36
44
 
37
45
  it "message coverage down" do
38
- expect("85.35% (-3%)").to eq( build_presenter({}, "covered_percent" => 85.348, "covered_percent_delta" => -3.0).coverage_message)
46
+ expect("85.35% (-3%)").to eq(build_presenter({}, "covered_percent" => 85.348, "covered_percent_delta" => -3.0).coverage_message)
39
47
  end
40
48
 
41
49
  it "message approved" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Helmkamp
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-11 00:00:00.000000000 Z
11
+ date: 2021-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -129,6 +129,7 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ".circleci/config.yml"
132
133
  - ".codeclimate.yml"
133
134
  - ".gitignore"
134
135
  - ".rspec"
@@ -144,7 +145,6 @@ files:
144
145
  - bin/nokogiri
145
146
  - bin/pry
146
147
  - bin/rake
147
- - circle.yml
148
148
  - codeclimate-services.gemspec
149
149
  - config/cacert.pem
150
150
  - config/load.rb
@@ -222,7 +222,7 @@ homepage: https://codeclimate.com/
222
222
  licenses:
223
223
  - MIT
224
224
  metadata: {}
225
- post_install_message:
225
+ post_install_message:
226
226
  rdoc_options: []
227
227
  require_paths:
228
228
  - lib
@@ -237,9 +237,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  - !ruby/object:Gem::Version
238
238
  version: '0'
239
239
  requirements: []
240
- rubyforge_project:
241
- rubygems_version: 2.7.7
242
- signing_key:
240
+ rubygems_version: 3.0.3
241
+ signing_key:
243
242
  specification_version: 4
244
243
  summary: Service classes for Code Climate
245
244
  test_files:
data/circle.yml DELETED
@@ -1,3 +0,0 @@
1
- test:
2
- override:
3
- - bundle exec rake && bundle exec codeclimate-test-reporter