From 87d630329a98cbe890f3c4643515f5f327010ebd Mon Sep 17 00:00:00 2001
From: Artem Vasiliev <artem.job@gmail.com>
Date: Thu, 12 Apr 2018 23:37:59 +0300
Subject: [PATCH] chore: upgrade Ruby

The stable is 2.5.1 now.
---
 .ruby-version                            |  2 +-
 DockerFile => Dockerfile                 |  2 +-
 Gemfile                                  |  6 +-
 Gemfile.lock                             | 70 +++++++++++-------------
 Guardfile                                |  2 +
 README.md                                |  7 ++-
 app/api_clients/github_client.rb         |  2 +
 app/main.rb                              |  2 +
 bin/app.rb                               |  2 +
 lib/environment.rb                       |  2 +
 spec/main_spec.rb                        |  2 +
 spec/support/datafile_fixtures_helper.rb |  6 +-
 spec/support/environment.rb              |  2 +
 spec/support/spec_helper.rb              |  2 +
 14 files changed, 65 insertions(+), 44 deletions(-)
 rename DockerFile => Dockerfile (95%)

diff --git a/.ruby-version b/.ruby-version
index 951d42f..6bf7c6f 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-ruby-2.4.2
+ruby-2.5.1
diff --git a/DockerFile b/Dockerfile
similarity index 95%
rename from DockerFile
rename to Dockerfile
index bd862c1..e86007a 100644
--- a/DockerFile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM ruby:2.4.2
+FROM ruby:2.5.1
 
 RUN apt-get -y update && apt-get -y upgrade
 
diff --git a/Gemfile b/Gemfile
index 55300ee..2f3cbc3 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,11 +1,13 @@
+# frozen_string_literal: true
+
 source 'https://rubygems.org'
-ruby '2.4.2'
+ruby '2.5.1'
 
 gem 'activesupport'
 
 group :development do
-  gem 'guard-rspec', require: false
   gem 'guard-bundler'
+  gem 'guard-rspec', require: false
   gem 'guard-rubocop', require: false
 end
 
diff --git a/Gemfile.lock b/Gemfile.lock
index 4cb841e..3482a0d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,26 +1,26 @@
 GEM
   remote: https://rubygems.org/
   specs:
-    activesupport (5.1.4)
+    activesupport (5.2.0)
       concurrent-ruby (~> 1.0, >= 1.0.2)
-      i18n (~> 0.7)
+      i18n (>= 0.7, < 2)
       minitest (~> 5.1)
       tzinfo (~> 1.1)
     addressable (2.5.2)
       public_suffix (>= 2.0.2, < 4.0)
-    ast (2.3.0)
-    coderay (1.1.1)
+    ast (2.4.0)
+    coderay (1.1.2)
     concurrent-ruby (1.0.5)
     crack (0.4.3)
       safe_yaml (~> 1.0.0)
     diff-lcs (1.3)
-    docile (1.1.5)
-    ffi (1.9.18)
+    docile (1.3.0)
+    ffi (1.9.23)
     formatador (0.2.5)
-    guard (2.14.1)
+    guard (2.14.2)
       formatador (>= 0.2.4)
       listen (>= 2.7, < 4.0)
-      lumberjack (~> 1.0)
+      lumberjack (>= 1.0.12, < 2.0)
       nenv (~> 0.1)
       notiffany (~> 0.0)
       pry (>= 0.9.12)
@@ -39,40 +39,37 @@ GEM
       guard (~> 2.0)
       rubocop (~> 0.20)
     hashdiff (0.3.7)
-    i18n (0.9.1)
+    i18n (1.0.0)
       concurrent-ruby (~> 1.0)
     json (2.1.0)
     listen (3.1.5)
       rb-fsevent (~> 0.9, >= 0.9.4)
       rb-inotify (~> 0.9, >= 0.9.7)
       ruby_dep (~> 1.2)
-    lumberjack (1.0.12)
-    method_source (0.8.2)
-    minitest (5.10.3)
+    lumberjack (1.0.13)
+    method_source (0.9.0)
+    minitest (5.11.3)
     nenv (0.3.0)
     notiffany (0.1.1)
       nenv (~> 0.1)
       shellany (~> 0.0)
-    parallel (1.12.0)
-    parser (2.4.0.0)
-      ast (~> 2.2)
+    parallel (1.12.1)
+    parser (2.5.1.0)
+      ast (~> 2.4.0)
     powerpack (0.1.1)
-    pry (0.10.4)
+    pry (0.11.3)
       coderay (~> 1.1.0)
-      method_source (~> 0.8.1)
-      slop (~> 3.4)
-    public_suffix (3.0.1)
-    rainbow (2.2.2)
-      rake
-    rake (12.0.0)
-    rb-fsevent (0.10.2)
+      method_source (~> 0.9.0)
+    public_suffix (3.0.2)
+    rainbow (3.0.0)
+    rb-fsevent (0.10.3)
     rb-inotify (0.9.10)
       ffi (>= 0.5.0, < 2)
     rspec (3.7.0)
       rspec-core (~> 3.7.0)
       rspec-expectations (~> 3.7.0)
       rspec-mocks (~> 3.7.0)
-    rspec-core (3.7.0)
+    rspec-core (3.7.1)
       rspec-support (~> 3.7.0)
     rspec-expectations (3.7.0)
       diff-lcs (>= 1.2.0, < 2.0)
