Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release script to update spec/dummy/package.json and fix Ruby 2.1 issues #867

Merged
merged 5 commits into from
Jun 9, 2017

Conversation

justin808
Copy link
Member

@justin808 justin808 commented Jun 7, 2017

Fixing #870

This change is Reviewable

@justin808 justin808 changed the title Updated spec/dummy/client/package.json latest version Update release script to update spec/dummy/package.json and fix Ruby 2.1 issues Jun 9, 2017
@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage remained the same at 76.893% when pulling 1639ddf on fix-ci into 88608bd on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.02%) to 76.916% when pulling d9f0447 on fix-ci into 88608bd on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage remained the same at 76.893% when pulling 290ce57 on fix-ci into 88608bd on master.

@justin808
Copy link
Member Author

@robwise can you review my comments and changes, since I'm changing some code you wrote.


Review status: 0 of 7 files reviewed at latest revision, 4 unresolved discussions.


lib/react_on_rails/prerender_error.rb, line 12 at r3 (raw file):

      if err
        # rubocop:disable Layout/IndentHeredoc
        message << <<-MSG.strip_heredoc

ruby 2.1 fix


rakelib/release.rake, line 73 at r3 (raw file):

  # Update master with new npm version
  sh_in_dir(Path.join(gem_root, "spec", "dummy", "client"), "yarn add react-on-rails@#{npm_version}")
  sh_in_dir(gem_root, "git commit -am 'Updated spec/dummy/client/package.json latest version'") unless is_dry_run

Update master to set new version in spec/dummy


rakelib/run_rspec.rake, line 52 at r3 (raw file):

  desc "(HACK) Run RSpec on spec/empty_spec in order to have SimpleCov generate a coverage report from cache"
  task :empty do
    sh %(#{ENV['USE_COVERALLS'] ? 'COVERAGE=true' : ''} rspec spec/empty_spec.rb)

this is the key fix that was needed for codeship since we're not running coveralls on codeship.

An error occurred while loading ./spec/features/hello_world_spec.rb.
Failure/Error: require "simplecov"

LoadError:
  cannot load such file -- simplecov
# /home/rof/cache/bundler/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
# /home/rof/cache/bundler/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
# /home/rof/cache/bundler/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
# /home/rof/cache/bundler/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
# ./spec/simplecov_helper.rb:6:in `<top (required)>'
# ./spec/rails_helper.rb:6:in `require_relative'
# ./spec/rails_helper.rb:6:in `<top (required)>'
# ./spec/features/hello_world_spec.rb:3:in `require_relative'
# ./spec/features/hello_world_spec.rb:3:in `<top (required)>'
No examples found.

Finished in 0.00029 seconds (files took 1.76 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

rake aborted!
Command failed with status (1): [cd /home/rof/src/github.com/shakacode/reac...]
/home/rof/src/github.com/shakacode/react_on_rails/rakelib/task_helpers.rb:22:in `block in sh_in_dir'
/home/rof/src/github.com/shakacode/react_on_rails/rakelib/task_helpers.rb:22:in `each'
/home/rof/src/github.com/shakacode/react_on_rails/rakelib/task_helpers.rb:22:in `sh_in_dir'
/home/rof/src/github.com/shakacode/react_on_rails/rakelib/run_rspec.rake:105:in `run_tests_in'
/home/rof/src/github.com/shakacode/react_on_rails/rakelib/run_rspec.rake:41:in `block (3 levels) in <top (required)>'
/home/rof/src/github.com/shakacode/react_on_rails/rakelib/run_rspec.rake:47:in `block (3 levels) in <top (required)>'
/home/rof/src/github.com/shakacode/react_on_rails/rakelib/run_rspec.rake:47:in `each'
/home/rof/src/github.com/shakacode/react_on_rails/rakelib/run_rspec.rake:47:in `block (2 levels) in <top (required)>'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:in `load'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:27:in `run'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/cli.rb:360:in `exec'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/cli.rb:20:in `dispatch'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/cli.rb:10:in `start'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/exe/bundle:35:in `block in <top (required)>'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/home/rof/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.1/exe/bundle:27:in `<top (required)>'
/home/rof/.rvm/gems/ruby-2.4.1/bin/bundle:23:in `load'
/home/rof/.rvm/gems/ruby-2.4.1/bin/bundle:23:in `<main>'
/home/rof/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
/home/rof/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => run_rspec:example_basic
(See full trace by running task with --trace)

spec/dummy/spec/simplecov_helper.rb, line 5 at r3 (raw file):

# Starts SimpleCov for code coverage.

if ENV["COVERAGE"] == "true"

the check for == "true" can be removed

seems OK, however to leave it


Comments from Reviewable

@robwise
Copy link
Contributor

robwise commented Jun 9, 2017

Reviewed 1 of 3 files at r1, 2 of 4 files at r2.
Review status: 3 of 7 files reviewed at latest revision, 6 unresolved discussions.


lib/react_on_rails/prerender_error.rb, line 12 at r3 (raw file):

Previously, justin808 (Justin Gordon) wrote…

ruby 2.1 fix

rubocop is getting mad because you're using strip_heredoc yet you're left-aligning everything. Either don't use strip_heredoc, or indent your message. The end result will be the same either way


lib/react_on_rails/prerender_error.rb, line 21 at r3 (raw file):

      end
      # rubocop:disable Layout/IndentHeredoc
      message << <<-MSG.strip_heredoc

same comment as above


lib/react_on_rails/prerender_error.rb, line 29 at r3 (raw file):

      if console_messages
        # rubocop:disable Layout/IndentHeredoc

same comment as above


Comments from Reviewable

@justin808
Copy link
Member Author

FYI -- on why strip_heredoc doesn't work for interpolated: rubocop/rubocop#4465


Review status: 3 of 7 files reviewed at latest revision, 6 unresolved discussions.


Comments from Reviewable

@justin808 justin808 merged commit 27c2cbc into master Jun 9, 2017
@Judahmeek Judahmeek deleted the fix-ci branch October 21, 2017 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants