Upgrate to Rails 4.1.5

footer-fixes
Marcin Kulik 10 years ago
parent 1ca942bd66
commit 130948ae3f

@ -1,6 +1,6 @@
source 'https://rubygems.org'
gem 'rails', '4.0.9'
gem 'rails', '4.1.5'
gem 'sass-rails', '~> 4.0.3'
gem 'coffee-rails', '~> 4.0.1'
@ -15,11 +15,11 @@ gem 'omniauth-github', '~> 1.1.0'
gem 'omniauth-browserid', git: 'https://github.com/callahad/omniauth-browserid.git'
gem 'kaminari', '~> 0.14.1'
gem 'bugsnag', '~> 2.2.1'
gem 'draper', '~> 1.2.1'
gem 'draper', '~> 1.3.1'
gem 'fog', '~> 1.9.0'
gem 'simple_form', '~> 3.0.2'
gem 'simple_form_bootstrap3', '~> 0.2.6'
gem 'sidekiq', '~> 2.17'
gem 'sidekiq', '~> 3.2.2'
gem 'thin', '~> 1.5.0'
gem 'open4', '~> 1.3.0'
gem 'redcarpet', '~> 2.2.2'
@ -31,7 +31,7 @@ gem 'yajl-ruby', '~> 1.1.0', :require => 'yajl'
gem 'newrelic_rpm'
gem 'virtus', '~> 1.0.1'
gem 'warden', '~> 1.2.3'
gem 'pundit', '~> 0.2.3'
gem 'pundit', '~> 0.3.0'
gem 'rack-robustness', '~> 1.1.0'
group :development do
@ -45,7 +45,7 @@ end
group :test, :development do
gem 'pry-rails', '~> 0.3.2'
gem 'rspec-rails', '~> 3.0.0.beta1'
gem 'rspec-rails', '~> 3.0.2'
gem 'cane', '~> 2.5.2'
gem 'jasmine-rails', '~> 0.4.5'
gem 'timecop', '~> 0.7.1'
@ -54,15 +54,16 @@ end
group :test do
gem "rake", '~> 10.0.4'
gem 'factory_girl_rails', '~> 4.2.0'
gem 'capybara', '~> 2.2.0'
gem 'capybara', '~> 2.4.1'
gem 'poltergeist', '~> 1.5.0'
gem 'database_cleaner', '~> 1.0.1'
gem 'guard'
gem 'guard-rspec'
gem 'rb-inotify', '~> 0.9.0'
gem 'simplecov', '~> 0.7.1', require: false
gem 'shoulda-matchers', '~> 2.4.0'
gem 'shoulda-matchers'
gem 'coveralls', require: false
gem 'rspec-activemodel-mocks'
end
group :production do

