graphiterb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
  $: << File.dirname(__FILE__)+'/../lib/'
3
- require 'graphite'
4
- require 'graphite/graphite_script'
3
+ require 'graphiterb'
4
+ require 'graphiterb/graphite_script'
5
5
 
6
6
  WC_EXEC = '/usr/bin/wc'
7
7
 
8
8
  class ApiCallMonitor < Graphiterb::GraphiteLogger
9
- API_CALLS_TO_MONITOR = %w(trstrank wordbag influence conversation)
10
- ERROR_CODES_TO_MONITOR = %w(4.. 5..)
9
+ API_CALLS_TO_MONITOR = %w[trstrank wordbag influence conversation]
10
+ ERROR_CODES_TO_MONITOR = %w[4.. 5..]
11
11
 
12
12
  def initialize *args
13
13
  super *args
@@ -32,10 +32,6 @@ class ApiCallMonitor < Graphiterb::GraphiteLogger
32
32
  [0, rate].max
33
33
  end
34
34
 
35
- def hostname
36
- @hostname ||= `hostname`.chomp.gsub(".","_")
37
- end
38
-
39
35
  def get_metrics metrics, iter, since
40
36
  API_CALLS_TO_MONITOR.each do |api|
41
37
  calls(api)
data/bin/file_monitor.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  $: << File.dirname(__FILE__)+'/../lib/'
3
- require 'graphite'
3
+ require 'graphiterb'
4
4
  Settings.define :work_dir, :description => "Base directory where scrapers store files. (Ex: /data/ripd/com.tw)", :required => true
5
- require 'graphite/graphite_script'
5
+ require 'graphiterb/graphite_script'
6
6
 
7
7
  #
8
8
  # Usage:
data/graphiterb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{graphiterb}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Philip (flip) Kromer (@mrflip)"]
@@ -18,6 +18,7 @@ module Graphiterb
18
18
  @socket = TCPSocket.new(Settings.carbon_server, Settings.carbon_port)
19
19
  rescue StandardError => e
20
20
  Log.warn "Couldn't connect to server #{Settings.carbon_server} port #{Settings.carbon_port}: #{e.class} #{e}"
21
+ $stderr
21
22
  end
22
23
  end
23
24
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiterb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philip (flip) Kromer (@mrflip)