augury 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c20cb6d68923a886d955dc7f94305b9f59acb06991e96112170b933c4dbf56ae
4
- data.tar.gz: 29a140a75cb40148ac27955ccfb489e322f79a54e9f735933e67dc0f291588b7
3
+ metadata.gz: 9c891eea8bed0f5f4745bccf4dd9f21bf76531d4444dc8c4d499089bee630e71
4
+ data.tar.gz: 51eba708d2e431d2d98818fa7b87c7756a20920d6bda90116fefee7dd1c36d3e
5
5
  SHA512:
6
- metadata.gz: 81038a2cd623f5a7ba2ba9e38bcceb104b301a90276e71f4eaa2a37152f49ffa45cae9d01e83a0ec1142401d1a006cb4cca348efe3c2ace6d2c57bd99555b0b2
7
- data.tar.gz: 24ddd1018b9ff51169a2c8dd6d76e43623e84fac2a19a3161ee96b1947829967c586c46b41fac222aa8befa7a22d3d280da5645ffd05f898f75cf3ca7d8b2abc
6
+ metadata.gz: 71016c4ce98d20acb04b3fbef356edd340b4e2a1b7ebac45ff309b19d33823fdc167517d66311063312f3405740fdb93a5c41bd383d19268447268f5303c73f0
7
+ data.tar.gz: f7f2c2a1877e698647ed7da52eeb7632445f8639898f51a635f517d6380b42d38ec6adcd0742dae151ff223524127756703758bca9d9efc6a82690597d8aa2d3
data/.codeclimate.yml CHANGED
@@ -5,6 +5,10 @@ plugins:
5
5
  rubocop:
6
6
  enabled: true
7
7
  channel: rubocop-0-92
8
+ markdownlint:
9
+ enabled: true
10
+ bundler-audit:
11
+ enabled: true
8
12
  ratings:
9
13
  paths:
10
14
  - "**.rb"
@@ -0,0 +1,30 @@
1
+ name: Tests
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ os: [ubuntu-latest]
9
+ ruby: [2.6, 2.7, '3.0']
10
+ runs-on: ${{ matrix.os }}
11
+ env:
12
+ TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
13
+ TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
14
+ TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
15
+ TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
16
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
17
+ steps:
18
+ - if: matrix.os == 'ubuntu-latest'
19
+ run: sudo apt-get install -y fortune
20
+ - uses: actions/checkout@v2
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ bundler-cache: true
25
+ - run: bundle exec rake
26
+ - if: matrix.os == 'ubuntu-latest' && matrix.ruby == '3.0'
27
+ run: |
28
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
29
+ chmod +x ./cc-test-reporter
30
+ ./cc-test-reporter after-build
data/.mdlrc ADDED
@@ -0,0 +1,7 @@
1
+ # Ignore the following rules
2
+ #
3
+ # MD013: No line length restriction, use Semantic Line Feeds
4
+ # http://rhodesmill.org/brandon/2012/one-sentence-per-line/
5
+ # MD014: Allow for cli examples to start with dollar sign
6
+ # MD034: Never run into this issue and GitHub supports it fine
7
+ rules "~MD013", "~MD014", "~MD034"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 1.1.2 (2022-04-12)
4
+
5
+ - Fix issue with mismatched case for Twitter screen_name. (#22)
6
+
3
7
  ## 1.1.1 (2020-02-13)
4
8
 
5
9
  - Fix attribution on last item
data/Gemfile CHANGED
@@ -9,7 +9,7 @@ gem 'rake'
9
9
 
10
10
  # Testing
11
11
  gem 'rspec', '~>3.0'
12
- gem 'simplecov'
12
+ gem 'simplecov', '< 0.18'
13
13
  gem 'vcr'
14
14
  gem 'webmock'
15
15
 
@@ -20,6 +20,7 @@ gem 'pry-byebug'
20
20
  gem 'pry-doc'
21
21
 
22
22
  # Linting / completion
23
+ gem 'bundler-audit'
23
24
  gem 'rubocop', '0.92'
24
25
  gem 'rubocop-rake'
25
26
  gem 'rubocop-rspec'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- augury (1.1.0)
4
+ augury (1.1.2)
5
5
  thor (~> 1.0.0)
6
6
  twitter (~> 7.0)
7
7
  word_wrap (~> 1.0)
@@ -9,24 +9,27 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.7.0)
12
+ addressable (2.8.0)
13
13
  public_suffix (>= 2.0.2, < 5.0)
