farmstead 0.0.61 → 0.0.62

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: a8dda3a19384b9083e12d25405d93a1f8f12e9de
4
- data.tar.gz: 95b6cdfd98b1120e9157e8b6afec30ea9904c48f
3
+ metadata.gz: 4bfd23b610c05e88e9b75115d4895cd02481b479
4
+ data.tar.gz: f6f890f173573f3a6183986bc92d73ed22d7ba1a
5
5
  SHA512:
6
- metadata.gz: a24a54807ac7533ad6fb3430b420fb3f0ae5a99bd6e09056bc1788447819d025b441e4e14b0868ac57f229096bdcc9a43883fa1c6ef8d701769c0c561b6776f3
7
- data.tar.gz: 78462a832ef3e0b50946d83f8cc4f656547824d179a1edf1c8d6e0734ba2a66824f2290c97c83842124f2b5273e0bab2bf2131ff766a113c983249f00a2bb186
6
+ metadata.gz: 1a1d4b673abe3bff43af27a8ce929272868a69ceedd67d4c91fec5c53e3003b6a08fa3742e174523ce24b99bfd4c88a62d98c199bcf2660d26a049c72a9d5d5b
7
+ data.tar.gz: 329539a361733799925c103c2199bf1daab777ddbc98cb342a16d6b023a9b9f1cf6170a0ed9adbf80295f4c8201915de103da9fe1ee884e74a7cbd74b8b22399
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- farmstead (0.0.61)
4
+ farmstead (0.0.62)
5
5
  httparty (~> 0.15.6)
6
6
  mechanize (~> 2.7)
7
7
  mysql2 (~> 0.4.10)
@@ -15,9 +15,9 @@ module Farmstead
15
15
  trap('TERM') { @consumer.stop }
16
16
  @consumer.each_message do |message|
17
17
  puts "Received: #{message.value}"
18
- # Run the extract method of the module referenced by the message
19
- obj = JSON.parse(message.value)
20
- my_module = Object.const_get "<%= ENV['name'].capitalize %>::#{obj["module"]}"
18
+ # The Field message only contains the module name
19
+ module_name = JSON.parse(message.value)
20
+ my_module = Object.const_get "<%= ENV['name'].capitalize %>::#{module_name}"
21
21
  result = my_module::extract
22
22
  Farmstead::DB.insert("test",result: result)
23
23
  @producer.produce(result, topic: "Forest")
@@ -27,9 +27,9 @@ module Farmstead
27
27
  # Cycle thru sources, pull config and pass to Kafka
28
28
  sources = Farmstead::DB.select_all("sources")
29
29
  sources.each do |source|
30
- result = source["config"]
31
- puts result
32
- @producer.produce(result, topic: "Field")
30
+ module_name = source["module"]
31
+ puts module_name
32
+ @producer.produce(module_name, topic: "Field")
33
33
  @producer.deliver_messages
34
34
  end
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module Farmstead
2
- VERSION = "0.0.61"
2
+ VERSION = "0.0.62"
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.61
4
+ version: 0.0.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Jenney