sinatra-flash 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/sinatra/flash.rb +1 -1
- data/sinatra-flash.gemspec +2 -2
- data/spec/flash_spec.rb +5 -0
- data/spec/spec_helper.rb +4 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/sinatra/flash.rb
CHANGED
@@ -14,7 +14,7 @@ module Sinatra
|
|
14
14
|
# for the next request.
|
15
15
|
app.after do
|
16
16
|
set :sessions, true unless session # If you do not have a session, one will be appointed for you by the court.
|
17
|
-
@flash.each{|key, flash| session[key] = @flash[key].next}
|
17
|
+
@flash.each{|key, flash| session[key] = @flash[key].next} if @flash
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
data/sinatra-flash.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sinatra-flash}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Stephen Eley"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-29}
|
13
13
|
s.description = %q{A Sinatra extension for setting and showing Rails-like flash messages. This extension improves on the Rack::Flash gem by being simpler to use, providing a full range of hash operations (including iterating through various flash keys, testing the size of the hash, etc.), and offering a 'styled_flash' view helper to render the entire flash hash with sensible CSS classes. The downside is reduced flexibility -- these methods will *only* work in Sinatra.}
|
14
14
|
s.email = %q{sfeley@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/flash_spec.rb
CHANGED
@@ -59,4 +59,9 @@ describe Sinatra::Flash do
|
|
59
59
|
get '/flash'
|
60
60
|
last_response.body.should == "{:hi=>:ho}"
|
61
61
|
end
|
62
|
+
|
63
|
+
it "behaves well when nothing ever checks the flash" do
|
64
|
+
get '/dummy'
|
65
|
+
last_response.body.should == "This page does not invoke the flash at all."
|
66
|
+
end
|
62
67
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 1
|
9
|
+
version: 0.2.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Stephen Eley
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-29 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|