- <% @metacodes = user_metacodes() %>
- <% set = get_metacodeset() %>
<% @metacodes.each do |metacode| %>
<% end %>
+
<%= form.text_field :name, :maxlength => 140, :placeholder => "title..." %>
+
-
+
+
<% end %>
diff --git a/config/initializers/access_codes.rb b/config/initializers/access_codes.rb
index 543ce6e9..fdf4e4b3 100644
--- a/config/initializers/access_codes.rb
+++ b/config/initializers/access_codes.rb
@@ -1,5 +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/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
index d0f0d3b5..5b98aef4 100644
--- a/config/initializers/backtrace_silencers.rb
+++ b/config/initializers/backtrace_silencers.rb
@@ -1,8 +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/devise.rb b/config/initializers/devise.rb
index a086584d..6740cdc9 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -7,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,
@@ -92,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 33073f45..40de1df8 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -8,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
@@ -39,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
@@ -61,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/uservoice.rb b/config/initializers/uservoice.rb
index 3aa65a46..9375e3a1 100644
--- a/config/initializers/uservoice.rb
+++ b/config/initializers/uservoice.rb
@@ -2,7 +2,10 @@
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/routes.rb b/config/routes.rb
index c64c188e..fe48b6ba 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -64,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/script/rails b/script/rails
index 1267847e..6f9d9941 100644
--- a/script/rails
+++ b/script/rails
@@ -1,6 +1,5 @@
#!/usr/bin/env ruby.exe
# frozen_string_literal: true
-# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
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 f3ec6a75..4d802865 100644
--- a/spec/api/v2/mappings_api_spec.rb
+++ b/spec/api/v2/mappings_api_spec.rb
@@ -24,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)
@@ -32,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/synapses_api_spec.rb b/spec/api/v2/synapses_api_spec.rb
index c422f3bc..093bc41e 100644
--- a/spec/api/v2/synapses_api_spec.rb
+++ b/spec/api/v2/synapses_api_spec.rb
@@ -24,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)
@@ -32,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)