@@ -80,30 +77,29 @@ GEM
     rspec-mocks (3.7.0)
       diff-lcs (>= 1.2.0, < 2.0)
       rspec-support (~> 3.7.0)
-    rspec-support (3.7.0)
-    rubocop (0.49.1)
+    rspec-support (3.7.1)
+    rubocop (0.54.0)
       parallel (~> 1.10)
-      parser (>= 2.3.3.1, < 3.0)
+      parser (>= 2.5)
       powerpack (~> 0.1)
-      rainbow (>= 1.99.1, < 3.0)
+      rainbow (>= 2.2.2, < 4.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (~> 1.0, >= 1.0.1)
-    ruby-progressbar (1.8.1)
+    ruby-progressbar (1.9.0)
     ruby_dep (1.5.0)
     safe_yaml (1.0.4)
     shellany (0.0.1)
-    simplecov (0.15.1)
-      docile (~> 1.1.0)
+    simplecov (0.16.1)
+      docile (~> 1.1)
       json (>= 1.8, < 3)
       simplecov-html (~> 0.10.0)
     simplecov-html (0.10.2)
-    slop (3.6.0)
-    thor (0.19.4)
+    thor (0.20.0)
     thread_safe (0.3.6)
-    tzinfo (1.2.4)
+    tzinfo (1.2.5)
       thread_safe (~> 0.1)
     unicode-display_width (1.3.0)
-    webmock (3.1.1)
+    webmock (3.3.0)
       addressable (>= 2.3.6)
       crack (>= 0.3.2)
       hashdiff
@@ -121,7 +117,7 @@ DEPENDENCIES
   webmock
 
 RUBY VERSION
-   ruby 2.4.2p198
+   ruby 2.5.1p57
 
 BUNDLED WITH
-   1.16.0
+   1.16.1
diff --git a/Guardfile b/Guardfile
index 6dc520c..2114ce1 100644
--- a/Guardfile
+++ b/Guardfile
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 # A sample Guardfile
 # More info at https://github.com/guard/guard#readme
 
diff --git a/README.md b/README.md
index 16235ba..cd30aa4 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Place your app-specific code in app/ dir, and utility code that you'd like to ex
 * Clone the repo: `git clone https://github.com/artemv/ruby-starter-kit.git my-app`
 
 ## 1 - In your machine
-* Install Ruby 2.4.2 from https://www.ruby-lang.org/en/downloads/ or via RVM (https://rvm.io/)
+* Install Ruby 2.5.1 from https://www.ruby-lang.org/en/downloads/ or via RVM (https://rvm.io/)
 * Install Bundler and dependencies:
 ```
 cd my-app
@@ -56,3 +56,8 @@ guard
 ```
 It will run rubocop on start, will run rubocop inspections on changed files and will re-run all RSpecs and rubocop
 inspections if you hit Enter in guard window.
+
+Run the tests:
+```
+rspec
+```
diff --git a/app/api_clients/github_client.rb b/app/api_clients/github_client.rb
index 2b4c569..3caa1de 100644
--- a/app/api_clients/github_client.rb
+++ b/app/api_clients/github_client.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'net/http'
 require 'uri'
 require 'json'
diff --git a/app/main.rb b/app/main.rb
index 19dd159..e70db9b 100644
--- a/app/main.rb
+++ b/app/main.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require_relative 'api_clients/github_client'
 
 # A stub for apps' entry point class
diff --git a/bin/app.rb b/bin/app.rb
index fdd9b18..d9651df 100755
--- a/bin/app.rb
+++ b/bin/app.rb
@@ -1,4 +1,6 @@
 #!/usr/bin/env ruby
+# frozen_string_literal: true
+
 require_relative '../lib/environment'
 
 raise 'Usage: repo=octokit.rb bin/app.rb' unless ENV['repo']
diff --git a/lib/environment.rb b/lib/environment.rb
index a0a0c59..53d4573 100644
--- a/lib/environment.rb
+++ b/lib/environment.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'active_support/logger'
 
 # App environment boilerplate code
diff --git a/spec/main_spec.rb b/spec/main_spec.rb
index 891eed8..57ce335 100644
--- a/spec/main_spec.rb
+++ b/spec/main_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 RSpec.describe Main do
 
   context 'should work' do
diff --git a/spec/support/datafile_fixtures_helper.rb b/spec/support/datafile_fixtures_helper.rb
index 8497aad..697cf07 100644
--- a/spec/support/datafile_fixtures_helper.rb
+++ b/spec/support/datafile_fixtures_helper.rb
@@ -1,3 +1,5 @@
-def load_fixture_text(fn)
-  File.open([Environment::APP_ROOT, 'spec', 'support', 'fixtures', fn].join('/'), &:read)
+# frozen_string_literal: true
+
+def load_fixture_text(file_name)
+  File.open([Environment::APP_ROOT, 'spec', 'support', 'fixtures', file_name].join('/'), &:read)
 end
diff --git a/spec/support/environment.rb b/spec/support/environment.rb
index 0f8cbd5..21039f0 100644
--- a/spec/support/environment.rb
+++ b/spec/support/environment.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 # Test mode environment tweaks
 class Environment
 
diff --git a/spec/support/spec_helper.rb b/spec/support/spec_helper.rb
index 18cf343..ce09279 100644
--- a/spec/support/spec_helper.rb
+++ b/spec/support/spec_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'simplecov'
 require 'webmock/rspec'
 
-- 
GitLab