carnivore-actor 0.1.2 → 0.1.4

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 30d7522c172bc94dde59f5939927b1e3ea7b3f55
4
+ data.tar.gz: 1a188952e214d5a4d4c9d349b55b5935a219ca21
5
+ SHA512:
6
+ metadata.gz: 692a0903394293c59eaafac45bb7b73beac87facd0ee9330ee861334bf427b73b65f0972679b5a483ca06d2c2410f7639be9146d9271a29e67e4f112a3f9402d
7
+ data.tar.gz: 573d3f573f40c5d482873b9c62f21af87305bdd8cc5b7c1e0daca671e58e374839347a6f84cfbee84e2b79aaf3e4098ca3d98e8ef6f3c14af1c4463016f6e35d
@@ -1,3 +1,6 @@
1
+ # v0.1.4
2
+ * Allow specifying name for transmission
3
+
1
4
  # v0.1.2
2
5
  * Update tests
3
6
  * Fill out docs
data/README.md CHANGED
@@ -4,6 +4,8 @@ Provides Actor `Carnivore::Source`
4
4
 
5
5
  # Usage
6
6
 
7
+ ## Basic
8
+
7
9
  ```ruby
8
10
  require 'carnivore'
9
11
  require 'carnivore-actor'
@@ -13,6 +15,19 @@ Carnivore.configure do
13
15
  end
14
16
  ```
15
17
 
18
+ ## Specify destination name
19
+
20
+ ```
21
+ Carnivore.configure do
22
+ source = Carnivore::Source.build(
23
+ :type => :actor,
24
+ :args => {
25
+ :name => 'source_name'
26
+ }
27
+ )
28
+ end
29
+ ```
30
+
16
31
  # Info
17
32
  * Carnivore: https://github.com/carnivore-rb/carnivore
18
33
  * Repository: https://github.com/carnivore-rb/carnivore-actor
@@ -25,10 +25,17 @@ module Carnivore
25
25
  #
26
26
  # @param payload [Object]
27
27
  # @return [TrueClass]
28
+ # @note if `:remote_name` exists in arguments, transmission
29
+ # is made to "remote" source instead of self (jackal hack)
28
30
  def transmit(payload, *args)
29
- @messages << payload
30
- signal(:available_messages)
31
- true
31
+ if(arguments[:source_name])
32
+ Carnivore::Supervisor.supervisor[arguments[:remote_name]].transmit(payload)
33
+ true
34
+ else
35
+ @messages << payload
36
+ signal(:available_messages)
37
+ true
38
+ end
32
39
  end
33
40
 
34
41
  # Get current messages and clear store
@@ -1,9 +1,6 @@
1
1
  module Carnivore
2
2
  module Actor
3
- # Custom version class
4
- class Version < Gem::Version
5
- end
6
3
  # Current version of library
7
- VERSION = Version.new('0.1.2')
4
+ VERSION = Gem::Version.new('0.1.4')
8
5
  end
9
6
  end
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carnivore-actor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Chris Roberts
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-05-13 00:00:00.000000000 Z
11
+ date: 2014-10-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: carnivore
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>'
17
+ - - ">"
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.1.10
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>'
24
+ - - ">"
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.1.10
30
27
  description: Carnivore actor source
@@ -33,41 +30,40 @@ executables: []
33
30
  extensions: []
34
31
  extra_rdoc_files: []
35
32
  files:
33
+ - CHANGELOG.md
34
+ - CONTRIBUTING.md
35
+ - Gemfile
36
+ - LICENSE
37
+ - README.md
36
38
  - carnivore-actor.gemspec
37
- - lib/carnivore-actor/version.rb
38
- - lib/carnivore-actor/actor.rb
39
39
  - lib/carnivore-actor.rb
40
+ - lib/carnivore-actor/actor.rb
41
+ - lib/carnivore-actor/version.rb
40
42
  - test/spec.rb
41
43
  - test/specs/actor.rb
42
- - Gemfile
43
- - README.md
44
- - LICENSE
45
- - CHANGELOG.md
46
- - CONTRIBUTING.md
47
44
  homepage: https://github.com/carnivore-rb/carnivore-actor
48
45
  licenses:
49
46
  - Apache 2.0
47
+ metadata: {}
50
48
  post_install_message:
51
49
  rdoc_options: []
52
50
  require_paths:
53
51
  - lib
54
52
  required_ruby_version: !ruby/object:Gem::Requirement
55
- none: false
56
53
  requirements:
57
- - - ! '>='
54
+ - - ">="
58
55
  - !ruby/object:Gem::Version
59
56
  version: '0'
60
57
  required_rubygems_version: !ruby/object:Gem::Requirement
61
- none: false
62
58
  requirements:
63
- - - ! '>='
59
+ - - ">="
64
60
  - !ruby/object:Gem::Version
65
61
  version: '0'
66
62
  requirements: []
67
63
  rubyforge_project:
68
- rubygems_version: 1.8.24
64
+ rubygems_version: 2.2.2
69
65
  signing_key:
70
- specification_version: 3
66
+ specification_version: 4
71
67
  summary: Message processing helper
72
68
  test_files: []
73
69
  has_rdoc: