gnip-client 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b7db523bd6ac69ada3f363c2f675ae783a78334f
4
+ data.tar.gz: 84a9d3a0a5dfc0ec1898627a04da3b7b42474571
5
+ SHA512:
6
+ metadata.gz: e2d5f4c2727a740c30efda269c801c0e15b2e50df392166e661fdb14739fabdffda5e9b41a4d83b53193cc19ca5a2e62bbe33208171868dabca64537e7212591
7
+ data.tar.gz: b179744c41fe4e1d0a9187fa2bed29c44fcb3ca62fac9f8b9c39f4b33bd9b65320629419304fd64a6dc2a710c4ee0f870ca6b23507cf9c7eae38e0c7829e46d4
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.2.2
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.1
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in gnip.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 TODO: Write your name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # Gnip Client
2
+ Gnip client is a Ruby library for accessing the Gnip API, with this gem you can manage rules, full archive search, and streaming realtime contents.
3
+ You can also call the replay method if the realtimestream goes down for any reason.
4
+
5
+ In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/gnip`.
6
+ To experiment with that code, run `bundle console` for an interactive prompt.
7
+
8
+
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'gnip-client', require: 'gnip'
16
+ ```
17
+
18
+ And then execute:
19
+
20
+ $ bundle
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install gnip-client
25
+
26
+ ## Usage
27
+ You can define the client passing username, password, account and label (defaul is dev).
28
+
29
+ ```ruby
30
+ label possible values: prod, dev
31
+ client = Gnip::PowerTrackClient.new(username: YOUR_USERNAME, password: YOUR_PASSWORD, account: YOUR_ACCOUNT, label: "prod")
32
+ ```
33
+
34
+ **Manage gnip rules**
35
+
36
+ ```ruby
37
+ rules = {"rules": [{"value": "rule1", "tag": "tag1"}, {"value":"rule2"}] }
38
+
39
+ client.rules.add(rules)
40
+ client.rules.remove(rules)
41
+ client.rules.list
42
+ client.rules.delete_all!
43
+
44
+ #For the replay channel
45
+ client.replay_rules.add(rules)
46
+ client.replay_rules.remove(rules)
47
+ client.replay_rules.list
48
+ client.replay_rules.delete_all!
49
+
50
+ ```
51
+ **Full Archive search**
52
+
53
+ ```ruby
54
+ client.full_archive.search(query: "hello", date_from: Time.now - 2.months, date_to: Time.now - 20.hours)
55
+ client.full_archive.total_by_time_period(query: "hello", date_from: Time.now - 2.months, date_to: Time.now - 20.hours)
56
+ client.full_archive.total(query: "hello", date_from: Time.now - 2.months, date_to: Time.now - 20.hours)
57
+ ```
58
+
59
+ **Stream**
60
+
61
+ Derived from [gnip-stream](https://github.com/rweald/gnip-stream)
62
+
63
+ ```ruby
64
+ client.stream.consume(date_from: Time.now - 2.days, date_to: Time.now - 1.day) do |data|
65
+ puts data
66
+ end
67
+
68
+ client.replay.consume(date_from: Time.now - 2.days, date_to: Time.now - 1.day) do |data|
69
+ puts data
70
+ end
71
+
72
+ ```
73
+
74
+ ## Development
75
+
76
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
77
+
78
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
79
+
80
+ ## Contributing
81
+
82
+ 1. Fork it ( https://github.com/giovannelli/gnip-client/fork )
83
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
84
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
85
+ 4. Push to the branch (`git push origin my-new-feature`)
86
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "gnip"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
data/gnip.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'gnip/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "gnip-client"
8
+ spec.version = Gnip::VERSION
9
+ spec.authors = ["Duccio Giovannelli"]
10
+ spec.email = ["giovannelli@extendi.it"]
11
+
12
+ spec.summary = %q{A Ruby library for accessing the Gnip API. See https://gnip.com/ for full details and to sign up for an account.}
13
+ spec.homepage = "https://github.com/giovannelli/gnip-client"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.9"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "pry"
24
+ spec.add_development_dependency "rspec"
25
+
26
+ spec.add_dependency 'httparty', '>= 0'
27
+ spec.add_dependency 'em-http-request', '>= 1.0.3'
28
+ spec.add_dependency 'activesupport', '>= 4.2.1'
29
+ end
data/lib/gnip.rb ADDED
@@ -0,0 +1,24 @@
1
+ require "active_support/core_ext/hash"
2
+ require "httparty"
3
+ require "gnip/version"
4
+ require "gnip/power_track_client"
5
+ require "gnip/gnip-rules/rules"
6
+ require "gnip/gnip-full-archive/full_archive"
7
+ require "gnip/gnip-stream/error_reconnect"
8
+ require "gnip/gnip-stream/json_data_bufffer"
9
+ require "gnip/gnip-stream/stream"
10
+ require "gnip/gnip-stream/replay"
11
+
12
+ begin
13
+ require "pry"
14
+ rescue LoadError => e
15
+
16
+ end
17
+
18
+ module Gnip
19
+
20
+ def self.format_date(datetime)
21
+ datetime.to_datetime.utc.strftime('%Y%m%d%H%M')
22
+ end
23
+
24
+ end
@@ -0,0 +1,88 @@
1
+ module Gnip
2
+ module GnipFullArchive
3
+ class FullArchive
4
+
5
+ class InvalidRequestException < StandardError; end
6
+
7
+ include HTTParty
8
+
9
+ attr_reader :search_url, :counts_url
10
+
11
+ #alias :total :total_entries
12
+
13
+ def initialize(client)
14
+ @search_url = "https://data-api.twitter.com/search/fullarchive/accounts/#{client.account}/#{client.label}.json"
15
+ @counts_url = "https://data-api.twitter.com/search/fullarchive/accounts/#{client.account}/#{client.label}/counts.json"
16
+ @auth = { username: client.username, password: client.password }
17
+ end
18
+
19
+ #Search using the fullarchive search endpoint return an hash containing up to 500 results and the cursor to the next page
20
+ #options[:query] query to twitter
21
+ #options[:per_page] default is 500
22
+ #options[:start_date] as datetime
23
+ #options[:end_date] as datetime
24
+ #options[:cursor_next] cursor to the next page
25
+ def search(options = {})
26
+ search_options = {}
27
+ search_options[:query] = options[:query]||""
28
+ search_options[:maxResults] = options[:per_page]||500
29
+ search_options[:fromDate] = Gnip.format_date(options[:date_from]) if options[:date_from]
30
+ search_options[:toDate] = Gnip.format_date(options[:date_to]) if options[:date_to]
31
+ search_options[:next] = options[:next_cursor] if options[:next_cursor]
32
+ url = [self.search_url, search_options.to_query].join('?')
33
+ begin
34
+ parsed_response = self.class.get(url, basic_auth: @auth).parsed_response
35
+ if parsed_response["error"].present?
36
+ response = { results: [], next: nil, error: parsed_response["error"]["message"] }
37
+ else
38
+ response = { results: parsed_response["results"], next: parsed_response["next"] }
39
+ end
40
+ rescue Exception => e
41
+ response = { results: [], next: nil, error: e.message }
42
+ end
43
+ return response
44
+ end
45
+
46
+ # full aarchive search endpoints return total contents by day, minute, hour paginated
47
+ # so to get totals across time period passed may need to run more than one call, the stop condition is cursor nil
48
+ # bucket: must be one of [minute, hour, day]
49
+ def total_by_time_period(options={})
50
+ response = options[:response]||{}
51
+ search_options = {}
52
+ search_options[:query] = options[:query]||""
53
+ search_options[:bucket] = options[:bucket]||'day'
54
+ search_options[:fromDate] = Gnip.format_date(options[:date_from]) if options[:date_from]
55
+ search_options[:toDate] = Gnip.format_date(options[:date_to]) if options[:date_to]
56
+ search_options[:next] = options[:next_cursor] if options[:next_cursor]
57
+ url = [self.counts_url, search_options.to_query].join('?')
58
+
59
+ begin
60
+ parsed_response = self.class.get(url, basic_auth: @auth).parsed_response
61
+ parsed_response = parsed_response.with_indifferent_access
62
+ if parsed_response[:error].present?
63
+ response = { results: [], next: nil, error: parsed_response[:error][:message] }
64
+ else
65
+ parsed_response[:results].each_with_index do |item, i|
66
+ parsed_response[:results][i] = item.merge(timePeriod: DateTime.parse(item[:timePeriod]).to_s)
67
+ end
68
+ response = { results: (response[:results]||[]) + parsed_response[:results], next: parsed_response[:next] }
69
+ end
70
+ rescue Exception => e
71
+ response = { results: [], next: nil, error: e.message }
72
+ end
73
+ return response if !parsed_response[:next].to_s.present?
74
+ total_by_time_period(query: search_options[:query], date_from: search_options[:fromDate], date_to: search_options[:toDate], bucket: search_options[:bucket], next_cursor: parsed_response[:next], response: response)
75
+ end
76
+
77
+ #return total contents in a specific date interval with a passed query
78
+ def total(options={})
79
+ extra = {}
80
+ response = total_by_time_period(options)
81
+ extra = { error: response[:error] } if response[:error].present?
82
+ return { query: options[:query], total: response[:results].map{|item| item[:count]}.reduce(:+) }.merge!(extra)
83
+ end
84
+
85
+ end
86
+
87
+ end
88
+ end
@@ -0,0 +1,50 @@
1
+ module Gnip
2
+ module GnipRules
3
+ class Rules
4
+
5
+ include HTTParty
6
+
7
+ attr_reader :rules_url
8
+
9
+ def initialize(client, replay=false)
10
+ @rules_url = "https://api.gnip.com:443/accounts/#{client.account}/publishers/#{client.publisher}/#{replay ? "replay" : "streams"}/track/#{client.label}/rules.json"
11
+ @auth = { username: client.username, password: client.password }
12
+ end
13
+
14
+ #Add rules to PowerTrack rules
15
+ #rules should be an hash in the format {"rules": [{"value": "rule1", "tag": "tag1"}, {"value":"rule2"}]}"
16
+ def add(rules)
17
+ self.class.post(self.rules_url, basic_auth: @auth, body: rules.to_json)
18
+ end
19
+
20
+ #Remove rules from PowerTrack rules
21
+ #rules should be an hash in the format {"rules": [{"value": "rule1", "tag": "tag1"}, {"value":"rule2"}]}"
22
+ def remove(rules)
23
+ self.class.delete(self.rules_url, basic_auth: @auth, body: rules.to_json)
24
+ end
25
+
26
+ #Get the full list of rules
27
+ def list
28
+ self.class.get(self.rules_url, basic_auth: @auth).parsed_response.slice("rules")
29
+ end
30
+
31
+ #delete all rules from PowerTrack
32
+ #http://support.gnip.com/apis/powertrack/api_reference.html#DeleteRules
33
+ #Request Body Size Limit 1 MB (~5000 rules)
34
+ def delete_all!
35
+ rules_list = self.list
36
+ rules_list["rules"].in_groups_of(2, false).each do |group_of_rules|
37
+ self.remove({ "rules": group_of_rules })
38
+ end
39
+ sleep 0.05
40
+ rules_list = self.list
41
+ if !rules_list["rules"].size.zero?
42
+ self.delete_all!
43
+ else
44
+ return []
45
+ end
46
+ end
47
+ end
48
+
49
+ end
50
+ end
@@ -0,0 +1,29 @@
1
+ module Gnip
2
+ module GnipStream
3
+
4
+ class ErrorReconnect
5
+
6
+ def initialize(source_class, method_name)
7
+ @source_class = source_class
8
+ @method_name = method_name
9
+ @reconnect_attempts = 0
10
+ end
11
+
12
+ def attempt_to_reconnect(error_message)
13
+ @error_message = error_message
14
+ if @reconnect_attempts < 5
15
+ @reconnect_attempts +=1
16
+ sleep(2)
17
+ @source_class.send(@method_name)
18
+ else
19
+ reconnect_failed_raise_error
20
+ end
21
+ end
22
+
23
+ def reconnect_failed_raise_error
24
+ raise @error_message
25
+ end
26
+
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,31 @@
1
+ module Gnip
2
+ module GnipStream
3
+ class JsonDataBuffer
4
+
5
+ attr_accessor :split_pattern, :check_pattern
6
+
7
+ def initialize(split_pattern, check_pattern)
8
+ @split_pattern = split_pattern
9
+ @check_pattern = check_pattern
10
+ @buffer = ""
11
+ end
12
+
13
+ def process(chunk)
14
+ @buffer.concat(chunk)
15
+ end
16
+
17
+ def complete_entries
18
+ entries = []
19
+ while @buffer =~ check_pattern
20
+ new_line = @buffer[@buffer.size - 2..@buffer.size - 1] == "\r\n"
21
+ activities = @buffer.split(split_pattern)
22
+ entries << activities.shift
23
+ @buffer = activities.join(split_pattern)
24
+ @buffer = @buffer + "\r\n" if @buffer.size > 0 && new_line
25
+ end
26
+ entries.select{ |entry| entry.size > 0 }
27
+ end
28
+ end
29
+
30
+ end
31
+ end
@@ -0,0 +1,42 @@
1
+ module Gnip
2
+ module GnipStream
3
+ class Replay < Stream
4
+
5
+ def initialize(client)
6
+ super
7
+ @url = "https://stream.gnip.com:443/accounts/#{client.account}/publishers/#{client.publisher}/replay/track/#{client.label}.json"
8
+ end
9
+
10
+ def configure_handlers
11
+ self.on_error { |error| @error_handler.attempt_to_reconnect("Gnip Connection Error. Reason was: #{error.inspect}") }
12
+ self.on_connection_close { puts 'done' }
13
+ end
14
+
15
+ def consume(options={}, &block)
16
+ @client_callback = block if block
17
+ self.on_message(&@client_callback)
18
+ self.connect(options)
19
+ end
20
+
21
+ def connect(options)
22
+ search_options = {}
23
+ search_options[:fromDate] = Gnip.format_date(options[:date_from]) if options[:date_from]
24
+ search_options[:toDate] = Gnip.format_date(options[:date_to]) if options[:date_to]
25
+ stream_url = [self.url, search_options.to_query].join('?')
26
+ EM.run do
27
+ http = EM::HttpRequest.new(stream_url, inactivity_timeout: 45, connection_timeout: 75).get(head: @headers)
28
+ http.stream { |chunk| process_chunk(chunk) }
29
+ http.callback {
30
+ handle_connection_close(http)
31
+ EM.stop
32
+ }
33
+ http.errback {
34
+ handle_error(http)
35
+ EM.stop
36
+ }
37
+ end
38
+ end
39
+
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,79 @@
1
+ require 'eventmachine'
2
+ require 'em-http-request'
3
+
4
+ module Gnip
5
+ module GnipStream
6
+ class Stream
7
+
8
+ EventMachine.threadpool_size = 5
9
+
10
+ attr_accessor :url, :backfill_client
11
+
12
+ def initialize(client)
13
+ @url = "https://stream.gnip.com:443/accounts/#{client.account}/publishers/#{client.publisher}/streams/track/#{client.label}.json"
14
+ @backfill_client = client.backfill_client
15
+ @processor = JsonDataBuffer.new("\r\n", Regexp.new(/^\{.*\}\r\n/))
16
+ @headers = {'authorization' => [client.username, client.password], 'accept-encoding' => 'gzip, compressed'}
17
+ @error_handler = ErrorReconnect.new(self, :consume)
18
+ @connection_close_handler = ErrorReconnect.new(self, :consume)
19
+ configure_handlers
20
+ end
21
+
22
+ def configure_handlers
23
+ self.on_error { |error| @error_handler.attempt_to_reconnect("Gnip Connection Error. Reason was: #{error.inspect}") }
24
+ self.on_connection_close { @connection_close_handler.attempt_to_reconnect("Gnip Connection Closed") }
25
+ end
26
+
27
+ def consume(&block)
28
+ @client_callback = block if block
29
+ self.on_message(&@client_callback)
30
+ self.connect
31
+ end
32
+
33
+ def on_message(&block)
34
+ @on_message = block
35
+ end
36
+
37
+ def on_connection_close(&block)
38
+ @on_connection_close = block
39
+ end
40
+
41
+ def on_error(&block)
42
+ @on_error = block
43
+ end
44
+
45
+ def connect
46
+ EM.run do
47
+ options = {}
48
+ options = { query: { "client" => self.backfill_client } } if self.backfill_client.present?
49
+ http = EM::HttpRequest.new(self.url, inactivity_timeout: 45, connection_timeout: 75).get( { head: @headers }.merge!(options))
50
+ http.stream { |chunk| process_chunk(chunk) }
51
+ http.callback {
52
+ handle_connection_close(http)
53
+ EM.stop
54
+ }
55
+ http.errback {
56
+ handle_error(http)
57
+ EM.stop
58
+ }
59
+ end
60
+ end
61
+
62
+ def process_chunk(chunk)
63
+ @processor.process(chunk)
64
+ @processor.complete_entries.each do |entry|
65
+ EM.defer { @on_message.call(entry) }
66
+ end
67
+ end
68
+
69
+ def handle_error(http_connection)
70
+ @on_error.call(http_connection)
71
+ end
72
+
73
+ def handle_connection_close(http_connection)
74
+ @on_connection_close.call(http_connection)
75
+ end
76
+
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,25 @@
1
+ module Gnip
2
+ class PowerTrackClient
3
+
4
+ attr_accessor :publisher, :label, :account,
5
+ :username, :password,
6
+ :backfill_client
7
+
8
+ attr_reader :rules, :replay_rules, :full_archive, :stream, :replay
9
+
10
+ def initialize(options = {})
11
+ @account = options[:account]
12
+ @publisher = options[:publisher]||"twitter"
13
+ @label = options[:label]||"dev"
14
+ @username = options[:username]
15
+ @password = options[:password]
16
+ @backfill_client = options[:backfill_client]||nil
17
+ @rules = Gnip::GnipRules::Rules.new(self)
18
+ @replay_rules = Gnip::GnipRules::Rules.new(self, true)
19
+ @full_archive = Gnip::GnipFullArchive::FullArchive.new(self)
20
+ @stream = Gnip::GnipStream::Stream.new(self)
21
+ @replay = Gnip::GnipStream::Replay.new(self)
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,3 @@
1
+ module Gnip
2
+ VERSION = "0.1.8"
3
+ end
metadata ADDED
@@ -0,0 +1,165 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gnip-client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.8
5
+ platform: ruby
6
+ authors:
7
+ - Duccio Giovannelli
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: httparty
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: em-http-request
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 1.0.3
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 1.0.3
97
+ - !ruby/object:Gem::Dependency
98
+ name: activesupport
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 4.2.1
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 4.2.1
111
+ description:
112
+ email:
113
+ - giovannelli@extendi.it
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".gitignore"
119
+ - ".rspec"
120
+ - ".ruby-version"
121
+ - ".travis.yml"
122
+ - CODE_OF_CONDUCT.md
123
+ - Gemfile
124
+ - LICENSE.txt
125
+ - README.md
126
+ - Rakefile
127
+ - bin/console
128
+ - bin/setup
129
+ - gnip.gemspec
130
+ - lib/gnip.rb
131
+ - lib/gnip/gnip-full-archive/full_archive.rb
132
+ - lib/gnip/gnip-rules/rules.rb
133
+ - lib/gnip/gnip-stream/error_reconnect.rb
134
+ - lib/gnip/gnip-stream/json_data_bufffer.rb
135
+ - lib/gnip/gnip-stream/replay.rb
136
+ - lib/gnip/gnip-stream/stream.rb
137
+ - lib/gnip/power_track_client.rb
138
+ - lib/gnip/version.rb
139
+ homepage: https://github.com/giovannelli/gnip-client
140
+ licenses:
141
+ - MIT
142
+ metadata: {}
143
+ post_install_message:
144
+ rdoc_options: []
145
+ require_paths:
146
+ - lib
147
+ required_ruby_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ required_rubygems_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ requirements: []
158
+ rubyforge_project:
159
+ rubygems_version: 2.4.5
160
+ signing_key:
161
+ specification_version: 4
162
+ summary: A Ruby library for accessing the Gnip API. See https://gnip.com/ for full
163
+ details and to sign up for an account.
164
+ test_files: []
165
+ has_rdoc: