rails_4_session_flash_backport 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
data/Gemfile CHANGED
@@ -4,6 +4,7 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :development do
7
+ gem 'rake'
7
8
  gem "rspec"
8
9
  gem "actionpack", ENV["ACTIONPACK_VERSION"] || "3.2.9"
9
10
  gem "pry"
data/README.md CHANGED
@@ -9,6 +9,9 @@ sessions working on Rails 3, and we figured as long as we're going to be doing
9
9
  crazy stuff we might as well go and use the far more sensible practice from
10
10
  Rails 4 of storing the flash as basic ruby types.
11
11
 
12
+ For more details of the how and why, check out our blog post
13
+ [Happily upgrading Ruby on Rails at production scale](http://webuild.envato.com/blog/upgrading-ruby-on-rails-at-production-scale/)
14
+
12
15
  When using this gem on a Rails 2 or 3 app:
13
16
 
14
17
  - Flash messages are stored as basic objects in the Rails 4 style.
@@ -28,6 +31,8 @@ Rails 3 servers concurrently with your Rails 2 cluster to verify everything is
28
31
  fine and performance is acceptable without
29
32
  having to do the all-in switch.
30
33
 
34
+ ## Status [![Build Status](https://travis-ci.org/envato/rails_4_session_flash_backport.png?branch=travis_ci)](https://travis-ci.org/envato/rails_4_session_flash_backport)
35
+
31
36
  ## Installation
32
37
 
33
38
  Add this line to your application's Gemfile:
data/Rakefile CHANGED
@@ -2,14 +2,14 @@ require "bundler/gem_tasks"
2
2
 
3
3
  namespace :spec do
4
4
  task :rails3 do
5
- system "export ACTIONPACK_VERSION=3.2.9 && bundle check > /dev/null || bundle update"
5
+ system "export ACTIONPACK_VERSION=3.2.9 && bundle check > /dev/null || bundle install"
6
6
  puts "Running Rails 3 specs"
7
7
  system "export ACTIONPACK_VERSION=3.2.9 && bundle exec rspec --color spec/rails3"
8
8
  puts ""
9
9
  end
10
10
 
11
11
  task :rails2 do
12
- system "export ACTIONPACK_VERSION=2.3.14 && bundle check > /dev/null || bundle update"
12
+ system "export ACTIONPACK_VERSION=2.3.14 && bundle check > /dev/null || bundle install"
13
13
  puts "Running Rails 2 specs"
14
14
  system "export ACTIONPACK_VERSION=2.3.14 && bundle exec rspec --color spec/rails2"
15
15
  puts ""
@@ -17,3 +17,5 @@ namespace :spec do
17
17
  end
18
18
 
19
19
  task :spec => ["spec:rails2", "spec:rails3"]
20
+
21
+ task :default => :spec
@@ -24,6 +24,12 @@ module ActionController::Session
24
24
  load! unless @loaded
25
25
  super(key.to_s, value)
26
26
  end
27
+
28
+ def delete(key)
29
+ value = super(key)
30
+ string_value = super(key.to_s)
31
+ value || string_value
32
+ end
27
33
  end
28
34
  end
29
35
  end
@@ -1,3 +1,3 @@
1
1
  module Rails4SessionFlashBackport
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_4_session_flash_backport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-21 00:00:00.000000000 Z
12
+ date: 2014-03-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Store flash in the session in Rails 4 style on Rails 2/3
15
15
  email:
@@ -19,6 +19,7 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - .gitignore
22
+ - .travis.yml
22
23
  - Gemfile
23
24
  - LICENSE.txt
24
25
  - README.md