14
14
  ast (2.4.2)
15
- awesome_print (1.8.0)
16
- backport (1.1.2)
17
- benchmark (0.1.1)
15
+ awesome_print (1.9.2)
16
+ backport (1.2.0)
17
+ benchmark (0.2.0)
18
18
  buftok (0.2.0)
19
+ bundler-audit (0.9.0.1)
20
+ bundler (>= 1.2.0, < 3)
21
+ thor (~> 1.0)
19
22
  byebug (11.1.3)
20
23
  coderay (1.1.3)
21
24
  crack (0.4.5)
22
25
  rexml
23
- diff-lcs (1.4.4)
24
- docile (1.3.5)
26
+ diff-lcs (1.5.0)
27
+ docile (1.4.0)
25
28
  domain_name (0.5.20190701)
26
29
  unf (>= 0.0.5, < 1.0.0)
27
30
  e2mmap (0.1.0)
28
31
  equalizer (0.0.11)
29
- ffi (1.14.2)
32
+ ffi (1.15.5)
30
33
  ffi-compiler (1.0.1)
31
34
  ffi (>= 1.0.0)
32
35
  rake
@@ -36,62 +39,63 @@ GEM
36
39
  http-cookie (~> 1.0)
37
40
  http-form_data (~> 2.2)
38
41
  http-parser (~> 1.2.0)
39
- http-cookie (1.0.3)
42
+ http-cookie (1.0.4)
40
43
  domain_name (~> 0.5)
41
44
  http-form_data (2.3.0)
42
45
  http-parser (1.2.3)
43
46
  ffi-compiler (>= 1.0, < 2.0)
44
47
  http_parser.rb (0.6.0)
45
48
  jaro_winkler (1.5.4)
46
- kramdown (2.3.0)
49
+ json (2.6.1)
50
+ kramdown (2.3.2)
47
51
  rexml
48
52
  kramdown-parser-gfm (1.1.0)
49
53
  kramdown (~> 2.0)
50
54
  memoizable (0.4.2)
51
55
  thread_safe (~> 0.3, >= 0.3.1)
52
56
  method_source (1.0.0)
53
- mini_portile2 (2.5.0)
57
+ mini_portile2 (2.8.0)
54
58
  multipart-post (2.1.1)
55
59
  naught (1.1.0)
56
- nokogiri (1.11.1)
57
- mini_portile2 (~> 2.5.0)
60
+ nokogiri (1.13.4)
61
+ mini_portile2 (~> 2.8.0)
58
62
  racc (~> 1.4)
59
- parallel (1.20.1)
60
- parser (3.0.0.0)
63
+ parallel (1.22.1)
64
+ parser (3.1.1.0)
61
65
  ast (~> 2.4.1)
62
- pry (0.13.1)
66
+ pry (0.14.1)
63
67
  coderay (~> 1.1)
64
68
  method_source (~> 1.0)
65
69
  pry-awesome_print (9.6.11)
66
70
  awesome_print (>= 1.1.0, < 999)
67
71
  pry (>= 0.9.0, < 999)
68
- pry-byebug (3.9.0)
72
+ pry-byebug (3.8.0)
69
73
  byebug (~> 11.0)
70
- pry (~> 0.13.0)
71
- pry-doc (1.1.0)
74
+ pry (~> 0.10)
75
+ pry-doc (1.3.0)
72
76
  pry (~> 0.11)
73
77
  yard (~> 0.9.11)