@ -10,33 +10,35 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.9)
actionpack (= 4.0.9)
actionmailer (4.1.5)
actionpack (= 4.1.5)
actionview (= 4.1.5)
mail (~> 2.5.4)
actionpack (4.0.9)
activesupport (= 4.0.9)
builder (~> 3.1.0)
erubis (~> 2.7.0)
actionpack (4.1.5)
actionview (= 4.1.5)
activesupport (= 4.1.5)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.5)
activesupport (= 4.1.5)
builder (~> 3.1)
erubis (~> 2.7.0)
active_model_serializers (0.8.1)
activemodel (>= 3.0)
activemodel (4.0.9)
activesupport (= 4.0.9)
builder (~> 3.1.0)
activerecord (4.0.9)
activemodel (= 4.0.9)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.9)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.9)
activemodel (4.1.5)
activesupport (= 4.1.5)
builder (~> 3.1)
activerecord (4.1.5)
activemodel (= 4.1.5)
activesupport (= 4.1.5)
arel (~> 5.0.0)
activesupport (4.1.5)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.2)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
axiom-types (0.0.5)
descendants_tracker (~> 0.0.1)
ice_nine (~> 0.9)
@ -45,7 +47,7 @@ GEM
bugsnag (2.2.1)
httparty (>= 0.6, < 1.0)
multi_json (~> 1.0)
builder (3.1.4)
builder (3.2.2)
cane (2.5.2)
parallel
capistrano (2.15.5)
@ -56,7 +58,7 @@ GEM
net-ssh-gateway (>= 1.1.0)
capistrano-ext (1.2.1)
capistrano (>= 1.0.0)
capybara (2.2.0)
capybara (2.4.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
@ -78,7 +80,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.6.3)
connection_pool (1.2.0)
connection_pool (2.0.0)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
@ -93,8 +95,9 @@ GEM
dotenv (0.8.0)
dotenv-rails (0.8.0)
dotenv (= 0.8.0)
draper (1.2.1)
draper (1.3.1)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
request_store (~> 1.0.3)
equalizer (0.0.9)
@ -123,15 +126,16 @@ GEM
foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6)
formatador (0.2.4)
guard (2.2.4)
formatador (0.2.5)
guard (2.6.1)
formatador (>= 0.2.4)
listen (~> 2.1)
listen (~> 2.7)
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-rspec (1.2.1)
guard (>= 1.1)
guard-rspec (4.3.1)
guard (~> 2.1)
rspec (>= 2.14, < 4.0)
hashie (2.0.5)
highline (1.6.19)
hike (1.2.3)
@ -156,17 +160,17 @@ GEM
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.8.1)
listen (2.4.0)
listen (2.7.9)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.4)
lumberjack (1.0.9)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.25.1)
minitest (4.7.5)
minitest (5.4.1)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (1.2.0)
@ -178,7 +182,7 @@ GEM
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
newrelic_rpm (3.7.1.182)
nokogiri (1.5.10)
nokogiri (1.5.11)
oauth (0.4.7)
oauth2 (0.8.1)
faraday (~> 0.8)
@ -210,13 +214,13 @@ GEM
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyglot (0.3.5)
pry (0.9.12.4)
coderay (~> 1.0)
method_source (~> 0.8)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-rails (0.3.2)
pry (>= 0.9.10)
pundit (0.2.3)
pundit (0.3.0)
activesupport (>= 3.0.0)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0)
@ -226,48 +230,57 @@ GEM
rack-robustness (1.1.0)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.9)
actionmailer (= 4.0.9)
actionpack (= 4.0.9)
activerecord (= 4.0.9)
activesupport (= 4.0.9)
rails (4.1.5)
actionmailer (= 4.1.5)
actionpack (= 4.1.5)
actionview (= 4.1.5)
activemodel (= 4.1.5)
activerecord (= 4.1.5)
activesupport (= 4.1.5)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.9)
railties (= 4.1.5)
sprockets-rails (~> 2.0)
railties (4.0.9)
actionpack (= 4.0.9)
activesupport (= 4.0.9)
railties (4.1.5)
actionpack (= 4.1.5)
activesupport (= 4.1.5)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.12.0)
rake (10.0.4)
rb-fsevent (0.9.3)
rb-inotify (0.9.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
redcarpet (2.2.2)
redis (3.0.6)
redis-namespace (1.3.2)
redis (~> 3.0.4)
request_store (1.0.5)
redis (3.1.0)
redis-namespace (1.5.1)
redis (~> 3.0, >= 3.0.4)
request_store (1.0.8)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec-collection_matchers (0.0.2)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.0.0.beta1)
rspec-expectations (3.0.0.beta1)
diff-lcs (>= 1.1.3, < 2.0)
rspec-support (= 3.0.0.beta1)
rspec-mocks (3.0.0.beta1)
rspec-rails (3.0.0.beta1)
actionpack (>= 3.0)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-activemodel-mocks (1.0.1)
activemodel (>= 3.0)
activesupport (>= 3.0)
rspec-mocks (>= 2.99, < 4.0)
rspec-core (3.0.4)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.4)
rspec-support (~> 3.0.0)
rspec-rails (3.0.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-collection_matchers
rspec-core (= 3.0.0.beta1)
rspec-expectations (= 3.0.0.beta1)
rspec-mocks (= 3.0.0.beta1)
rspec-support (3.0.0.beta1)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-support (~> 3.0.0)
rspec-support (3.0.4)
ruby-hmac (0.4.0)
sass (3.2.19)
sass-rails (4.0.3)
@ -275,13 +288,13 @@ GEM
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
shoulda-matchers (2.4.0)
shoulda-matchers (2.6.2)
activesupport (>= 3.0.0)
sidekiq (2.17.0)
sidekiq (3.2.2)
celluloid (>= 0.15.2)
connection_pool (>= 1.0.0)
connection_pool (>= 2.0.0)
json
redis (>= 3.0.4)
redis (>= 3.0.6)
redis-namespace (>= 1.3.1)
simple_form (3.0.2)
actionpack (~> 4.0)
@ -300,7 +313,7 @@ GEM
slim (2.0.1)
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
slop (3.4.7)
slop (3.6.0)
spring (1.0.0)
spring-commands-rspec (1.0.1)
spring (>= 0.9.1)
@ -329,7 +342,8 @@ GEM
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.41)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.3.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
@ -360,14 +374,14 @@ DEPENDENCIES
cane (~> 2.5.2)
capistrano (~> 2.15)
capistrano-ext (~> 1.2)
capybara (~> 2.2.0)
capybara (~> 2.4.1)
carrierwave (~> 0.8.0)
coffee-rails (~> 4.0.1)
coveralls
dalli (~> 2.6.2)
database_cleaner (~> 1.0.1)
dotenv-rails (~> 0.8)
draper (~> 1.2.1)
draper (~> 1.3.1)
factory_girl_rails (~> 4.2.0)
fog (~> 1.9.0)
foreman (~> 0.63.0)
@ -385,17 +399,18 @@ DEPENDENCIES
pg (~> 0.14)
poltergeist (~> 1.5.0)
pry-rails (~> 0.3.2)
pundit (~> 0.2.3)
pundit (~> 0.3.0)
quiet_assets (~> 1.0.1)
rack-robustness (~> 1.1.0)
rails (= 4.0.9)
rails (= 4.1.5)
rake (~> 10.0.4)
rb-inotify (~> 0.9.0)
redcarpet (~> 2.2.2)
rspec-rails (~> 3.0.0.beta1)
rspec-activemodel-mocks
rspec-rails (~> 3.0.2)
sass-rails (~> 4.0.3)
shoulda-matchers (~> 2.4.0)
sidekiq (~> 2.17)
shoulda-matchers
sidekiq (~> 3.2.2)
simple_form (~> 3.0.2)
simple_form_bootstrap3 (~> 0.2.6)
simplecov (~> 0.7.1)

