From e71b06bd572992d9fcb1f61a0b66a5076574b687 Mon Sep 17 00:00:00 2001 From: rahul Date: Fri, 14 Jul 2017 01:23:03 +0530 Subject: [PATCH 1/5] Add ruby 2.4 to travis and vagrant --- .travis.yml | 2 +- bootstrap.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6c83258b..9191bbd7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ dist: trusty language: ruby cache: bundler rvm: - - 2.2.3 + - 2.4.0 before_install: - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" - "echo `phantomjs -v`" diff --git a/bootstrap.sh b/bootstrap.sh index 197b6be2..f0ac49fb 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -2,7 +2,7 @@ pushd /vagrant echo -e "\ninstalling required software packages...\n" -zypper -q -n install update-alternatives ruby2.2-devel make gcc gcc-c++ \ +zypper -q -n install update-alternatives ruby2.4-devel make gcc gcc-c++ \ libxml2-devel libxslt-devel nodejs screen mariadb \ libmysqld-devel sqlite3-devel ImageMagick @@ -10,7 +10,7 @@ echo -e "\ndisabling versioned gem binary names...\n" echo 'install: --no-format-executable' >> /etc/gemrc echo -e "\ninstalling bundler...\n" -gem.ruby2.2 install bundler +gem.ruby2.4 install bundler echo -e "\ninstalling your bundle...\n" su - vagrant -c "cd /vagrant/; bundle install --quiet" From 7f28ff3ac9041c1a791d4f7587979673e487130b Mon Sep 17 00:00:00 2001 From: rahul Date: Fri, 14 Jul 2017 01:32:27 +0530 Subject: [PATCH 2/5] Updated rdoc-generator-fivefish gem This update is required to update yajl-ruby 1.2 to yajl-ruby 1.3 that support ruby 2.4 --- Gemfile.lock | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index effbde5b..583286a0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -228,8 +228,8 @@ GEM domain_name (~> 0.5) i18n (0.7.0) i18n_data (0.7.0) - inversion (0.12.3) - loggability (~> 0.4) + inversion (1.0.0) + loggability (~> 0.12) iso-639 (0.2.5) jquery-datatables-rails (2.2.3) jquery-rails @@ -257,7 +257,7 @@ GEM celluloid-io (>= 0.15.0) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) - loggability (0.11.0) + loggability (0.14.0) loofah (2.0.3) nokogiri (>= 1.5.9) lumberjack (1.0.5) @@ -412,13 +412,12 @@ GEM rb-fsevent (0.9.4) rb-inotify (0.9.4) ffi (>= 0.5.0) - rdoc (4.1.1) - json (~> 1.4) - rdoc-generator-fivefish (0.1.0) - inversion (~> 0.12) - loggability (~> 0.6) - rdoc (~> 4.0) - yajl-ruby (~> 1.1) + rdoc (5.1.0) + rdoc-generator-fivefish (0.3.0) + inversion (~> 1.0) + loggability (~> 0.12) + rdoc (~> 5.0) + yajl-ruby (~> 1.3) redcarpet (3.2.3) referer-parser (0.2.1) request_store (1.1.0) @@ -548,7 +547,7 @@ GEM chronic (>= 0.6.3) xpath (2.0.0) nokogiri (~> 1.3) - yajl-ruby (1.2.0) + yajl-ruby (1.3.0) PLATFORMS ruby From a6f9fdbb4350ea0beb81e1ac79038c2c48613f04 Mon Sep 17 00:00:00 2001 From: rahul Date: Fri, 14 Jul 2017 01:48:47 +0530 Subject: [PATCH 3/5] Updated rails to 4.2.8 Rails update to 4.2.8 is necessary to get rid of Bignum and Fixnum warnings. Ruby had two visible Integer classes: Fixnum and Bignum. Ruby 2.4 unifies them into Integer. All C extensions which touch the Fixnum or Bignum class need to be fixed. --- Gemfile | 2 +- Gemfile.lock | 94 +++++++++++++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/Gemfile b/Gemfile index 46c8731e..d58a9fe2 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.8.4') end # as web framework -gem 'rails', '~> 4.2' +gem 'rails', '~> 4.2.8' # enables serving assets in production and setting your logger to standard out # both of which are required to run an application on a twelve-factor provider diff --git a/Gemfile.lock b/Gemfile.lock index 583286a0..71c317e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,40 +12,39 @@ GEM remote: https://rubygems.org/ remote: https://rails-assets.org/ specs: - actionmailer (4.2.7.1) - actionpack (= 4.2.7.1) - actionview (= 4.2.7.1) - activejob (= 4.2.7.1) + actionmailer (4.2.9) + actionpack (= 4.2.9) + actionview (= 4.2.9) + activejob (= 4.2.9) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.7.1) - actionview (= 4.2.7.1) - activesupport (= 4.2.7.1) + actionpack (4.2.9) + actionview (= 4.2.9) + activesupport (= 4.2.9) 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.7.1) - activesupport (= 4.2.7.1) + actionview (4.2.9) + activesupport (= 4.2.9) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) + rails-html-sanitizer (~> 1.0, >= 1.0.3) active_model_serializers (0.9.4) activemodel (>= 3.2) - activejob (4.2.7.1) - activesupport (= 4.2.7.1) + activejob (4.2.9) + activesupport (= 4.2.9) globalid (>= 0.3.0) - activemodel (4.2.7.1) - activesupport (= 4.2.7.1) + activemodel (4.2.9) + activesupport (= 4.2.9) builder (~> 3.1) - activerecord (4.2.7.1) - activemodel (= 4.2.7.1) - activesupport (= 4.2.7.1) + activerecord (4.2.9) + activemodel (= 4.2.9) + activesupport (= 4.2.9) arel (~> 6.0) - activesupport (4.2.7.1) + activesupport (4.2.9) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) @@ -67,7 +66,7 @@ GEM request_store user_agent_parser uuidtools - arel (6.0.3) + arel (6.0.4) ast (2.3.0) autoprefixer-rails (5.1.9) execjs @@ -88,8 +87,11 @@ GEM bootstrap3-datetimepicker-rails (3.0.3) momentjs-rails (>= 2.8.1) browser (0.6.0) - builder (3.2.2) byebug (9.0.6) + + builder (3.2.3) + columnize (~> 0.8) + debugger-linecache (~> 1.2) cancancan (1.13.1) capybara (2.6.2) addressable @@ -193,8 +195,8 @@ GEM formtastic-bootstrap (3.1.1) formtastic (>= 3.0) geocoder (1.2.2) - globalid (0.3.6) - activesupport (>= 4.1.0) + globalid (0.4.0) + activesupport (>= 4.2.0) gravtastic (3.2.6) guard (2.6.0) formatador (>= 0.2.4) @@ -261,17 +263,17 @@ GEM loofah (2.0.3) nokogiri (>= 1.5.9) lumberjack (1.0.5) - mail (2.6.3) - mime-types (>= 1.16, < 3) + mail (2.6.6) + mime-types (>= 1.16, < 4) method_source (0.8.2) - mime-types (2.99.1) + mime-types (2.99.3) mimemagic (0.3.2) mina (0.3.8) open4 (~> 1.3.4) rake mini_magick (4.5.1) mini_portile2 (2.2.0) - minitest (5.10.1) + minitest (5.10.2) momentjs-rails (2.8.1) railties (>= 3.1) monetize (1.4.0) @@ -284,7 +286,7 @@ GEM monetize (~> 1.4.0) money (~> 6.7) railties (>= 3.0) - multi_json (1.11.2) + multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) mysql2 (0.4.2) @@ -351,22 +353,22 @@ GEM coderay (~> 1.0) method_source (~> 0.8) slop (~> 3.4) - rack (1.6.4) + rack (1.6.8) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.7.1) - actionmailer (= 4.2.7.1) - actionpack (= 4.2.7.1) - actionview (= 4.2.7.1) - activejob (= 4.2.7.1) - activemodel (= 4.2.7.1) - activerecord (= 4.2.7.1) - activesupport (= 4.2.7.1) + rails (4.2.9) + actionmailer (= 4.2.9) + actionpack (= 4.2.9) + actionview (= 4.2.9) + activejob (= 4.2.9) + activemodel (= 4.2.9) + activerecord (= 4.2.9) + activesupport (= 4.2.9) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.7.1) + railties (= 4.2.9) sprockets-rails rails-assets-bootstrap (3.3.6) rails-assets-jquery (>= 1.9.1, < 3) @@ -401,14 +403,14 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.4) rails_stdout_logging (0.0.3) - railties (4.2.7.1) - actionpack (= 4.2.7.1) - activesupport (= 4.2.7.1) + railties (4.2.9) + actionpack (= 4.2.9) + activesupport (= 4.2.9) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.2.2) - rake - rake (10.5.0) + + rainbow (2.2.1) + rake (12.0.0) rb-fsevent (0.9.4) rb-inotify (0.9.4) ffi (>= 0.5.0) @@ -506,7 +508,7 @@ GEM sysexits (1.2.0) term-ansicolor (1.3.2) tins (~> 1.0) - thor (0.19.1) + thor (0.19.4) thread_safe (0.3.6) tilt (1.4.1) timecop (0.7.1) @@ -615,7 +617,7 @@ DEPENDENCIES poltergeist prawn-qrcode (~> 0.2.2.1) prawn_rails - rails (~> 4.2) + rails (~> 4.2.8) rails-assets-bootstrap-markdown! rails-assets-date.format! rails-assets-holderjs! From d4d1512c61b39291816ffa42a07054af03203008 Mon Sep 17 00:00:00 2001 From: rahul Date: Fri, 14 Jul 2017 01:56:49 +0530 Subject: [PATCH 4/5] Updated rspec-rails and guard rspec Updated this gem to fix nomethoderror old version of rspec use last_comment method which is deprecated in latest versions --- Gemfile | 4 +- Gemfile.lock | 101 +++++++++--------- .../admin/roles_controller_spec.rb | 2 +- 3 files changed, 56 insertions(+), 51 deletions(-) diff --git a/Gemfile b/Gemfile index d58a9fe2..1b0a3c1d 100644 --- a/Gemfile +++ b/Gemfile @@ -201,7 +201,7 @@ gem 'selectize-rails' # Use guard and spring for testing in development group :development do # to launch specs when files are modified - gem 'guard-rspec', '~> 4.2.8' + gem 'guard-rspec' gem 'spring-commands-rspec' gem 'haml_lint', '~> 0.24.0' # for static code analisys @@ -220,7 +220,7 @@ end group :test do # as test framework - gem 'rspec-rails' + gem 'rspec-rails', '~> 3.5', '>= 3.5.2' gem 'database_cleaner' gem 'capybara' gem 'poltergeist' diff --git a/Gemfile.lock b/Gemfile.lock index 71c317e2..928c3b84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -109,11 +109,6 @@ GEM activesupport (>= 3.2.0) carrierwave fastimage - celluloid (0.15.2) - timers (~> 1.1.0) - celluloid-io (0.15.0) - celluloid (>= 0.15.0) - nio4r (>= 0.5.0) chart-js-rails (0.0.6) railties (> 3.1) chronic (0.10.2) @@ -123,7 +118,7 @@ GEM aws_cf_signer rest-client cocoon (1.2.6) - coderay (1.1.0) + coderay (1.1.1) coffee-rails (4.1.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.1.x) @@ -165,7 +160,7 @@ GEM warden (~> 1.2.3) devise_ichain_authenticatable (0.3.1) devise (>= 2.2) - diff-lcs (1.2.5) + diff-lcs (1.3) docile (1.1.5) domain_name (0.5.20160310) unf (>= 0.0.5, < 1.0.0) @@ -186,10 +181,10 @@ GEM multipart-post (>= 1.2, < 3) fastimage (2.0.0) addressable (~> 2) - ffi (1.9.3) + ffi (1.9.18) font-awesome-rails (4.1.0.0) railties (>= 3.2, < 5.0) - formatador (0.2.4) + formatador (0.2.5) formtastic (3.1.3) actionpack (>= 3.2.13) formtastic-bootstrap (3.1.1) @@ -198,15 +193,20 @@ GEM globalid (0.4.0) activesupport (>= 4.2.0) gravtastic (3.2.6) - guard (2.6.0) + guard (2.14.1) formatador (>= 0.2.4) - listen (~> 2.7) + listen (>= 2.7, < 4.0) lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) pry (>= 0.9.12) + shellany (~> 0.0) thor (>= 0.18.1) - guard-rspec (4.2.8) + guard-compat (1.2.1) + guard-rspec (4.7.3) guard (~> 2.1) - rspec (>= 2.14, < 4.0) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) haml (4.0.5) tilt haml-rails (0.5.3) @@ -254,15 +254,14 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - listen (2.7.2) - celluloid (>= 0.15.2) - celluloid-io (>= 0.15.0) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) loggability (0.14.0) loofah (2.0.3) nokogiri (>= 1.5.9) - lumberjack (1.0.5) + lumberjack (1.0.12) mail (2.6.6) mime-types (>= 1.16, < 4) method_source (0.8.2) @@ -290,10 +289,13 @@ GEM multi_xml (0.5.5) multipart-post (2.0.0) mysql2 (0.4.2) + nenv (0.3.0) netrc (0.11.0) - nio4r (1.2.1) nokogiri (1.8.0) mini_portile2 (~> 2.2.0) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) oauth2 (0.9.4) faraday (>= 0.8, < 0.10) jwt (~> 1.0) @@ -349,9 +351,9 @@ GEM prawn_rails (0.0.11) prawn (>= 0.11.1) railties (>= 3.0.0) - pry (0.9.12.6) - coderay (~> 1.0) - method_source (~> 0.8) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) slop (~> 3.4) rack (1.6.8) rack-openid (1.3.1) @@ -411,9 +413,9 @@ GEM rainbow (2.2.1) rake (12.0.0) - rb-fsevent (0.9.4) - rb-inotify (0.9.4) - ffi (>= 0.5.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) rdoc (5.1.0) rdoc-generator-fivefish (0.3.0) inversion (~> 1.0) @@ -432,32 +434,33 @@ GEM rolify (5.1.0) rqrcode (0.10.1) chunky_png (~> 1.0) - rspec (3.0.0) - rspec-core (~> 3.0.0) - rspec-expectations (~> 3.0.0) - rspec-mocks (~> 3.0.0) + rspec (3.6.0) + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) rspec-activemodel-mocks (1.0.1) activemodel (>= 3.0) activesupport (>= 3.0) rspec-mocks (>= 2.99, < 4.0) - rspec-core (3.0.2) - rspec-support (~> 3.0.0) - rspec-expectations (3.0.2) + rspec-core (3.6.0) + rspec-support (~> 3.6.0) + rspec-expectations (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.0.0) - rspec-mocks (3.0.2) - rspec-support (~> 3.0.0) - rspec-rails (3.0.0) + rspec-support (~> 3.6.0) + rspec-mocks (3.6.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.6.0) + rspec-rails (3.6.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.0.0) - rspec-expectations (~> 3.0.0) - rspec-mocks (~> 3.0.0) - rspec-support (~> 3.0.0) - rspec-support (3.0.2) - rubocop (0.49.1) - parallel (~> 1.10) + + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) + rspec-support (~> 3.6.0) + rspec-support (3.6.0) + rubocop (0.48.1) parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) @@ -466,6 +469,7 @@ GEM ruby-oembed (0.8.14) ruby-openid (2.5.0) ruby-progressbar (1.8.1) + ruby_dep (1.5.0) rubyzip (1.2.1) safe_yaml (1.0.4) sass (3.2.19) @@ -475,6 +479,7 @@ GEM sprockets (~> 2.8, < 2.12) sprockets-rails (~> 2.0) selectize-rails (0.12.4) + shellany (0.0.1) shoulda-matchers (2.8.0) activesupport (>= 3.0.0) simplecov (0.11.2) @@ -512,7 +517,6 @@ GEM thread_safe (0.3.6) tilt (1.4.1) timecop (0.7.1) - timers (1.1.0) tins (1.6.0) transitions (0.1.12) ttfunk (1.1.1) @@ -590,7 +594,7 @@ DEPENDENCIES formtastic (~> 3.1.1) formtastic-bootstrap gravtastic - guard-rspec (~> 4.2.8) + guard-rspec haml-rails haml_lint (~> 0.24.0) hoptoad_notifier (~> 2.3) @@ -637,8 +641,9 @@ DEPENDENCIES rolify rqrcode rspec-activemodel-mocks - rspec-rails - rubocop (~> 0.49.0) + + rspec-rails (~> 3.5, >= 3.5.2) + rubocop (~> 0.48.1) ruby-oembed sass-rails (>= 4.0.2) selectize-rails diff --git a/spec/controllers/admin/roles_controller_spec.rb b/spec/controllers/admin/roles_controller_spec.rb index 964346ef..d5cdc67e 100644 --- a/spec/controllers/admin/roles_controller_spec.rb +++ b/spec/controllers/admin/roles_controller_spec.rb @@ -55,7 +55,7 @@ describe Admin::RolesController do end describe 'POST #toggle' do - before:each do + before :each do sign_in admin post :toggle_user, conference_id: conference.short_title, user: { email: 'user1@osem.io' }, From 5c0a565e8d5f136c9d668e840decd8f4bd74cbc0 Mon Sep 17 00:00:00 2001 From: rahul Date: Sat, 15 Jul 2017 19:59:02 +0530 Subject: [PATCH 5/5] webmock updated Updated Webmock as previous version was not compatible with the new gems --- Gemfile.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 928c3b84..8f7ef5d6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,7 +57,8 @@ GEM awesome_nested_set (>= 2.0) acts_as_list (0.4.0) activerecord (>= 3.0) - addressable (2.3.6) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) ahoy_matey (1.0.0) addressable browser (>= 0.4.0) @@ -87,11 +88,8 @@ GEM bootstrap3-datetimepicker-rails (3.0.3) momentjs-rails (>= 2.8.1) browser (0.6.0) - byebug (9.0.6) - builder (3.2.3) - columnize (~> 0.8) - debugger-linecache (~> 1.2) + byebug (9.0.6) cancancan (1.13.1) capybara (2.6.2) addressable @@ -140,7 +138,7 @@ GEM term-ansicolor (~> 1.3) thor (~> 0.19.1) tins (~> 1.6.0) - crack (0.4.2) + crack (0.4.3) safe_yaml (~> 1.0.0) currencies (0.4.2) daemons (1.1.9) @@ -220,6 +218,7 @@ GEM rake (>= 10, < 13) rubocop (>= 0.47.0) sysexits (~> 1.1) + hashdiff (0.3.4) hashie (2.1.1) hike (1.2.3) hoptoad_notifier (2.4.11) @@ -355,6 +354,7 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) + public_suffix (2.0.5) rack (1.6.8) rack-openid (1.3.1) rack (>= 1.1.0) @@ -410,8 +410,8 @@ GEM activesupport (= 4.2.9) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - - rainbow (2.2.1) + rainbow (2.2.2) + rake rake (12.0.0) rb-fsevent (0.10.2) rb-inotify (0.9.10) @@ -454,13 +454,13 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) rspec-mocks (~> 3.6.0) rspec-support (~> 3.6.0) rspec-support (3.6.0) - rubocop (0.48.1) + rubocop (0.49.1) + parallel (~> 1.10) parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) @@ -542,9 +542,10 @@ GEM binding_of_caller (>= 0.7.2) railties (>= 4.0) sprockets-rails (>= 2.0, < 4.0) - webmock (1.20.4) + webmock (3.0.1) addressable (>= 2.3.6) crack (>= 0.3.2) + hashdiff websocket-driver (0.6.3) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) @@ -641,9 +642,8 @@ DEPENDENCIES rolify rqrcode rspec-activemodel-mocks - rspec-rails (~> 3.5, >= 3.5.2) - rubocop (~> 0.48.1) + rubocop (~> 0.49.0) ruby-oembed sass-rails (>= 4.0.2) selectize-rails