tappy 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/bin/tappy CHANGED
@@ -6,16 +6,14 @@ require 'tappy'
6
6
  host = ARGV[0] || "localhost"
7
7
  port = ARGV[1].to_i
8
8
  port = 9090 if port == 0
9
- filter_option = ARGV[2] || "foursquare"
9
+ @@filter_option = ARGV[2] || "foursquare"
10
10
 
11
11
  module Tappy
12
12
  class MyTappy < TappyBase
13
- set :twitter_host, "http://api.twitter.com"
14
- set :filter, "Tappy::AgentFilter"
15
- set :filter_options, filter_option
13
+ set :filter_options, @@filter_option
16
14
  end
17
15
  end
18
16
 
19
- puts "Start Tappy server on #{host}:#{port}, options: #{filter_option}"
17
+ puts "Start Tappy server on #{host}:#{port}, options: #{@@filter_option}"
20
18
 
21
19
  Tappy::TappyBase.run! :host => host, :port => port
@@ -1,6 +1,6 @@
1
1
  module Tappy
2
2
  class AgentFilter < Filter
3
- def filter(response)
3
+ def filter(response)
4
4
  json = JSON.parse(response.body)
5
5
  begin
6
6
  if json.class == Array
@@ -4,6 +4,7 @@ module Tappy
4
4
 
5
5
  def initialize(options)
6
6
  @options = options
7
+ puts "filter options: #{options}"
7
8
  end
8
9
 
9
10
  def filter(response)
data/lib/tappy.rb CHANGED
@@ -6,5 +6,5 @@ require 'tappy/filter/filter'
6
6
  require 'tappy/filter/agent_filter'
7
7
 
8
8
  module Tappy
9
- VERSION = '1.0.1'
9
+ VERSION = '1.0.2'
10
10
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Francis Chong