From 1270249f9fd0a244863e1f2f959bae584131a98f Mon Sep 17 00:00:00 2001 From: basnal Date: Tue, 22 Jul 2014 15:46:55 +0530 Subject: [PATCH] Root was set to show Newsletters #11 --- .gitignore | 2 +- Gemfile.lock | 3 +-- app/assets/javascripts/home.js.coffee | 3 --- app/controllers/home_controller.rb | 4 ---- app/helpers/home_helper.rb | 2 -- app/views/home/index.html.haml | 8 ------- app/views/layouts/application.html.haml | 7 ++---- app/views/newsletters/index.html.haml | 7 ++---- config/deploy.rb | 29 ++++++++++++++++-------- config/routes.rb | 2 +- spec/controllers/home_controller_spec.rb | 5 ---- spec/helpers/home_helper_spec.rb | 15 ------------ 12 files changed, 27 insertions(+), 60 deletions(-) delete mode 100644 app/assets/javascripts/home.js.coffee delete mode 100644 app/controllers/home_controller.rb delete mode 100644 app/helpers/home_helper.rb delete mode 100644 app/views/home/index.html.haml delete mode 100644 spec/controllers/home_controller_spec.rb delete mode 100644 spec/helpers/home_helper_spec.rb diff --git a/.gitignore b/.gitignore index 05f02a1..2e78410 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,4 @@ build/ *.log config/environment.yml config/mongoid.yml -config/mongoid.yml +config/secrets.yml diff --git a/Gemfile.lock b/Gemfile.lock index ad4f5d0..f648c22 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -133,12 +133,11 @@ GEM mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) + method_source (0.8.2) mime-types (1.25.1) mina (0.3.0) open4 rake - method_source (0.8.2) - mime-types (1.25.1) mini_magick (3.7.0) subexec (~> 0.2.1) mini_portile (0.6.0) diff --git a/app/assets/javascripts/home.js.coffee b/app/assets/javascripts/home.js.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/home.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb deleted file mode 100644 index 95f2992..0000000 --- a/app/controllers/home_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -class HomeController < ApplicationController - def index - end -end diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb deleted file mode 100644 index 23de56a..0000000 --- a/app/helpers/home_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module HomeHelper -end diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml deleted file mode 100644 index 85e70b9..0000000 --- a/app/views/home/index.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -%div.carousel.slide{id: "myCarousel"} - .carousel-inner - .active.item - =image_tag("/images/1.jpg") - .item - =image_tag("/images/2.jpg") -%script{type: "text/javascript"} - var $ = jQuery.noConflict(); $(document).ready(function() { $('#myCarousel').carousel({ interval: 3000, cycle: true }); }); diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 246c731..cf8c868 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -8,14 +8,11 @@ %body %div.nav.navbar-inverse.navbar-fixed-top %div.container - %div.navbar-header - .navbar-brand - %h4 LightAir %div.nav-collapse %ul.nav.navbar-nav %li.active - %a{href: "#{home_index_path}"} - %h4 Home + %a{href: "#{newsletters_path}"} + %h4 LightAir %li.dropdown %a.dropdown-toggle{"data-toggle" => "dropdown"} %h4 diff --git a/app/views/newsletters/index.html.haml b/app/views/newsletters/index.html.haml index 89b9cb3..c252262 100644 --- a/app/views/newsletters/index.html.haml +++ b/app/views/newsletters/index.html.haml @@ -1,10 +1,7 @@ %table.table.table-striped + %tr + %strong Newsletters -@newsletters.each do |news| %tr %td =link_to news.sent_on, newsletter_path(news) - %td - =link_to "Edit", edit_newsletter_path(news) - %td - =link_to "Delete", newsletter_path(news), method: :delete - %tr diff --git a/config/deploy.rb b/config/deploy.rb index dbc5e95..35db3ed 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -12,26 +12,32 @@ # repository - Git repo to clone from. (needed by mina/git) # branch - Branch name to deploy. (needed by mina/git) -set :domain, '162.243.86.174' -set :deploy_to, '/home/deploy/projects/lightair/production' -set :repository, 'git@github.com:joshsoftware/lightair.git' -set :branch, 'master' +set :domain, 'lightair.com' +set :deploy_to, '/home/basnal/www/lightair.com' +set :repository, 'git@github.com:joshsoftware/lightair.git' +set :branch, 'master' +set :identity_file, '/home/basnal/.ssh/id_rsa' +set :rails_env, 'production' +set :term_mode, nil + +set :current_path, 'current' # Manually create these paths in shared/ (eg: shared/config/database.yml) in your server. # They will be linked in the 'deploy:link_shared_paths' step. + set :shared_paths, ['config/mongoid.yml', 'log', 'tmp', 'config/initializers/google_oauth.rb', 'config/environment.yml'] # Optional settings: - set :user, 'deploy' # Username in the server to SSH to. +set :user, 'basnal' # Username in the server to SSH to. # set :port, '30000' # SSH port number. # This task is the environment that is loaded for most commands, such as # `mina deploy` or `mina rake`. task :environment do # For those using RVM, use this to load an RVM version@gemset. - invoke :'rvm:use[ruby-2.1.2-p95@gemset]' + invoke :'rvm:use[ruby-2.1.2@lightair]' end # Put any custom mkdir's in here for when `mina setup` is ran. @@ -41,17 +47,23 @@ queue! %[mkdir -p "#{deploy_to}/shared/log"] queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/log"] + queue! %[mkdir -p "#{deploy_to}/shared/tmp"] + queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/tmp"] + queue! %[mkdir -p "#{deploy_to}/shared/config"] queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config"] queue! %[touch "#{deploy_to}/shared/config/mongoid.yml"] queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config/mongoid.yml"] + queue! %[mkdir "#{deploy_to}/shared/config/initializers"] + queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config/initializers"] + queue! %[touch "#{deploy_to}/shared/config/initializers/google_oauth.rb"] queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config/initializers/google_oauth.rb"] - queue! %[touch "#{deploy_to}/shared/config/initializers/environment.yml"] - queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config/initializers/environment.yml"] + queue! %[touch "#{deploy_to}/shared/config/environment.yml"] + queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config/environment.yml"] end @@ -77,4 +89,3 @@ # - http://nadarei.co/mina/tasks # - http://nadarei.co/mina/settings # - http://nadarei.co/mina/helpers - diff --git a/config/routes.rb b/config/routes.rb index a8696dd..f582ad4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,7 +10,7 @@ get '/auth/failure', to: 'spreadsheets#failure' resources :users, :newsletters, :home, :spreadsheets - root :to => 'home#index' + root :to => 'newsletters#index' # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb deleted file mode 100644 index 89cd3f0..0000000 --- a/spec/controllers/home_controller_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -RSpec.describe HomeController, :type => :controller do - -end diff --git a/spec/helpers/home_helper_spec.rb b/spec/helpers/home_helper_spec.rb deleted file mode 100644 index 987e70a..0000000 --- a/spec/helpers/home_helper_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'rails_helper' - -# Specs in this file have access to a helper object that includes -# the HomeHelper. For example: -# -# describe HomeHelper do -# describe "string concat" do -# it "concats two strings with spaces" do -# expect(helper.concat_strings("this","that")).to eq("this that") -# end -# end -# end -RSpec.describe HomeHelper, :type => :helper do - -end