@ -1,7 +1,7 @@
notification :tmux, :color_location => 'status-right-bg'
guard 'rspec', all_on_start: false, cmd: 'spring rspec --fail-fast --tag ~js --tag ~slow' do
watch('spec/spec_helper.rb') { "spec" }
watch('spec/rails_helper.rb') { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
watch(%r{^spec/.+_spec\.rb$})

@ -4,4 +4,4 @@
require File.expand_path('../config/application', __FILE__)
Asciinema::Application.load_tasks
Rails.application.load_tasks

@ -8,7 +8,7 @@ class Asciicast < ActiveRecord::Base
mount_uploader :stdout_timing, StdoutTimingUploader
mount_uploader :stdout_frames, StdoutFramesUploader
serialize :snapshot, JSON
serialize :snapshot, ActiveSupportJsonProxy
validates :stdout_data, :stdout_timing, :presence => true
validates :terminal_columns, :terminal_lines, :duration, :presence => true

@ -2,4 +2,4 @@
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Asciinema::Application.initialize!
Rails.application.initialize!

@ -1,4 +1,4 @@
Asciinema::Application.configure do
Rails.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
@ -19,11 +19,19 @@ Asciinema::Application.configure do
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations
# Raise an error on page load if there are pending migrations.
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
# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.
config.assets.raise_runtime_errors = true
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end

@ -1,11 +1,11 @@
Asciinema::Application.configure do
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
@ -32,8 +32,7 @@ Asciinema::Application.configure do
# Generate digests for assets URLs.
config.assets.digest = true
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
# `config.assets.precompile` has moved to config/initializers/assets.rb
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
@ -57,16 +56,12 @@ Asciinema::Application.configure do
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
config.assets.precompile += %w( player.css player.js embed.css embed.js )
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found).
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
@ -77,4 +72,7 @@ Asciinema::Application.configure do
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end

@ -1,4 +1,4 @@
Asciinema::Application.configure do
Rails.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
@ -33,4 +33,7 @@ Asciinema::Application.configure do
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end

@ -0,0 +1,8 @@
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
Rails.application.config.assets.precompile += %w( player.css player.js embed.css embed.js persona-include.js )

@ -0,0 +1,3 @@
# Be sure to restart your server when you modify this file.
Rails.application.config.action_dispatch.cookies_serializer = :json

@ -2,4 +2,3 @@
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone

@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.
Asciinema::Application.config.session_store :cookie_store, key: '_asciinema_session', secure: CFG.ssl?
Rails.application.config.session_store :cookie_store, key: '_asciinema_session', secure: CFG.ssl?

@ -1,4 +1,4 @@
Asciinema::Application.routes.draw do
Rails.application.routes.draw do
get "/browse" => "asciicasts#index", :as => :browse
get "/browse/:category" => "asciicasts#index", :as => :category
@ -38,4 +38,5 @@ Asciinema::Application.routes.draw do
get '/privacy' => 'pages#show', page: :privacy, as: :privacy
get '/tos' => 'pages#show', page: :tos, as: :tos
get '/contributing' => 'pages#show', page: :contributing, as: :contributing
end

