rubytter 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.3
@@ -0,0 +1,25 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../lib')
2
+ require 'rubygems'
3
+ require 'rubytter'
4
+ require 'oauth'
5
+
6
+ key = ""
7
+ secret = ""
8
+
9
+ consumer = OAuth::Consumer.new(key, secret, :site => "http://twitter.com")
10
+
11
+ request_token = consumer.get_request_token
12
+ system('open', request_token.authorize_url) || puts("Access here: #{request_token.authorize_url}\nand...")
13
+
14
+ print "Enter PIN: "
15
+ pin = gets.strip
16
+
17
+ access_token = request_token.get_access_token(
18
+ :oauth_token => request_token.token,
19
+ :oauth_verifier => pin
20
+ )
21
+
22
+ client = OAuthRubytter.new(access_token)
23
+ client.friends_timeline.each do |status|
24
+ puts "#{status.user.screen_name}: #{status.text}"
25
+ end
data/lib/rubytter.rb CHANGED
@@ -256,12 +256,6 @@ class Rubytter
256
256
  def method_missing(name, *args)
257
257
  self[name]
258
258
  end
259
-
260
- def symbolize_keys!
261
- each do |key, value|
262
- self[(key.to_sym rescue key) || key] = value
263
- end
264
- end
265
259
  end
266
260
 
267
261
  data.keys.each do |k|
@@ -219,7 +219,6 @@ class Rubytter
219
219
  struct = @rubytter.structize(hash)
220
220
  struct.to_hash.should == {
221
221
  :a => "a",
222
- "b" => 1,
223
222
  :b => 1,
224
223
  :c => {:b => 2, :a => 1},
225
224
  :e => [{:b => 2, :a => 1}, {:c => "\"<>&"}],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubytter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jugyo
@@ -55,6 +55,7 @@ files:
55
55
  - examples/replies.rb
56
56
  - examples/search.rb
57
57
  - examples/update_status.rb
58
+ - examples/use_oauth.rb
58
59
  - examples/user.rb
59
60
  - lib/rubytter.rb
60
61
  - lib/rubytter/connection.rb
@@ -104,4 +105,5 @@ test_files:
104
105
  - examples/replies.rb
105
106
  - examples/search.rb
106
107
  - examples/update_status.rb
108
+ - examples/use_oauth.rb
107
109
  - examples/user.rb