tweetsearch 0.1.2 → 0.1.3

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: 0540f3580085530aaeff366afcb1a91ae7d100d2
4
- data.tar.gz: 40416aa10909fc5a014f5996c62a6f8f998ee39f
3
+ metadata.gz: 0b52a057a490d5e07bdb0b5298c4715d332ca8c2
4
+ data.tar.gz: c01239dc3fc7dcd38189485304a10ef723895de0
5
5
  SHA512:
6
- metadata.gz: 6eae995a71b09123139811b66e3ae092e41145aca2298bc8692314e11eb450ea1a504a12bd1413950cb8f82e4ff19321c3f4652b6d66055ab43f59fdb7432581
7
- data.tar.gz: 2c42bb2ba34ab84c0121204e4c5b6682feeebd6660a2cf8b0b4ead2c0dadba19484f3c986dd9b205ab116fcced3941d697825864dbf01491ab7dd71452679acb
6
+ metadata.gz: 42f9581265dd0b30bf0a7d4c6d3abf848d729cc0f02624b1b0f6018513104f77cb260697a1b440c395cc427d986a30adbfb8692b55185511bff81b5a9d06be7b
7
+ data.tar.gz: 81552bb5725ef8a77ffbcd517dd4b7a40add96f6ce46b6e16c066e642d03b3e80051fe0f27428dfddb6a28054988141e52cc5096d47ace82c7d80e5c115db113
@@ -1,5 +1,5 @@
1
- access_token=<your_access_token>
1
+ ACCESS_TOKEN=<your_access_token>
2
2
 
3
3
  # used for creating access token
4
- api_key=<OPTIONAL your_api_key>
5
- api_secret=<OPTIONAL your_api_secret>
4
+ API_KEY=<OPTIONAL your_api_key>
5
+ API_SECRET=<OPTIONAL your_api_secret>
data/.gitignore CHANGED
@@ -9,3 +9,6 @@ config/
9
9
 
10
10
  # lock file
11
11
  Gemfile.lock
12
+
13
+ # product
14
+ *.gem
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ namespace :util do
15
15
  desc 'Generate new access token'
16
16
  task :access_token do
17
17
  OAUTH_ENDPOINT = 'https://api.twitter.com/oauth2/token'
18
- basic_token = Base64.urlsafe_encode64("#{ENV['api_key']}:#{ENV['api_secret']}")
18
+ basic_token = Base64.urlsafe_encode64("#{ENV['API_KEY']}:#{ENV['API_SECRET']}")
19
19
  token_response = HTTParty.post(OAUTH_ENDPOINT, headers: { Authorization: "Basic #{basic_token}" },
20
20
  query: { grant_type: 'client_credentials' }).parsed_response
21
21
  puts "Access Token: #{token_response['access_token']}"
@@ -5,8 +5,8 @@ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
5
5
 
6
6
  require 'tweetsearch'
7
7
 
8
- if ENV['access_token'].nil?
9
- puts '`access_token` not found, please make sure `access_token` is set in the environment variable'
8
+ if ENV['ACCESS_TOKEN'].nil?
9
+ puts '`ACCESS_TOKEN` not found, please make sure `ACCESS_TOKEN` is set in the environment variable'
10
10
  exit(1)
11
11
  end
12
12
 
@@ -13,7 +13,7 @@ module TweetSearch
13
13
  end
14
14
 
15
15
  def self.config
16
- @config ||= { access_token: ENV['access_token'] }
16
+ @config ||= { access_token: ENV['ACCESS_TOKEN'] }
17
17
  end
18
18
 
19
19
  def self.search_tweets(*tags)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TweetSearch
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
@@ -21,7 +21,7 @@ VCR.configure do |config|
21
21
  config.cassette_library_dir = CASSETTES_FOLDER
22
22
  config.hook_into :webmock
23
23
 
24
- config.filter_sensitive_data('<ACCESS_TOKEN>') { ENV['access_token'] }
24
+ config.filter_sensitive_data('<ACCESS_TOKEN>') { ENV['ACCESS_TOKEN'] }
25
25
  end
26
26
 
27
27
  def cassette_name(path_to_spec, description)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweetsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - NoBetterThan97