codeclimate-services 1.11.1 → 1.11.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
  SHA256:
3
- metadata.gz: 8980a3e6294016d7483aedd981ee4c54f56c45f8526274e9516013825d9f626a
4
- data.tar.gz: ef2aaaa203bc911dbb348b5e4f1d3e0b7b6a7eaab0e7857156e4318d6c6ac74b
3
+ metadata.gz: 96ac3fb2929dbad8aadc4a01e46ae15dfdbd0f624da568dd171349b664cb9da2
4
+ data.tar.gz: de09b581fb3a7ec8c7d597d65f06d832acc8f00ecbbde05cc2a4a340ea6e75b2
5
5
  SHA512:
6
- metadata.gz: bcf20aee515217c99ab7d09ee592bba7b3ec16f732e9bd7ffd3698b18d3a6e5bab3ab7c6f5dcf1bb0806d6e0c4f4179b551de756a545a2d93ccaef0467e7b87d
7
- data.tar.gz: 3941929485b68f39e67ee5c02f03faad637e3273b16c87dc92c7b85fcf8c6025a17c40e62a1306b64b2d9ddc4d7d33e63ae4b8de5a59abd1c1d009415962673e
6
+ metadata.gz: 9e75e38ea1dbcda5c960c5310a98ab6cade92b8ec51a54a3a4dfb43249ef04f35d318f2733f51e80920d337ed36c77cfbae14ca60ac5efbcafae68da6e3f1df5
7
+ data.tar.gz: 5ef15601e7864fd5a4287ac48658bd9e2e60847939e19c1a16f9bacc4836ee1d5eec9363b9648708edffdfa0678f662747e0b80b70792321572c52d0f3cc99ca
data/.circleci/config.yml CHANGED
@@ -1,13 +1,23 @@
1
- version: 2
2
-
1
+ version: 2.0
3
2
  jobs:
4
3
  test:
5
- machine:
6
- docker_layer_caching: true
4
+ environment:
5
+ CC_TEST_REPORTER_ID: ad21bc049a323138b0a88086069115e9df6dba417912095b7bb17b7a65fc6182
6
+ docker:
7
+ - image: "circleci/ruby:2.7.5"
7
8
  working_directory: ~/codeclimate/codeclimate-services
8
9
  steps:
9
10
  - checkout
10
- - run: bundle install && bundle exec rake && bundle exec codeclimate-test-reporter
11
+ - run:
12
+ name: Setup Coverage
13
+ command: |
14
+ (curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > cc-test-reporter && chmod +x ./cc-test-reporter) || echo "Couldn't download test reporter"
15
+ - run: bundle install && bundle exec rake
16
+ - persist_to_workspace:
17
+ root: .
18
+ paths:
19
+ - coverage
20
+ - run: ./cc-test-reporter after-build --exit-code $? || echo "Send coverage skipped..."
11
21
 
12
22
  workflows:
13
23
  version: 2
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.4
1
+ 2.7.5
data/Gemfile CHANGED
@@ -7,5 +7,4 @@ gem "pry"
7
7
 
8
8
  group :test do
9
9
  gem "simplecov"
10
- gem "codeclimate-test-reporter", "~> 1.0.0"
11
10
  end
data/README.md CHANGED
@@ -131,6 +131,18 @@ and always return a hash of `{ ok: true|false, message: "String (HTML ok)" }`.
131
131
 
132
132
  When you open your PR, please include an image for your service.
133
133
 
134
+ ## Release
135
+
136
+ 1. Bump the version on `lib/cc/services/version`
137
+ 2. A gem owner developer should run the following: (check owners here https://rubygems.org/gems/codeclimate-services)
138
+ ```shell
139
+ bundle install
140
+ gem build codeclimate-services.gemspec
141
+ gem push codeclimate-services-<VERSION>.gem
142
+ git tag v<VERSION>
143
+ git push origin master --tags
144
+ ```
145
+
134
146
  ## License
135
147
 
136
148
  See LICENSE.txt. This incorporates code from bugsnag-notification-plugins and
@@ -19,7 +19,7 @@ class CC::Service::Formatter < SimpleDelegator
19
19
  end
20
20
 
21
21
  def message_prefix
22
- prefix = options.fetch(:prefix, "").to_s
22
+ prefix = (options[:prefix] || "").to_s
23
23
 
24
24
  if options[:prefix_with_repo]
25
25
  prefix << "[#{repo_name}]"
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Services
3
- VERSION = "1.11.1".freeze
3
+ VERSION = "1.11.2".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,21 @@
1
+ describe CC::Service::Formatter do
2
+
3
+ class TestFormatter < described_class
4
+ def format_test
5
+ message = message_prefix
6
+ message << "This is a test"
7
+ end
8
+ end
9
+
10
+ FakeService = Struct.new(:receive)
11
+
12
+ it "supports passing nil as prefix" do
13
+ formatter = TestFormatter.new(
14
+ FakeService.new(:some_result),
15
+ prefix: nil,
16
+ prefix_with_repo: false,
17
+ )
18
+
19
+ expect(formatter.format_test).to eq("This is a test")
20
+ end
21
+ end
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.1
4
+ version: 1.11.2
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: 2021-02-26 00:00:00.000000000 Z
11
+ date: 2022-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -198,6 +198,7 @@ files:
198
198
  - spec/cc/service/asana_spec.rb
199
199
  - spec/cc/service/campfire_spec.rb
200
200
  - spec/cc/service/flowdock_spec.rb
201
+ - spec/cc/service/formatter_spec.rb
201
202
  - spec/cc/service/github_issues_spec.rb
202
203
  - spec/cc/service/github_pull_requests_spec.rb
203
204
  - spec/cc/service/gitlab_merge_requests_spec.rb
@@ -222,7 +223,7 @@ homepage: https://codeclimate.com/
222
223
  licenses:
223
224
  - MIT
224
225
  metadata: {}
225
- post_install_message:
226
+ post_install_message:
226
227
  rdoc_options: []
227
228
  require_paths:
228
229
  - lib
@@ -237,8 +238,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
238
  - !ruby/object:Gem::Version
238
239
  version: '0'
239
240
  requirements: []
240
- rubygems_version: 3.0.3
241
- signing_key:
241
+ rubygems_version: 3.3.7
242
+ signing_key:
242
243
  specification_version: 4
243
244
  summary: Service classes for Code Climate
244
245
  test_files:
@@ -250,6 +251,7 @@ test_files:
250
251
  - spec/cc/service/asana_spec.rb
251
252
  - spec/cc/service/campfire_spec.rb
252
253
  - spec/cc/service/flowdock_spec.rb
254
+ - spec/cc/service/formatter_spec.rb
253
255
  - spec/cc/service/github_issues_spec.rb
254
256
  - spec/cc/service/github_pull_requests_spec.rb
255
257
  - spec/cc/service/gitlab_merge_requests_spec.rb