Skip to content

Commit

Permalink
Merge pull request #26 from hiroara/chore/support-ruby27
Browse files Browse the repository at this point in the history
Chore/support ruby27
  • Loading branch information
RobertMaciejewski committed May 14, 2020
2 parents 33e2bbb + 3b07c47 commit 671ad64
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
29 changes: 18 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2
version: 2.1
jobs:
build: &build
docker:
Expand All @@ -13,13 +13,15 @@ jobs:
- run:
name: install dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
gem install bundler -v 2.1.2
bundle config set path vendor/bundle
bundle install --jobs=4 --retry=3
# run tests!
- run:
name: run tests
command: |
mkdir /tmp/test-results
bundle exec rubocop --format progress -r $(bundle show rubocop-junit-formatter)/lib/rubocop/formatter/junit_formatter.rb --format RuboCop::Formatter::JUnitFormatter --out /tmp/test-results/rubocop.xml
bundle exec rubocop --format progress -r $(bundle info --path rubocop-junit-formatter)/lib/rubocop/formatter/junit_formatter.rb --format RuboCop::Formatter::JUnitFormatter --out /tmp/test-results/rubocop.xml
bundle exec rspec --format progress \
--format RspecJunitFormatter \
--out /tmp/test-results/rspec.xml \
Expand All @@ -30,27 +32,32 @@ jobs:
- store_artifacts:
path: /tmp/test-results
destination: test-results
ruby-2.3:
ruby-23:
<<: *build
docker:
- image: circleci/ruby:2.3
ruby-2.4:
ruby-24:
<<: *build
docker:
- image: circleci/ruby:2.4
ruby-2.5:
ruby-25:
<<: *build
docker:
- image: circleci/ruby:2.5
ruby-2.6:
ruby-26:
<<: *build
docker:
- image: circleci/ruby:2.6
ruby-27:
<<: *build
docker:
- image: circleci/ruby:2.7
workflows:
version: 2
ruby-multi-build:
jobs:
- ruby-2.3
- ruby-2.4
- ruby-2.5
- ruby-2.6
- ruby-23
- ruby-24
- ruby-25
- ruby-26
- ruby-27
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source 'https://rubygems.org'

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

gem 'rake', '~> 10.0'
gem 'rake', '~> 13.0'

group :development do
gem 'pry', '~> 0.10'
Expand Down
5 changes: 2 additions & 3 deletions lib/scnnr/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ def send_json(data)
end
end

def send_request
block = block_given? ? Proc.new : nil
request = build_request(&block)
def send_request(&block)
request = block_given? ? build_request(&block) : build_request
with_retries do
Net::HTTP.start(@uri.host, @uri.port, use_ssl: use_ssl?) do |http|
@logger&.info("Started #{@method.upcase} #{@uri}")
Expand Down
2 changes: 1 addition & 1 deletion scnnr.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_development_dependency 'bundler', '~> 1.15'
spec.add_development_dependency 'bundler', '~> 2.1'
end

0 comments on commit 671ad64

Please sign in to comment.