simple_session 0.1.0
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.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +119 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/simple_session/base.rb +250 -0
- data/lib/simple_session/version.rb +3 -0
- data/lib/simple_session.rb +24 -0
- data/simple_session.gemspec +34 -0
- metadata +185 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0b7f7c72b9d113d34ba0692f2088ec4937e1bac0
|
4
|
+
data.tar.gz: 26605252efbf549d4b51f29e3075b897289241f8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2ce6cb3733b86fd8b8b2ba6d66d6b2ef41aebdf06d692de9a1a547e5128d96dfb5970e577ee737faab8ca4af962b25fe273f3b0c9d5a5b0f3e5998ad57d7e9ac
|
7
|
+
data.tar.gz: 19078bd164571ef77f2a40d107f2474791a1384e0ab9d00db38126432a75a1bfa69ea0fb2709d09ed5bbb4ae48c36f0acb0e8ed40d39fd2cd6973867d2f12881
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 hayduke19us
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
# SimpleSession
|
2
|
+
|
3
|
+
This is a drop in replacement for rack session. By default
|
4
|
+
the session cookie is encrypted in AES-256-CBC and requires a secret
|
5
|
+
which is recommended to be kept in an .env file or something similar.
|
6
|
+
|
7
|
+
<a href='#install-sect'><h4>Installation</h4></a>
|
8
|
+
|
9
|
+
<a href='#usage-sect'><h4>Usage</h4></a>
|
10
|
+
|
11
|
+
<a href='#overview-sect'><h4>Overview</h4></a>
|
12
|
+
|
13
|
+
<a href='#default-sect'><h4>Default Options</h4></a>
|
14
|
+
|
15
|
+
|
16
|
+
<h2 id='install-sect'>Installation</h2>
|
17
|
+
|
18
|
+
Add this line to your application's Gemfile:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
gem 'simple_session'
|
22
|
+
```
|
23
|
+
|
24
|
+
And then execute:
|
25
|
+
|
26
|
+
$ bundle
|
27
|
+
|
28
|
+
Or install it yourself as:
|
29
|
+
|
30
|
+
$ gem install simple_session
|
31
|
+
|
32
|
+
<h2 id='usage-sect'>Usage</h2>
|
33
|
+
Full examples are in the *test/simple_session_test.rb* and
|
34
|
+
*test/simple_app.rb*. It's just a middleware so throw it on top of the stack.
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
use SimpleSession::Session, secret: 'some secret', expire_after: 7200
|
38
|
+
```
|
39
|
+
|
40
|
+
<h4 id='overview-sect'>Overview</h4>
|
41
|
+
SimpleSession is a simple Middleware that processes the session cookie
|
42
|
+
with 5 steps.
|
43
|
+
|
44
|
+
1. Extract the session from the request if there is one. If there is no session
|
45
|
+
create a new one that looks like this:
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
{ session_id: 'some secret id' }
|
49
|
+
```
|
50
|
+
|
51
|
+
2. Load the session data into the app environment so they are accessible with racks request methods like this:
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
get '/'
|
55
|
+
request.session
|
56
|
+
session
|
57
|
+
request.session_options
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
3. Clear the session if the time has expired and create a new one.
|
62
|
+
|
63
|
+
4. Update the options if they have been changed like this.
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
# This changes the session to expire one minute after
|
67
|
+
# the current time.
|
68
|
+
get '/'
|
69
|
+
request.session_options[:expire_after] = 60
|
70
|
+
end
|
71
|
+
```
|
72
|
+
|
73
|
+
5. Create the new session cookie, encrypt it and return the response.
|
74
|
+
|
75
|
+
<h4 id='default-sect'>Default Options</h4>
|
76
|
+
|
77
|
+
* secret: nil
|
78
|
+
* key: 'rack.session'
|
79
|
+
* expire_after: 7200
|
80
|
+
|
81
|
+
The following is a simple example. The only **required argument is :secret**.
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
require 'sinatra'
|
85
|
+
require 'simple_session'
|
86
|
+
|
87
|
+
class SimpleApp < Sinatra::Base
|
88
|
+
|
89
|
+
use SimpleSession::Session, secret: 'Your Secret'
|
90
|
+
|
91
|
+
get '/signin' do
|
92
|
+
if session[:user_id]
|
93
|
+
"Already Signed in"
|
94
|
+
else
|
95
|
+
session[:user_id] = '!Green3ggsandHam!'
|
96
|
+
"Id: #{ session[:user_id] }"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
103
|
+
## Development
|
104
|
+
|
105
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
106
|
+
|
107
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
108
|
+
|
109
|
+
## Contributing
|
110
|
+
|
111
|
+
**Write a test** and go for it.
|
112
|
+
|
113
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/simple_session. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
114
|
+
|
115
|
+
|
116
|
+
## License
|
117
|
+
|
118
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
119
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "simple_session"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,250 @@
|
|
1
|
+
require 'rack/request'
|
2
|
+
require 'securerandom'
|
3
|
+
require 'openssl'
|
4
|
+
require 'byebug'
|
5
|
+
|
6
|
+
module SimpleSession
|
7
|
+
|
8
|
+
class Base
|
9
|
+
|
10
|
+
attr_reader :request, :session
|
11
|
+
|
12
|
+
def initialize app, options = {}
|
13
|
+
@app = app
|
14
|
+
@key = options.fetch :key, 'rack.session'
|
15
|
+
@secret = options[:secret]
|
16
|
+
@cipher_key = cipher_key
|
17
|
+
@options_key = options.fetch :options_key, 'rack.session.options'
|
18
|
+
@default_opts = options
|
19
|
+
end
|
20
|
+
|
21
|
+
def req_session
|
22
|
+
request.cookies[@key] if request
|
23
|
+
end
|
24
|
+
|
25
|
+
def req_options
|
26
|
+
session[:options] if session
|
27
|
+
end
|
28
|
+
|
29
|
+
def clear_session
|
30
|
+
@session = new_session_hash
|
31
|
+
@options = {options: OptionHash.new(@default_opts).opts}
|
32
|
+
end
|
33
|
+
|
34
|
+
def time_expired?
|
35
|
+
req_options && req_options[:expire] && req_options[:expire] <= Time.now
|
36
|
+
end
|
37
|
+
|
38
|
+
def new_session_hash
|
39
|
+
{ session_id: SecureRandom.hex(32) }
|
40
|
+
end
|
41
|
+
|
42
|
+
def call env
|
43
|
+
# Decrypt request session and store it
|
44
|
+
extract_session env
|
45
|
+
|
46
|
+
original_opts = @options[:options].dup
|
47
|
+
|
48
|
+
# Process options
|
49
|
+
clear_session if time_expired?
|
50
|
+
|
51
|
+
# Load session into app env
|
52
|
+
load_environment env
|
53
|
+
|
54
|
+
# Pass on request
|
55
|
+
status, headers, body = @app.call env
|
56
|
+
|
57
|
+
# Check session for changes and update options
|
58
|
+
update_options if options_changed? original_opts
|
59
|
+
|
60
|
+
# Encrypt and add session to headers
|
61
|
+
add_session headers
|
62
|
+
|
63
|
+
[status, headers, body]
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
def update_options
|
69
|
+
@options = {options: OptionHash.new(@options[:options]).opts}
|
70
|
+
end
|
71
|
+
|
72
|
+
def options_changed? original
|
73
|
+
original != @options[:options]
|
74
|
+
end
|
75
|
+
|
76
|
+
# If the session is nil create a new one
|
77
|
+
# If the session is unable to be decrypted throw an
|
78
|
+
# error and create a new one.
|
79
|
+
# encrypted data is not allowed in the app env
|
80
|
+
def extract_session env
|
81
|
+
begin
|
82
|
+
@request = Rack::Request.new env
|
83
|
+
@session = req_session ? decrypt(req_session) : new_session_hash
|
84
|
+
|
85
|
+
unless @session
|
86
|
+
raise ArgumentError, "Unable to decrypt session #{caller[0]}"
|
87
|
+
end
|
88
|
+
|
89
|
+
rescue => e
|
90
|
+
@session = new_session_hash
|
91
|
+
puts e.message
|
92
|
+
end
|
93
|
+
|
94
|
+
@options = options_hash
|
95
|
+
end
|
96
|
+
|
97
|
+
def load_environment env
|
98
|
+
env[@key] = session[:value] || session
|
99
|
+
env[@options_key] = @options[:options]
|
100
|
+
end
|
101
|
+
|
102
|
+
def add_session headers
|
103
|
+
cookie = Hash.new
|
104
|
+
cookie[:value] = session[:value] || session
|
105
|
+
cookie[:expires] = @options[:options][:expire]
|
106
|
+
set_cookie_header headers, @key, encrypt(cookie.merge!(@options))
|
107
|
+
end
|
108
|
+
|
109
|
+
def set_cookie_header headers, key, cookie
|
110
|
+
Rack::Utils.set_cookie_header! headers, key, cookie
|
111
|
+
end
|
112
|
+
|
113
|
+
def options_hash
|
114
|
+
o = session[:options] || OptionHash.new(@default_opts).opts
|
115
|
+
{ options: o }
|
116
|
+
end
|
117
|
+
|
118
|
+
def encrypt data
|
119
|
+
begin
|
120
|
+
if data.is_a? Hash
|
121
|
+
# Serialize
|
122
|
+
m = Marshal.dump data
|
123
|
+
|
124
|
+
# Cipher
|
125
|
+
c = load_cipher m
|
126
|
+
|
127
|
+
# Base64
|
128
|
+
[c].pack('m')
|
129
|
+
else
|
130
|
+
raise ArgumentError, "Internal session data must be a hash"
|
131
|
+
end
|
132
|
+
rescue => e
|
133
|
+
puts e.message
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
def decrypt data
|
138
|
+
begin
|
139
|
+
if data.is_a? String
|
140
|
+
# Decode Base64
|
141
|
+
b = data.unpack('m').first
|
142
|
+
|
143
|
+
# Decipher
|
144
|
+
c = unload_cipher b
|
145
|
+
|
146
|
+
# Deserialize
|
147
|
+
Marshal.load c
|
148
|
+
else
|
149
|
+
raise ArgumentError, "External session data must be a string."
|
150
|
+
end
|
151
|
+
rescue => e
|
152
|
+
puts e.message
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
def digest
|
157
|
+
OpenSSL::Digest.new 'sha256', @secret
|
158
|
+
end
|
159
|
+
|
160
|
+
def hmac data
|
161
|
+
OpenSSL::HMAC.digest digest, @key, data
|
162
|
+
end
|
163
|
+
|
164
|
+
def new_cipher
|
165
|
+
OpenSSL::Cipher::AES.new(256, :CBC)
|
166
|
+
end
|
167
|
+
|
168
|
+
def load_cipher marshaled_data
|
169
|
+
cipher = new_cipher
|
170
|
+
cipher.encrypt
|
171
|
+
iv = cipher.random_iv
|
172
|
+
cipher.iv = iv
|
173
|
+
cipher.key = @cipher_key
|
174
|
+
|
175
|
+
iv + cipher.update(marshaled_data) + cipher.final
|
176
|
+
end
|
177
|
+
|
178
|
+
def unload_cipher data
|
179
|
+
cipher = new_cipher
|
180
|
+
cipher.decrypt
|
181
|
+
cipher.iv = data[0, 16]
|
182
|
+
cipher.key = @cipher_key
|
183
|
+
cipher.update(data[16..-1]) + cipher.final
|
184
|
+
end
|
185
|
+
|
186
|
+
def cipher_key
|
187
|
+
hmac("A red, red fox has had three socks but all have holes")
|
188
|
+
end
|
189
|
+
|
190
|
+
class OptionHash
|
191
|
+
|
192
|
+
SANITATION = [:key, :secret, :options_key]
|
193
|
+
|
194
|
+
def initialize args
|
195
|
+
@opts = sanitize args.dup
|
196
|
+
process_request_options
|
197
|
+
set_instance_variables
|
198
|
+
create_readers
|
199
|
+
end
|
200
|
+
|
201
|
+
def opts
|
202
|
+
@opts
|
203
|
+
end
|
204
|
+
|
205
|
+
def create_reader name
|
206
|
+
self.class.send(:define_method, name, &Proc.new)
|
207
|
+
end
|
208
|
+
|
209
|
+
def create_readers
|
210
|
+
@opts.keys.each do |k|
|
211
|
+
create_reader(k) { instance_variable_get "@#{k}"}
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
def set_instance_variables
|
216
|
+
@opts.each { |k, v| instance_variable_set "@#{k.to_s}", v}
|
217
|
+
end
|
218
|
+
|
219
|
+
def process_request_options
|
220
|
+
begin
|
221
|
+
p_time
|
222
|
+
rescue => e
|
223
|
+
puts e.message
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
def p_time
|
228
|
+
@opts[:expire_after] ||= default_time
|
229
|
+
@opts[:expire] = Time.now + @opts[:expire_after].to_i if @opts[:expire_after]
|
230
|
+
end
|
231
|
+
|
232
|
+
private
|
233
|
+
def sanitize args
|
234
|
+
dup_args = args
|
235
|
+
SANITATION.each do |key|
|
236
|
+
dup_args.delete(key) if args[key]
|
237
|
+
end
|
238
|
+
dup_args
|
239
|
+
end
|
240
|
+
|
241
|
+
def default_time
|
242
|
+
60 * 60 * 2
|
243
|
+
end
|
244
|
+
|
245
|
+
end
|
246
|
+
|
247
|
+
end
|
248
|
+
|
249
|
+
end
|
250
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require "simple_session/version"
|
2
|
+
require "simple_session/base.rb"
|
3
|
+
|
4
|
+
# Options
|
5
|
+
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
6
|
+
# key = options.fetch :key, 'rack.session'
|
7
|
+
# secret = options[:secret]
|
8
|
+
# options_key = options.fetch :options_key, 'rack.session.options'
|
9
|
+
|
10
|
+
module SimpleSession
|
11
|
+
|
12
|
+
class Session < Base
|
13
|
+
|
14
|
+
def initalize app, options={}
|
15
|
+
super app, options
|
16
|
+
end
|
17
|
+
|
18
|
+
def call env
|
19
|
+
super env
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'simple_session/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "simple_session"
|
8
|
+
spec.version = SimpleSession::VERSION
|
9
|
+
spec.authors = ["hayduke19us"]
|
10
|
+
spec.email = ["hayduke19us@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A simple middleware providing rack with a session cookie.}
|
13
|
+
spec.description = %q{Provides the a light version of racks session options
|
14
|
+
and honers rack's naming conventions. HMAC AES-128-CBC
|
15
|
+
encryption included}
|
16
|
+
spec.homepage = "https://github.com/hayduke19us/simple_session"
|
17
|
+
spec.license = "MIT"
|
18
|
+
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "minitest"
|
27
|
+
spec.add_development_dependency "byebug"
|
28
|
+
spec.add_development_dependency "rack-test"
|
29
|
+
spec.add_development_dependency "sinatra"
|
30
|
+
spec.add_development_dependency "timecop"
|
31
|
+
spec.add_development_dependency "minitest-focus"
|
32
|
+
|
33
|
+
spec.add_runtime_dependency "rack"
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simple_session
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- hayduke19us
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rack-test
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sinatra
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: timecop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: minitest-focus
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rack
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: "Provides the a light version of racks session options \n and
|
140
|
+
honers rack's naming conventions. HMAC AES-128-CBC \n encryption
|
141
|
+
included"
|
142
|
+
email:
|
143
|
+
- hayduke19us@gmail.com
|
144
|
+
executables: []
|
145
|
+
extensions: []
|
146
|
+
extra_rdoc_files: []
|
147
|
+
files:
|
148
|
+
- ".gitignore"
|
149
|
+
- ".travis.yml"
|
150
|
+
- CODE_OF_CONDUCT.md
|
151
|
+
- Gemfile
|
152
|
+
- LICENSE.txt
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- bin/console
|
156
|
+
- bin/setup
|
157
|
+
- lib/simple_session.rb
|
158
|
+
- lib/simple_session/base.rb
|
159
|
+
- lib/simple_session/version.rb
|
160
|
+
- simple_session.gemspec
|
161
|
+
homepage: https://github.com/hayduke19us/simple_session
|
162
|
+
licenses:
|
163
|
+
- MIT
|
164
|
+
metadata: {}
|
165
|
+
post_install_message:
|
166
|
+
rdoc_options: []
|
167
|
+
require_paths:
|
168
|
+
- lib
|
169
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
requirements: []
|
180
|
+
rubyforge_project:
|
181
|
+
rubygems_version: 2.4.5
|
182
|
+
signing_key:
|
183
|
+
specification_version: 4
|
184
|
+
summary: A simple middleware providing rack with a session cookie.
|
185
|
+
test_files: []
|