diff --git a/Gemfile b/Gemfile index 175a22f..c1994a8 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ gem 'omniauth-orcid' gem 'octokit' gem 'pg' gem 'will_paginate', '~> 3.1' -gem 'rails', '4.2.5.1' +gem 'rails', '4.2.6' gem 'newrelic_rpm' gem 'sanitize' gem 'sass-rails', '~> 5.0' @@ -28,7 +28,7 @@ group :development, :test do gem 'capybara', '~> 2.4.4' gem 'factory_girl_rails', '~> 4.4.1' gem 'mocha', '~> 1.1.0' - gem 'rspec-rails', '~> 3.1.0' + gem 'rspec-rails', '~> 3.4.2' gem 'shoulda-matchers', '~> 2.7.0' end diff --git a/Gemfile.lock b/Gemfile.lock index 01a9c74..c342a8c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,36 +2,36 @@ GEM remote: https://rubygems.org/ specs: aasm (4.1.0) - actionmailer (4.2.5.1) - actionpack (= 4.2.5.1) - actionview (= 4.2.5.1) - activejob (= 4.2.5.1) + actionmailer (4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.5.1) - actionview (= 4.2.5.1) - activesupport (= 4.2.5.1) + actionpack (4.2.6) + actionview (= 4.2.6) + activesupport (= 4.2.6) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.5.1) - activesupport (= 4.2.5.1) + actionview (4.2.6) + activesupport (= 4.2.6) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.5.1) - activesupport (= 4.2.5.1) + activejob (4.2.6) + activesupport (= 4.2.6) globalid (>= 0.3.0) - activemodel (4.2.5.1) - activesupport (= 4.2.5.1) + activemodel (4.2.6) + activesupport (= 4.2.6) builder (~> 3.1) - activerecord (4.2.5.1) - activemodel (= 4.2.5.1) - activesupport (= 4.2.5.1) + activerecord (4.2.6) + activemodel (= 4.2.6) + activesupport (= 4.2.6) arel (~> 6.0) - activesupport (4.2.5.1) + activesupport (4.2.6) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -57,7 +57,7 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - concurrent-ruby (1.0.0) + concurrent-ruby (1.0.2) crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.2) @@ -91,13 +91,15 @@ GEM kgio (2.10.0) loofah (2.0.3) nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) + mail (2.6.4) + mime-types (>= 1.16, < 4) metaclass (0.0.4) method_source (0.8.2) - mime-types (2.99) + mime-types (3.0) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0221) mini_portile2 (2.0.0) - minitest (5.8.4) + minitest (5.9.0) mocha (1.1.0) metaclass (~> 0.0.1) multi_json (1.11.2) @@ -114,8 +116,8 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (~> 1.2) - octokit (2.1.1) - sawyer (~> 0.3.0) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) omniauth (1.3.1) hashie (>= 1.2, < 4) rack (>= 1.0, < 3) @@ -132,16 +134,16 @@ GEM rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.5.1) - actionmailer (= 4.2.5.1) - actionpack (= 4.2.5.1) - actionview (= 4.2.5.1) - activejob (= 4.2.5.1) - activemodel (= 4.2.5.1) - activerecord (= 4.2.5.1) - activesupport (= 4.2.5.1) + rails (4.2.6) + actionmailer (= 4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + activemodel (= 4.2.6) + activerecord (= 4.2.6) + activesupport (= 4.2.6) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.5.1) + railties (= 4.2.6) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) @@ -151,29 +153,30 @@ GEM rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (4.2.5.1) - actionpack (= 4.2.5.1) - activesupport (= 4.2.5.1) + railties (4.2.6) + actionpack (= 4.2.6) + activesupport (= 4.2.6) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) raindrops (0.15.0) - rake (10.5.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) + rake (11.1.2) + rspec-core (3.4.4) + rspec-support (~> 3.4.0) + rspec-expectations (3.4.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) + rspec-support (~> 3.4.0) + rspec-mocks (3.4.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-rails (3.4.2) + actionpack (>= 3.0, < 4.3) + activesupport (>= 3.0, < 4.3) + railties (>= 3.0, < 4.3) + rspec-core (~> 3.4.0) + rspec-expectations (~> 3.4.0) + rspec-mocks (~> 3.4.0) + rspec-support (~> 3.4.0) + rspec-support (3.4.1) safe_yaml (1.0.4) sanitize (4.0.1) crass (~> 1.0.2) @@ -186,17 +189,17 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sawyer (0.3.0) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) faraday (~> 0.8, < 0.10) - uri_template (~> 0.5.0) shoulda-matchers (2.7.0) activesupport (>= 3.0.0) slop (3.6.0) spring (1.6.2) - sprockets (3.5.2) + sprockets (3.6.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.0.0) + sprockets-rails (3.0.4) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -212,7 +215,6 @@ GEM kgio (~> 2.6) rack raindrops (~> 0.7) - uri_template (0.5.3) web-console (2.2.1) activemodel (>= 4.0) binding_of_caller (>= 0.7.2) @@ -245,8 +247,8 @@ DEPENDENCIES omniauth-orcid pg pry - rails (= 4.2.5.1) - rspec-rails (~> 3.1.0) + rails (= 4.2.6) + rspec-rails (~> 3.4.2) sanitize sass-rails (~> 5.0) shoulda-matchers (~> 2.7.0) @@ -256,6 +258,3 @@ DEPENDENCIES web-console (~> 2.0) webmock (~> 1.19.0) will_paginate (~> 3.1) - -BUNDLED WITH - 1.10.6 diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index 614e987..c33a920 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -46,7 +46,7 @@ get :profile, :format => :html expect(response).to be_success - expect(response.body).should_not match /Please updated your profile before continuing/ + expect(response.body).not_to match /Please updated your profile before continuing/ end end diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index cdfa4cd..226a55d 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -85,7 +85,7 @@ # TODO work out why this needs to be done. paper.sha = "48d24b0158528e85ac7706aecd8cddc4" paper.save - paper.stub(:set_review_issue) { true } + allow(paper).to receive(:set_review_issue) { true } paper.start_review! expect(paper.state).to eq('under_review') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a26d74e..ce312d2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -94,8 +94,8 @@ RSpec.configure do |config| config.before(:each) do stub_request(:post, "https://api.github.com/repos/openjournals/joss-reviews/issues"). - with(:body => "{\"labels\":[\"review\"],\"title\":\"Submission: arfon / fidgit\",\"body\":\"**Submitting author:** @foobar (\\u003ca href=\\\"http://orcid.org/0000-0000-0000-1234\\\"\\u003eDoe, John\\u003c/a\\u003e)\\n**Repository:** \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target =\\\"_blank\\\"\\u003ehttp://github.com/arfon/fidgit\\u003c/a\\u003e\\n**Version:** v1.0.0\\n**Archive:** \\u003ca href=\\\"http://dx.doi.org/10.0001/zenodo.12345\\\" target =\\\"_blank\\\"\\u003ehttp://dx.doi.org/10.0001/zenodo.12345\\u003c/a\\u003e\\n\\n## Status\\n\\n[![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n\\nStatus badge code:\\n\\n```\\nHTML: \\u003ca href=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4\\\"\\u003e\\u003cimg src=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg\\\"\\u003e\\u003c/a\\u003e\\nMarkdown: [![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n```\\n\\n## Reviewer questions\\n\\n### General checks\\n\\n- [ ] **Repository:** Is the source code for this software available at the \\u003ca target=\\\"_blank\\\" href=\\\"http://github.com/arfon/fidgit\\\"\\u003erepository url\\u003c/a\\u003e?\\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\\n- [ ] **Version:** Does the release version given match the GitHub release (v1.0.0)?\\n- [ ] **Archive:** Does the \\u003ca target=\\\"_blank\\\" href=\\\"http://dx.doi.org/10.0001/zenodo.12345\\\"\\u003esoftware archive\\u003c/a\\u003e resolve?\\n\\n### Functionality\\n\\n- [ ] **Installation:** Does installation proceed as outlined in the documentation?\\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\\n- [ ] **Performance:** Have the performance claims of the software been confirmed?\\n\\n### Documentation\\n\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\\n- [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\\n- [ ] **Functionality documentation:** Is the functionality of the software documented to a satisfactory level (e.g. API method documentation)?\\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\\n\\n### Software paper\\n\\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g. papers, datasets, software)?\\n\"}", - :headers => {'Accept'=>'application/vnd.github.beta+json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Octokit Ruby Gem 2.1.1'}). - to_return(:status => 200, :body => "", :headers => {}) + with(:body => "{\"labels\":[\"review\"],\"title\":\"Submission: arfon / fidgit\",\"body\":\"**Submitting author:** @foobar (\\u003ca href=\\\"http://orcid.org/0000-0000-0000-1234\\\"\\u003eDoe, John\\u003c/a\\u003e)\\n**Repository:** \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target =\\\"_blank\\\"\\u003ehttp://github.com/arfon/fidgit\\u003c/a\\u003e\\n**Version:** v1.0.0\\n**Archive:** \\u003ca href=\\\"http://dx.doi.org/10.0001/zenodo.12345\\\" target =\\\"_blank\\\"\\u003ehttp://dx.doi.org/10.0001/zenodo.12345\\u003c/a\\u003e\\n\\n## Status\\n\\n[![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n\\nStatus badge code:\\n\\n```\\nHTML: \\u003ca href=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4\\\"\\u003e\\u003cimg src=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg\\\"\\u003e\\u003c/a\\u003e\\nMarkdown: [![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n```\\n\\n## Reviewer questions\\n\\n### General checks\\n\\n- [ ] **Repository:** Is the source code for this software available at the \\u003ca target=\\\"_blank\\\" href=\\\"http://github.com/arfon/fidgit\\\"\\u003erepository url\\u003c/a\\u003e?\\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\\n- [ ] **Version:** Does the release version given match the GitHub release (v1.0.0)?\\n- [ ] **Archive:** Does the \\u003ca target=\\\"_blank\\\" href=\\\"http://dx.doi.org/10.0001/zenodo.12345\\\"\\u003esoftware archive\\u003c/a\\u003e resolve?\\n\\n### Functionality\\n\\n- [ ] **Installation:** Does installation proceed as outlined in the documentation?\\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\\n- [ ] **Performance:** Have the performance claims of the software been confirmed?\\n\\n### Documentation\\n\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\\n- [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\\n- [ ] **Functionality documentation:** Is the functionality of the software documented to a satisfactory level (e.g. API method documentation)?\\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\\n\\n### Software paper\\n\\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g. papers, datasets, software)?\\n\"}", + :headers => {'Accept'=>'application/vnd.github.v3+json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'Octokit Ruby Gem 4.3.0'}). + to_return(:status => 200, :body => "", :headers => {}) end end