bumbleworks 0.0.46 → 0.0.47

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.
@@ -14,6 +14,10 @@ module Bumbleworks
14
14
 
15
15
  def new_storage(storage)
16
16
  raise UnsupportedStorage unless use?(storage)
17
+ wrap_storage_with_driver(storage)
18
+ end
19
+
20
+ def wrap_storage_with_driver(storage)
17
21
  driver.new(storage)
18
22
  end
19
23
 
@@ -1,3 +1,3 @@
1
1
  module Bumbleworks
2
- VERSION = "0.0.46"
2
+ VERSION = "0.0.47"
3
3
  end
@@ -42,10 +42,10 @@ describe 'History storage' do
42
42
  end
43
43
 
44
44
  it 'keeps history of messages' do
45
- Bumbleworks.dashboard.history.by_date(Date.today).should be_empty
45
+ Bumbleworks.dashboard.history.all.should be_empty
46
46
  wfid = Bumbleworks.launch!('make_honey')
47
47
  Bumbleworks.dashboard.wait_for(:dave)
48
- Bumbleworks.dashboard.history.by_date(Date.today).should_not be_empty
48
+ Bumbleworks.dashboard.history.all.should_not be_empty
49
49
  Bumbleworks.dashboard.history.wfids.should include(wfid)
50
50
  end
51
51
  end
@@ -5,7 +5,7 @@ describe Bumbleworks::HashStorage do
5
5
  end
6
6
 
7
7
  it 'is a Bumbleworks::StorageAdapter' do
8
- described_class.is_a? Bumbleworks::StorageAdapter
8
+ described_class.superclass.should == Bumbleworks::StorageAdapter
9
9
  end
10
10
  end
11
11
  end
@@ -52,13 +52,23 @@ describe Bumbleworks::StorageAdapter do
52
52
  end
53
53
  end
54
54
 
55
- describe '.new_storage' do
55
+ describe '.wrap_storage_with_driver' do
56
56
  before :each do
57
57
  storage_driver = double('storage_driver')
58
58
  storage_driver.stub(:new).with(:awesome_stuff).and_return(:new_storage)
59
59
  described_class.stub(:driver => storage_driver)
60
60
  end
61
61
 
62
+ it 'returns driven storage' do
63
+ described_class.wrap_storage_with_driver(:awesome_stuff).should == :new_storage
64
+ end
65
+ end
66
+
67
+ describe '.new_storage' do
68
+ before :each do
69
+ described_class.stub(:wrap_storage_with_driver).with(:awesome_stuff).and_return(:new_storage)
70
+ end
71
+
62
72
  it 'returns driven storage if driver can use storage' do
63
73
  described_class.stub(:use?).with(:awesome_stuff).and_return(true)
64
74
  described_class.new_storage(:awesome_stuff).should == :new_storage
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bumbleworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.46
4
+ version: 0.0.47
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-12-02 00:00:00.000000000 Z
15
+ date: 2013-12-05 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: ruote