From e702f7023fd83f2bb11cdc0cca1f1aa244bc56fc Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Wed, 30 Jul 2014 01:24:20 -0400 Subject: [PATCH] renamed application to not be ISSAD, now Metamaps --- Rakefile | 2 +- .../in_metacode_sets_controller.rb | 86 ------------------- app/controllers/main_controller.rb | 9 +- app/controllers/metacode_sets_controller.rb | 16 ++-- app/controllers/metacodes_controller.rb | 34 ++++---- config.ru | 2 +- config/application.rb | 2 +- config/environment.rb | 2 +- config/environments/development.rb | 2 +- config/environments/production.rb | 2 +- config/environments/test.rb | 2 +- config/initializers/secret_token.rb | 2 +- config/initializers/session_store.rb | 4 +- config/routes.rb | 15 +--- 14 files changed, 40 insertions(+), 140 deletions(-) delete mode 100644 app/controllers/in_metacode_sets_controller.rb diff --git a/Rakefile b/Rakefile index b21a66b9..30cf58f5 100644 --- a/Rakefile +++ b/Rakefile @@ -4,4 +4,4 @@ require File.expand_path('../config/application', __FILE__) -ISSAD::Application.load_tasks +Metamaps::Application.load_tasks diff --git a/app/controllers/in_metacode_sets_controller.rb b/app/controllers/in_metacode_sets_controller.rb deleted file mode 100644 index 36a262ff..00000000 --- a/app/controllers/in_metacode_sets_controller.rb +++ /dev/null @@ -1,86 +0,0 @@ -class InMetacodeSetsController < ApplicationController - - before_filter :require_admin - - # GET /in_metacode_sets - # GET /in_metacode_sets.json - def index - @in_metacode_sets = InMetacodeSet.all - - respond_to do |format| - format.html # index.html.erb - format.json { render json: @in_metacode_sets } - end - end - - # GET /in_metacode_sets/1 - # GET /in_metacode_sets/1.json - def show - @in_metacode_set = InMetacodeSet.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.json { render json: @in_metacode_set } - end - end - - # GET /in_metacode_sets/new - # GET /in_metacode_sets/new.json - def new - @in_metacode_set = InMetacodeSet.new - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @in_metacode_set } - end - end - - # GET /in_metacode_sets/1/edit - def edit - @in_metacode_set = InMetacodeSet.find(params[:id]) - end - - # POST /in_metacode_sets - # POST /in_metacode_sets.json - def create - @in_metacode_set = InMetacodeSet.new(params[:in_metacode_set]) - - respond_to do |format| - if @in_metacode_set.save - format.html { redirect_to @in_metacode_set, notice: 'In metacode set was successfully created.' } - format.json { render json: @in_metacode_set, status: :created, location: @in_metacode_set } - else - format.html { render action: "new" } - format.json { render json: @in_metacode_set.errors, status: :unprocessable_entity } - end - end - end - - # PUT /in_metacode_sets/1 - # PUT /in_metacode_sets/1.json - def update - @in_metacode_set = InMetacodeSet.find(params[:id]) - - respond_to do |format| - if @in_metacode_set.update_attributes(params[:in_metacode_set]) - format.html { redirect_to @in_metacode_set, notice: 'In metacode set was successfully updated.' } - format.json { head :no_content } - else - format.html { render action: "edit" } - format.json { render json: @in_metacode_set.errors, status: :unprocessable_entity } - end - end - end - - # DELETE /in_metacode_sets/1 - # DELETE /in_metacode_sets/1.json - def destroy - @in_metacode_set = InMetacodeSet.find(params[:id]) - @in_metacode_set.destroy - - respond_to do |format| - format.html { redirect_to in_metacode_sets_url } - format.json { head :no_content } - end - end -end diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index a3ba3b43..c960d11d 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -3,10 +3,8 @@ class MainController < ApplicationController include MapsHelper include UsersHelper include SynapsesHelper - - before_filter :require_user, only: [:invite] - respond_to :html, :js, :json + respond_to :html, :json # home page def home @@ -22,11 +20,6 @@ class MainController < ApplicationController respond_with(@maps, @current) end - # /request - def requestinvite - - end - ### SEARCHING ### # get /search/topics?term=SOMETERM diff --git a/app/controllers/metacode_sets_controller.rb b/app/controllers/metacode_sets_controller.rb index 9e16ae83..4542f6dd 100644 --- a/app/controllers/metacode_sets_controller.rb +++ b/app/controllers/metacode_sets_controller.rb @@ -16,14 +16,14 @@ class MetacodeSetsController < ApplicationController ### SHOW IS NOT CURRENTLY IN USE # GET /metacode_sets/1 # GET /metacode_sets/1.json - def show - @metacode_set = MetacodeSet.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.json { render json: @metacode_set } - end - end +# def show +# @metacode_set = MetacodeSet.find(params[:id]) +# +# respond_to do |format| +# format.html # show.html.erb +# format.json { render json: @metacode_set } +# end +# end # GET /metacode_sets/new # GET /metacode_sets/new.json diff --git a/app/controllers/metacodes_controller.rb b/app/controllers/metacodes_controller.rb index 58987b55..810981dc 100644 --- a/app/controllers/metacodes_controller.rb +++ b/app/controllers/metacodes_controller.rb @@ -23,14 +23,14 @@ class MetacodesController < ApplicationController ### SHOW IS CURRENTLY DISABLED # GET /metacodes/1 # GET /metacodes/1.json - def show - @metacode = Metacode.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.json { render json: @metacode } - end - end +# def show +# @metacode = Metacode.find(params[:id]) +# +# respond_to do |format| +# format.html # show.html.erb +# format.json { render json: @metacode } +# end +# end # GET /metacodes/new # GET /metacodes/new.json @@ -84,13 +84,13 @@ class MetacodesController < ApplicationController ### DESTROY IS CURRENTLY DISABLED # DELETE /metacodes/1 # DELETE /metacodes/1.json - def destroy - @metacode = Metacode.find(params[:id]) - @metacode.destroy - - respond_to do |format| - format.html { redirect_to metacodes_url } - format.json { head :no_content } - end - end +# def destroy +# @metacode = Metacode.find(params[:id]) +# @metacode.destroy +# +# respond_to do |format| +# format.html { redirect_to metacodes_url } +# format.json { head :no_content } +# end +# end end diff --git a/config.ru b/config.ru index 8d2cc245..e83757ab 100644 --- a/config.ru +++ b/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) -run ISSAD::Application +run Metamaps::Application diff --git a/config/application.rb b/config/application.rb index dc87d823..c87ef5b7 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,7 +9,7 @@ if defined?(Bundler) # Bundler.require(:default, :assets, Rails.env) end -module ISSAD +module Metamaps class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers diff --git a/config/environment.rb b/config/environment.rb index d73e6cb7..6e9ad9e4 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -2,4 +2,4 @@ require File.expand_path('../application', __FILE__) # Initialize the rails application -ISSAD::Application.initialize! +Metamaps::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index d3a8b0b7..50a7f79f 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,4 @@ -ISSAD::Application.configure do +Metamaps::Application.configure do # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on diff --git a/config/environments/production.rb b/config/environments/production.rb index d476c262..fdf1495b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,4 +1,4 @@ -ISSAD::Application.configure do +Metamaps::Application.configure do # Settings specified here will take precedence over those in config/application.rb # Code is not reloaded between requests diff --git a/config/environments/test.rb b/config/environments/test.rb index 5f3706b8..8a7b408c 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,4 +1,4 @@ -ISSAD::Application.configure do +Metamaps::Application.configure do # Settings specified here will take precedence over those in config/application.rb # The test environment is used exclusively to run your application's diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 736a0d6c..b9f46222 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. -ISSAD::Application.config.secret_token = '267c8a84f63963282f45bc3010eaddf027abfab58fc759d6e239c8005f85ee99d6d01b1ab6394cdee9ca7f8c9213a0cf91d3d8d3350f096123e2caccbcc0924f' +Metamaps::Application.config.secret_token = '267c8a84f63963282f45bc3010eaddf027abfab58fc759d6e239c8005f85ee99d6d01b1ab6394cdee9ca7f8c9213a0cf91d3d8d3350f096123e2caccbcc0924f' diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index a6f08f8e..757d66cc 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. -ISSAD::Application.config.session_store :cookie_store, key: '_ISSAD_session' +Metamaps::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") -# ISSAD::Application.config.session_store :active_record_store +# Metamaps::Application.config.session_store :active_record_store diff --git a/config/routes.rb b/config/routes.rb index c8473630..46253069 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,4 @@ -ISSAD::Application.routes.draw do +Metamaps::Application.routes.draw do root to: 'main#home', via: :get @@ -12,22 +12,19 @@ ISSAD::Application.routes.draw do match '/search/mappers', to: 'main#searchmappers', via: :get, as: :searchmappers match '/search/synapses', to: 'main#searchsynapses', via: :get, as: :searchsynapses - resources :in_metacode_sets + resources :mappings, except: [:index, :new, :edit] resources :metacode_sets, :except => [:show] resources :metacodes, :except => [:show, :destroy] + resources :synapses, except: [:index, :new, :edit] resources :topics, except: [:index, :new, :edit] do get :autocomplete_topic, :on => :collection end - resources :synapses, except: [:index, :new, :edit] - match 'maps/active', to: 'maps#index', via: :get, as: :activemaps match 'maps/featured', to: 'maps#index', via: :get, as: :featuredmaps match 'maps/new', to: 'maps#index', via: :get, as: :newmaps match 'maps/mappers/:id', to: 'maps#index', via: :get, as: :usermaps match 'maps/topics/:id', to: 'maps#index', via: :get, as: :topicmaps - - resources :maps, except: [:new, :edit] match 'maps/:id/embed', to: 'maps#embed', via: :get, as: :embed @@ -36,9 +33,5 @@ ISSAD::Application.routes.draw do get "sign_out", :to => "devise/sessions#destroy" end match 'user/updatemetacodes', to: 'users#updatemetacodes', via: :post, as: :updatemetacodes - - resources :users, except: [:index] - - resources :mappings, except: [:index, :new, :edit] - + resources :users, except: [:index, :destroy] end