@ -7,6 +7,16 @@
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure your secret_key_base is kept private
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
Asciinema::Application.config.secret_key_base = CFG.secret_token
development:
secret_key_base: <%= CFG.secret_token %>
test:
secret_key_base: <%= CFG.secret_token %>
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= CFG.secret_token %>

@ -0,0 +1,13 @@
# Remove this and replace with `JSON` after upgrading to Rails 4.2
class ActiveSupportJsonProxy
def self.dump(object)
ActiveSupport::JSON.encode(object) unless object.nil?
end
def self.load(string)
ActiveSupport::JSON.decode(string) if string.present?
end
end

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe "Asciicast creation" do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe "Asciicast retrieval" do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AccountMergesController do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
module Api
describe AsciicastsController do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe ApiTokensController do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
class FakesController < ApplicationController

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
shared_examples_for 'guest user trying to modify' do
it { should redirect_to(login_path) }

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe DocsController do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe HomeController do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe PagesController do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe SessionsController do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe UsersController do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe ApplicationDecorator do
end

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastDecorator do
include Draper::ViewHelpers

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe BrushDecorator do
let(:decorator) { described_class.new(brush) }

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe CellDecorator do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AvatarHelper do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe OmniAuthCredentials do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe SnapshotDecorator do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe UserDecorator do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
feature "Asciicast page", :js => true do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
feature "Asciicast lists" do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
feature "Docs" do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
feature "Example page with embedded player", :js => true do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
feature "Homepage", :js => true do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
feature "Static pages" do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe 'Asciicast playback', :js => true, :slow => true do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
feature "User's profile" do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
routes = proc do
get '/test/widget/:id' => 'test_widget#show'

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe ApplicationHelper do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe ApiToken do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
require 'stringio'
describe AsciicastParams do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
require 'tempfile'
describe Asciicast do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Brush do
let(:brush) { Brush.new(attributes) }

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe BufferedStdout do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Cell do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Comment do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Cursor do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe FrameDiffList do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe FrameDiff do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Frame do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Grid do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Like do
end

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Snapshot do

