tweetstream 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of tweetstream might be problematic. Click here for more details.

@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b9a936abc485ff966804cb2a205338218d7e92c7
4
+ data.tar.gz: 6d6f9be166c5529da1bd3a27d1802d5013eca136
5
+ SHA512:
6
+ metadata.gz: 77d559d5782ce0bd26690789d7d03a546d70c9c94cdd25966cedeabfeb8de78f31110679b7189c48051f785493dc07207956b2871fba91609805996280d7bf66
7
+ data.tar.gz: 353aa44d4b0cce68586155056c103462901205c05ce003920f5bf05e364232a7d1ff28ef9f7b51e3f1f66be682c77004071e16153c95f9d86c3037368b8940e6
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Intridea, Inc.
1
+ Copyright (c) 2012-2013 Intridea, Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,9 +1,18 @@
1
- # TweetStream [![Build Status](https://secure.travis-ci.org/intridea/tweetstream.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/intridea/tweetstream.png?travis)][gemnasium] [![Code Climate](https://codeclimate.com/badge.png)][codeclimate]
2
- TweetStream provides simple Ruby access to [Twitter's Streaming API](https://dev.twitter.com/docs/streaming-api).
1
+ # TweetStream
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/tweetstream.png)][gem]
4
+ [![Build Status](https://secure.travis-ci.org/intridea/tweetstream.png?branch=master)][travis]
5
+ [![Dependency Status](https://gemnasium.com/intridea/tweetstream.png?travis)][gemnasium]
6
+ [![Code Climate](https://codeclimate.com/github/intridea/tweetstream.png)][codeclimate]
7
+ [![Coverage Status](https://coveralls.io/repos/intridea/tweetstream/badge.png?branch=master)][coveralls]
3
8
 
9
+ [gem]: https://rubygems.org/gems/tweetstream
4
10
  [travis]: http://travis-ci.org/intridea/tweetstream
5
11
  [gemnasium]: https://gemnasium.com/intridea/tweetstream
6
12
  [codeclimate]: https://codeclimate.com/github/intridea/tweetstream
13
+ [coveralls]: https://coveralls.io/r/intridea/tweetstream
14
+
15
+ TweetStream provides simple Ruby access to [Twitter's Streaming API](https://dev.twitter.com/docs/streaming-api).
7
16
 
8
17
  ## Installation
9
18
 
@@ -53,7 +62,8 @@ with the methods available on the Streaming API wiki page.
53
62
 
54
63
  ## Changes in 2.0
55
64
 
56
- TweetStream 2.0 introduces a number of requested features and bug fixes. For the complete list refer to the [changelog](https://github.com/intridea/tweetstream/blob/master/CHANGELOG.md#version-200). Notable
65
+ TweetStream 2.0 introduces a number of requested features and bug fixes. For
66
+ the complete list refer to the [changelog](CHANGELOG.md#version-200). Notable
57
67
  additions in 2.0 include:
58
68
 
59
69
  ### OAuth
@@ -328,6 +338,18 @@ end
328
338
  If you put the above into a script and run the script with `ruby scriptname.rb`,
329
339
  you will see a list of daemonization commands such as start, stop, and run.
330
340
 
341
+ ## Proxy Support
342
+
343
+ TweetStream supports a configurable proxy:
344
+
345
+ ```ruby
346
+ TweetStream.configure do |config|
347
+ config.proxy = { :uri => 'http://myproxy:8081' }
348
+ end
349
+ ```
350
+
351
+ Your proxy will now be used for all connections.
352
+
331
353
  ## REST
332
354
 
333
355
  To access the Twitter REST API, we recommend the [Twitter][] gem.
@@ -343,4 +365,5 @@ To access the Twitter REST API, we recommend the [Twitter][] gem.
343
365
 
344
366
  ## Copyright
345
367
 
346
- Copyright (c) 2012 Intridea, Inc. (http://www.intridea.com/). See [LICENSE](https://github.com/intridea/tweetstream/blob/master/LICENSE.md) for details.
368
+ Copyright (c) 2012-2013 Intridea, Inc. (http://www.intridea.com/). See
369
+ [LICENSE](LICENSE.md) for details.
@@ -555,7 +555,8 @@ module TweetStream
555
555
  :method => (options.delete(:method) || 'get').to_s.upcase,
556
556
  :user_agent => user_agent,
557
557
  :on_inited => inited_proc,
558
- :params => normalize_filter_parameters(options)
558
+ :params => normalize_filter_parameters(options),
559
+ :proxy => proxy
559
560
  }.merge(extra_stream_parameters).merge(auth_params)
560
561
 
561
562
  [stream_params, callbacks]
@@ -10,6 +10,7 @@ module TweetStream
10
10
  :password,
11
11
  :user_agent,
12
12
  :auth_method,
13
+ :proxy,
13
14
  :consumer_key,
14
15
  :consumer_secret,
15
16
  :oauth_token,
@@ -33,6 +34,8 @@ module TweetStream
33
34
  # The default authentication method
34
35
  DEFAULT_AUTH_METHOD = :oauth
35
36
 
37
+ DEFAULT_PROXY = nil
38
+
36
39
  VALID_FORMATS = [
37
40
  :basic,
38
41
  :oauth].freeze
@@ -78,6 +81,7 @@ module TweetStream
78
81
  self.password = DEFAULT_PASSWORD
79
82
  self.user_agent = DEFAULT_USER_AGENT
80
83
  self.auth_method = DEFAULT_AUTH_METHOD
84
+ self.proxy = DEFAULT_PROXY
81
85
  self.consumer_key = DEFAULT_CONSUMER_KEY
82
86
  self.consumer_secret = DEFAULT_CONSUMER_SECRET
83
87
  self.oauth_token = DEFAULT_OAUTH_TOKEN
@@ -1,3 +1,3 @@
1
1
  module TweetStream
2
- VERSION = '2.4.0' unless defined?(TweetStream::VERSION)
2
+ VERSION = '2.5.0' unless defined?(TweetStream::VERSION)
3
3
  end
@@ -1,10 +1,11 @@
1
- unless ENV['CI']
2
- require 'simplecov'
3
- SimpleCov.start do
4
- add_group 'Tweetstream', 'lib/tweetstream'
5
- add_group 'Specs', 'spec'
6
- end
7
- end
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+
4
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
+ SimpleCov::Formatter::HTMLFormatter,
6
+ Coveralls::SimpleCov::Formatter
7
+ ]
8
+ SimpleCov.start
8
9
 
9
10
  require 'tweetstream'
10
11
  require 'tweetstream/site_stream_client'
@@ -13,10 +14,16 @@ require 'rspec'
13
14
  require 'webmock/rspec'
14
15
  require 'yajl'
15
16
 
17
+ WebMock.disable_net_connect!(:allow => 'coveralls.io')
18
+
16
19
  RSpec.configure do |config|
17
20
  config.expect_with :rspec do |c|
18
21
  c.syntax = :expect
19
22
  end
23
+
24
+ config.after(:each) do
25
+ TweetStream.reset
26
+ end
20
27
  end
21
28
 
22
29
  def samples(fixture)
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'helper'
2
2
 
3
3
  describe TweetStream::Client do
4
4
  before do
@@ -39,7 +39,8 @@ describe TweetStream::Client do
39
39
  :basic => {
40
40
  :username => 'tweetstream',
41
41
  :password => 'rubygem'
42
- }
42
+ },
43
+ :proxy => nil
43
44
  ).and_return(@stream)
44
45
 
45
46
  @client.track('monday')
@@ -71,7 +72,8 @@ describe TweetStream::Client do
71
72
  :consumer_secret => 'abcdefghijklmnopqrstuvwxyz',
72
73
  :token => '123456789',
73
74
  :token_secret => 'abcdefghijklmnopqrstuvwxyz'
74
- }
75
+ },
76
+ :proxy => nil
75
77
  ).and_return(@stream)
76
78
 
77
79
  @client.track('monday')
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'helper'
2
2
 
3
3
  describe TweetStream::Client do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'helper'
2
2
 
3
3
  describe TweetStream::Client do
4
4
  before(:each) do
@@ -46,6 +46,16 @@ describe TweetStream::Client do
46
46
  @client.track('abc', :inited => Proc.new { })
47
47
  end
48
48
 
49
+ describe 'proxy usage' do
50
+ it 'connects with a proxy' do
51
+ @client = TweetStream::Client.new(:proxy => { :uri => 'http://someproxy:8081'})
52
+ EM::Twitter::Client.should_receive(:connect).
53
+ with(hash_including(:proxy => { :uri => 'http://someproxy:8081'})).and_return(@stream)
54
+ @stream.should_receive(:each).and_return
55
+ @client.track('abc')
56
+ end
57
+ end
58
+
49
59
  describe "#each" do
50
60
  it "calls the appropriate parser" do
51
61
  @client = TweetStream::Client.new
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'helper'
2
2
 
3
3
  describe TweetStream::Client do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'helper'
2
2
 
3
3
  describe TweetStream::Daemon do
4
4
  describe ".new" do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'helper'
2
2
 
3
3
  describe TweetStream::SiteStreamClient do
4
4
  before do
@@ -1,9 +1,6 @@
1
- require 'spec_helper'
1
+ require 'helper'
2
2
 
3
3
  describe TweetStream do
4
- after do
5
- TweetStream.reset
6
- end
7
4
 
8
5
  context "when delegating to a client" do
9
6
  before do
@@ -117,4 +114,16 @@ describe TweetStream do
117
114
  end
118
115
  end
119
116
 
117
+ describe '.proxy' do
118
+ it 'returns the default proxy' do
119
+ expect(TweetStream.proxy).to eq(TweetStream::Configuration::DEFAULT_PROXY)
120
+ end
121
+ end
122
+
123
+ describe '.proxy=' do
124
+ it 'sets the proxy' do
125
+ TweetStream.proxy = { :uri => 'http://someproxy:8081' }
126
+ expect(TweetStream.proxy).to be_kind_of(Hash)
127
+ end
128
+ end
120
129
  end
@@ -1,5 +1,7 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/tweetstream/version', __FILE__)
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'tweetstream/version'
3
5
 
4
6
  Gem::Specification.new do |spec|
5
7
  spec.name = 'tweetstream'
@@ -15,17 +17,14 @@ Gem::Specification.new do |spec|
15
17
  spec.add_dependency 'daemons', '~> 1.1'
16
18
  spec.add_dependency 'em-twitter', '~> 0.2'
17
19
  spec.add_dependency 'em-http-request', '~> 1.0.2'
18
- spec.add_dependency 'twitter', '~> 4.0'
20
+ spec.add_dependency 'twitter', '~> 4.5'
19
21
  spec.add_dependency 'yajl-ruby', '~> 1.1'
22
+ spec.add_development_dependency 'bundler', '~> 1.0'
20
23
 
21
- spec.add_development_dependency 'guard-rspec'
22
- spec.add_development_dependency 'kramdown'
23
- spec.add_development_dependency 'pry'
24
- spec.add_development_dependency 'pry-debugger'
25
- spec.add_development_dependency 'simplecov'
24
+ spec.files = %w(.yardopts CHANGELOG.md CONTRIBUTING.md LICENSE.md README.md Rakefile tweetstream.gemspec)
25
+ spec.files += Dir.glob("lib/**/*.rb")
26
+ spec.files += Dir.glob("spec/**/*")
27
+ spec.test_files = Dir.glob("spec/**/*")
26
28
 
27
- spec.files = `git ls-files`.split("\n")
28
- spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
29
- spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
30
29
  spec.require_paths = ["lib"]
31
30
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweetstream
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 2.4.0
4
+ version: 2.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Bleigh
@@ -10,168 +9,92 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-12-16 00:00:00.000000000 Z
12
+ date: 2013-03-24 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- version_requirements: !ruby/object:Gem::Requirement
15
+ name: daemons
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.1'
21
- none: false
22
- name: daemons
23
21
  type: :runtime
24
22
  prerelease: false
25
- requirement: !ruby/object:Gem::Requirement
23
+ version_requirements: !ruby/object:Gem::Requirement
26
24
  requirements:
27
25
  - - ~>
28
26
  - !ruby/object:Gem::Version
29
27
  version: '1.1'
30
- none: false
31
28
  - !ruby/object:Gem::Dependency
32
- version_requirements: !ruby/object:Gem::Requirement
29
+ name: em-twitter
30
+ requirement: !ruby/object:Gem::Requirement
33
31
  requirements:
34
32
  - - ~>
35
33
  - !ruby/object:Gem::Version
36
34
  version: '0.2'
37
- none: false
38
- name: em-twitter
39
35
  type: :runtime
40
36
  prerelease: false
41
- requirement: !ruby/object:Gem::Requirement
37
+ version_requirements: !ruby/object:Gem::Requirement
42
38
  requirements:
43
39
  - - ~>
44
40
  - !ruby/object:Gem::Version
45
41
  version: '0.2'
46
- none: false
47
42
  - !ruby/object:Gem::Dependency
48
- version_requirements: !ruby/object:Gem::Requirement
43
+ name: em-http-request
44
+ requirement: !ruby/object:Gem::Requirement
49
45
  requirements:
50
46
  - - ~>
51
47
  - !ruby/object:Gem::Version
52
48
  version: 1.0.2
53
- none: false
54
- name: em-http-request
55
49
  type: :runtime
56
50
  prerelease: false
57
- requirement: !ruby/object:Gem::Requirement
51
+ version_requirements: !ruby/object:Gem::Requirement
58
52
  requirements:
59
53
  - - ~>
60
54
  - !ruby/object:Gem::Version
61
55
  version: 1.0.2
62
- none: false
63
56
  - !ruby/object:Gem::Dependency
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ~>
67
- - !ruby/object:Gem::Version
68
- version: '4.0'
69
- none: false
70
57
  name: twitter
71
- type: :runtime
72
- prerelease: false
73
58
  requirement: !ruby/object:Gem::Requirement
74
59
  requirements:
75
60
  - - ~>
76
61
  - !ruby/object:Gem::Version
77
- version: '4.0'
78
- none: false
79
- - !ruby/object:Gem::Dependency
62
+ version: '4.5'
63
+ type: :runtime
64
+ prerelease: false
80
65
  version_requirements: !ruby/object:Gem::Requirement
81
66
  requirements:
82
67
  - - ~>
83
68
  - !ruby/object:Gem::Version
84
- version: '1.1'
85
- none: false
69
+ version: '4.5'
70
+ - !ruby/object:Gem::Dependency
86
71
  name: yajl-ruby
87
- type: :runtime
88
- prerelease: false
89
72
  requirement: !ruby/object:Gem::Requirement
90
73
  requirements:
91
74
  - - ~>
92
75
  - !ruby/object:Gem::Version
93
76
  version: '1.1'
94
- none: false
95
- - !ruby/object:Gem::Dependency
96
- version_requirements: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - ! '>='
99
- - !ruby/object:Gem::Version
100
- version: '0'
101
- none: false
102
- name: guard-rspec
103
- type: :development
77
+ type: :runtime
104
78
  prerelease: false
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- none: false
111
- - !ruby/object:Gem::Dependency
112
79
  version_requirements: !ruby/object:Gem::Requirement
113
80
  requirements:
114
- - - ! '>='
115
- - !ruby/object:Gem::Version
116
- version: '0'
117
- none: false
118
- name: kramdown
119
- type: :development
120
- prerelease: false
121
- requirement: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ! '>='
81
+ - - ~>
124
82
  - !ruby/object:Gem::Version
125
- version: '0'
126
- none: false
83
+ version: '1.1'
127
84
  - !ruby/object:Gem::Dependency
128
- version_requirements: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - ! '>='
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
- none: false
134
- name: pry
135
- type: :development
136
- prerelease: false
85
+ name: bundler
137
86
  requirement: !ruby/object:Gem::Requirement
138
87
  requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- none: false
143
- - !ruby/object:Gem::Dependency
144
- version_requirements: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - ! '>='
88
+ - - ~>
147
89
  - !ruby/object:Gem::Version
148
- version: '0'
149
- none: false
150
- name: pry-debugger
90
+ version: '1.0'
151
91
  type: :development
152
92
  prerelease: false
153
- requirement: !ruby/object:Gem::Requirement
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
- none: false
159
- - !ruby/object:Gem::Dependency
160
93
  version_requirements: !ruby/object:Gem::Requirement
161
94
  requirements:
162
- - - ! '>='
163
- - !ruby/object:Gem::Version
164
- version: '0'
165
- none: false
166
- name: simplecov
167
- type: :development
168
- prerelease: false
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ! '>='
95
+ - - ~>
172
96
  - !ruby/object:Gem::Version
173
- version: '0'
174
- none: false
97
+ version: '1.0'
175
98
  description: TweetStream is a simple wrapper for consuming the Twitter Streaming API.
176
99
  email:
177
100
  - michael@intridea.com
@@ -180,33 +103,19 @@ executables: []
180
103
  extensions: []
181
104
  extra_rdoc_files: []
182
105
  files:
183
- - .document
184
- - .gemtest
185
- - .gitignore
186
- - .rspec
187
- - .travis.yml
188
106
  - .yardopts
189
107
  - CHANGELOG.md
190
108
  - CONTRIBUTING.md
191
- - Gemfile
192
- - Guardfile
193
109
  - LICENSE.md
194
110
  - README.md
195
111
  - Rakefile
196
- - examples/growl_daemon.rb
197
- - examples/oauth.rb
198
- - examples/sitestream.rb
199
- - examples/userstream.rb
200
- - gemfiles/twitter4_0.gemfile
201
- - gemfiles/twitter4_1.gemfile
202
- - gemfiles/twitter4_2.gemfile
203
- - gemfiles/twitter4_3.gemfile
204
- - lib/tweetstream.rb
112
+ - tweetstream.gemspec
205
113
  - lib/tweetstream/client.rb
206
114
  - lib/tweetstream/configuration.rb
207
115
  - lib/tweetstream/daemon.rb
208
116
  - lib/tweetstream/site_stream_client.rb
209
117
  - lib/tweetstream/version.rb
118
+ - lib/tweetstream.rb
210
119
  - spec/fixtures/delete.json
211
120
  - spec/fixtures/direct_messages.json
212
121
  - spec/fixtures/favorite.json
@@ -218,7 +127,7 @@ files:
218
127
  - spec/fixtures/status_withheld.json
219
128
  - spec/fixtures/statuses.json
220
129
  - spec/fixtures/user_withheld.json
221
- - spec/spec_helper.rb
130
+ - spec/helper.rb
222
131
  - spec/tweetstream/client_authentication_spec.rb
223
132
  - spec/tweetstream/client_site_stream_spec.rb
224
133
  - spec/tweetstream/client_spec.rb
@@ -226,31 +135,29 @@ files:
226
135
  - spec/tweetstream/daemon_spec.rb
227
136
  - spec/tweetstream/site_stream_client_spec.rb
228
137
  - spec/tweetstream_spec.rb
229
- - tweetstream.gemspec
230
138
  homepage: http://github.com/intridea/tweetstream
231
139
  licenses:
232
140
  - MIT
141
+ metadata: {}
233
142
  post_install_message:
234
143
  rdoc_options: []
235
144
  require_paths:
236
145
  - lib
237
146
  required_ruby_version: !ruby/object:Gem::Requirement
238
147
  requirements:
239
- - - ! '>='
148
+ - - '>='
240
149
  - !ruby/object:Gem::Version
241
150
  version: '0'
242
- none: false
243
151
  required_rubygems_version: !ruby/object:Gem::Requirement
244
152
  requirements:
245
- - - ! '>='
153
+ - - '>='
246
154
  - !ruby/object:Gem::Version
247
155
  version: '0'
248
- none: false
249
156
  requirements: []
250
157
  rubyforge_project:
251
- rubygems_version: 1.8.23
158
+ rubygems_version: 2.0.0
252
159
  signing_key:
253
- specification_version: 3
160
+ specification_version: 4
254
161
  summary: TweetStream is a simple wrapper for consuming the Twitter Streaming API.
255
162
  test_files:
256
163
  - spec/fixtures/delete.json
@@ -264,7 +171,7 @@ test_files:
264
171
  - spec/fixtures/status_withheld.json
265
172
  - spec/fixtures/statuses.json
266
173
  - spec/fixtures/user_withheld.json
267
- - spec/spec_helper.rb
174
+ - spec/helper.rb
268
175
  - spec/tweetstream/client_authentication_spec.rb
269
176
  - spec/tweetstream/client_site_stream_spec.rb
270
177
  - spec/tweetstream/client_spec.rb
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/.gemtest DELETED
File without changes
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- *.sw?
2
- .DS_Store
3
- coverage
4
- rdoc
5
- pkg
6
- Gemfile.lock
7
- coverage/*
8
- .yardoc/*
9
- doc/*
10
- .bundle
11
- .swp
12
- .idea
13
- .rvmrc
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --fail-fast
3
- --order random
@@ -1,16 +0,0 @@
1
- bundler_args: --without development
2
- language: ruby
3
- matrix:
4
- allow_failures:
5
- - rvm: ruby-head
6
- rvm:
7
- - 1.8.7
8
- - 1.9.2
9
- - 1.9.3
10
- - ruby-head
11
- gemfile:
12
- - Gemfile
13
- - gemfiles/twitter4_0.gemfile
14
- - gemfiles/twitter4_1.gemfile
15
- - gemfiles/twitter4_2.gemfile
16
- - gemfiles/twitter4_3.gemfile
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- source :rubygems
2
-
3
- gem 'rake'
4
- gem 'yard'
5
- gem 'json', :platforms => :ruby_18
6
-
7
- group :test do
8
- gem 'rspec'
9
- gem 'webmock'
10
- end
11
-
12
- gemspec
data/Guardfile DELETED
@@ -1,10 +0,0 @@
1
- # A sample Guardfile
2
- # More info at https://github.com/guard/guard#readme
3
-
4
- guard 'rspec', :version => 2 do
5
- watch(%r{^spec/.+_spec\.rb$})
6
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
7
- watch('spec/spec_helper.rb') { "spec/" }
8
- watch('spec/data/.+') { "spec/" }
9
- end
10
-
@@ -1,18 +0,0 @@
1
- require 'rubygems'
2
- require 'tweetstream'
3
- require 'growl'
4
-
5
- tracks = 'yankees'
6
- puts "Starting a TweetStream Daemon to track: #{tracks}"
7
-
8
- TweetStream.configure do |config|
9
- config.consumer_key = 'abcdefghijklmnopqrstuvwxyz'
10
- config.consumer_secret = '0123456789'
11
- config.oauth_token = 'abcdefghijklmnopqrstuvwxyz'
12
- config.oauth_token_secret = '0123456789'
13
- config.auth_method = :oauth
14
- end
15
-
16
- TweetStream::Daemon.new('tracker').track(tracks) do |status|
17
- Growl.notify status.text, :title => status.user.screen_name
18
- end
@@ -1,19 +0,0 @@
1
- require 'tweetstream'
2
-
3
- TweetStream.configure do |config|
4
- config.consumer_key = 'abcdefghijklmnopqrstuvwxyz'
5
- config.consumer_secret = '0123456789'
6
- config.oauth_token = 'abcdefghijklmnopqrstuvwxyz'
7
- config.oauth_token_secret = '0123456789'
8
- config.auth_method = :oauth
9
- end
10
-
11
- client = TweetStream::Client.new
12
-
13
- client.on_error do |message|
14
- puts message
15
- end
16
-
17
- client.track("yankees") do |status|
18
- puts "#{status.text}"
19
- end
@@ -1,39 +0,0 @@
1
- require 'tweetstream'
2
-
3
- TweetStream.configure do |config|
4
- config.consumer_key = 'abcdefghijklmnopqrstuvwxyz'
5
- config.consumer_secret = '0123456789'
6
- config.oauth_token = 'abcdefghijklmnopqrstuvwxyz'
7
- config.oauth_token_secret = '0123456789'
8
- config.auth_method = :oauth
9
- end
10
-
11
- EM.run do
12
-
13
- client = TweetStream::Client.new
14
-
15
- client.on_error do |error|
16
- puts error
17
- end
18
-
19
- client.sitestream([user_id], :followings => true) do |status|
20
- puts status.inspect
21
- end
22
-
23
- EM::Timer.new(60) do
24
- client.control.add_user(user_id_to_add)
25
- client.control.info { |i| puts i.inspect }
26
- end
27
-
28
- EM::Timer.new(75) do
29
- client.control.friends_ids(user_id) do |friends|
30
- puts friends.inspect
31
- end
32
- end
33
-
34
- EM::Timer.new(90) do
35
- client.control.remove_user(user_id_to_remove)
36
- client.control.info { |i| puts i.inspect }
37
- end
38
-
39
- end
@@ -1,25 +0,0 @@
1
- require 'tweetstream'
2
-
3
- TweetStream.configure do |config|
4
- config.consumer_key = 'abcdefghijklmnopqrstuvwxyz'
5
- config.consumer_secret = '0123456789'
6
- config.oauth_token = 'abcdefghijklmnopqrstuvwxyz'
7
- config.oauth_token_secret = '0123456789'
8
- config.auth_method = :oauth
9
- end
10
-
11
- client = TweetStream::Client.new
12
-
13
- client.on_error do |message|
14
- puts message
15
- end
16
-
17
- client.on_direct_message do |direct_message|
18
- puts direct_message.text
19
- end
20
-
21
- client.on_timeline_status do |status|
22
- puts status.text
23
- end
24
-
25
- client.userstream
@@ -1,13 +0,0 @@
1
- source :rubygems
2
-
3
- gem 'twitter', '~> 4.0.0'
4
- gem 'rake'
5
- gem 'yard'
6
- gem 'json', :platforms => :ruby_18
7
-
8
- group :test do
9
- gem 'rspec'
10
- gem 'webmock'
11
- end
12
-
13
- gemspec :path => '..'
@@ -1,13 +0,0 @@
1
- source :rubygems
2
-
3
- gem 'twitter', '~> 4.1.0'
4
- gem 'rake'
5
- gem 'yard'
6
- gem 'json', :platforms => :ruby_18
7
-
8
- group :test do
9
- gem 'rspec'
10
- gem 'webmock'
11
- end
12
-
13
- gemspec :path => '..'
@@ -1,13 +0,0 @@
1
- source :rubygems
2
-
3
- gem 'twitter', '~> 4.2.0'
4
- gem 'rake'
5
- gem 'yard'
6
- gem 'json', :platforms => :ruby_18
7
-
8
- group :test do
9
- gem 'rspec'
10
- gem 'webmock'
11
- end
12
-
13
- gemspec :path => '..'
@@ -1,13 +0,0 @@
1
- source :rubygems
2
-
3
- gem 'twitter', '~> 4.3.0'
4
- gem 'rake'
5
- gem 'yard'
6
- gem 'json', :platforms => :ruby_18
7
-
8
- group :test do
9
- gem 'rspec'
10
- gem 'webmock'
11
- end
12
-
13
- gemspec :path => '..'