rack_session_access 0.0.1 → 0.0.2
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/lib/rack_session_access.rb +1 -1
- data/lib/rack_session_access/version.rb +1 -1
- data/spec/middleware_spec.rb +22 -37
- data/spec/rack_session_access_spec.rb +7 -0
- metadata +6 -6
data/lib/rack_session_access.rb
CHANGED
data/spec/middleware_spec.rb
CHANGED
@@ -97,48 +97,33 @@ feature "manage rack session", %q(
|
|
97
97
|
So I can write faster tests
|
98
98
|
) do
|
99
99
|
|
100
|
-
context "with rack application and :rack_test driver", :driver => :rack_test do
|
101
|
-
background do
|
102
|
-
Capybara.app = TestRackApp
|
103
|
-
Capybara.current_driver.should == :rack_test
|
104
|
-
end
|
105
|
-
include_examples "common scenarios"
|
106
|
-
include_examples "rack scenarios"
|
107
|
-
end
|
108
100
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
101
|
+
[:rack_test, :selenium].each do |driver_name|
|
102
|
+
context "with rack application and #{driver_name.inspect} driver", :driver => driver_name do
|
103
|
+
background do
|
104
|
+
Capybara.current_driver.should == driver_name
|
105
|
+
Capybara.app = TestRackApp
|
106
|
+
end
|
107
|
+
include_examples "common scenarios"
|
108
|
+
include_examples "rack scenarios"
|
113
109
|
end
|
114
|
-
include_examples "common scenarios"
|
115
|
-
include_examples "rack scenarios"
|
116
|
-
end
|
117
110
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
111
|
+
context "with sinatra application and #{driver_name.inspect} driver", :driver => driver_name do
|
112
|
+
background do
|
113
|
+
Capybara.current_driver.should == driver_name
|
114
|
+
Capybara.app = TestSinatraApp
|
115
|
+
end
|
116
|
+
include_examples "common scenarios"
|
117
|
+
include_examples "sinatra scenarios"
|
122
118
|
end
|
123
|
-
include_examples "common scenarios"
|
124
|
-
include_examples "sinatra scenarios"
|
125
|
-
end
|
126
|
-
|
127
|
-
context "with sinatra application and :selenium driver", :driver => :selenium do
|
128
|
-
background do
|
129
|
-
Capybara.app = TestSinatraApp
|
130
|
-
Capybara.current_driver.should == :selenium
|
131
|
-
end
|
132
|
-
include_examples "common scenarios"
|
133
|
-
include_examples "sinatra scenarios"
|
134
|
-
end
|
135
119
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
120
|
+
context "with rails application and #{driver_name.inspect} driver", :driver => driver_name do
|
121
|
+
background do
|
122
|
+
Capybara.current_driver.should == driver_name
|
123
|
+
Capybara.app = TestRailsApp::Application
|
124
|
+
end
|
125
|
+
include_examples "common scenarios"
|
126
|
+
include_examples "rails scenarios"
|
140
127
|
end
|
141
|
-
include_examples "common scenarios"
|
142
|
-
include_examples "rails scenarios"
|
143
128
|
end
|
144
129
|
end
|
@@ -28,4 +28,11 @@ describe RackSessionAccess do
|
|
28
28
|
result = subject.decode(data)
|
29
29
|
result.should == source
|
30
30
|
end
|
31
|
+
|
32
|
+
it "should encode and decode values with line brake characters" do
|
33
|
+
source = { 'line' => "one\ntwo" }
|
34
|
+
data = subject.encode(source)
|
35
|
+
result = subject.decode(data)
|
36
|
+
result.should == source
|
37
|
+
end
|
31
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack_session_access
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
16
|
-
requirement: &
|
16
|
+
requirement: &13127280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *13127280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: builder
|
27
|
-
requirement: &
|
27
|
+
requirement: &13124100 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 2.0.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *13124100
|
36
36
|
description:
|
37
37
|
email:
|
38
38
|
- andriy.yanko@gmail.com
|