staccato-proxy 0.0.2 → 0.1.0

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: 5c92d157ddd27707f56e4dfc270ba34f2cabc0d8
4
- data.tar.gz: 45c90eb181612e6400dafd24e4b763ab05e4fba0
3
+ metadata.gz: 20939da6bb72624f92fbad27e2a6b224dd7479bb
4
+ data.tar.gz: 55dd8d90eaed9394e18f88ea779a986f8e02a182
5
5
  SHA512:
6
- metadata.gz: b28e7f555723271b3c1874a3f7c2b9e35ee4a9cccb608f1850145821c9e0dfafd0d427532934b956c30d6aacf54ff05d685191490c3261fc0cd398dbbebc9a21
7
- data.tar.gz: 3aa6bff217f845cfc29d492a33ff78979aa0b8c0e055ac08963fccea77839aeef65f17088bdd19f23e6f7305bcfd8ace0bce0030c858d9b7d7663fd8d683f356
6
+ metadata.gz: e7bca78ef8495583c6d9f3983e18a8605e005bd7a385b23e34b468abe22a214222df40b16ae8f72e1730dd43bac40c3d786ccae5af1a9687b72014caee01983e
7
+ data.tar.gz: 4d03ca7d057436fd88c39b0978060ff532451fc2d8e6cc3c6a30702d925a387e82657aa322b5de56e5d1874cf18a5850510959e65f45e88a92bf8afd8a95b56b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## Staccato::Proxy 0.1.0 ##
2
+
3
+ * Switch to using celluloid-supervision
4
+
5
+ *Tony Pitale*
6
+
1
7
  ## Staccato::Proxy 0.0.2 ##
2
8
 
3
9
  * Fix minor bug in Listener
data/CODE_OF_CONDUCT.md CHANGED
@@ -11,12 +11,14 @@ Examples of unacceptable behavior by participants include:
11
11
  * Trolling or insulting/derogatory comments
12
12
  * Public or private harassment
13
13
  * Publishing other's private information, such as physical or electronic addresses, without explicit permission
14
- * Other unethical or unprofessional conduct.
14
+ * Other unethical or unprofessional conduct
15
15
 
16
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
16
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
17
+
18
+ By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
17
19
 
18
20
  This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
19
21
 
20
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
22
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at [INSERT EMAIL ADDRESS]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
21
23
 
22
- This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
24
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.3.0, available at [http://contributor-covenant.org/version/1/3/0/](http://contributor-covenant.org/version/1/3/0/)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Staccato::Proxy
2
2
 
3
- TODO: Write a gem description
3
+ A UDP to HTTP proxy exclusively for use with [Staccato](https://github.com/tpitale/staccato) to Google Analytics.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ `staccato-proxy --debug`
22
22
 
23
23
  ## Contributing
24
24
 
@@ -1,5 +1,6 @@
1
1
  require 'optparse'
2
2
  require 'http'
3
+ require 'celluloid/current'
3
4
  require 'celluloid/io'
4
5
 
5
6
  require "staccato/proxy/version"
@@ -4,7 +4,6 @@ module Staccato::Proxy
4
4
 
5
5
  def initialize(options)
6
6
  @options = options
7
- @group = Celluloid::SupervisionGroup.run!
8
7
  end
9
8
 
10
9
  def host
@@ -24,13 +23,24 @@ module Staccato::Proxy
24
23
  end
25
24
 
26
25
  def run
27
- @group.supervise_as(:staccato_proxy_listener, Staccato::Proxy::Listener, host, port, debug?)
28
- @group.supervise_as(:staccato_proxy_sender, Staccato::Proxy::Sender, url, debug?)
26
+ config.deploy
29
27
  self
30
28
  end
31
29
 
32
30
  def terminate
33
- @group.terminate
31
+ config.shutdown
32
+ end
33
+
34
+ private
35
+ def config
36
+ @config ||= Celluloid::Supervision::Configuration.define([
37
+ {
38
+ type: Staccato::Proxy::Listener, as: :staccato_proxy_listener, args: [host, port, debug?]
39
+ },
40
+ {
41
+ type: Staccato::Proxy::Sender, as: :staccato_proxy_sender, args: [url, debug?]
42
+ }
43
+ ])
34
44
  end
35
45
  end
36
46
  end
@@ -1,5 +1,5 @@
1
1
  module Staccato
2
2
  module Proxy
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency "http"
22
22
  spec.add_dependency "celluloid-io"
23
+ spec.add_dependency "celluloid-supervision"
23
24
 
24
25
  spec.add_development_dependency "bundler", "~> 1.6"
25
26
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staccato-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Pitale
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-06 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: celluloid-supervision
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement