tweetsearch 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3fd636d902884424da5e954439b9bbcb278fb183
4
- data.tar.gz: 0f3377dd58a04c8699ce9d70ec7e70fdf4228143
3
+ metadata.gz: 784c0b8345be1ba12b22e6f349b6871eb91eeb58
4
+ data.tar.gz: 363c6fd9d4de619a5a6c23d8eadcccfbf293ed47
5
5
  SHA512:
6
- metadata.gz: 27cdb50a69425c2e552f38e0eea361186ff50b61db2351c5515402b2585aa550caeac5fffe060d042d544493a3b606428ebb4e78fa18e75dd46432f0bc82990e
7
- data.tar.gz: ba4eaf8ef7e385ef8abf294247a65e467478a9bdefe0a6360ea20707225bbbd6e1e878f3f8fa16462c448180ab35958f246d9d7f15eb97a16a80595d777e79f4
6
+ metadata.gz: 2178ff3f0e209ae3a651829b56e93798803fa6ec342412e66075cc03fb26b2f1585c8824b1c5bacfbf4ace11b35fb41615b59cefceba8c15fcd4988ceb2a58fc
7
+ data.tar.gz: 1fe270a6e57cac0d1b7c8fd8bf7aa9cd5262ac0448e55d257bfe537f642cb8ee765e483f0e7e9cba50656f015f7e3ab12a4a132f033fe19f77cd48818a512756
data/Gemfile CHANGED
@@ -4,23 +4,3 @@ ruby '2.3.1'
4
4
  source 'https://rubygems.org'
5
5
 
6
6
  gemspec
7
- =begin
8
- gem 'dotenv'
9
-
10
- gem 'flay'
11
- gem 'flog'
12
-
13
- gem 'httparty'
14
-
15
- gem 'minitest'
16
- gem 'minitest-rg'
17
-
18
- gem 'rake'
19
- gem 'rubocop'
20
-
21
- gem 'simplecov'
22
-
23
- gem 'vcr'
24
-
25
- gem 'webmock'
26
- =end
data/bin/tweetsearch CHANGED
@@ -1,14 +1,18 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'dotenv'
5
- Dotenv.load
6
4
  $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w(.. lib))
7
5
  require 'tweetsearch'
8
6
 
7
+ if ENV['access_token'].nil?
8
+ puts '`access_token` not found, please make sure `access_token` is set in the environment variable'
9
+ exit(1)
10
+ end
9
11
 
10
12
  print 'Hashtags (separated by space): '
11
- @tags = gets.chomp.split.map { |tag| tag.start_with?('#') ? tag : "##{tag}" }
12
- @client = TweetSearch::TwitterClient.new(access_token: ENV['access_token'])
13
- tweets = TweetSearch::Tweet.search(@tags, using_client: @client)
14
- print tweets.map{|item| print item.text + "/n" }
13
+ tags = gets.chomp.split.map { |tag| tag.start_with?('#') ? tag : "##{tag}" }
14
+
15
+ client = TweetSearch::TwitterClient.new(access_token: ENV['access_token'])
16
+ tweets = TweetSearch::Tweet.search(tags, using_client: client)
17
+
18
+ tweets.each { |item| print item.text + "\n" }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TweetSearch
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
data/tweetsearch.gemspec CHANGED
@@ -15,8 +15,8 @@ Gem::Specification.new do |s|
15
15
  s.test_files = `git ls-files -- spec/*`.split("\n")
16
16
  s.executables << 'tweetsearch'
17
17
 
18
- #s.add_runtime_dependency 'http', '~> 2.0'
19
18
  s.add_runtime_dependency 'httparty', '~> 0.14'
19
+
20
20
  s.add_development_dependency 'dotenv', '~> 2.1'
21
21
  s.add_development_dependency 'minitest', '~> 5.9'
22
22
  s.add_development_dependency 'minitest-rg', '~> 5.2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweetsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NoBetterThan97
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-04 00:00:00.000000000 Z
11
+ date: 2016-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -191,7 +191,6 @@ files:
191
191
  - ".rubocop.yml"
192
192
  - ".travis.yml"
193
193
  - Gemfile
194
- - Gemfile.lock
195
194
  - LICENSE
196
195
  - README.md
197
196
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,84 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- tweetsearch (0.1.0)
5
- httparty (~> 0.14)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- addressable (2.4.0)
11
- ast (2.3.0)
12
- crack (0.4.3)
13
- safe_yaml (~> 1.0.0)
14
- docile (1.1.5)
15
- dotenv (2.1.1)
16
- erubis (2.7.0)
17
- flay (2.8.1)
18
- erubis (~> 2.7.0)
19
- path_expander (~> 1.0)
20
- ruby_parser (~> 3.0)
21
- sexp_processor (~> 4.0)
22
- flog (4.4.0)
23
- path_expander (~> 1.0)
24
- ruby_parser (~> 3.1, > 3.1.0)
25
- sexp_processor (~> 4.4)
26
- hashdiff (0.3.0)
27
- httparty (0.14.0)
28
- multi_xml (>= 0.5.2)
29
- json (2.0.2)
30
- minitest (5.9.1)
31
- minitest-rg (5.2.0)
32
- minitest (~> 5.0)
33
- multi_xml (0.5.5)
34
- parser (2.3.1.4)
35
- ast (~> 2.2)
36
- path_expander (1.0.0)
37
- powerpack (0.1.1)
38
- rainbow (2.1.0)
39
- rake (11.3.0)
40
- rubocop (0.44.1)
41
- parser (>= 2.3.1.1, < 3.0)
42
- powerpack (~> 0.1)
43
- rainbow (>= 1.99.1, < 3.0)
44
- ruby-progressbar (~> 1.7)
45
- unicode-display_width (~> 1.0, >= 1.0.1)
46
- ruby-progressbar (1.8.1)
47
- ruby_parser (3.8.3)
48
- sexp_processor (~> 4.1)
49
- safe_yaml (1.0.4)
50
- sexp_processor (4.7.0)
51
- simplecov (0.12.0)
52
- docile (~> 1.1.0)
53
- json (>= 1.8, < 3)
54
- simplecov-html (~> 0.10.0)
55
- simplecov-html (0.10.0)
56
- unicode-display_width (1.1.1)
57
- vcr (3.0.3)
58
- webmock (2.1.0)
59
- addressable (>= 2.3.6)
60
- crack (>= 0.3.2)
61
- hashdiff
62
-
63
- PLATFORMS
64
- ruby
65
-
66
- DEPENDENCIES
67
- dotenv (~> 2.1)
68
- flay (~> 2.8)
69
- flog (~> 4.4)
70
- httparty (~> 0.14)
71
- minitest (~> 5.9)
72
- minitest-rg (~> 5.2)
73
- rake (~> 11.3)
74
- rubocop (~> 0.42)
75
- simplecov (~> 0.12)
76
- tweetsearch!
77
- vcr (~> 3.0)
78
- webmock (~> 2.1)
79
-
80
- RUBY VERSION
81
- ruby 2.3.1p112
82
-
83
- BUNDLED WITH
84
- 1.13.6