Skip to content

Commit bc0a717

Browse files
committed
Fixes deprecation warnings, of which there were so many.
1 parent 28eef29 commit bc0a717

File tree

8 files changed

+32
-21
lines changed

8 files changed

+32
-21
lines changed

Gemfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Edit this Gemfile to bundle your application's dependencies.
22
source 'http://gemcutter.org'
3-
gem "rails", "3.0.3", :group => [:development, :test]
4-
gem 'rspec-rails', '2.3', :group => [:development, :test]
3+
group :development, :test do
4+
gem 'jeweler'
5+
gem "rails", "= 3.0.3"
6+
gem 'rspec-rails', '= 2.3'
7+
end

Gemfile.lock

+6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ GEM
3333
diff-lcs (1.1.2)
3434
erubis (2.6.6)
3535
abstract (>= 1.0.0)
36+
git (1.2.5)
3637
i18n (0.5.0)
38+
jeweler (1.5.2)
39+
bundler (~> 1.0.0)
40+
git (>= 1.2.5)
41+
rake
3742
mail (2.2.15)
3843
activesupport (>= 2.3.6)
3944
i18n (>= 0.4.0)
@@ -82,5 +87,6 @@ PLATFORMS
8287
ruby
8388

8489
DEPENDENCIES
90+
jeweler
8591
rails (= 3.0.3)
8692
rspec-rails (= 2.3)

Rakefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ begin
44
require 'rspec/core'
55
require 'rspec/core/rake_task'
66
rescue MissingSourceFile
7-
module Rspec
7+
module RSpec
88
module Core
99
class RakeTask
1010
def initialize(name)
@@ -30,7 +30,7 @@ task :default => :spec
3030
task :stats => "spec:statsetup"
3131

3232
desc "Run RSpec code examples"
33-
Rspec::Core::RakeTask.new(:spec) do |t|
33+
RSpec::Core::RakeTask.new(:spec) do |t|
3434
t.pattern = "./spec/**/*_spec.rb"
3535
end
3636

spec/rails_root/Gemfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Edit this Gemfile to bundle your application's dependencies.
22
source 'http://gemcutter.org'
3-
gem "rails", "3.0.3", :group => [:development, :test]
4-
gem 'rspec-rails', :group => [:development, :test]
3+
group :development, :test do
4+
gem "rails", "= 3.0.3"
5+
gem 'rspec-rails', '= 2.3'
6+
end

spec/rails_root/Gemfile.lock

+10-10
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ GEM
6060
rake (>= 0.8.7)
6161
thor (~> 0.14.4)
6262
rake (0.8.7)
63-
rspec (2.4.0)
64-
rspec-core (~> 2.4.0)
65-
rspec-expectations (~> 2.4.0)
66-
rspec-mocks (~> 2.4.0)
67-
rspec-core (2.4.0)
68-
rspec-expectations (2.4.0)
63+
rspec (2.3.0)
64+
rspec-core (~> 2.3.0)
65+
rspec-expectations (~> 2.3.0)
66+
rspec-mocks (~> 2.3.0)
67+
rspec-core (2.3.1)
68+
rspec-expectations (2.3.0)
6969
diff-lcs (~> 1.1.2)
70-
rspec-mocks (2.4.0)
71-
rspec-rails (2.4.1)
70+
rspec-mocks (2.3.0)
71+
rspec-rails (2.3.0)
7272
actionpack (~> 3.0)
7373
activesupport (~> 3.0)
7474
railties (~> 3.0)
75-
rspec (~> 2.4.0)
75+
rspec (~> 2.3.0)
7676
thor (0.14.6)
7777
treetop (1.4.9)
7878
polyglot (>= 0.3.1)
@@ -83,4 +83,4 @@ PLATFORMS
8383

8484
DEPENDENCIES
8585
rails (= 3.0.3)
86-
rspec-rails
86+
rspec-rails (= 2.3)

spec/rails_root/config/application.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
module TruncateHtmlSpec
99
class Application < Rails::Application
10-
config.action_controller.session = { :key => "_myapp_session",
11-
:secret => "truncate_html_super_secret_dont_tell_anyone" }
10+
config.active_support.deprecation = :stderr
11+
config.session_store :cookie_store, :key => "_myapp_session"
12+
config.secret_token = "truncate_html_super_secret_dont_tell_anyone"
1213
end
1314
end

spec/rails_root/config/environments/test.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@
2626
# This is necessary if your schema can't be completely dumped by the schema dumper,
2727
# like if you have constraints or database-specific column types
2828
# config.active_record.schema_format = :sql
29-
30-
config.gem 'rspec-rails', :version => '>= 1.3.2', :lib => false unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
29+
config.gem 'rspec-rails', :version => '>= 1.3.2', :lib => false unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))

spec/spec_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
require File.expand_path('../../lib/truncate_html', __FILE__)
88

9-
Rspec.configure do |config|
9+
RSpec.configure do |config|
1010
config.mock_with :rspec
1111
end

0 commit comments

Comments
 (0)