@ -1,6 +1,6 @@
# encoding: utf-8
require 'spec_helper'
require 'rails_helper'
describe Stdout do
let(:stdout) { Stdout.new('spec/fixtures/stdout.decompressed',

@ -1,6 +1,6 @@
# encoding: utf-8
require 'spec_helper'
require 'rails_helper'
describe Terminal do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe User do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastPolicy do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe UserPolicy do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastPagePresenter do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe BareAsciicastPagePresenter do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe BrowsePagePresenter do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe HomePagePresenter do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe UserPagePresenter do

@ -0,0 +1,64 @@
if ENV["CI"] && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby")
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start 'rails' do
add_group "Decorators", "app/decorators"
add_group "Presenters", "app/presenters"
end
end
ENV["RAILS_ENV"] ||= 'test'
ENV['CARRIERWAVE_STORAGE_DIR_PREFIX'] ||= 'uploads/test/'
require File.expand_path("../../config/environment", __FILE__)
ActiveRecord::Migration.maintain_test_schema!
require 'rspec/rails'
require 'capybara/rspec'
require 'capybara/poltergeist'
require 'sidekiq/testing'
require 'pundit/rspec'
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
Dir[Rails.root.join("spec/shared/**/*.rb")].each { |f| require f }
Capybara.javascript_driver = :poltergeist
OmniAuth.config.test_mode = true
CarrierWave.configure do |config|
config.storage = :file
config.enable_processing = false
end
RSpec.configure do |config|
config.use_transactional_fixtures = false
config.infer_base_class_for_anonymous_controllers = false
config.infer_spec_type_from_file_location!
config.include FactoryGirl::Syntax::Methods
config.include Asciinema::FixtureHelpers
config.include Asciinema::FeatureHelpers
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, :js => true) do
DatabaseCleaner.strategy = :truncation
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe "asciicasts routing" do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe 'connect routing' do
it 'routes /connect/:api_token to api_tokens#create for api_token' do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastSerializer do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastCreator do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastFramesFileUpdater do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastProcessor do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastSnapshotUpdater do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Film do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe JsonFileWriter do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe TimingParser do

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe ViewCounter do
let(:view_counter) { described_class.new }

@ -1,64 +1,78 @@
if ENV["CI"] && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby")
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start 'rails' do
add_group "Decorators", "app/decorators"
add_group "Presenters", "app/presenters"
end
end
ENV["RAILS_ENV"] ||= 'test'
ENV['CARRIERWAVE_STORAGE_DIR_PREFIX'] ||= 'uploads/test/'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'capybara/rspec'
require 'capybara/poltergeist'
require 'sidekiq/testing'
require 'pundit/rspec'
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
Dir[Rails.root.join("spec/shared/**/*.rb")].each { |f| require f }
Capybara.javascript_driver = :poltergeist
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause this
# file to always be loaded, without a need to explicitly require it in any files.
#
# Given that it is always loaded, you are encouraged to keep this file as
# light-weight as possible. Requiring heavyweight dependencies from this file
# will add to the boot time of your test suite on EVERY test run, even for an
# individual file that may not need all of that loaded. Instead, make a
# separate helper file that requires this one and then use it only in the specs
# that actually need it.
#
# The `.rspec` file also contains a few flags that are not defaults but that
# users commonly want.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
# The settings below are suggested to provide a good initial experience
# with RSpec, but feel free to customize to your heart's content.
OmniAuth.config.test_mode = true
# These two settings work together to allow you to limit a spec run
# to individual examples or groups you care about by tagging them with
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
# get run.
config.filter_run :focus
config.run_all_when_everything_filtered = true
CarrierWave.configure do |config|
config.storage = :file
config.enable_processing = false
end
# Many RSpec users commonly either run the entire suite or an individual
# file, and it's useful to allow more verbose output when running an
# individual spec file.
if config.files_to_run.one?
# Use the documentation formatter for detailed output,
# unless a formatter has already been configured
# (e.g. via a command-line flag).
config.default_formatter = 'doc'
end
RSpec.configure do |config|
config.mock_with :rspec
config.use_transactional_fixtures = false
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
# Print the 10 slowest examples and example groups at the
# end of the spec run, to help surface which specs are running
# particularly slow.
config.profile_examples = 10
config.include FactoryGirl::Syntax::Methods
config.include Asciinema::FixtureHelpers
config.include Asciinema::FeatureHelpers
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234
config.order = :random
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
# Seed global randomization in this process using the `--seed` CLI option.
# Setting this allows you to use `--seed` to deterministically reproduce
# test failures related to randomization by passing the same `--seed` value
# as the one that triggered the failure.
Kernel.srand config.seed
config.before(:each) do
DatabaseCleaner.strategy = :transaction
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
# assertions if you prefer.
config.expect_with :rspec do |expectations|
# Enable only the newer, non-monkey-patching expect syntax.
# For more details, see:
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
expectations.syntax = :expect
end
config.before(:each, :js => true) do
DatabaseCleaner.strategy = :truncation
end
# rspec-mocks config goes here. You can use an alternate test double
# library (such as bogus or mocha) by changing the `mock_with` option here.
config.mock_with :rspec do |mocks|
# Enable only the newer, non-monkey-patching expect syntax.
# For more details, see:
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
mocks.syntax = :expect
config.before(:each) do
DatabaseCleaner.start
# Prevents you from mocking or stubbing a method that does not exist on
# a real object. This is generally recommended.
mocks.verify_partial_doubles = true
end
config.after(:each) do
DatabaseCleaner.clean
end
end

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
require 'rack/mock'
describe AuthCookieStrategy do

@ -2,16 +2,28 @@ RSpec::Matchers.define :have_queued_job do |*expected|
match do |actual|
actual.jobs.any? { |job| Array(expected) == job["args"] }
end
failure_message_for_should do |actual|
failure_message do |actual|
"expected that #{actual} would have a job queued with #{expected}"
end
failure_message_for_should_not do |actual|
failure_message_when_negated do |actual|
"expected that #{actual} would not a have a job queued with #{expected}"
end
description do
"have a job queued with #{expected}"
end
end
RSpec::Matchers.define :have_queued_job_at do |at,*expected|
match do |actual|
actual.jobs.any? { |job| job["args"] == Array(expected) && job["at"].to_i == at.to_i }
end
failure_message do |actual|
"expected that #{actual} would have a job queued with #{expected} at time #{at}"
end
failure_message_when_negated do |actual|
"expected that #{actual} would not a have a job queued with #{expected} at time #{at}"
end
description do
"have a job queued with #{expected} at time #{at}"
end
end

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe Bzip2Uploader do
let(:uploader) { Bzip2Uploader.new(user, :photo) }

@ -1,4 +1,4 @@
require 'spec_helper'
require 'rails_helper'
describe AsciicastWorker do

Loading…
Cancel
Save