tw 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.3.4 2012-10-18
2
+
3
+ * add Tw::Client::Stream sample
4
+
1
5
  === 0.3.3 2012-10-18
2
6
 
3
7
  * count 140 chars with t.co
data/Manifest.txt CHANGED
@@ -20,6 +20,7 @@ lib/tw/client/tweet.rb
20
20
  lib/tw/conf.rb
21
21
  samples/README.md
22
22
  samples/sample.rb
23
+ samples/stream.rb
23
24
  samples/update_profile_image.rb
24
25
  script/console
25
26
  script/destroy
data/lib/tw.rb CHANGED
@@ -23,7 +23,7 @@ require 'tw/client/error'
23
23
  require 'tw/client/helper'
24
24
 
25
25
  module Tw
26
- VERSION = '0.3.3'
26
+ VERSION = '0.3.4'
27
27
  class Conf
28
28
  REQUIRE_VERSION = '0.1.0'
29
29
  end
data/samples/README.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  ## Tw API
4
4
 
5
- % tw sample.rb hello woooorld
5
+ % ruby sample.rb hello woooorld
6
+
7
+
8
+ ## Tw Stream API
9
+
10
+ % ruby stream.rb
11
+
6
12
 
7
13
  ## Use Tw as front-end of twitter auth
8
14
 
data/samples/stream.rb ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ $:.unshift File.expand_path '../lib', File.dirname(__FILE__)
3
+ require 'rubygems'
4
+ require 'tw'
5
+
6
+ user = ARGV.shift
7
+ client = Tw::Client::Stream.new user
8
+
9
+ loop do
10
+ begin
11
+ client.user_stream do |m|
12
+ puts m
13
+ end
14
+ rescue StandardError, Timeout::Error => e
15
+ puts e.message
16
+ end
17
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -240,6 +240,7 @@ files:
240
240
  - lib/tw/conf.rb
241
241
  - samples/README.md
242
242
  - samples/sample.rb
243
+ - samples/stream.rb
243
244
  - samples/update_profile_image.rb
244
245
  - script/console
245
246
  - script/destroy
@@ -264,7 +265,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
264
265
  version: '0'
265
266
  segments:
266
267
  - 0
267
- hash: 1015519835812409521
268
+ hash: -48100630555256287
268
269
  required_rubygems_version: !ruby/object:Gem::Requirement
269
270
  none: false
270
271
  requirements: