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.
@@ -10,7 +10,7 @@ module RackSessionAccess
10
10
 
11
11
  # encode session hash to string
12
12
  def encode(hash)
13
- Array(Marshal.dump(hash)).pack('m')
13
+ [Marshal.dump(hash)].pack('m')
14
14
  end
15
15
 
16
16
  # decode string to session hash
@@ -1,3 +1,3 @@
1
1
  module RackSessionAccess
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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
- context "with rack application and :selenium driver", :driver => :selenium do
110
- background do
111
- Capybara.app = TestRackApp
112
- Capybara.current_driver.should == :selenium
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
- context "with sinatra application and :rack_test driver", :driver => :rack_test do
119
- background do
120
- Capybara.app = TestSinatraApp
121
- Capybara.current_driver.should == :rack_test
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
- context "with rails application and :rack_test driver", :driver => :rack_test do
137
- background do
138
- Capybara.app = TestRailsApp::Application
139
- Capybara.current_driver.should == :rack_test
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.1
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-07 00:00:00.000000000 Z
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: &21097300 !ruby/object:Gem::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: *21097300
24
+ version_requirements: *13127280
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: builder
27
- requirement: &21096800 !ruby/object:Gem::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: *21096800
35
+ version_requirements: *13124100
36
36
  description:
37
37
  email:
38
38
  - andriy.yanko@gmail.com