From b6b697872e46fd340263bc9c24339e790967d581 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Mon, 11 Apr 2016 15:05:15 +0100 Subject: [PATCH] Set TargetRubyVersion to 2.3 in Rubocop --- .rubocop.yml | 2 ++ Gemfile | 2 ++ config/environment.rb | 2 ++ config/initializers/sequel.rb | 2 ++ config/schedule.rb | 4 +++- config/unicorn.rb | 2 ++ db/migrate/001_create_currencies.rb | 2 ++ lib/tasks/db.rake | 2 ++ lib/tasks/environment.rake | 2 ++ lib/tasks/rates.rake | 2 ++ lib/tasks/test.rake | 2 ++ spec/api_spec.rb | 2 ++ spec/currency_spec.rb | 2 ++ spec/helper.rb | 2 ++ spec/quote_spec.rb | 2 ++ 15 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index b6e7d57..338b4df 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,2 +1,4 @@ +AllCops: + TargetRubyVersion: 2.3 Documentation: Enabled: false diff --git a/Gemfile b/Gemfile index f671bfd..698ed4a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'http://rubygems.org' ruby '2.3.0' diff --git a/config/environment.rb b/config/environment.rb index 3056116..578fb8c 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative 'app' $LOAD_PATH << App.root.join('lib') Dir[App.root.join('config/initializers/*.rb')].each { |f| require f } diff --git a/config/initializers/sequel.rb b/config/initializers/sequel.rb index 711a78f..26a2d58 100644 --- a/config/initializers/sequel.rb +++ b/config/initializers/sequel.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'pg' require 'sequel' diff --git a/config/schedule.rb b/config/schedule.rb index d2a745c..67731cf 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + job_type :rake, 'cd :path && foreman run bundle exec rake :task --silent :output' every '*/15 13,14,15,16,17 * * 1-5' do - rake "rates:update" + rake 'rates:update' end diff --git a/config/unicorn.rb b/config/unicorn.rb index 26c4404..e35b8b1 100644 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + preload_app true worker_processes((ENV['WORKER_PROCESSES'] || 4).to_i) timeout 10 diff --git a/db/migrate/001_create_currencies.rb b/db/migrate/001_create_currencies.rb index d94a01b..3d1e311 100644 --- a/db/migrate/001_create_currencies.rb +++ b/db/migrate/001_create_currencies.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Sequel.migration do change do create_table :currencies do diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index f7686e2..20be55c 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :db do desc 'Create db' task :create do diff --git a/lib/tasks/environment.rake b/lib/tasks/environment.rake index 706201a..95c6e48 100644 --- a/lib/tasks/environment.rake +++ b/lib/tasks/environment.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + task :environment do require './config/environment' end diff --git a/lib/tasks/rates.rake b/lib/tasks/rates.rake index 8348b3e..554c8d7 100644 --- a/lib/tasks/rates.rake +++ b/lib/tasks/rates.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :rates do task setup: :environment do require 'currency' diff --git a/lib/tasks/test.rake b/lib/tasks/test.rake index 99e86b0..c58c312 100644 --- a/lib/tasks/test.rake +++ b/lib/tasks/test.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rake/testtask' Rake::TestTask.new(test: :environment) do |t| diff --git a/spec/api_spec.rb b/spec/api_spec.rb index e1a5eb3..1fb59f7 100644 --- a/spec/api_spec.rb +++ b/spec/api_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative 'helper' require 'rack/test' require 'api' diff --git a/spec/currency_spec.rb b/spec/currency_spec.rb index 31d5993..88d771c 100644 --- a/spec/currency_spec.rb +++ b/spec/currency_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative 'helper' require 'currency' diff --git a/spec/helper.rb b/spec/helper.rb index ca1c7aa..5ce9464 100644 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + ENV['RACK_ENV'] = 'test' require './config/environment' require 'minitest/autorun' diff --git a/spec/quote_spec.rb b/spec/quote_spec.rb index 7dceb94..06ba1b7 100644 --- a/spec/quote_spec.rb +++ b/spec/quote_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative 'helper' require 'quote'