tappy 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/bin/tappy CHANGED
@@ -7,13 +7,15 @@ host = ARGV[0] || "localhost"
7
7
  port = ARGV[1].to_i
8
8
  port = 9090 if port == 0
9
9
  @@filter_option = ARGV[2] || "foursquare"
10
+ @@filter_class = ARGV[3] || "Tappy::AgentFilter"
10
11
 
11
12
  module Tappy
12
13
  class MyTappy < TappyBase
14
+ set :filter_class, @@filter_class
13
15
  set :filter_options, @@filter_option
14
16
  end
15
17
  end
16
18
 
17
- puts "Start Tappy server on #{host}:#{port}, options: #{@@filter_option}"
19
+ puts "Start Tappy server on #{host}:#{port}, options: #{@@filter_option}, filter: #{@@filter_class}"
18
20
 
19
21
  Tappy::MyTappy.run! :host => host, :port => port
@@ -6,8 +6,8 @@ require 'json'
6
6
  module Tappy
7
7
  class TappyBase < Sinatra::Base
8
8
  set :twitter_host, "http://api.twitter.com"
9
- set :filter, "Tappy::AgentFilter"
10
- set :filter_options, ENV["TAPPY_OPTIONS"] || "foursquare"
9
+ set :filter, ENV["TAPPY_FILTER_CLASS"] || "Tappy::AgentFilter"
10
+ set :filter_options, ENV["TAPPY_FILTER_OPTIONS"] || "foursquare"
11
11
 
12
12
  helpers do
13
13
  def handle_request(url, request_params={}, params={})
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.4'
9
+ VERSION = '1.0.5'
10
10
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 4
9
- version: 1.0.4
8
+ - 5
9
+ version: 1.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Francis Chong