ambry 0.2.2 → 0.2.3.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/Changelog.md +15 -4
- data/lib/ambry/version.rb +2 -2
- data/lib/rack/ambry.rb +5 -4
- metadata +14 -14
data/Changelog.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
# Ambry Changelog
|
2
2
|
|
3
|
-
## [0.2.
|
3
|
+
## [0.2.3](https://github.com/norman/ambry/tree/0.2.3) - 2011-10-07 ([diff](https://github.com/norman/ambry/compare/0.2.2...0.2.3))
|
4
|
+
|
5
|
+
### [Norman Clarke](https://github.com/norman)
|
6
|
+
|
7
|
+
* Make cookie adapter's cookie name configurable
|
8
|
+
|
9
|
+
### [Norman Clarke](https://github.com/norman)
|
10
|
+
|
11
|
+
* Allow middleware to accept a Proc
|
12
|
+
* Add ability to remove an adapter
|
13
|
+
|
14
|
+
## [0.2.2](https://github.com/norman/ambry/tree/0.2.2) - 2011-09-21 ([diff](https://github.com/norman/ambry/compare/0.2.1...0.2.2))
|
4
15
|
|
5
16
|
### [Norman Clarke](https://github.com/norman)
|
6
17
|
|
@@ -8,20 +19,20 @@
|
|
8
19
|
* Add ability to remove an adapter
|
9
20
|
|
10
21
|
|
11
|
-
## [0.2.1](https://github.com/norman/ambry/tree/0.2.1) -
|
22
|
+
## [0.2.1](https://github.com/norman/ambry/tree/0.2.1) - 2011-09-20 ([diff](https://github.com/norman/ambry/compare/0.2.0...0.2.1))
|
12
23
|
|
13
24
|
### [Norman Clarke](https://github.com/norman)
|
14
25
|
|
15
26
|
* Fix handling of attributes with falsy values
|
16
27
|
|
17
28
|
|
18
|
-
## [0.2.0](https://github.com/norman/ambry/tree/0.2.0) -
|
29
|
+
## [0.2.0](https://github.com/norman/ambry/tree/0.2.0) - 2011-09-05 ([diff](https://github.com/norman/ambry/compare/0.1.2...0.2.0))
|
19
30
|
|
20
31
|
### [Norman Clarke](https://github.com/norman)
|
21
32
|
|
22
33
|
* Always create a default in-memory adapter
|
23
34
|
|
24
|
-
## [0.1.2](https://github.com/norman/ambry/tree/0.1.1) -
|
35
|
+
## [0.1.2](https://github.com/norman/ambry/tree/0.1.1) - 2011-08-29 ([diff](https://github.com/norman/ambry/compare/0.1.1...0.1.2))
|
25
36
|
|
26
37
|
### [Norman Clarke](https://github.com/norman)
|
27
38
|
|
data/lib/ambry/version.rb
CHANGED
data/lib/rack/ambry.rb
CHANGED
@@ -6,16 +6,17 @@ module Rack
|
|
6
6
|
# @see Ambry::Adapters::Cookie
|
7
7
|
class Ambry
|
8
8
|
def initialize(app, options = {})
|
9
|
-
@app
|
10
|
-
options
|
9
|
+
@app = app
|
10
|
+
options = options.call if options.respond_to? :call
|
11
|
+
@cookie_name = options.delete(:cookie_name) || "ambry_data"
|
11
12
|
@ambry = ::Ambry::Adapters::Cookie.new(options.merge(:sync => true))
|
12
13
|
end
|
13
14
|
|
14
15
|
def call(env)
|
15
|
-
@ambry.data = env["rack.cookies"][
|
16
|
+
@ambry.data = env["rack.cookies"][@cookie_name]
|
16
17
|
@ambry.load_database
|
17
18
|
status, headers, body = @app.call(env)
|
18
|
-
env["rack.cookies"][
|
19
|
+
env["rack.cookies"][@cookie_name] = @ambry.export_data
|
19
20
|
[status, headers, body]
|
20
21
|
end
|
21
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ambry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3.1
|
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: 2011-
|
12
|
+
date: 2011-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffaker
|
16
|
-
requirement: &
|
16
|
+
requirement: &70355746209440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70355746209440
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: minitest
|
27
|
-
requirement: &
|
27
|
+
requirement: &70355746207640 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.2.2
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70355746207640
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: mocha
|
38
|
-
requirement: &
|
38
|
+
requirement: &70355746205360 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70355746205360
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activesupport
|
49
|
-
requirement: &
|
49
|
+
requirement: &70355746188360 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3.0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70355746188360
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: activemodel
|
60
|
-
requirement: &
|
60
|
+
requirement: &70355746185300 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '3.0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70355746185300
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
|
-
requirement: &
|
71
|
+
requirement: &70355746184180 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70355746184180
|
80
80
|
description: ! " Ambry is not an ORM, man! It's a database and ORM replacement
|
81
81
|
for (mostly)\n static models and small datasets. It provides ActiveModel compatibility,
|
82
82
|
and\n flexible searching and storage.\n"
|