diff --git a/CHANGELOG.md b/CHANGELOG.md index 7529e22..12dabff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +0.2.0 +----- +* Rails 4 rc1 +* Improved and fixed spec helper + 0.1.5 ----- * Updated gems diff --git a/Gemfile b/Gemfile index 17c6cc2..80c2c0b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' ruby '2.0.0' -gem 'rails', '4.0.0.beta1' +gem 'rails', '4.0.0.rc1' # Servers gem 'thin' @@ -32,6 +32,19 @@ gem 'nokogiri' gem 'resque', require: 'resque/server' # Resque web interface gem 'rest-client' +# Assets +gem 'coffee-rails', '~> 4.0.0' +gem 'haml_assets' +gem 'handlebars_assets' +gem 'i18n-js' +gem 'jquery-turbolinks' +gem 'less-rails' +gem 'sass-rails', '~> 4.0.0.rc1' +gem 'therubyracer' +gem 'turbolinks' +gem 'twitter-bootstrap-rails' +gem 'uglifier', '>= 1.3.0' + group :development, :test do gem 'debugger' gem 'delorean' @@ -51,7 +64,7 @@ end group :test do gem 'capybara' gem 'coveralls', require: false - gem 'database_cleaner', github: 'bmabey/database_cleaner' + gem 'database_cleaner', github: 'bmabey/database_cleaner', ref: '20136e89' gem 'email_spec' gem 'launchy' gem 'rspec' @@ -60,17 +73,3 @@ group :test do gem 'simplecov', require: false gem 'webmock', require: false end - -group :assets do - gem 'coffee-rails', '~> 4.0.0.beta1' - gem 'haml_assets' - gem 'handlebars_assets' - gem 'i18n-js' - gem 'jquery-turbolinks' - gem 'less-rails' - gem 'sass-rails', '~> 4.0.0.beta1' - gem 'therubyracer' - gem 'turbolinks' - gem 'twitter-bootstrap-rails' - gem 'uglifier', '>= 1.0.3' -end diff --git a/Gemfile.lock b/Gemfile.lock index d6f44a7..1ad3984 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,36 +1,37 @@ GIT remote: git://github.com/bmabey/database_cleaner.git revision: 20136e8987c222013d96e07c27d1230d2bbebd61 + ref: 20136e89 specs: database_cleaner (0.9.1) GEM remote: https://rubygems.org/ specs: - actionmailer (4.0.0.beta1) - actionpack (= 4.0.0.beta1) + actionmailer (4.0.0.rc1) + actionpack (= 4.0.0.rc1) mail (~> 2.5.3) - actionpack (4.0.0.beta1) - activesupport (= 4.0.0.beta1) + actionpack (4.0.0.rc1) + activesupport (= 4.0.0.rc1) builder (~> 3.1.0) erubis (~> 2.7.0) rack (~> 1.5.2) rack-test (~> 0.6.2) - activemodel (4.0.0.beta1) - activesupport (= 4.0.0.beta1) + activemodel (4.0.0.rc1) + activesupport (= 4.0.0.rc1) builder (~> 3.1.0) - activerecord (4.0.0.beta1) - activemodel (= 4.0.0.beta1) - activerecord-deprecated_finders (~> 0.0.3) - activesupport (= 4.0.0.beta1) - arel (~> 4.0.0.beta1) - activerecord-deprecated_finders (0.0.3) - activesupport (4.0.0.beta1) - i18n (~> 0.6.2) + activerecord (4.0.0.rc1) + activemodel (= 4.0.0.rc1) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.0.rc1) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.2) + activesupport (4.0.0.rc1) + i18n (~> 0.6, >= 0.6.4) minitest (~> 4.2) multi_json (~> 1.3) thread_safe (~> 0.1) - tzinfo (~> 0.3.33) + tzinfo (~> 0.3.37) addressable (2.3.4) arel (4.0.0) atomic (1.1.8) @@ -62,7 +63,7 @@ GEM colorize (0.5.8) columnize (0.3.6) commonjs (0.2.6) - coveralls (0.6.6) + coveralls (0.6.7) colorize multi_json (~> 1.3) rest-client @@ -94,7 +95,7 @@ GEM railties (>= 3.0.0) faker (1.1.2) i18n (~> 0.5) - ffi (1.7.0) + ffi (1.8.1) haml (4.0.2) tilt haml_assets (0.2.1) @@ -115,7 +116,6 @@ GEM jquery-turbolinks (1.0.0) railties (>= 3.1.0) turbolinks - json (1.7.7) kgio (2.8.0) launchy (2.3.0) addressable (~> 2.3) @@ -134,7 +134,7 @@ GEM railties method_source (0.8.1) mime-types (1.23) - minitest (4.7.3) + minitest (4.7.4) mono_logger (1.0.1) multi_json (1.7.2) nokogiri (1.5.9) @@ -153,25 +153,22 @@ GEM rack rack-test (0.6.2) rack (>= 1.0) - rails (4.0.0.beta1) - actionmailer (= 4.0.0.beta1) - actionpack (= 4.0.0.beta1) - activerecord (= 4.0.0.beta1) - activesupport (= 4.0.0.beta1) + rails (4.0.0.rc1) + actionmailer (= 4.0.0.rc1) + actionpack (= 4.0.0.rc1) + activerecord (= 4.0.0.rc1) + activesupport (= 4.0.0.rc1) bundler (>= 1.3.0, < 2.0) - railties (= 4.0.0.beta1) - sprockets-rails (~> 2.0.0.rc3) - railties (4.0.0.beta1) - actionpack (= 4.0.0.beta1) - activesupport (= 4.0.0.beta1) + railties (= 4.0.0.rc1) + sprockets-rails (~> 2.0.0.rc4) + railties (4.0.0.rc1) + actionpack (= 4.0.0.rc1) + activesupport (= 4.0.0.rc1) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.17.0, < 2.0) + thor (>= 0.18.1, < 2.0) raindrops (0.11.0) rake (10.0.4) - rdoc (3.12.2) - json (~> 1.4) - redis (3.0.3) + redis (3.0.4) redis-namespace (1.2.1) redis (~> 3.0.0) ref (1.0.4) @@ -191,7 +188,7 @@ GEM rspec-expectations (2.13.0) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.13.1) - rspec-rails (2.13.0) + rspec-rails (2.13.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -199,7 +196,7 @@ GEM rspec-expectations (~> 2.13.0) rspec-mocks (~> 2.13.0) rubyzip (0.9.9) - sass (3.2.7) + sass (3.2.8) sass-rails (4.0.0.rc1) railties (>= 4.0.0.beta, < 5.0) sass (>= 3.1.10) @@ -239,7 +236,7 @@ GEM thor (0.18.1) thread_safe (0.1.0) atomic - tilt (1.3.7) + tilt (1.4.0) treetop (1.4.12) polyglot polyglot (>= 0.3.1) @@ -275,7 +272,7 @@ DEPENDENCIES binding_of_caller bullet capybara - coffee-rails (~> 4.0.0.beta1) + coffee-rails (~> 4.0.0) coveralls database_cleaner! debugger @@ -297,12 +294,12 @@ DEPENDENCIES pg pry pry-rails - rails (= 4.0.0.beta1) + rails (= 4.0.0.rc1) resque rest-client rspec rspec-rails - sass-rails (~> 4.0.0.beta1) + sass-rails (~> 4.0.0.rc1) selenium-webdriver simpleconfig simplecov @@ -310,6 +307,6 @@ DEPENDENCIES thin turbolinks twitter-bootstrap-rails - uglifier (>= 1.0.3) + uglifier (>= 1.3.0) unicorn webmock diff --git a/VERSION b/VERSION index 9faa1b7..0ea3a94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.5 +0.2.0 diff --git a/config.ru b/config.ru index 524350f..5bc2a61 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 Starterapp::Application +run Rails.application diff --git a/config/application.rb b/config/application.rb index 7589296..c34c176 100644 --- a/config/application.rb +++ b/config/application.rb @@ -2,8 +2,9 @@ require File.expand_path('../boot', __FILE__) require 'rails/all' -# Assets should be precompiled for production (so we don't need the gems loaded then) -Bundler.require(*Rails.groups(assets: %w(development test))) +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(:default, Rails.env) module Starterapp class Application < Rails::Application diff --git a/config/environments/development.rb b/config/environments/development.rb index a91407b..a58300f 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -23,5 +23,7 @@ Starterapp::Application.configure do config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. config.assets.debug = true end diff --git a/config/environments/production.rb b/config/environments/production.rb index 5f3b769..bb17c62 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -23,10 +23,10 @@ Starterapp::Application.configure do config.serve_static_assets = true # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier + config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass - # Whether to fallback to assets pipeline if a precompiled asset is missed. + # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # Generate digests for assets URLs. diff --git a/config/environments/test.rb b/config/environments/test.rb index 9fe67b3..1d652d5 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -30,6 +30,7 @@ Starterapp::Application.configure do # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + config.action_mailer.default_url_options = { host: 'localhost' } # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index bbc843a..e140115 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -1,6 +1,6 @@ # Be sure to restart your server when you modify this file. -# Your secret key for verifying the integrity of signed cookies. +# Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 49cd3d4..2fb4e77 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,3 +1,3 @@ # Be sure to restart your server when you modify this file. -Starterapp::Application.config.session_store :encrypted_cookie_store, key: '_starterapp_session' +Starterapp::Application.config.session_store :cookie_store, key: '_starterapp_session' diff --git a/config/routes.rb b/config/routes.rb index 25d8eb7..6a7bf1e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Starterapp::Application.routes.draw do - root to: 'pages#home' + root 'pages#home' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index be6544c..9e2f87e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -21,8 +21,6 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } require 'webmock/rspec' require 'capybara/rspec' -WebMock.disable_net_connect! allow: 'graph.facebook.com', allow_localhost: true - #Capybara.ignore_hidden_elements = false # testing hidden fields RSpec.configure do |config| @@ -41,16 +39,4 @@ RSpec.configure do |config| # the seed, which is printed after each run. # --seed 1234 config.order = 'random' - - config.include Delorean - - ActionMailer::Base.perform_deliveries = false - ActionMailer::Base.raise_delivery_errors = false - ActionMailer::Base.delivery_method = :test - - config.before(:each) do - back_to_the_present - reset_email - #load "#{Rails.root}/db/seeds.rb" - end end diff --git a/spec/support/delorean.rb b/spec/support/delorean.rb new file mode 100644 index 0000000..9ca9b40 --- /dev/null +++ b/spec/support/delorean.rb @@ -0,0 +1,7 @@ +RSpec.configure do |config| + config.include Delorean + + config.before(:each) do + back_to_the_present + end +end diff --git a/spec/support/mailer_macros.rb b/spec/support/mailer_macros.rb index fdcc0c1..3e7a05d 100644 --- a/spec/support/mailer_macros.rb +++ b/spec/support/mailer_macros.rb @@ -10,4 +10,8 @@ end RSpec.configure do |config| config.include MailerMacros + + config.before(:each) do + reset_email + end end