diff --git a/Gemfile b/Gemfile index 72b8d41..e86d64d 100644 --- a/Gemfile +++ b/Gemfile @@ -20,8 +20,12 @@ gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc +# Easily generate a Twitter Bootstrap navbar in your Rails app gem 'rails_bootstrap_navbar' +# Kaminari Mongoid adapter. +gem 'kaminari-mongoid' + # This gem hooks up your Rails application with Roadie to help you generate HTML emails. gem 'roadie-rails', '~> 1.0' diff --git a/Gemfile.lock b/Gemfile.lock index ca7ccaa..3557425 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,56 +1,56 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) + actionmailer (4.2.8) + actionpack (= 4.2.8) + actionview (= 4.2.8) + activejob (= 4.2.8) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) + actionpack (4.2.8) + actionview (= 4.2.8) + activesupport (= 4.2.8) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) + actionview (4.2.8) + activesupport (= 4.2.8) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (4.2.8) + activesupport (= 4.2.8) globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) + activemodel (4.2.8) + activesupport (= 4.2.8) builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) + activerecord (4.2.8) + activemodel (= 4.2.8) + activesupport (= 4.2.8) arel (~> 6.0) - activesupport (4.2.6) + activesupport (4.2.8) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.4.0) - arel (6.0.3) - autoprefixer-rails (6.3.6.2) + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) + arel (6.0.4) + autoprefixer-rails (6.7.7.1) execjs binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) bootstrap-navbar (2.4.0) gem_config (~> 0.3) - bootstrap-sass (3.3.6) + bootstrap-sass (3.3.7) autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) - bson (4.1.1) - builder (3.2.2) - byebug (9.0.5) - capybara (2.7.1) + bson (4.2.1) + builder (3.2.3) + byebug (9.0.6) + capybara (2.13.0) addressable mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -64,41 +64,43 @@ GEM coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.10.0) - concurrent-ruby (1.0.2) - css_parser (1.4.8) + coffee-script-source (1.12.2) + concurrent-ruby (1.0.5) + css_parser (1.4.10) addressable debug_inspector (0.0.2) - diff-lcs (1.2.5) - dotenv (2.1.1) - dotenv-rails (2.1.1) - dotenv (= 2.1.1) - railties (>= 4.0, < 5.1) + diff-lcs (1.3) + dotenv (2.2.0) + dotenv-rails (2.2.0) + dotenv (= 2.2.0) + railties (>= 3.2, < 5.1) erubis (2.7.0) - excon (0.49.0) + excon (0.55.0) execjs (2.7.0) - font-awesome-rails (4.6.3.0) + font-awesome-rails (4.7.0.1) railties (>= 3.2, < 5.1) gem_config (0.3.1) - geocoder (1.3.7) - globalid (0.3.6) + geocoder (1.4.3) + globalid (0.3.7) activesupport (>= 4.1.0) haml (4.0.7) tilt - i18n (0.7.0) - jbuilder (2.5.0) - activesupport (>= 3.0.0, < 5.1) + i18n (0.8.1) + jbuilder (2.6.3) + activesupport (>= 3.0.0, < 5.2) multi_json (~> 1.2) - jquery-rails (4.1.1) + jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-ui-rails (5.0.5) railties (>= 3.2.16) - json (1.8.3) + json (1.8.6) kaminari (0.17.0) actionpack (>= 3.0.0) activesupport (>= 3.0.0) + kaminari-mongoid (0.1.2) + kaminari loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.4) @@ -111,15 +113,15 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_portile2 (2.1.0) - minitest (5.9.0) - mongo (2.2.5) - bson (~> 4.0) + minitest (5.10.1) + mongo (2.4.1) + bson (>= 4.2.1, < 5.0.0) mongoid (5.0.2) activemodel (~> 4.0) mongo (~> 2.1) origin (~> 2.1) tzinfo (>= 0.3.37) - mongoid-compatibility (0.4.0) + mongoid-compatibility (0.4.1) activesupport mongoid (>= 2.0) mongoid-rspec (3.0.0) @@ -131,50 +133,49 @@ GEM mongoid-compatibility multi_json (1.12.1) nested_form (0.3.2) - nokogiri (1.6.8) + nokogiri (1.7.1) mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - origin (2.2.0) - pkg-config (1.1.7) - pry (0.10.3) + origin (2.3.0) + pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - pry-rails (0.3.4) - pry (>= 0.9.10) - puma (3.4.0) - rack (1.6.4) - rack-pjax (0.8.0) + pry-rails (0.3.6) + pry (>= 0.10.4) + public_suffix (2.0.5) + puma (3.8.2) + rack (1.6.5) + rack-pjax (1.0.0) nokogiri (~> 1.5) - rack (~> 1.1) + rack (>= 1.1) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) + rails (4.2.8) + actionmailer (= 4.2.8) + actionpack (= 4.2.8) + actionview (= 4.2.8) + activejob (= 4.2.8) + activemodel (= 4.2.8) + activerecord (= 4.2.8) + activesupport (= 4.2.8) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) + railties (= 4.2.8) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) + rails-dom-testing (1.0.8) activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) + nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - rails-i18n (4.0.8) + rails-i18n (4.0.9) i18n (~> 0.7) railties (~> 4.0) rails_12factor (0.0.3) rails_serve_static_assets rails_stdout_logging - rails_admin (0.8.1) + rails_admin (1.1.1) builder (~> 3.1) coffee-rails (~> 4.0) font-awesome-rails (>= 3.0, < 5) @@ -183,90 +184,88 @@ GEM jquery-ui-rails (~> 5.0) kaminari (~> 0.14) nested_form (~> 0.3) - rack-pjax (~> 0.7) - rails (~> 4.0) - remotipart (~> 1.0) - safe_yaml (~> 1.0) + rack-pjax (>= 0.7) + rails (>= 4.0, < 6) + remotipart (~> 1.3) sass-rails (>= 4.0, < 6) rails_bootstrap_navbar (2.0.1) bootstrap-navbar (~> 2.0) rails (>= 3.0.0) rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) + railties (4.2.8) + actionpack (= 4.2.8) + activesupport (= 4.2.8) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (11.2.2) - rdoc (4.2.2) - json (~> 1.4) - remotipart (1.2.1) + rake (12.0.0) + rdoc (4.3.0) + remotipart (1.3.1) roadie (3.2.1) css_parser (~> 1.4.5) nokogiri (>= 1.5.0, < 1.8.0) roadie-rails (1.1.1) railties (>= 3.0, < 5.1) roadie (~> 3.1) - rspec (3.4.0) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-rails (3.4.2) - actionpack (>= 3.0, < 4.3) - activesupport (>= 3.0, < 4.3) - railties (>= 3.0, < 4.3) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - safe_yaml (1.0.4) - sass (3.4.22) - sass-rails (5.0.4) - railties (>= 4.0.0, < 5.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.2) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-support (3.5.0) + sass (3.4.23) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sdoc (0.4.1) + sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - simple_form (3.2.1) + simple_form (3.4.0) actionpack (> 4, < 5.1) activemodel (> 4, < 5.1) slim (3.0.7) temple (~> 0.7.6) tilt (>= 1.3.3, < 2.1) - slim-rails (3.1.0) + slim-rails (3.1.2) actionpack (>= 3.1) railties (>= 3.1) slim (~> 3.0) slop (3.6.0) - sprockets (3.6.1) + sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.0.4) + sprockets-rails (3.2.0) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) temple (0.7.7) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - turbolinks (2.5.3) - coffee-rails - tzinfo (1.2.2) + thor (0.19.4) + thread_safe (0.3.6) + tilt (2.0.7) + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.0) + tzinfo (1.2.3) thread_safe (~> 0.1) - uglifier (3.0.0) + uglifier (3.1.10) execjs (>= 0.3.0, < 3) web-console (2.3.0) activemodel (>= 4.0) @@ -288,6 +287,7 @@ DEPENDENCIES geocoder jbuilder (~> 2.0) jquery-rails + kaminari-mongoid mailchimp-api mongoid (~> 5.0.0) mongoid-rspec (= 3.0.0) diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin/application_controller.rb index 4de6421..8d84545 100644 --- a/app/controllers/admin/application_controller.rb +++ b/app/controllers/admin/application_controller.rb @@ -1,5 +1,5 @@ module Admin - class ApplicationController < ApplicationController + class ApplicationController < ::ApplicationController http_basic_authenticate_with name: 'admin', password: ENV['ADMIN_PASSWORD'] unless Rails.env.development? end end