Skip to content

Commit

Permalink
Corrected some RuboCop issues.
Browse files Browse the repository at this point in the history
Signed-off-by: Hermann Mayer <hermann.mayer92@gmail.com>
  • Loading branch information
Jack12816 committed Jun 8, 2023
1 parent 2ec46b9 commit d76e63a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,6 +1,6 @@
### next

* TODO: Replace this bullet point with an actual description of a change.
* Moved the development dependencies from the gemspec to the Gemfile (#2)

### 1.2.0

Expand Down
18 changes: 18 additions & 0 deletions Gemfile
Expand Up @@ -6,3 +6,21 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in keyless.gemspec
gemspec

# Development dependencies
gem 'appraisal', '~> 2.4'
gem 'bundler', '~> 2.3'
gem 'countless', '~> 1.1'
gem 'guard-rspec', '~> 4.7'
gem 'railties', '>= 5.2'
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.12'
gem 'rubocop', '~> 1.28'
gem 'rubocop-rails', '~> 2.14'
gem 'rubocop-rspec', '~> 2.10'
gem 'simplecov', '>= 0.22'
gem 'timecop', '>= 0.9.6'
gem 'vcr', '~> 6.0'
gem 'webmock', '~> 3.18'
gem 'yard', '>= 0.9.28'
gem 'yard-activesupport-concern', '>= 0.0.1'
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -13,6 +13,7 @@ BASH_RUN_SHELL_FLAGS ?=

# Directories
VENDOR_DIR ?= vendor/bundle
GEMFILES_DIR ?= gemfiles

# Host binaries
AWK ?= awk
Expand Down
16 changes: 16 additions & 0 deletions gemfiles/rails_5.2.gemfile
Expand Up @@ -2,6 +2,22 @@

source "https://rubygems.org"

gem "appraisal", "~> 2.4"
gem "bundler", "~> 2.3"
gem "countless", "~> 1.1"
gem "guard-rspec", "~> 4.7"
gem "railties", ">= 5.2"
gem "rake", "~> 13.0"
gem "rspec", "~> 3.12"
gem "rubocop", "~> 1.28"
gem "rubocop-rails", "~> 2.14"
gem "rubocop-rspec", "~> 2.10"
gem "simplecov", ">= 0.22"
gem "timecop", ">= 0.9.6"
gem "vcr", "~> 6.0"
gem "webmock", "~> 3.18"
gem "yard", ">= 0.9.28"
gem "yard-activesupport-concern", ">= 0.0.1"
gem "activesupport", "~> 5.2.0"

gemspec path: "../"
17 changes: 0 additions & 17 deletions keyless.gemspec
Expand Up @@ -39,21 +39,4 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'httparty', '>= 0.21'
spec.add_runtime_dependency 'jwt', '~> 2.6'
spec.add_runtime_dependency 'recursive-open-struct', '~> 1.1'

spec.add_development_dependency 'appraisal', '~> 2.4'
spec.add_development_dependency 'bundler', '~> 2.3'
spec.add_development_dependency 'countless', '~> 1.1'
spec.add_development_dependency 'guard-rspec', '~> 4.7'
spec.add_development_dependency 'railties', '>= 5.2'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.12'
spec.add_development_dependency 'rubocop', '~> 1.28'
spec.add_development_dependency 'rubocop-rails', '~> 2.14'
spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
spec.add_development_dependency 'simplecov', '>= 0.22'
spec.add_development_dependency 'timecop', '>= 0.9.6'
spec.add_development_dependency 'vcr', '~> 6.0'
spec.add_development_dependency 'webmock', '~> 3.18'
spec.add_development_dependency 'yard', '>= 0.9.28'
spec.add_development_dependency 'yard-activesupport-concern', '>= 0.0.1'
end
14 changes: 6 additions & 8 deletions spec/keyless/rsa_public_key_spec.rb
Expand Up @@ -132,10 +132,8 @@ def ignore_exceptions
end

describe '#fetch' do
let(:pub1) { file_fixture('rsa1.pub') }
let(:pub2) { file_fixture('rsa2.pub') }
let(:configure_pub1) { instance.url = pub1.path }
let(:configure_pub2) { instance.url = pub2.path }
let(:configure_pub_old) { instance.url = file_fixture('rsa1.pub').path }
let(:configure_pub_new) { instance.url = file_fixture('rsa2.pub').path }

context 'with cache' do
before do
Expand All @@ -144,8 +142,8 @@ def ignore_exceptions
end

it 'cache the key' do
configure_pub1
expect { configure_pub2 }.not_to change { instance.fetch.to_s }
configure_pub_old
expect { configure_pub_new }.not_to change { instance.fetch.to_s }
end

it 'caches nothing on issues', :vcr do
Expand All @@ -158,8 +156,8 @@ def ignore_exceptions
context 'without cache' do
it 'does not cache the key' do
instance.caching = false
configure_pub1
expect { configure_pub2 }.to change { instance.fetch.to_s }
configure_pub_old
expect { configure_pub_new }.to change { instance.fetch.to_s }
end
end
end
Expand Down

0 comments on commit d76e63a

Please sign in to comment.