rservicebus2 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd9d48db615541ba3a417e22e9d7600124c1f444
4
- data.tar.gz: 3d330bfcd2dcbb5776add8aa95aab35deea04d6e
3
+ metadata.gz: 2818f60beb961df4be8ade5166033fe205c89a44
4
+ data.tar.gz: b6c5ae95275f5245fdc762ddade45a509305d2b6
5
5
  SHA512:
6
- metadata.gz: 89c3e81247c1e61fc56edb522f35b063fa8049c1ecb669d45bc780c40ce359937ab50879711d366a5b106c2218d7c7a7583ad82c77ad88cf51dcf0887652df82
7
- data.tar.gz: 9844949ed2ac97493913598266b0a06f9c948699d52f2c473fad43f2473765a3cc647f6e31ac7582ee771ce27b87b07dc603733cad27eb09dae4d1f5d3ac88d7
6
+ metadata.gz: 07743b264253c6c62057f34ce8e54273867593a104eca5fec78aa1e1b1f31823ef9479625123133dd2fb267ba93d67f29e60919793a26e3419a207550c051ab5
7
+ data.tar.gz: c131f2da904d6468837f722e408587fd239834e816bc38720aa176a24b8d8611dd2e626d9cff1b938f84c4bc4cd57bc9af4809f020eabbe81ddf1360123d0aa9
@@ -0,0 +1,25 @@
1
+ require 'fluiddb2'
2
+
3
+ module RServiceBus2
4
+ # Implementation of an AppResource - FluidDb2
5
+ class AppResourceFluidDb2 < AppResource
6
+ def connect(uri)
7
+ FluidDb2.Db(uri)
8
+ end
9
+
10
+ # Transaction Semantics
11
+ def Begin
12
+ @connection.begin
13
+ end
14
+
15
+ # Transaction Semantics
16
+ def Commit
17
+ @connection.commit
18
+ end
19
+
20
+ # Transaction Semantics
21
+ def Rollback
22
+ @connection.rollback
23
+ end
24
+ end
25
+ end
@@ -8,15 +8,20 @@ module RServiceBus2
8
8
  # rm = resource_manager
9
9
  rm = ResourceManager.new(state_manager, saga_storage)
10
10
  env.each do |k, v|
11
- if v.is_a?(String) &&
12
- (k.start_with?('RSBFDB_') || v.index('fluiddb') == 0)
11
+ if v.is_a?(String) && k.start_with?('RSBFDB2_')
12
+ uri = URI.parse(v)
13
+ require 'rservicebus2/appresource/fluiddb2'
14
+
15
+ k = k.sub('RSBFDB2_', '')
16
+ rm.add k, AppResourceFluidDb2.new(host, uri)
17
+ elsif v.is_a?(String) &&
18
+ (k.start_with?('RSBFDB_') || v.index('fluiddb') == 0)
13
19
  v = v['fluiddb'.length..-1] if v.index('fluiddb') == 0
14
20
  uri = URI.parse(v)
15
21
  require 'rservicebus2/appresource/fluiddb'
16
22
 
17
- key = k.sub('RSBFDB_', '') if k.start_with?('RSBFDB_')
18
- key = k.sub('RSBFDB_', '') if k.start_with?('RSBFDB_')
19
- rm.add k.sub('RSBFDB_', ''), AppResourceFluidDb.new(host, uri)
23
+ k = k.sub('RSBFDB_', '') if k.start_with?('RSBFDB_')
24
+ rm.add k, AppResourceFluidDb.new(host, uri)
20
25
  elsif v.is_a?(String) && k.start_with?('RSB_')
21
26
  uri = URI.parse(v)
22
27
  case uri.scheme
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rservicebus2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guy Irvine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-29 00:00:00.000000000 Z
11
+ date: 2016-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uuidtools
@@ -96,6 +96,7 @@ files:
96
96
  - lib/rservicebus2/appresource/dir.rb
97
97
  - lib/rservicebus2/appresource/file.rb
98
98
  - lib/rservicebus2/appresource/fluiddb.rb
99
+ - lib/rservicebus2/appresource/fluiddb2.rb
99
100
  - lib/rservicebus2/appresource.rb
100
101
  - lib/rservicebus2/appresource_configure.rb
101
102
  - lib/rservicebus2/audit.rb