74
- public_suffix (4.0.6)
75
- racc (1.5.2)
76
- rainbow (3.0.0)
77
- rake (13.0.3)
78
- regexp_parser (2.0.3)
79
- reverse_markdown (2.0.0)
78
+ public_suffix (4.0.7)
79
+ racc (1.6.0)
80
+ rainbow (3.1.1)
81
+ rake (13.0.6)
82
+ regexp_parser (2.3.0)
83
+ reverse_markdown (2.1.1)
80
84
  nokogiri
81
- rexml (3.2.4)
82
- rspec (3.10.0)
83
- rspec-core (~> 3.10.0)
84
- rspec-expectations (~> 3.10.0)
85
- rspec-mocks (~> 3.10.0)
86
- rspec-core (3.10.1)
87
- rspec-support (~> 3.10.0)
88
- rspec-expectations (3.10.1)
85
+ rexml (3.2.5)
86
+ rspec (3.11.0)
87
+ rspec-core (~> 3.11.0)
88
+ rspec-expectations (~> 3.11.0)
89
+ rspec-mocks (~> 3.11.0)
90
+ rspec-core (3.11.0)
91
+ rspec-support (~> 3.11.0)
92
+ rspec-expectations (3.11.0)
89
93
  diff-lcs (>= 1.2.0, < 2.0)
90
- rspec-support (~> 3.10.0)
91
- rspec-mocks (3.10.1)
94
+ rspec-support (~> 3.11.0)
95
+ rspec-mocks (3.11.1)
92
96
  diff-lcs (>= 1.2.0, < 2.0)
93
- rspec-support (~> 3.10.0)
94
- rspec-support (3.10.1)
97
+ rspec-support (~> 3.11.0)
98
+ rspec-support (3.11.0)
95
99
  rubocop (0.92.0)
96
100
  parallel (~> 1.10)
97
101
  parser (>= 2.7.1.5)
@@ -101,8 +105,8 @@ GEM
101
105
  rubocop-ast (>= 0.5.0)
102
106
  ruby-progressbar (~> 1.7)
103
107
  unicode-display_width (>= 1.4.0, < 2.0)
104
- rubocop-ast (1.4.1)
105
- parser (>= 2.7.1.5)
108
+ rubocop-ast (1.17.0)
109
+ parser (>= 3.1.1.0)
106
110
  rubocop-rake (0.5.1)
107
111
  rubocop
108
112
  rubocop-rspec (1.44.1)
@@ -110,16 +114,16 @@ GEM
110
114
  rubocop-ast (>= 0.7.1)
111
115
  ruby-progressbar (1.11.0)
112
116
  simple_oauth (0.3.1)
113
- simplecov (0.21.2)
117
+ simplecov (0.17.1)
114
118
  docile (~> 1.1)
115
- simplecov-html (~> 0.11)
116
- simplecov_json_formatter (~> 0.1)
117
- simplecov-html (0.12.3)
118
- simplecov_json_formatter (0.1.2)
119
- solargraph (0.40.2)
120
- backport (~> 1.1)
119
+ json (>= 1.8, < 3)
120
+ simplecov-html (~> 0.10.0)
121
+ simplecov-html (0.10.2)
122
+ solargraph (0.44.3)
123
+ backport (~> 1.2)
121
124
  benchmark
122
125
  bundler (>= 1.17.2)
126
+ diff-lcs (~> 1.4)
123
127
  e2mmap
124
128
  jaro_winkler (~> 1.5)
125
129
  kramdown (~> 2.3)
@@ -146,21 +150,24 @@ GEM
146
150
  simple_oauth (~> 0.3.0)
147
151
  unf (0.1.4)
148
152
  unf_ext
149
- unf_ext (0.0.7.7)
150
- unicode-display_width (1.7.0)
151
- vcr (6.0.0)
152
- webmock (3.11.1)
153
- addressable (>= 2.3.6)
153
+ unf_ext (0.0.8.1)
154
+ unicode-display_width (1.8.0)
155
+ vcr (6.1.0)
156
+ webmock (3.14.0)
157
+ addressable (>= 2.8.0)
154
158
  crack (>= 0.3.2)
155
159
  hashdiff (>= 0.4.0, < 2.0.0)
160
+ webrick (1.7.0)
156
161
  word_wrap (1.0.0)
