Skip to content

Commit

Permalink
Merge pull request #65 from sue445/feature/ruby_2.7
Browse files Browse the repository at this point in the history
CI against ruby 2.7
  • Loading branch information
sue445 committed Jan 1, 2020
2 parents ecbcf71 + 6315163 commit 79765c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
34 changes: 10 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
version: 2.1

orbs:
ruby-orbs: sue445/ruby-orbs@volatile
codeclimate: sue445/codeclimate@volatile
ruby-orbs: sue445/ruby-orbs@volatile

executors:
ruby:
parameters:
tag:
type: string
default: "2.6"
default: "latest"
docker:
- image: ruby:<< parameters.tag >>
environment:
Expand All @@ -26,27 +27,6 @@ executors:
CC_TEST_REPORTER_ID: d91e7c9665019f1574eb4c5a3de1547c80bc3062e3c297282f106501a3c5c694
working_directory: ~/app

commands:
with-cc-test-reporter:
description: "Run test with cc-test-reporter"
parameters:
steps:
type: steps
default: []
description: "Run steps between `before-build` and `after-build`"
steps:
- run:
name: Setup Code Climate test-reporter
command: |
# download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- run: ./cc-test-reporter before-build
- steps: << parameters.steps >>
- run:
command: ./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
when: always

jobs:
rspec:
parameters:
Expand All @@ -61,10 +41,12 @@ jobs:
- run: bundle --version
- run: gem --version
- ruby-orbs/bundle-install:
cache_key_prefix: "v2-rspec"
with_gemfile_lock: false
gemspec_name: "itest5ch"
update_always: true
- with-cc-test-reporter:
- codeclimate/with-cc-test-reporter:
after_build_args: "--coverage-input-type simplecov"
steps:
- run: bundle exec rspec

Expand All @@ -75,6 +57,7 @@ jobs:
steps:
- checkout
- ruby-orbs/bundle-install:
cache_key_prefix: "v2-rubocop"
with_gemfile_lock: false
gemspec_name: "itest5ch"
update_always: true
Expand All @@ -88,6 +71,9 @@ build_jobs: &build_jobs
- rspec:
name: "rspec:2.6"
version: "2.6"
- rspec:
name: "rspec:2.7"
version: "2.7"
- rubocop

workflows:
Expand Down
2 changes: 1 addition & 1 deletion lib/itest5ch/http_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_html(url, referer: nil)
options["User-Agent"] = Itest5ch.config.user_agent if Itest5ch.config.user_agent
options["Referer"] = referer if referer

open(url, options).read # rubocop:disable Security/Open
URI.open(url, options).read
end

# @param url [String]
Expand Down

0 comments on commit 79765c2

Please sign in to comment.