farmstead 0.0.77 → 0.0.78

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: f8d9cf814e57468301326aabaa67dc8d3a54dfce
4
- data.tar.gz: fa9f3d9e375bd29fad966368992e31bd6d0c515c
3
+ metadata.gz: c714a55694953352e059ff37f418f1346d5c1060
4
+ data.tar.gz: 3244b536dbfd931074fc8b60d33d3a4ec9cdce08
5
5
  SHA512:
6
- metadata.gz: 33cc0b4ba3347c5288643e8b98c145787a9a169afc914a9bf4b418cf066ea3269672bc12ad6043350601a12add56537144d911e45bc0715ebc4f20ed2fa7acb9
7
- data.tar.gz: c56b21060b141d1520b1f976671e7ed6bc1187053e7c5f35b219a88b99f1d6779930994342c550802830361e9ab7b99c8a5d58ac37a29c0ff6d249fe93f91d55
6
+ metadata.gz: 5604ee77300fe7bf5648b22f7765c6b15363a2600816a348661097af237d3c054facb59754663d008dbe84b8091c44d3435cb7ae4ca81b1871508d0c06b0c7c7
7
+ data.tar.gz: 7e73f8aaa56d2da1b43e086ae6c828fa8b7e67cf26f0764b0d22f9eaa5912ed9aa1b68cdb58b0305ff029f68e7eb7e66da606fab9011676244bf8a0c928aca1f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- farmstead (0.0.77)
4
+ farmstead (0.0.78)
5
5
  httparty (~> 0.15.6)
6
6
  mechanize (~> 2.7)
7
7
  mysql2 (~> 0.4.10)
@@ -11,6 +11,18 @@ module Farmstead
11
11
  module Load
12
12
  class Service < Farmstead::Service
13
13
  def run
14
+ puts "Received: #{message.value}"
15
+ # Run the load method of the module referenced by the message
16
+ message = '{"module_name":"StopandShop","result":"Home - stop and shop"}'
17
+ obj = JSON.parse(message)
18
+ project_name = ENV["name"].capitalize
19
+ module_name = obj["module_name"]
20
+ my_module = Object.const_get "#{project_name}::#{module_name}"
21
+ puts obj["result"]
22
+ my_module::load(obj["result"])
23
+ end
24
+
25
+ def runs
14
26
  @consumer.subscribe("Road")
15
27
  trap('TERM') { @consumer.stop }
16
28
  @consumer.each_message do |message|
@@ -21,7 +33,7 @@ module Farmstead
21
33
  module_name = obj["module_name"]
22
34
  my_module = Object.const_get "#{project_name}::#{module_name}"
23
35
  puts obj["result"]
24
- result = my_module::load(obj["result"])
36
+ my_module::load(obj["result"])
25
37
  @consumer.mark_message_as_processed(message)
26
38
  end
27
39
  end
@@ -1,3 +1,3 @@
1
1
  module Farmstead
2
- VERSION = "0.0.77"
2
+ VERSION = "0.0.78"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: farmstead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.77
4
+ version: 0.0.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Jenney