157
- yard (0.9.26)
162
+ yard (0.9.27)
163
+ webrick (~> 1.7.0)
158
164
 
159
165
  PLATFORMS
160
166
  ruby
161
167
 
162
168
  DEPENDENCIES
163
169
  augury!
170
+ bundler-audit
164
171
  pry
165
172
  pry-awesome_print
166
173
  pry-byebug
@@ -170,7 +177,7 @@ DEPENDENCIES
170
177
  rubocop (= 0.92)
171
178
  rubocop-rake
172
179
  rubocop-rspec
173
- simplecov
180
+ simplecov (< 0.18)
174
181
  solargraph
175
182
  vcr
176
183
  webmock
data/README.md CHANGED
@@ -2,16 +2,15 @@
2
2
 
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/73443845cac0dadff540/maintainability)](https://codeclimate.com/github/claytron/augury/maintainability)
4
4
  [![Test Coverage](https://api.codeclimate.com/v1/badges/73443845cac0dadff540/test_coverage)](https://codeclimate.com/github/claytron/augury/test_coverage)
5
- [![Tests](https://travis-ci.com/claytron/augury.svg?branch=master)](https://travis-ci.com/github/claytron/augury)
5
+ ![Tests](https://github.com/claytron/augury/actions/workflows/ci.yml/badge.svg)
6
6
 
7
7
  Have you ever wanted to turn a twitter account into a fortune file?
8
8
  Well, today is your lucky day!
9
9
 
10
- <blockquote>
11
- Augury is the practice from ancient Roman religion of<br>
12
- interpreting omens from the observed flight of birds.<br><br>
13
- As per <a href="https://en.wikipedia.org/wiki/Augury">Wikipedia</a>
14
- </blockquote>
10
+ > Augury is the practice from ancient Roman religion of
11
+ > interpreting omens from the observed flight of birds.
12
+ >
13
+ > As per [Wikipedia](https://en.wikipedia.org/wiki/Augury)
15
14
 
16
15
  There are a lot of really funny twitter accounts out there.
17
16
  Let's just pick one and get started.
@@ -27,6 +27,9 @@ module Augury
27
27
  end
28
28
 
29
29
  def retrieve_tweets
30
+ # Make sure the case of the name is correct to avoid errors in the Twitter API
31
+ screen_name = @twitter.user(@username).screen_name
32
+
30
33
  @tweets = collect_with_max_id do |max_id|
31
34
  options = {
32
35
  count: 200,
@@ -35,7 +38,7 @@ module Augury
35
38
  exclude_replies: !@config[:replies],
36
39
  }
37
40
  options[:max_id] = max_id unless max_id.nil?
38
- @twitter.user_timeline(@username, options)
41
+ @twitter.user_timeline(screen_name, options)
39
42
  end
40
43
  rescue Twitter::Error::TooManyRequests => e
41
44
  reset_length = e.rate_limit.reset_in + 1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Augury
4
- VERSION = '1.1.1'
4
+ VERSION = '1.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: augury
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clayton Parker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-14 00:00:00.000000000 Z
11
+ date: 2022-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -62,14 +62,15 @@ extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
64
64
  - ".codeclimate.yml"
65
+ - ".github/workflows/ci.yml"
65
66
  - ".gitignore"
67
+ - ".mdlrc"
66
68
  - ".rbenv-gemsets"
67
69
  - ".rspec"
68
70
  - ".rubocop.yml"
69
71
  - ".ruby-gemset"
70
72
  - ".ruby-version"
71
73
  - ".solargraph.yml"
72
- - ".travis.yml"
73
74
  - CHANGELOG.md
74
75
  - Gemfile
75
76
  - Gemfile.lock
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 3.0
4
- - 2.7
5
- - 2.6
6
- before_install:
7
- - sudo apt-get -y install fortune
8
- before_script:
9
- - export PATH=$PATH:/usr/games
10
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
11
- - chmod +x ./cc-test-reporter
12
- - ./cc-test-reporter before-build
13
- script:
14
- - bundle exec rspec
15
- after_script:
16
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT