From 6d187f556af09e1aa23d094f1e29178d91414cfe Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 1 Jul 2016 15:16:39 +0800 Subject: [PATCH 1/7] update Gemfile to rails 5 and ruby 2.3.0 --- .ruby-version | 2 +- .travis.yml | 2 +- Gemfile | 21 +++--- Gemfile.lock | 189 ++++++++++++++++++++++++++------------------------ 4 files changed, 112 insertions(+), 102 deletions(-) diff --git a/.ruby-version b/.ruby-version index 378bc559..276cbf9e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.1.3 +2.3.0 diff --git a/.travis.yml b/.travis.yml index e65b8389..4dda1c42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ cache: directories: - app/assets/javascripts/node_modules rvm: - - 2.1.3 + - 2.3.0 before_script: - echo "Rspec setup" - export RAILS_ENV=test diff --git a/Gemfile b/Gemfile index 5840a752..ca180f09 100644 --- a/Gemfile +++ b/Gemfile @@ -1,28 +1,27 @@ source 'https://rubygems.org' -ruby '2.1.3' +ruby '2.3.0' -gem 'rails' +gem 'rails', '~> 5.0.0' -gem 'active_model_serializers', '~> 0.8.1' +gem 'active_model_serializers' gem 'aws-sdk', '< 2.0' -gem 'best_in_place' #in-place editing -gem 'delayed_job', '~> 4.0.2' -gem 'delayed_job_active_record', '~> 4.0.1' +gem 'best_in_place' +gem 'delayed_job' +gem 'delayed_job_active_record' gem 'devise' -gem 'doorkeeper' +gem 'doorkeeper', '~> 4.0.0.rc4' gem 'dotenv-rails' gem 'exception_notification' gem 'formtastic' gem 'formula' gem 'httparty' gem 'json' -gem 'kaminari' # pagination +gem 'kaminari' gem 'paperclip' gem 'pg' gem 'pundit' gem 'pundit_extra' gem 'rack-cors' -gem 'rails3-jquery-autocomplete' gem 'redis' gem 'slack-notifier' gem 'snorlax' @@ -31,12 +30,13 @@ gem 'uservoice-ruby' gem 'jquery-rails' gem 'jquery-ui-rails' gem 'jbuilder' +gem 'rails3-jquery-autocomplete' +gem 'babel-transpiler' group :assets do gem 'coffee-rails' gem 'sass-rails' gem 'uglifier' - # gem 'therubyracer' end group :production do @@ -57,6 +57,5 @@ group :development, :test do gem 'binding_of_caller' gem 'pry-byebug' gem 'pry-rails' - gem 'quiet_assets' gem 'tunemygc' end diff --git a/Gemfile.lock b/Gemfile.lock index f62a561a..0691556f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,50 +1,59 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) + actioncable (5.0.0) + actionpack (= 5.0.0) + nio4r (~> 1.2) + websocket-driver (~> 0.6.1) + actionmailer (5.0.0) + actionpack (= 5.0.0) + actionview (= 5.0.0) + activejob (= 5.0.0) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - 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-dom-testing (~> 2.0) + actionpack (5.0.0) + actionview (= 5.0.0) + activesupport (= 5.0.0) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) + actionview (5.0.0) + activesupport (= 5.0.0) builder (~> 3.1) erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - active_model_serializers (0.8.3) - activemodel (>= 3.0) - activejob (4.2.6) - activesupport (= 4.2.6) - globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) - arel (~> 6.0) - activesupport (4.2.6) + active_model_serializers (0.10.1) + actionpack (>= 4.1, < 6) + activemodel (>= 4.1, < 6) + jsonapi (~> 0.1.1.beta2) + railties (>= 4.1, < 6) + activejob (5.0.0) + activesupport (= 5.0.0) + globalid (>= 0.3.6) + activemodel (5.0.0) + activesupport (= 5.0.0) + activerecord (5.0.0) + activemodel (= 5.0.0) + activesupport (= 5.0.0) + arel (~> 7.0) + activesupport (5.0.0) + concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.3.8) - arel (6.0.3) + arel (7.0.0) aws-sdk (1.66.0) aws-sdk-v1 (= 1.66.0) aws-sdk-v1 (1.66.0) json (~> 1.4) nokogiri (>= 1.4.4) + babel-source (5.8.35) + babel-transpiler (0.7.0) + babel-source (>= 4.0, < 6) + execjs (~> 2.0) bcrypt (3.1.11) best_in_place (3.1.0) actionpack (>= 3.2) @@ -63,20 +72,20 @@ GEM cocaine (0.5.8) climate_control (>= 0.0.3, < 1.0) coderay (1.1.1) - coffee-rails (4.1.1) + coffee-rails (4.2.1) coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.1.x) + railties (>= 4.0.0, < 5.2.x) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.10.0) concurrent-ruby (1.0.2) debug_inspector (0.0.2) - delayed_job (4.0.6) - activesupport (>= 3.0, < 5.0) - delayed_job_active_record (4.0.3) - activerecord (>= 3.0, < 5.0) - delayed_job (>= 3.0, < 4.1) + delayed_job (4.1.2) + activesupport (>= 3.0, < 5.1) + delayed_job_active_record (4.1.1) + activerecord (>= 3.0, < 5.1) + delayed_job (>= 3.0, < 5) devise (4.1.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -85,16 +94,16 @@ GEM warden (~> 1.2.3) diff-lcs (1.2.5) docile (1.1.5) - doorkeeper (3.1.0) - railties (>= 3.2) + doorkeeper (4.0.0.rc4) + railties (>= 4.2) dotenv (2.1.1) dotenv-rails (2.1.1) dotenv (= 2.1.1) railties (>= 4.0, < 5.1) erubis (2.7.0) - exception_notification (4.1.4) - actionmailer (~> 4.0) - activesupport (~> 4.0) + exception_notification (4.1.1) + actionmailer (>= 3.0.4) + activesupport (>= 3.0.4) execjs (2.7.0) ezcrypto (0.7.2) factory_girl (4.7.0) @@ -124,6 +133,8 @@ GEM json (1.8.3) json-schema (2.6.2) addressable (~> 2.3.8) + jsonapi (0.1.1.beta2) + json (~> 1.8) kaminari (0.17.0) actionpack (>= 3.0.0) activesupport (>= 3.0.0) @@ -140,6 +151,7 @@ GEM minitest (5.9.0) multi_json (1.12.1) multi_xml (0.5.5) + nio4r (1.2.1) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) @@ -165,29 +177,25 @@ GEM pundit (1.1.0) activesupport (>= 3.0.0) pundit_extra (0.2.0) - quiet_assets (1.1.0) - railties (>= 3.1, < 5.0) - rack (1.6.4) + rack (2.0.1) rack-cors (0.4.0) rack-test (0.6.3) rack (>= 1.0) - 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) + rails (5.0.0) + actioncable (= 5.0.0) + actionmailer (= 5.0.0) + actionpack (= 5.0.0) + actionview (= 5.0.0) + activejob (= 5.0.0) + activemodel (= 5.0.0) + activerecord (= 5.0.0) + activesupport (= 5.0.0) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) + railties (= 5.0.0) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.1) + activesupport (>= 4.2.0, < 6.0) nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) rails3-jquery-autocomplete (1.0.15) @@ -197,35 +205,35 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) + railties (5.0.0) + actionpack (= 5.0.0) + activesupport (= 5.0.0) + method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (11.2.2) redis (3.3.0) responders (2.2.0) railties (>= 4.2.0, < 5.1) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) + rspec-core (3.1.7) + rspec-support (~> 3.1.0) + rspec-expectations (3.1.2) diff-lcs (>= 1.2.0, < 2.0) - 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) + 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) sass (3.4.22) - sass-rails (5.0.4) - railties (>= 4.0.0, < 5.0) + sass-rails (5.0.5) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) @@ -241,10 +249,10 @@ GEM slop (3.6.0) snorlax (0.1.6) rails (> 4.1) - sprockets (3.6.0) + sprockets (3.6.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.0.4) + sprockets-rails (3.1.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -262,22 +270,26 @@ GEM oauth (>= 0.4.7) warden (1.2.6) rack (>= 1.0) + websocket-driver (0.6.4) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) PLATFORMS ruby DEPENDENCIES - active_model_serializers (~> 0.8.1) + active_model_serializers aws-sdk (< 2.0) + babel-transpiler best_in_place better_errors binding_of_caller brakeman coffee-rails - delayed_job (~> 4.0.2) - delayed_job_active_record (~> 4.0.1) + delayed_job + delayed_job_active_record devise - doorkeeper + doorkeeper (~> 4.0.0.rc4) dotenv-rails exception_notification factory_girl_rails @@ -296,9 +308,8 @@ DEPENDENCIES pry-rails pundit pundit_extra - quiet_assets rack-cors - rails + rails (~> 5.0.0) rails3-jquery-autocomplete rails_12factor redis From 2e49701dea143c8313ba23f9a31324df58540d7b Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 1 Jul 2016 15:17:49 +0800 Subject: [PATCH 2/7] fiddle with javascripts and add sprockets manifest file --- app/assets/config/manifest.js | 6 ++++++ app/assets/javascripts/application.js | 6 +++--- app/assets/javascripts/src/Metamaps.Import.js | 2 -- app/assets/javascripts/test/Metamaps.Import.spec.js | 13 +++++++------ 4 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 app/assets/config/manifest.js diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 00000000..72a7189c --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1,6 @@ +// JS and CSS bundles +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css + +// Other +//= link_tree ../images diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 8dcb1df3..13ad082d 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -16,6 +16,9 @@ //= require ./orderedLibraries/underscore //= require ./orderedLibraries/backbone //= require_directory ./lib +//= require_directory ./shims +//= require_directory ./require +//= require_directory ./famous //= require ./src/Metamaps.GlobalUI //= require ./src/Metamaps.Router //= require ./src/Metamaps.Backbone @@ -44,6 +47,3 @@ //= require ./src/Metamaps.Admin //= require ./src/Metamaps.Import //= require ./src/Metamaps.JIT -//= require_directory ./shims -//= require_directory ./require -//= require_directory ./famous diff --git a/app/assets/javascripts/src/Metamaps.Import.js b/app/assets/javascripts/src/Metamaps.Import.js index 159298b8..e82a05c5 100644 --- a/app/assets/javascripts/src/Metamaps.Import.js +++ b/app/assets/javascripts/src/Metamaps.Import.js @@ -320,5 +320,3 @@ Metamaps.Import = { Metamaps.Synapse.renderSynapse(mapping, synapse, node1, node2, true) } } - -module.exports = Metamaps.Import diff --git a/app/assets/javascripts/test/Metamaps.Import.spec.js b/app/assets/javascripts/test/Metamaps.Import.spec.js index d8993e42..cf8d6f53 100644 --- a/app/assets/javascripts/test/Metamaps.Import.spec.js +++ b/app/assets/javascripts/test/Metamaps.Import.spec.js @@ -1,11 +1,12 @@ -var chai = require('chai') -var expect = chai.expect +/* global describe, it */ +const chai = require('chai') +const expect = chai.expect -Metamaps = {} -Metamaps.Import = require('../src/Metamaps.Import') +const Metamaps = {} +require('../src/Metamaps.Import') -describe('Metamaps.Import.js', function() { - it('has a topic whitelist', function() { +describe('Metamaps.Import.js', function () { + it('has a topic whitelist', function () { expect(Metamaps.Import.topicWhitelist).to.deep.equal( ['id', 'name', 'metacode', 'x', 'y', 'description', 'link', 'permission'] ) From 2ffd62674d0e4ba9fff4bfa6383388e932607ad6 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 1 Jul 2016 15:18:18 +0800 Subject: [PATCH 3/7] update config directory for rails 5 --- config/application.rb | 25 +-------- config/boot.rb | 5 +- config/cable.yml | 9 ++++ config/environment.rb | 8 +-- config/environments/production.rb | 52 ++----------------- config/environments/test.rb | 2 +- .../application_controller_renderer.rb | 6 +++ config/initializers/assets.rb | 12 +++++ config/initializers/cookies_serializer.rb | 5 ++ .../initializers/filter_parameter_logging.rb | 4 ++ config/initializers/inflections.rb | 11 ++-- config/initializers/mime_types.rb | 1 - config/initializers/new_framework_defaults.rb | 24 +++++++++ config/initializers/secret_token.rb | 2 +- config/initializers/session_store.rb | 4 +- config/initializers/wrap_parameters.rb | 8 +-- config/puma.rb | 47 +++++++++++++++++ config/spring.rb | 6 +++ 18 files changed, 139 insertions(+), 92 deletions(-) create mode 100644 config/cable.yml create mode 100644 config/initializers/application_controller_renderer.rb create mode 100644 config/initializers/assets.rb create mode 100644 config/initializers/cookies_serializer.rb create mode 100644 config/initializers/filter_parameter_logging.rb create mode 100644 config/initializers/new_framework_defaults.rb create mode 100644 config/puma.rb create mode 100644 config/spring.rb diff --git a/config/application.rb b/config/application.rb index 570b6959..d3ebab7e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,4 @@ -require File.expand_path('../boot', __FILE__) +require_relative 'boot' require 'csv' require 'rails/all' @@ -15,21 +15,6 @@ module Metamaps # Custom directories with classes and modules you want to be autoloadable. config.autoload_paths << Rails.root.join('app', 'services') - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" @@ -43,17 +28,9 @@ module Metamaps # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] - # Use SQL instead of Active Record's schema dumper when creating the database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - # Enable the asset pipeline config.assets.initialize_on_precompile = false - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '2.0' - config.generators do |g| g.test_framework :rspec end diff --git a/config/boot.rb b/config/boot.rb index 0f0d7c60..e49b6649 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,5 +1,6 @@ require 'rubygems' require 'rails/commands/server' + module Rails class Server def default_options @@ -9,6 +10,6 @@ module Rails end # Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' diff --git a/config/cable.yml b/config/cable.yml new file mode 100644 index 00000000..0bbde6f7 --- /dev/null +++ b/config/cable.yml @@ -0,0 +1,9 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 diff --git a/config/environment.rb b/config/environment.rb index 6e9ad9e4..426333bb 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) +# Load the Rails application. +require_relative 'application' -# Initialize the rails application -Metamaps::Application.initialize! +# Initialize the Rails application. +Rails.application.initialize! diff --git a/config/environments/production.rb b/config/environments/production.rb index 9654962a..be299d94 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,9 +1,8 @@ -Metamaps::Application.configure do +Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb config.log_level = :warn config.eager_load = true - config.assets.js_compressor = :uglifier # Code is not reloaded between requests config.cache_classes = true @@ -13,13 +12,12 @@ Metamaps::Application.configure do config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_files = true + config.public_file_server.enabled = false + # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = false - # Compress JavaScripts and CSS - config.assets.compress = true - + config.assets.js_compressor = :uglifier # S3 file storage config.paperclip_defaults = { @@ -38,7 +36,6 @@ Metamaps::Application.configure do port: ENV['SMTP_PORT'], user_name: ENV['SMTP_USERNAME'], password: ENV['SMTP_PASSWORD'], - #domain: ENV['SMTP_DOMAIN'] authentication: 'plain', enable_starttls_auto: true, openssl_verify_mode: 'none' } @@ -46,54 +43,13 @@ Metamaps::Application.configure do # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = true - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - # Generate digests for assets URLs config.assets.digest = true - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Prepend all log lines with the following tags - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - #config.assets.precompile += %w( ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation can not be found) config.i18n.fallbacks = true # Send deprecation notices to registered listeners config.active_support.deprecation = :notify - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 end diff --git a/config/environments/test.rb b/config/environments/test.rb index be83469c..29bd62b6 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -10,7 +10,7 @@ Metamaps::Application.configure do config.cache_classes = true # Configure static asset server for tests with Cache-Control for performance - config.serve_static_files = true + config.public_file_server.enabled = true config.static_cache_control = "public, max-age=3600" # Show full error reports and disable caching diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb new file mode 100644 index 00000000..51639b67 --- /dev/null +++ b/config/initializers/application_controller_renderer.rb @@ -0,0 +1,6 @@ +# Be sure to restart your server when you modify this file. + +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 00000000..f79cbbaf --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,12 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '2.0' +Rails.application.config.assets.quiet = true + +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb new file mode 100644 index 00000000..f51a497e --- /dev/null +++ b/config/initializers/cookies_serializer.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. +Rails.application.config.action_dispatch.cookies_serializer = :hybrid diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 00000000..4a994e1e --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 5d8d9be2..ac033bf9 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,15 +1,16 @@ # Be sure to restart your server when you modify this file. -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end -# + # These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections do |inflect| +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index 8b5e5425..2c36bfc3 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -2,6 +2,5 @@ # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone Mime::Type.register "application/xls", :xls diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb new file mode 100644 index 00000000..0706cafd --- /dev/null +++ b/config/initializers/new_framework_defaults.rb @@ -0,0 +1,24 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.0 upgrade. +# +# Read the Rails 5.0 release notes for more info on each option. + +# Enable per-form CSRF tokens. Previous versions had false. +Rails.application.config.action_controller.per_form_csrf_tokens = true + +# Enable origin-checking CSRF mitigation. Previous versions had false. +Rails.application.config.action_controller.forgery_protection_origin_check = true + +# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. +# Previous versions had false. +ActiveSupport.to_time_preserves_timezone = true + +# Require `belongs_to` associations by default. Previous versions had false. +Rails.application.config.active_record.belongs_to_required_by_default = true + +# Do not halt callback chains when a callback returns false. Previous versions had true. +ActiveSupport.halt_callback_chains_on_return_false = false + +# Configure SSL options to enable HSTS with subdomains. Previous versions had false. +Rails.application.config.ssl_options = { hsts: { subdomains: true } } diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 83877c08..e7f18911 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -4,4 +4,4 @@ # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -Metamaps::Application.config.secret_key_base = ENV['SECRET_KEY_BASE'] +Rails.application.config.secret_key_base = ENV['SECRET_KEY_BASE'] diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 757d66cc..d2dc13b6 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,8 +1,8 @@ # Be sure to restart your server when you modify this file. -Metamaps::Application.config.session_store :cookie_store, key: '_Metamaps_session' +Rails.application.config.session_store :cookie_store, key: '_Metamaps_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rails generate session_migration") -# Metamaps::Application.config.session_store :active_record_store +# Rails.application.config.session_store :active_record_store diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 999df201..36bb3e27 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -8,7 +8,7 @@ ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 00000000..c7f311f8 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,47 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum, this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/config/spring.rb b/config/spring.rb new file mode 100644 index 00000000..c9119b40 --- /dev/null +++ b/config/spring.rb @@ -0,0 +1,6 @@ +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } From dcd3cc6e787051bc6d55dd6f1270120c0087a546 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 1 Jul 2016 15:18:38 +0800 Subject: [PATCH 4/7] fix some errors with controllers/serializers --- app/controllers/main_controller.rb | 2 +- app/serializers/event_serializer.rb | 1 - app/serializers/new_map_serializer.rb | 1 - app/serializers/new_mapping_serializer.rb | 1 - app/serializers/new_synapse_serializer.rb | 1 - app/serializers/new_topic_serializer.rb | 1 - 6 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 87264c4c..7382b34a 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -175,7 +175,7 @@ class MainController < ApplicationController end #limit to 5 results - @synapses = @synapses.slice(0,5) + @synapses = @synapses.to_a.slice(0,5) render json: autocomplete_synapse_array_json(@synapses) end diff --git a/app/serializers/event_serializer.rb b/app/serializers/event_serializer.rb index 0e87cd44..723768a7 100644 --- a/app/serializers/event_serializer.rb +++ b/app/serializers/event_serializer.rb @@ -1,5 +1,4 @@ class EventSerializer < ActiveModel::Serializer - embed :ids, include: true attributes :id, :sequence_id, :kind, :map_id, :created_at has_one :actor, serializer: NewUserSerializer, root: 'users' diff --git a/app/serializers/new_map_serializer.rb b/app/serializers/new_map_serializer.rb index 3c56f82f..4139f4c6 100644 --- a/app/serializers/new_map_serializer.rb +++ b/app/serializers/new_map_serializer.rb @@ -1,5 +1,4 @@ class NewMapSerializer < ActiveModel::Serializer - embed :ids, include: true attributes :id, :name, :desc, diff --git a/app/serializers/new_mapping_serializer.rb b/app/serializers/new_mapping_serializer.rb index 4e65e161..90c4c66c 100644 --- a/app/serializers/new_mapping_serializer.rb +++ b/app/serializers/new_mapping_serializer.rb @@ -1,5 +1,4 @@ class NewMappingSerializer < ActiveModel::Serializer - embed :ids, include: true attributes :id, :xloc, :yloc, diff --git a/app/serializers/new_synapse_serializer.rb b/app/serializers/new_synapse_serializer.rb index b145d605..dd6fd6b5 100644 --- a/app/serializers/new_synapse_serializer.rb +++ b/app/serializers/new_synapse_serializer.rb @@ -1,5 +1,4 @@ class NewSynapseSerializer < ActiveModel::Serializer - embed :ids, include: true attributes :id, :desc, :category, diff --git a/app/serializers/new_topic_serializer.rb b/app/serializers/new_topic_serializer.rb index cdbbedf9..f9a1b962 100644 --- a/app/serializers/new_topic_serializer.rb +++ b/app/serializers/new_topic_serializer.rb @@ -1,5 +1,4 @@ class NewTopicSerializer < ActiveModel::Serializer - embed :ids, include: true attributes :id, :name, :desc, From 3502aa10e4b2c455ff33191ae47af8559fcbd2ed Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 1 Jul 2016 15:30:20 +0800 Subject: [PATCH 5/7] schema update - fix travis? --- db/schema.rb | 87 +++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index d3dc9634..c6cc3279 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,4 +1,3 @@ -# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -28,10 +27,9 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.string "queue" t.datetime "created_at" t.datetime "updated_at" + t.index ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree end - add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree - create_table "events", force: :cascade do |t| t.string "kind", limit: 255 t.integer "eventable_id" @@ -41,24 +39,22 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.integer "sequence_id" t.datetime "created_at" t.datetime "updated_at" + t.index ["eventable_type", "eventable_id"], name: "index_events_on_eventable_type_and_eventable_id", using: :btree + t.index ["map_id", "sequence_id"], name: "index_events_on_map_id_and_sequence_id", unique: true, using: :btree + t.index ["map_id"], name: "index_events_on_map_id", using: :btree + t.index ["sequence_id"], name: "index_events_on_sequence_id", using: :btree + t.index ["user_id"], name: "index_events_on_user_id", using: :btree end - add_index "events", ["eventable_type", "eventable_id"], name: "index_events_on_eventable_type_and_eventable_id", using: :btree - add_index "events", ["map_id", "sequence_id"], name: "index_events_on_map_id_and_sequence_id", unique: true, using: :btree - add_index "events", ["map_id"], name: "index_events_on_map_id", using: :btree - add_index "events", ["sequence_id"], name: "index_events_on_sequence_id", using: :btree - add_index "events", ["user_id"], name: "index_events_on_user_id", using: :btree - create_table "in_metacode_sets", force: :cascade do |t| t.integer "metacode_id" t.integer "metacode_set_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["metacode_id"], name: "index_in_metacode_sets_on_metacode_id", using: :btree + t.index ["metacode_set_id"], name: "index_in_metacode_sets_on_metacode_set_id", using: :btree end - add_index "in_metacode_sets", ["metacode_id"], name: "index_in_metacode_sets_on_metacode_id", using: :btree - add_index "in_metacode_sets", ["metacode_set_id"], name: "index_in_metacode_sets_on_metacode_set_id", using: :btree - create_table "mappings", force: :cascade do |t| t.text "category" t.integer "xloc" @@ -71,14 +67,13 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.datetime "updated_at", null: false t.integer "mappable_id" t.string "mappable_type" + t.index ["map_id", "synapse_id"], name: "index_mappings_on_map_id_and_synapse_id", using: :btree + t.index ["map_id", "topic_id"], name: "index_mappings_on_map_id_and_topic_id", using: :btree + t.index ["map_id"], name: "index_mappings_on_map_id", using: :btree + t.index ["mappable_id", "mappable_type"], name: "index_mappings_on_mappable_id_and_mappable_type", using: :btree + t.index ["user_id"], name: "index_mappings_on_user_id", using: :btree end - add_index "mappings", ["map_id", "synapse_id"], name: "index_mappings_on_map_id_and_synapse_id", using: :btree - add_index "mappings", ["map_id", "topic_id"], name: "index_mappings_on_map_id_and_topic_id", using: :btree - add_index "mappings", ["map_id"], name: "index_mappings_on_map_id", using: :btree - add_index "mappings", ["mappable_id", "mappable_type"], name: "index_mappings_on_mappable_id_and_mappable_type", using: :btree - add_index "mappings", ["user_id"], name: "index_mappings_on_user_id", using: :btree - create_table "maps", force: :cascade do |t| t.text "name" t.boolean "arranged" @@ -92,10 +87,9 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.string "screenshot_content_type" t.integer "screenshot_file_size" t.datetime "screenshot_updated_at" + t.index ["user_id"], name: "index_maps_on_user_id", using: :btree end - add_index "maps", ["user_id"], name: "index_maps_on_user_id", using: :btree - create_table "messages", force: :cascade do |t| t.text "message" t.integer "user_id" @@ -103,12 +97,11 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.string "resource_type" t.datetime "created_at" t.datetime "updated_at" + t.index ["resource_id"], name: "index_messages_on_resource_id", using: :btree + t.index ["resource_type"], name: "index_messages_on_resource_type", using: :btree + t.index ["user_id"], name: "index_messages_on_user_id", using: :btree end - add_index "messages", ["resource_id"], name: "index_messages_on_resource_id", using: :btree - add_index "messages", ["resource_type"], name: "index_messages_on_resource_type", using: :btree - add_index "messages", ["user_id"], name: "index_messages_on_user_id", using: :btree - create_table "metacode_sets", force: :cascade do |t| t.string "name" t.text "desc" @@ -116,10 +109,9 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.boolean "mapperContributed" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["user_id"], name: "index_metacode_sets_on_user_id", using: :btree end - add_index "metacode_sets", ["user_id"], name: "index_metacode_sets_on_user_id", using: :btree - create_table "metacodes", force: :cascade do |t| t.text "name" t.string "manual_icon" @@ -141,10 +133,9 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.datetime "created_at", null: false t.datetime "revoked_at" t.string "scopes" + t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree end - add_index "oauth_access_grants", ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree - create_table "oauth_access_tokens", force: :cascade do |t| t.integer "resource_owner_id" t.integer "application_id" @@ -154,12 +145,11 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.datetime "revoked_at" t.datetime "created_at", null: false t.string "scopes" + t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree + t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree + t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree end - add_index "oauth_access_tokens", ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree - add_index "oauth_access_tokens", ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree - add_index "oauth_access_tokens", ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree - create_table "oauth_applications", force: :cascade do |t| t.string "name", null: false t.string "uid", null: false @@ -168,10 +158,9 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.string "scopes", default: "", null: false t.datetime "created_at" t.datetime "updated_at" + t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree end - add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree - create_table "synapses", force: :cascade do |t| t.text "desc" t.text "category" @@ -183,24 +172,22 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "defer_to_map_id" + t.index ["node1_id", "node1_id"], name: "index_synapses_on_node1_id_and_node1_id", using: :btree + t.index ["node1_id"], name: "index_synapses_on_node1_id", using: :btree + t.index ["node2_id", "node2_id"], name: "index_synapses_on_node2_id_and_node2_id", using: :btree + t.index ["node2_id"], name: "index_synapses_on_node2_id", using: :btree + t.index ["user_id"], name: "index_synapses_on_user_id", using: :btree end - add_index "synapses", ["node1_id", "node1_id"], name: "index_synapses_on_node1_id_and_node1_id", using: :btree - add_index "synapses", ["node1_id"], name: "index_synapses_on_node1_id", using: :btree - add_index "synapses", ["node2_id", "node2_id"], name: "index_synapses_on_node2_id_and_node2_id", using: :btree - add_index "synapses", ["node2_id"], name: "index_synapses_on_node2_id", using: :btree - add_index "synapses", ["user_id"], name: "index_synapses_on_user_id", using: :btree - create_table "tokens", force: :cascade do |t| t.string "token" t.string "description" t.integer "user_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["user_id"], name: "index_tokens_on_user_id", using: :btree end - add_index "tokens", ["user_id"], name: "index_tokens_on_user_id", using: :btree - create_table "topics", force: :cascade do |t| t.text "name" t.text "desc" @@ -219,21 +206,19 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.integer "audio_file_size" t.datetime "audio_updated_at" t.integer "defer_to_map_id" + t.index ["metacode_id"], name: "index_topics_on_metacode_id", using: :btree + t.index ["user_id"], name: "index_topics_on_user_id", using: :btree end - add_index "topics", ["metacode_id"], name: "index_topics_on_metacode_id", using: :btree - add_index "topics", ["user_id"], name: "index_topics_on_user_id", using: :btree - create_table "user_maps", force: :cascade do |t| t.integer "user_id" t.integer "map_id" t.datetime "created_at" t.datetime "updated_at" + t.index ["map_id"], name: "index_user_maps_on_map_id", using: :btree + t.index ["user_id"], name: "index_user_maps_on_user_id", using: :btree end - add_index "user_maps", ["map_id"], name: "index_user_maps_on_map_id", using: :btree - add_index "user_maps", ["user_id"], name: "index_user_maps_on_user_id", using: :btree - create_table "users", force: :cascade do |t| t.string "name" t.string "email" @@ -262,19 +247,17 @@ ActiveRecord::Schema.define(version: 20160401133937) do t.integer "image_file_size" t.datetime "image_updated_at" t.integer "generation" + t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree end - add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree - create_table "webhooks", force: :cascade do |t| t.integer "hookable_id" t.string "hookable_type" t.string "kind", null: false t.string "uri", null: false t.text "event_types", default: [], array: true + t.index ["hookable_type", "hookable_id"], name: "index_webhooks_on_hookable_type_and_hookable_id", using: :btree end - add_index "webhooks", ["hookable_type", "hookable_id"], name: "index_webhooks_on_hookable_type_and_hookable_id", using: :btree - add_foreign_key "tokens", "users" end From 3df6ac1bdea9073939641bde8e0689e239a2c751 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 1 Jul 2016 15:33:53 +0800 Subject: [PATCH 6/7] travis y u do dis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4dda1c42..029f0cb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ before_script: - cp .example-env .env - bundle exec rake db:create - bundle exec rake db:schema:load + - bundle exec rake db:migrate - echo "node setup" - . $HOME/.nvm/nvm.sh - nvm install stable From 8e9baf54b6914400f9320e7f6c2a19b64268010e Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 8 Jul 2016 12:54:57 +0800 Subject: [PATCH 7/7] switch to ruby 2.3.1 --- .ruby-version | 2 +- Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ruby-version b/.ruby-version index 276cbf9e..2bf1c1cc 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.0 +2.3.1 diff --git a/Gemfile b/Gemfile index ca180f09..e688219e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '2.3.0' +ruby '2.3.1' gem 'rails', '~> 5.0.0'