diff --git a/Gemfile b/Gemfile index bee4096..68cd345 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' # Specify your gem's dependencies in erd.gemspec diff --git a/Rakefile b/Rakefile index b103f0a..82883e1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,6 @@ #!/usr/bin/env rake +# frozen_string_literal: true + require 'bundler' Bundler::GemHelper.install_tasks diff --git a/app/controllers/erd/application_controller.rb b/app/controllers/erd/application_controller.rb index fcb2e47..59ae599 100644 --- a/app/controllers/erd/application_controller.rb +++ b/app/controllers/erd/application_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Erd class ApplicationController < ActionController::Base protect_from_forgery diff --git a/app/controllers/erd/erd_controller.rb b/app/controllers/erd/erd_controller.rb index b2d8370..7652fec 100644 --- a/app/controllers/erd/erd_controller.rb +++ b/app/controllers/erd/erd_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'nokogiri' require 'rails_erd/diagram/graphviz' require 'erd/application_controller' diff --git a/config.ru b/config.ru index d2881ce..69bee0c 100644 --- a/config.ru +++ b/config.ru @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rubygems' require 'bundler' diff --git a/config/routes.rb b/config/routes.rb index ab678ad..73a0c89 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Erd::Engine.routes.draw do get '/' => 'erd#index' put '/' => 'erd#update' diff --git a/erd.gemspec b/erd.gemspec index 332d0c6..f23973e 100644 --- a/erd.gemspec +++ b/erd.gemspec @@ -1,4 +1,6 @@ # -*- encoding: utf-8 -*- +# frozen_string_literal: true + require File.expand_path('../lib/erd/version', __FILE__) Gem::Specification.new do |gem| diff --git a/lib/erd.rb b/lib/erd.rb index b17ba02..7e1708e 100644 --- a/lib/erd.rb +++ b/lib/erd.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + require 'erd/version' require 'erd/railtie' diff --git a/lib/erd/engine.rb b/lib/erd/engine.rb index e1d6d9d..56cde3e 100644 --- a/lib/erd/engine.rb +++ b/lib/erd/engine.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Erd class Engine < ::Rails::Engine isolate_namespace Erd diff --git a/lib/erd/generator_runner.rb b/lib/erd/generator_runner.rb index d92716e..7b9315d 100644 --- a/lib/erd/generator_runner.rb +++ b/lib/erd/generator_runner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/generators' module Erd diff --git a/lib/erd/migrator.rb b/lib/erd/migrator.rb index 2001a42..e790f3f 100644 --- a/lib/erd/migrator.rb +++ b/lib/erd/migrator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/generators' module Erd diff --git a/lib/erd/railtie.rb b/lib/erd/railtie.rb index 2e66e1b..f84e317 100644 --- a/lib/erd/railtie.rb +++ b/lib/erd/railtie.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails/all' require 'erd/engine' diff --git a/lib/erd/version.rb b/lib/erd/version.rb index c25501e..e5f3c37 100644 --- a/lib/erd/version.rb +++ b/lib/erd/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Erd VERSION = '0.4.0' end diff --git a/test/fake_app/db/migrate/20120428022519_create_authors.rb b/test/fake_app/db/migrate/20120428022519_create_authors.rb index 96b6baf..96cd9df 100644 --- a/test/fake_app/db/migrate/20120428022519_create_authors.rb +++ b/test/fake_app/db/migrate/20120428022519_create_authors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAuthors < ActiveRecord::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[5.0] : ActiveRecord::Migration def change create_table :authors do |t| diff --git a/test/fake_app/db/migrate/20120428022535_create_books.rb b/test/fake_app/db/migrate/20120428022535_create_books.rb index 481f748..2b4c994 100644 --- a/test/fake_app/db/migrate/20120428022535_create_books.rb +++ b/test/fake_app/db/migrate/20120428022535_create_books.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateBooks < ActiveRecord::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[5.0] : ActiveRecord::Migration def change create_table :books do |t| diff --git a/test/fake_app/fake_app.rb b/test/fake_app/fake_app.rb index e662656..e99c280 100644 --- a/test/fake_app/fake_app.rb +++ b/test/fake_app/fake_app.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'active_record' require 'action_controller/railtie' diff --git a/test/features/erd_test.rb b/test/features/erd_test.rb index aefdfec..58677af 100644 --- a/test/features/erd_test.rb +++ b/test/features/erd_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class ErdIndexTest < ActionDispatch::IntegrationTest diff --git a/test/lib/migrator_test.rb b/test/lib/migrator_test.rb index 282b2d6..86b4782 100644 --- a/test/lib/migrator_test.rb +++ b/test/lib/migrator_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'test_helper' class MigratorTest < ActiveSupport::TestCase