ambry 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,13 @@
1
1
  # Ambry Changelog
2
2
 
3
+ ## [0.2.2](https://github.com/norman/ambry/tree/0.2.2) - 2001-09-21 ([diff](https://github.com/norman/ambry/compare/0.2.1...0.2.2))
4
+
5
+ ### [Norman Clarke](https://github.com/norman)
6
+
7
+ * Allow middleware to accept a Proc
8
+ * Add ability to remove an adapter
9
+
10
+
3
11
  ## [0.2.1](https://github.com/norman/ambry/tree/0.2.1) - 2001-09-20 ([diff](https://github.com/norman/ambry/compare/0.2.0...0.2.1))
4
12
 
5
13
  ### [Norman Clarke](https://github.com/norman)
@@ -39,6 +39,16 @@ module Ambry
39
39
  end
40
40
  end
41
41
 
42
+ # Removes an adapter from Ambry.
43
+ #
44
+ # @param [Symbol] adapter The adapter name.
45
+ def remove_adapter(name)
46
+ @lock.synchronize do
47
+ adapters[name] = nil
48
+ adapters.delete name
49
+ end
50
+ end
51
+
42
52
  # Base error for Ambry.
43
53
  class AmbryError < StandardError ; end
44
54
 
@@ -2,7 +2,7 @@ module Ambry
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 1
5
+ TINY = 2
6
6
  BUILD = nil
7
7
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
8
8
  end
@@ -7,6 +7,7 @@ module Rack
7
7
  class Ambry
8
8
  def initialize(app, options = {})
9
9
  @app = app
10
+ options = options.call if options.respond_to? :call
10
11
  @ambry = ::Ambry::Adapters::Cookie.new(options.merge(:sync => true))
11
12
  end
12
13
 
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.1
4
+ version: 0.2.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: 2011-09-20 00:00:00.000000000 Z
12
+ date: 2011-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffaker
16
- requirement: &70104361299880 !ruby/object:Gem::Requirement
16
+ requirement: &70120995727480 !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: *70104361299880
24
+ version_requirements: *70120995727480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: minitest
27
- requirement: &70104361299380 !ruby/object:Gem::Requirement
27
+ requirement: &70120995726980 !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: *70104361299380
35
+ version_requirements: *70120995726980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mocha
38
- requirement: &70104361298940 !ruby/object:Gem::Requirement
38
+ requirement: &70120995726500 !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: *70104361298940
46
+ version_requirements: *70120995726500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activesupport
49
- requirement: &70104361298360 !ruby/object:Gem::Requirement
49
+ requirement: &70120995725740 !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: *70104361298360
57
+ version_requirements: *70120995725740
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: activemodel
60
- requirement: &70104361297820 !ruby/object:Gem::Requirement
60
+ requirement: &70120995725200 !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: *70104361297820
68
+ version_requirements: *70120995725200
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
- requirement: &70104361297440 !ruby/object:Gem::Requirement
71
+ requirement: &70120995724220 !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: *70104361297440
79
+ version_requirements: *70120995724220
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"