tdl-client-ruby 0.10.2 → 0.11.1

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: b93a578c88c3c616ad330a44eafeb7411d43aa62
4
- data.tar.gz: 12acc2e816d8227cf5e9cc7b2a8ab3487469f555
3
+ metadata.gz: 0ee1596ba4ee2b3b0a3d9f3b2275f7fcbadc71bf
4
+ data.tar.gz: 55631f4d61fb362c51681564118fae9538529578
5
5
  SHA512:
6
- metadata.gz: 474085531afb1e04f7e634cf7561a8d0618bce4d9a9045fcc73f854b33abd3100ff742a4dff51f85970e306e3a6a345e25309f232e741c08bdab8b690bc96712
7
- data.tar.gz: 2bfcf75a710bbfe87616702ea3f7e538116411243ae54899fc730acaa1216eeadfef5b888a26d442386f104252edc2ae005e9b8674edc9b64cd3d2cda2cf6d0e
6
+ metadata.gz: 61968bfb1573a1404e1cd46874d56689a929b562ff04c41ab526228ce50645a767fff910c37e472e173e39d7800aa96a206a11b887b14bbb8537c8aa422bb2d2
7
+ data.tar.gz: bcdbe1cd98b0e9f56b8fd2d49533776ade1fc5d336db41d0df6ab9abe7db4377074c329b5954b7dd7802f77b501bd0400c28e8e9275349e7b8f20f1b63339bb9
@@ -6,25 +6,25 @@ Logging.logger.root.level = :info
6
6
 
7
7
 
8
8
  def run_client
9
- client = TDL::Client.new('localhost', 61613, 'julian')
9
+ client = TDL::Client.new( hostname: 'localhost', port: 61613, unique_id: 'julian@example.com')
10
10
  include TDL::ClientActions
11
11
  rules = TDL::ProcessingRules.new
12
12
  rules.on('display_description').call(method(:display)).then(publish)
13
- rules.on('display_required_methods').call(method(:display)).then(publish)
14
- rules.on('increment').call(method(:increment)).then(publish_and_stop)
13
+ rules.on('sum').call(method(:sum)).then(publish)
14
+ rules.on('end_round').call(lambda { 'OK' }).then(publish_and_stop)
15
15
 
16
16
  # puts processing_rules.to_yaml
17
17
 
18
18
  client.go_live_with(rules)
19
19
  end
20
20
 
21
- def display(str)
22
- puts str
21
+ def display(round, description)
22
+ puts "#{round} = #{description}"
23
23
  'OK'
24
24
  end
25
25
 
26
- def increment(x)
27
- x + 1
26
+ def sum(x, y)
27
+ x + y
28
28
  end
29
29
 
30
30
 
@@ -2,7 +2,7 @@ require 'tdl/util'
2
2
 
3
3
  module TDL
4
4
  class ValidResponse
5
- attr_reader :result, :id, :client_action
5
+ attr_reader :id, :result, :client_action
6
6
 
7
7
  def initialize(id, result, client_action)
8
8
  @id = id
data/lib/tdl/client.rb CHANGED
@@ -6,6 +6,7 @@ require 'tdl/processing_rules'
6
6
  require 'tdl/actions/stop_action'
7
7
 
8
8
  require 'tdl/serialization/json_rpc_serialization_provider'
9
+
9
10
  module TDL
10
11
 
11
12
  class Client
@@ -1,4 +1,4 @@
1
1
  module TDL
2
- PREVIOUS_VERSION = '0.10.1'
2
+ PREVIOUS_VERSION = '0.10.2'
3
3
  # the current MAJOR.MINOR version is dynamically computed from the version of the Spec
4
4
  end
@@ -7,7 +7,7 @@ module TDL
7
7
  end
8
8
 
9
9
  def subscribe(handling_strategy)
10
- @stomp_client.subscribe("/queue/#{@unique_id}.req", {:ack => 'client', 'activemq.prefetchSize' => 1}) do |msg|
10
+ @stomp_client.subscribe("/queue/#{@unique_id}.req", {:ack => 'client-individual', 'activemq.prefetchSize' => 1}) do |msg|
11
11
  request = @serialization_provider.deserialize(msg)
12
12
  handling_strategy.process_next_request_from(self, request)
13
13
  end
data/tdl-client-ruby.iml CHANGED
@@ -2,11 +2,7 @@
2
2
  <module type="RUBY_MODULE" version="4">
3
3
  <component name="FacetManager">
4
4
  <facet type="gem" name="Ruby Gem">
5
- <configuration>
6
- <option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
7
- <option name="GEM_APP_TEST_PATH" value="$MODULE_DIR$/test" />
8
- <option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
9
- </configuration>
5
+ <configuration />
10
6
  </facet>
11
7
  </component>
12
8
  <component name="NewModuleRootManager" inherit-compiler-output="true">
@@ -15,6 +11,7 @@
15
11
  <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
16
12
  <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
17
13
  <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
14
+ <excludeFolder url="file://$MODULE_DIR$/broker" />
18
15
  <excludeFolder url="file://$MODULE_DIR$/broker/.cache" />
19
16
  <excludeFolder url="file://$MODULE_DIR$/coverage" />
20
17
  </content>
@@ -53,4 +50,8 @@
53
50
  <orderEntry type="library" scope="PROVIDED" name="unf (v0.1.4, rbenv: 2.2.2) [gem]" level="application" />
54
51
  <orderEntry type="library" scope="PROVIDED" name="unf_ext (v0.0.7.1, rbenv: 2.2.2) [gem]" level="application" />
55
52
  </component>
53
+ <component name="RModuleSettingsStorage">
54
+ <LOAD_PATH number="1" string0="$MODULE_DIR$/../../tdl-warmup/ruby/lib" />
55
+ <I18N_FOLDERS number="0" />
56
+ </component>
56
57
  </module>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdl-client-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Ghionoiu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-19 00:00:00.000000000 Z
11
+ date: 2016-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stomp
@@ -221,7 +221,7 @@ homepage: https://github.com/julianghionoiu/tdl-client-ruby
221
221
  licenses:
222
222
  - GPL-3.0
223
223
  metadata:
224
- previous_version: 0.10.1
224
+ previous_version: 0.10.2
225
225
  post_install_message:
226
226
  rdoc_options: []
227
227
  require_paths: