- <% @metacodes = user_metacodes() %>
- <% set = get_metacodeset() %>
<% @metacodes.each do |metacode| %>
<% end %>
+
<%= form.text_field :name, :maxlength => 140, :placeholder => "title..." %>
+
-
+
+
<% end %>
diff --git a/config.ru b/config.ru
index 8a0f42cc..ab79c07d 100644
--- a/config.ru
+++ b/config.ru
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
diff --git a/config/application.rb b/config/application.rb
index b80306c5..b629682a 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require_relative 'boot'
require 'csv'
diff --git a/config/boot.rb b/config/boot.rb
index e49b6649..f17b883c 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rubygems'
require 'rails/commands/server'
diff --git a/config/environment.rb b/config/environment.rb
index 426333bb..12ea62f8 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Load the Rails application.
require_relative 'application'
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 407a30f3..b1654921 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
Metamaps::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 24ceed21..f9c94af6 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb
diff --git a/config/environments/test.rb b/config/environments/test.rb
index dac060f1..5f0b1ee2 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
Metamaps::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
diff --git a/config/initializers/access_codes.rb b/config/initializers/access_codes.rb
index 4a220c97..fdf4e4b3 100644
--- a/config/initializers/access_codes.rb
+++ b/config/initializers/access_codes.rb
@@ -1,4 +1,7 @@
+# frozen_string_literal: true
$codes = []
if ActiveRecord::Base.connection.data_source_exists? 'users'
- $codes = ActiveRecord::Base.connection.execute('SELECT code FROM users').map { |user| user['code'] }
+ $codes = ActiveRecord::Base.connection
+ .execute('SELECT code FROM users')
+ .map { |user| user['code'] }
end
diff --git a/config/initializers/active_model_serializers.rb b/config/initializers/active_model_serializers.rb
index aba3586b..929be340 100644
--- a/config/initializers/active_model_serializers.rb
+++ b/config/initializers/active_model_serializers.rb
@@ -1 +1,2 @@
+# frozen_string_literal: true
ActiveModelSerializers.config.adapter = :json
diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb
index 51639b67..315ac48a 100644
--- a/config/initializers/application_controller_renderer.rb
+++ b/config/initializers/application_controller_renderer.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index 31897cf4..4edab3b6 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# 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.
@@ -9,4 +10,4 @@ Rails.application.config.assets.quiet = true
# 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( webpacked/metamaps.bundle.js )
+Rails.application.config.assets.precompile += %w(webpacked/metamaps.bundle.js)
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
index 59385cdf..5b98aef4 100644
--- a/config/initializers/backtrace_silencers.rb
+++ b/config/initializers/backtrace_silencers.rb
@@ -1,7 +1,10 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
-# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# You can add backtrace silencers for libraries that you're using but don't
+# wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
-# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# You can also remove all the silencers if you're trying to debug a problem
+# that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb
index f51a497e..74ea9274 100644
--- a/config/initializers/cookies_serializer.rb
+++ b/config/initializers/cookies_serializer.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb
index a9a8dcff..cb46d3ef 100644
--- a/config/initializers/cors.rb
+++ b/config/initializers/cors.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 8a87b3b9..6740cdc9 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
@@ -6,7 +7,8 @@ Devise.setup do |config|
# confirmation, reset password and unlock tokens in the database.
# Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
# by default. You can change it below and use your own secret key.
- # config.secret_key = '4d38a819bcea6314ffccb156a8e84b1b52c51ed446d11877c973791b3cd88449e9dbd7990cbc6e7f37d84702168ec36391467000c842ed5bed4f0b05df2b9507'
+ # config.secret_key = '4d38a819bcea6314ffccb156a8e84b1b52c51ed446d11877c973791b3cd88' +
+ # '449e9dbd7990cbc6e7f37d84702168ec36391467000c842ed5bed4f0b05df2b9507'
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
@@ -91,7 +93,8 @@ Devise.setup do |config|
config.stretches = Rails.env.test? ? 1 : 10
# Setup a pepper to generate the encrypted password.
- # config.pepper = "640ad415cb5292ac9ddbfa6ad7d9653d1537f1184e4037c2453db3eccb98e1c82facc6d3de7bf9d4c41d9967d41194c6e120f36f430e195ba840cd00e02dea59"
+ # config.pepper = "640ad415cb5292ac9ddbfa6ad7d9653d1537f1184e4037c2453db3eccb98e1c82" +
+ # "facc6d3de7bf9d4c41d9967d41194c6e120f36f430e195ba840cd00e02dea59"
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index 843fe831..40de1df8 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
Doorkeeper.configure do
# Change the ORM that doorkeeper will use (needs plugins)
orm :active_record
@@ -7,7 +8,8 @@ Doorkeeper.configure do
current_user || redirect_to(new_user_session_url)
end
- # If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
+ # If you want to restrict access to the web interface for adding oauth authorized applications,
+ # you need to declare the block below.
admin_authenticator do
current_user || redirect_to(new_user_session_url)
end
@@ -38,7 +40,9 @@ Doorkeeper.configure do
# Provide support for an owner to be assigned to each registered application (disabled by default)
# Optional parameter :confirmation => true (default false) if you want to enforce ownership of
# a registered application
- # Note: you must also run the rails g doorkeeper:application_owner generator to provide the necessary support
+ # Note: you must also run the rails g doorkeeper:application_owner generator to provide the
+ # necessary support
+ #
# enable_application_owner :confirmation => false
# Define access token scopes for your provider
@@ -60,9 +64,11 @@ Doorkeeper.configure do
# access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param
# Change the native redirect uri for client apps
- # When clients register with the following redirect uri, they won't be redirected to any server and the authorization code will be displayed within the provider
- # The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
- # (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
+ # When clients register with the following redirect uri, they won't be redirected to any server
+ # and the authorization code will be displayed within the provider
+ # The value can be any string. Use nil to disable this feature. When disabled, clients
+ # must provide a valid URL (Similar behaviour:
+ # https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
#
# native_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
diff --git a/config/initializers/exception_notification.rb b/config/initializers/exception_notification.rb
index 5423334e..db508b3c 100644
--- a/config/initializers/exception_notification.rb
+++ b/config/initializers/exception_notification.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'exception_notification/rails'
ExceptionNotification.configure do |config|
diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb
index 4a994e1e..b7fe1231 100644
--- a/config/initializers/filter_parameter_logging.rb
+++ b/config/initializers/filter_parameter_logging.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index ac033bf9..aa7435fb 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb
index b1d87b01..5b9883ab 100644
--- a/config/initializers/kaminari_config.rb
+++ b/config/initializers/kaminari_config.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
Kaminari.configure do |config|
# config.default_per_page = 25
# config.max_per_page = nil
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
index c7b0c86d..5e8d015a 100644
--- a/config/initializers/mime_types.rb
+++ b/config/initializers/mime_types.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb
index 0706cafd..d3c12d7b 100644
--- a/config/initializers/new_framework_defaults.rb
+++ b/config/initializers/new_framework_defaults.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.0 upgrade.
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
index 4a65d495..6f094b7c 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -1,2 +1,3 @@
+# frozen_string_literal: true
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index e7f18911..4da6fb50 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index d2dc13b6..57d69156 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_Metamaps_session'
diff --git a/config/initializers/uservoice.rb b/config/initializers/uservoice.rb
index df04eeaa..9375e3a1 100644
--- a/config/initializers/uservoice.rb
+++ b/config/initializers/uservoice.rb
@@ -1,7 +1,11 @@
+# frozen_string_literal: true
require 'uservoice-ruby'
def current_sso_token
- @current_sso_token ||= UserVoice.generate_sso_token('metamapscc', ENV['SSO_KEY'], {
- email: current_user.email
- }, 300) # Default expiry time is 5 minutes = 300 seconds
+ @current_sso_token ||= UserVoice.generate_sso_token(
+ 'metamapscc',
+ ENV['SSO_KEY'],
+ { email: current_user.email },
+ 300 # Default expiry time is 5 minutes = 300 seconds
+ )
end
diff --git a/config/initializers/version.rb b/config/initializers/version.rb
index c378cb6f..ff08c330 100644
--- a/config/initializers/version.rb
+++ b/config/initializers/version.rb
@@ -1,2 +1,3 @@
-METAMAPS_VERSION = "2 build `git log -1 --pretty=%H`".freeze
-METAMAPS_LAST_UPDATED = `git log -1 --pretty='%ad'`.split(' ').values_at(1,2,4).join(' ').freeze
+# frozen_string_literal: true
+METAMAPS_VERSION = '2 build `git log -1 --pretty=%H`'
+METAMAPS_LAST_UPDATED = `git log -1 --pretty='%ad'`.split(' ').values_at(1, 2, 4).join(' ').freeze
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
index 36bb3e27..d65576db 100644
--- a/config/initializers/wrap_parameters.rb
+++ b/config/initializers/wrap_parameters.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
diff --git a/config/puma.rb b/config/puma.rb
index c7f311f8..da41eff9 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -1,19 +1,20 @@
+# frozen_string_literal: true
# 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_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 }
+port ENV.fetch('PORT') { 3000 }
# Specifies the `environment` that Puma will run in.
#
-environment ENV.fetch("RAILS_ENV") { "development" }
+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
diff --git a/config/routes.rb b/config/routes.rb
index 38fe274e..fe48b6ba 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
Metamaps::Application.routes.draw do
use_doorkeeper
root to: 'main#home', via: :get
@@ -63,7 +64,11 @@ Metamaps::Application.routes.draw do
get 'explore/starred', to: 'maps#starredmaps'
get 'explore/mapper/:id', to: 'maps#usermaps'
- devise_for :users, controllers: { registrations: 'users/registrations', passwords: 'users/passwords', sessions: 'devise/sessions' }, skip: :sessions
+ devise_for :users, skip: :sessions, controllers: {
+ registrations: 'users/registrations',
+ passwords: 'users/passwords',
+ sessions: 'devise/sessions'
+ }
devise_scope :user do
get 'login' => 'devise/sessions#new', :as => :new_user_session
diff --git a/config/spring.rb b/config/spring.rb
index be72de67..b0ca9589 100644
--- a/config/spring.rb
+++ b/config/spring.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
%w(
.ruby-version
.ruby-gemset
diff --git a/lib/tasks/extensions.rake b/lib/tasks/extensions.rake
index bf07cec2..776c81e3 100644
--- a/lib/tasks/extensions.rake
+++ b/lib/tasks/extensions.rake
@@ -1,7 +1,8 @@
+# frozen_string_literal: true
namespace :assets do
task :js_compile do
- system "npm install"
- system "npm run build"
+ system 'npm install'
+ system 'npm run build'
end
end
diff --git a/lib/tasks/heroku.rake b/lib/tasks/heroku.rake
index a523a778..d7ce308f 100644
--- a/lib/tasks/heroku.rake
+++ b/lib/tasks/heroku.rake
@@ -1,9 +1,10 @@
+# frozen_string_literal: true
require 'dotenv/tasks'
namespace :heroku do
desc 'Generate the Heroku gems manifest from gem dependencies'
task gems: :dotenv do
- RAILS_ENV = 'production'.freeze
+ RAILS_ENV = 'production'
Rake::Task[:environment].invoke
list = Rails.configuration.gems.collect do |g|
_command, *options = g.send(:install_command)
diff --git a/lib/tasks/perms.rake b/lib/tasks/perms.rake
index 39cb9b27..bf087bd0 100644
--- a/lib/tasks/perms.rake
+++ b/lib/tasks/perms.rake
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'dotenv/tasks'
namespace :perms do
diff --git a/script/rails b/script/rails
index a861c543..6f9d9941 100644
--- a/script/rails
+++ b/script/rails
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby.exe
-# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+# frozen_string_literal: true
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
diff --git a/spec/api/v2/mappings_api_spec.rb b/spec/api/v2/mappings_api_spec.rb
index 4a1e3298..4d802865 100644
--- a/spec/api/v2/mappings_api_spec.rb
+++ b/spec/api/v2/mappings_api_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'mappings API', type: :request do
@@ -23,7 +24,9 @@ RSpec.describe 'mappings API', type: :request do
end
it 'POST /api/v2/mappings' do
- post '/api/v2/mappings', params: { mapping: mapping.attributes, access_token: token }
+ post '/api/v2/mappings', params: {
+ mapping: mapping.attributes, access_token: token
+ }
expect(response).to have_http_status(:success)
expect(response).to match_json_schema(:mapping)
@@ -31,7 +34,9 @@ RSpec.describe 'mappings API', type: :request do
end
it 'PATCH /api/v2/mappings/:id' do
- patch "/api/v2/mappings/#{mapping.id}", params: { mapping: mapping.attributes, access_token: token }
+ patch "/api/v2/mappings/#{mapping.id}", params: {
+ mapping: mapping.attributes, access_token: token
+ }
expect(response).to have_http_status(:success)
expect(response).to match_json_schema(:mapping)
diff --git a/spec/api/v2/maps_api_spec.rb b/spec/api/v2/maps_api_spec.rb
index 7356ca72..77cbc24b 100644
--- a/spec/api/v2/maps_api_spec.rb
+++ b/spec/api/v2/maps_api_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'maps API', type: :request do
diff --git a/spec/api/v2/synapses_api_spec.rb b/spec/api/v2/synapses_api_spec.rb
index f232b879..093bc41e 100644
--- a/spec/api/v2/synapses_api_spec.rb
+++ b/spec/api/v2/synapses_api_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'synapses API', type: :request do
@@ -23,7 +24,9 @@ RSpec.describe 'synapses API', type: :request do
end
it 'POST /api/v2/synapses' do
- post '/api/v2/synapses', params: { synapse: synapse.attributes, access_token: token }
+ post '/api/v2/synapses', params: {
+ synapse: synapse.attributes, access_token: token
+ }
expect(response).to have_http_status(:success)
expect(response).to match_json_schema(:synapse)
@@ -31,7 +34,9 @@ RSpec.describe 'synapses API', type: :request do
end
it 'PATCH /api/v2/synapses/:id' do
- patch "/api/v2/synapses/#{synapse.id}", params: { synapse: synapse.attributes, access_token: token }
+ patch "/api/v2/synapses/#{synapse.id}", params: {
+ synapse: synapse.attributes, access_token: token
+ }
expect(response).to have_http_status(:success)
expect(response).to match_json_schema(:synapse)
diff --git a/spec/api/v2/tokens_api_spec.rb b/spec/api/v2/tokens_api_spec.rb
index c2e480a5..cd424ba0 100644
--- a/spec/api/v2/tokens_api_spec.rb
+++ b/spec/api/v2/tokens_api_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'tokens API', type: :request do
diff --git a/spec/api/v2/topics_api_spec.rb b/spec/api/v2/topics_api_spec.rb
index 4781348a..9811071d 100644
--- a/spec/api/v2/topics_api_spec.rb
+++ b/spec/api/v2/topics_api_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'topics API', type: :request do
diff --git a/spec/controllers/mappings_controller_spec.rb b/spec/controllers/mappings_controller_spec.rb
index bcd2b97f..8d1c424d 100644
--- a/spec/controllers/mappings_controller_spec.rb
+++ b/spec/controllers/mappings_controller_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe MappingsController, type: :controller do
diff --git a/spec/controllers/maps_controller_spec.rb b/spec/controllers/maps_controller_spec.rb
index a10c20d1..b877dc88 100644
--- a/spec/controllers/maps_controller_spec.rb
+++ b/spec/controllers/maps_controller_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe MapsController, type: :controller do
diff --git a/spec/controllers/metacodes_controller_spec.rb b/spec/controllers/metacodes_controller_spec.rb
index cb4116d4..b25017b9 100644
--- a/spec/controllers/metacodes_controller_spec.rb
+++ b/spec/controllers/metacodes_controller_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe MetacodesController, type: :controller do
diff --git a/spec/controllers/synapses_controller_spec.rb b/spec/controllers/synapses_controller_spec.rb
index 15d91250..3a5310e4 100644
--- a/spec/controllers/synapses_controller_spec.rb
+++ b/spec/controllers/synapses_controller_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe SynapsesController, type: :controller do
diff --git a/spec/controllers/topics_controller_spec.rb b/spec/controllers/topics_controller_spec.rb
index 315b931f..0d7e3010 100644
--- a/spec/controllers/topics_controller_spec.rb
+++ b/spec/controllers/topics_controller_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe TopicsController, type: :controller do
diff --git a/spec/factories/mappings.rb b/spec/factories/mappings.rb
index bed0b754..1bcdf891 100644
--- a/spec/factories/mappings.rb
+++ b/spec/factories/mappings.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
FactoryGirl.define do
factory :mapping do
xloc 0
diff --git a/spec/factories/maps.rb b/spec/factories/maps.rb
index 14450c00..a95590e4 100644
--- a/spec/factories/maps.rb
+++ b/spec/factories/maps.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
FactoryGirl.define do
factory :map do
sequence(:name) { |n| "Cool Map ##{n}" }
diff --git a/spec/factories/metacodes.rb b/spec/factories/metacodes.rb
index 543e4955..2ed71beb 100644
--- a/spec/factories/metacodes.rb
+++ b/spec/factories/metacodes.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
FactoryGirl.define do
factory :metacode do
sequence(:name) { |n| "Cool Metacode ##{n}" }
diff --git a/spec/factories/synapses.rb b/spec/factories/synapses.rb
index db82fc39..6af8ca9e 100644
--- a/spec/factories/synapses.rb
+++ b/spec/factories/synapses.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
FactoryGirl.define do
factory :synapse do
sequence(:desc) { |n| "Cool synapse ##{n}" }
@@ -6,6 +7,6 @@ FactoryGirl.define do
association :topic1, factory: :topic
association :topic2, factory: :topic
user
- weight 1 # todo drop this column
+ weight 1 # TODO: drop this column
end
end
diff --git a/spec/factories/tokens.rb b/spec/factories/tokens.rb
index 3970d76f..6d5f110b 100644
--- a/spec/factories/tokens.rb
+++ b/spec/factories/tokens.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
FactoryGirl.define do
factory :token do
user
diff --git a/spec/factories/topics.rb b/spec/factories/topics.rb
index f4c73f4c..a6048d7c 100644
--- a/spec/factories/topics.rb
+++ b/spec/factories/topics.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
FactoryGirl.define do
factory :topic do
user
diff --git a/spec/factories/users.rb b/spec/factories/users.rb
index 746f52b1..b5b20b9a 100644
--- a/spec/factories/users.rb
+++ b/spec/factories/users.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# This file supports three factories, because code and joinedwithcode
# make things complicated!
diff --git a/spec/mailers/previews/map_mailer_preview.rb b/spec/mailers/previews/map_mailer_preview.rb
index 60310bf4..96d07c07 100644
--- a/spec/mailers/previews/map_mailer_preview.rb
+++ b/spec/mailers/previews/map_mailer_preview.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Preview all emails at http://localhost:3000/rails/mailers/map_mailer
class MapMailerPreview < ActionMailer::Preview
def invite_to_edit_email
diff --git a/spec/models/map_spec.rb b/spec/models/map_spec.rb
index e70429be..3f3089cf 100644
--- a/spec/models/map_spec.rb
+++ b/spec/models/map_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Map, type: :model do
diff --git a/spec/models/mapping_spec.rb b/spec/models/mapping_spec.rb
index 54c72b88..343c19ee 100644
--- a/spec/models/mapping_spec.rb
+++ b/spec/models/mapping_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Mapping, type: :model do
diff --git a/spec/models/metacode_spec.rb b/spec/models/metacode_spec.rb
index c9b34527..49354898 100644
--- a/spec/models/metacode_spec.rb
+++ b/spec/models/metacode_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Metacode, type: :model do
diff --git a/spec/models/synapse_spec.rb b/spec/models/synapse_spec.rb
index 3bdb1ac4..c5b63a41 100644
--- a/spec/models/synapse_spec.rb
+++ b/spec/models/synapse_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Synapse, type: :model do
diff --git a/spec/models/token_spec.rb b/spec/models/token_spec.rb
index 50e89c02..82582218 100644
--- a/spec/models/token_spec.rb
+++ b/spec/models/token_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Token, type: :model do
diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb
index dbaac86d..50e6d74b 100644
--- a/spec/models/topic_spec.rb
+++ b/spec/models/topic_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Topic, type: :model do
diff --git a/spec/policies/map_policy_spec.rb b/spec/policies/map_policy_spec.rb
index 7dd33707..c08432dd 100644
--- a/spec/policies/map_policy_spec.rb
+++ b/spec/policies/map_policy_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe MapPolicy, type: :policy do
diff --git a/spec/policies/mapping_policy_spec.rb b/spec/policies/mapping_policy_spec.rb
index 46b9c117..4010e589 100644
--- a/spec/policies/mapping_policy_spec.rb
+++ b/spec/policies/mapping_policy_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe MappingPolicy, type: :policy do
diff --git a/spec/policies/synapse_policy.rb b/spec/policies/synapse_policy.rb
index 4c725e37..4d9d422c 100644
--- a/spec/policies/synapse_policy.rb
+++ b/spec/policies/synapse_policy.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe SynapsePolicy, type: :policy do
diff --git a/spec/policies/topic_policy_spec.rb b/spec/policies/topic_policy_spec.rb
index 7078496c..ef80e8dc 100644
--- a/spec/policies/topic_policy_spec.rb
+++ b/spec/policies/topic_policy_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require 'rails_helper'
RSpec.describe TopicPolicy, type: :policy do
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index d14d6dbe..ddf0781c 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
ENV['RAILS_ENV'] ||= 'test'
require 'spec_helper'
require File.expand_path('../../config/environment', __FILE__)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index a2b164b2..a3477eb7 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
RSpec.configure do |config|
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
diff --git a/spec/support/controller_helpers.rb b/spec/support/controller_helpers.rb
index 1672479f..1d24b7ca 100644
--- a/spec/support/controller_helpers.rb
+++ b/spec/support/controller_helpers.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# https://github.com/plataformatec/devise/wiki/How-To:-Stub-authentication-in-controller-specs
require 'devise'
diff --git a/spec/support/factory_girl.rb b/spec/support/factory_girl.rb
index afae617a..0d10fa34 100644
--- a/spec/support/factory_girl.rb
+++ b/spec/support/factory_girl.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# lets you type create(:user) instead of FactoryGirl.create(:user)
RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
diff --git a/spec/support/pundit.rb b/spec/support/pundit.rb
index 1fd8e296..6e8dc0ce 100644
--- a/spec/support/pundit.rb
+++ b/spec/support/pundit.rb
@@ -1 +1,2 @@
+# frozen_string_literal: true
require 'pundit/rspec'
diff --git a/spec/support/schema_matcher.rb b/spec/support/schema_matcher.rb
index 207c5fa6..998771d9 100644
--- a/spec/support/schema_matcher.rb
+++ b/spec/support/schema_matcher.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
RSpec::Matchers.define :match_json_schema do |schema_name|
match do |response|
schema_directory = Rails.root.join('doc', 'api', 'schemas').to_s
diff --git a/spec/support/simplecov.rb b/spec/support/simplecov.rb
index 8017e897..1d48d7c8 100644
--- a/spec/support/simplecov.rb
+++ b/spec/support/simplecov.rb
@@ -1,2 +1,2 @@
+# frozen_string_literal: true
require 'simplecov'
-