Closed sphynx79 closed 5 years ago
Here is what I get:
% rbenv version
2.5.3 (set by /Users/username/light-service/.ruby-version)
And when I try rake:
% bundle exec rake
Randomized with seed 19202
.........................................................................................................................................................................................
Finished in 0.10075 seconds (files took 0.42454 seconds to load)
185 examples, 0 failures
Randomized with seed 19202
Running RuboCop...
Inspecting 80 files
..................................................................C.............
Offenses:
lib/light-service/organizer/with_reducer.rb:30:11: C: Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
80 files inspected, 1 offense detected
RuboCop failed!
Did you try bundle exec
?
Note to self: I need to tidy up the code, thanks to a newer version of Rubocop.
yes i try also:
$: bundle exec rake
This is my ruby version:
ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
And this is my bundle list: Gems included by the bundle:
Gems included by the bundle:
I am using rbenv
with homebrew locally.
I upgraded to Ruby v 2.6.0.
After installing all the gems via bundler, I received this error:
% be rubocop
Error: Unknown Ruby version 2.6 found in `.ruby-version`.
Supported versions: 2.2, 2.3, 2.4, 2.5
But be rake spec
worked properly.
After I changed lightservice.gemspec
this way:
- gem.add_development_dependency("rubocop", "~> 0.53")
+ gem.add_development_dependency("rubocop", "~> 0.63")
Rubocop gave me the same error I saw with v. 2.5.x:
% be rubocop
Inspecting 80 files
..................................................................C.............
Offenses:
lib/light-service/organizer/with_reducer.rb:30:11: C: Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
80 files inspected, 1 offense detected
Care to submit a PR to show me what you needed to get it to work? Thanks!
For me work nice:
λ bundle exec rake
C:/Ruby26/bin/ruby.exe -I'C:/Ruby26/lib/ruby/gems/2.6.0/gems/rspec-core-3.8.0/lib';'C:/Ruby26/lib/ruby/gems/2.6.0/gems/rspec-support-3.8.0/lib' 'C:/Ruby26/lib/ruby/gems/2.6.0/gems/rspec-core-3.8.0/exe/rspec' --pattern 'spec/**{,/*/**}/*_spec.rb'
Randomized with seed 47065
.........................................................................................................................................................................................
Finished in 0.35879 seconds (files took 1.99 seconds to load)
185 examples, 0 failures
Randomized with seed 47065
Running RuboCop...
Inspecting 80 files
................................................................................
80 files inspected, no offenses detected
ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
λ bundle list
Gems included by the bundle:
* activesupport (5.2.2)
* appraisal (2.2.0)
* ast (2.4.0)
* bundler (2.0.1)
* coderay (1.1.2)
* concurrent-ruby (1.1.4)
* diff-lcs (1.3)
* docile (1.3.1)
* i18n (1.5.3)
* jaro_winkler (1.5.2)
* json (2.1.0)
* method_source (0.9.2)
* minitest (5.11.3)
* parallel (1.13.0)
* parser (2.6.0.0)
* powerpack (0.1.2)
* pry (0.12.2)
* rainbow (3.0.0)
* rake (12.3.2)
* rspec (3.8.0)
* rspec-core (3.8.0)
* rspec-expectations (3.8.2)
* rspec-mocks (3.8.0)
* rspec-support (3.8.0)
* rubocop (0.63.1)
* ruby-progressbar (1.10.0)
* simplecov (0.16.1)
* simplecov-html (0.10.2)
* thor (0.20.3)
* thread_safe (0.3.6)
* tzinfo (1.2.5)
* unicode-display_width (1.4.1)
This is my light-service.gemspec file:
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/light-service/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Attila Domokos"]
gem.email = ["adomokos@gmail.com"]
gem.description = %q{A service skeleton with an emphasis on simplicity}
gem.summary = %q{A service skeleton with an emphasis on simplicity}
gem.homepage = "https://github.com/adomokos/light-service"
gem.license = "MIT"
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.name = "light-service"
gem.require_paths = ["lib"]
gem.version = LightService::VERSION
gem.add_development_dependency("activesupport", ">= 5.2.2")
gem.add_development_dependency("rspec", "~> 3.0")
gem.add_development_dependency("simplecov", "~> 0.16.1")
gem.add_development_dependency("rubocop", "~> 0.63.1")
gem.add_development_dependency("pry", "~> 0.12.2")
end
my rubocop version is 0.63.1, and i need to set activesupport as development dependency for work:
gem.add_development_dependency("activesupport", ">= 5.2.2")
λ rubocop -v
0.63.1
λ rubocop
Inspecting 80 files
................................................................................
80 files inspected, no offenses detected
λ rspec -v
RSpec 3.8
- rspec-core 3.8.0
- rspec-expectations 3.8.2
- rspec-mocks 3.8.0
- rspec-support 3.8.0
λ rspec
Randomized with seed 50818
.........................................................................................................................................................................................
Finished in 0.48365 seconds (files took 13.38 seconds to load)
185 examples, 0 failures
Randomized with seed 50818
I like the look of it! Can you submit a PR, plz? I'll merge it.
Excuse my ignorance, but what is PR??
No worries. It's a pull request.
Seems like this was fixed. Closing it.
Start rake task i receive this error:
$rake
LoadError: cannot load such file -- active_support/core_ext/string ./lib/light-service.rb:2:in
require' ./lib/light-service.rb:2:in
<top (required)>' ./spec/spec_helper.rb:15:inrequire' ./spec/spec_helper.rb:15:in
<top (required)>' ./spec/acceptance/organizer/reduce_if_spec.rb:1:inrequire' ./spec/acceptance/organizer/reduce_if_spec.rb:1:in
<top (required)>'same error if use bundle: bundle exec rake
if i insert in gemspec rspec work nice: gem.add_development_dependency("activesupport", ">= 5.2.2")
how can i include active_support/core_ext/string when start rspec task??