augury 1.1.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -1
- data/.github/workflows/ci.yml +2 -2
- data/.rubocop.yml +15 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +8 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +64 -68
- data/augury.gemspec +3 -1
- data/bin/extract_creds +4 -1
- data/exe/augury +2 -0
- data/lib/augury/cli.rb +4 -1
- data/lib/augury/fortune.rb +1 -1
- data/lib/augury/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee74f68b899c63c7045a62471fcc7e5c94b9f6efe7d8997030bc806241a22af7
|
4
|
+
data.tar.gz: c3061c1981ac0d5102073bebc9714b0675737af8ce3984440e11146f12174c57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7f502ddc53f768ff5670b113aa0729e6595dbd9c6c6c883babbad2e3f8b3ff2a355facbdf4431cd52216eaf77e010d476006e7f50804ed16611d13c554adb56
|
7
|
+
data.tar.gz: fb4fdafdbac2dc142838e38f539487f55498894117a39cee7b53fd2a560820e303b56a680000af4d2c64484994fd422838e92e18114a5f31a5bc13d418d4656b
|
data/.codeclimate.yml
CHANGED
data/.github/workflows/ci.yml
CHANGED
@@ -6,7 +6,7 @@ jobs:
|
|
6
6
|
fail-fast: false
|
7
7
|
matrix:
|
8
8
|
os: [ubuntu-latest]
|
9
|
-
ruby: [
|
9
|
+
ruby: ['3.1', '3.2', "3.3"]
|
10
10
|
runs-on: ${{ matrix.os }}
|
11
11
|
env:
|
12
12
|
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
|
@@ -23,7 +23,7 @@ jobs:
|
|
23
23
|
ruby-version: ${{ matrix.ruby }}
|
24
24
|
bundler-cache: true
|
25
25
|
- run: bundle exec rake
|
26
|
-
- if: matrix.os == 'ubuntu-latest' && matrix.ruby == '3.
|
26
|
+
- if: matrix.os == 'ubuntu-latest' && matrix.ruby == '3.1'
|
27
27
|
run: |
|
28
28
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
29
29
|
chmod +x ./cc-test-reporter
|
data/.rubocop.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion:
|
2
|
+
TargetRubyVersion: 3.1
|
3
3
|
Exclude:
|
4
4
|
- bin/**/*
|
5
5
|
- vendor/**/*
|
6
|
+
NewCops: enable
|
6
7
|
|
7
8
|
Style/TrailingCommaInArguments:
|
8
9
|
EnforcedStyleForMultiline: comma
|
@@ -16,6 +17,9 @@ Style/TrailingCommaInArrayLiteral:
|
|
16
17
|
Style/RedundantSelf:
|
17
18
|
Enabled: false
|
18
19
|
|
20
|
+
Style/Documentation:
|
21
|
+
Enabled: false
|
22
|
+
|
19
23
|
Layout/IndentationWidth:
|
20
24
|
Enabled: false
|
21
25
|
|
@@ -40,6 +44,15 @@ Layout/CaseIndentation:
|
|
40
44
|
EnforcedStyle: end
|
41
45
|
IndentOneStep: true
|
42
46
|
|
47
|
+
Metrics/AbcSize:
|
48
|
+
Max: 25
|
49
|
+
|
50
|
+
Metrics/CyclomaticComplexity:
|
51
|
+
Max: 25
|
52
|
+
|
53
|
+
Metrics/MethodLength:
|
54
|
+
Max: 20
|
55
|
+
|
43
56
|
# Ignore for rspec
|
44
57
|
Metrics/BlockLength:
|
45
|
-
|
58
|
+
IgnoredMethods: ['describe', 'context']
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.3.0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
## 2.0.0 (2024-03-05)
|
4
|
+
|
5
|
+
- Test against latest Ruby 3.3 and minimum 3.1.x
|
6
|
+
|
7
|
+
## 1.2.0 (2022-10-26)
|
8
|
+
|
9
|
+
- Test against latest Ruby 3.1, minimum version 2.7
|
10
|
+
|
3
11
|
## 1.1.2 (2022-04-12)
|
4
12
|
|
5
13
|
- Fix issue with mismatched case for Twitter screen_name. (#22)
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
augury (
|
4
|
+
augury (2.0.0)
|
5
5
|
thor (~> 1.0.0)
|
6
6
|
twitter (~> 7.0)
|
7
7
|
word_wrap (~> 1.0)
|
@@ -9,117 +9,118 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
addressable (2.8.
|
13
|
-
public_suffix (>= 2.0.2, <
|
12
|
+
addressable (2.8.6)
|
13
|
+
public_suffix (>= 2.0.2, < 6.0)
|
14
14
|
ast (2.4.2)
|
15
15
|
awesome_print (1.9.2)
|
16
16
|
backport (1.2.0)
|
17
|
-
benchmark (0.
|
17
|
+
benchmark (0.3.0)
|
18
|
+
bigdecimal (3.1.6)
|
18
19
|
buftok (0.2.0)
|
19
|
-
bundler-audit (0.9.
|
20
|
+
bundler-audit (0.9.1)
|
20
21
|
bundler (>= 1.2.0, < 3)
|
21
22
|
thor (~> 1.0)
|
22
23
|
byebug (11.1.3)
|
23
24
|
coderay (1.1.3)
|
24
|
-
crack (0.
|
25
|
+
crack (1.0.0)
|
26
|
+
bigdecimal
|
25
27
|
rexml
|
26
|
-
diff-lcs (1.5.
|
28
|
+
diff-lcs (1.5.1)
|
27
29
|
docile (1.4.0)
|
28
|
-
domain_name (0.
|
29
|
-
unf (>= 0.0.5, < 1.0.0)
|
30
|
+
domain_name (0.6.20240107)
|
30
31
|
e2mmap (0.1.0)
|
31
32
|
equalizer (0.0.11)
|
32
|
-
ffi (1.
|
33
|
+
ffi (1.16.3)
|
33
34
|
ffi-compiler (1.0.1)
|
34
35
|
ffi (>= 1.0.0)
|
35
36
|
rake
|
36
|
-
hashdiff (1.0
|
37
|
+
hashdiff (1.1.0)
|
37
38
|
http (4.4.1)
|
38
39
|
addressable (~> 2.3)
|
39
40
|
http-cookie (~> 1.0)
|
40
41
|
http-form_data (~> 2.2)
|
41
42
|
http-parser (~> 1.2.0)
|
42
|
-
http-cookie (1.0.
|
43
|
+
http-cookie (1.0.5)
|
43
44
|
domain_name (~> 0.5)
|
44
45
|
http-form_data (2.3.0)
|
45
46
|
http-parser (1.2.3)
|
46
47
|
ffi-compiler (>= 1.0, < 2.0)
|
47
48
|
http_parser.rb (0.6.0)
|
48
|
-
jaro_winkler (1.5.
|
49
|
-
json (2.
|
50
|
-
kramdown (2.
|
49
|
+
jaro_winkler (1.5.6)
|
50
|
+
json (2.7.1)
|
51
|
+
kramdown (2.4.0)
|
51
52
|
rexml
|
52
53
|
kramdown-parser-gfm (1.1.0)
|
53
54
|
kramdown (~> 2.0)
|
54
55
|
memoizable (0.4.2)
|
55
56
|
thread_safe (~> 0.3, >= 0.3.1)
|
56
57
|
method_source (1.0.0)
|
57
|
-
mini_portile2 (2.8.
|
58
|
-
multipart-post (2.
|
58
|
+
mini_portile2 (2.8.5)
|
59
|
+
multipart-post (2.4.0)
|
59
60
|
naught (1.1.0)
|
60
|
-
nokogiri (1.
|
61
|
-
mini_portile2 (~> 2.8.
|
61
|
+
nokogiri (1.16.2)
|
62
|
+
mini_portile2 (~> 2.8.2)
|
62
63
|
racc (~> 1.4)
|
63
|
-
parallel (1.
|
64
|
-
parser (3.
|
64
|
+
parallel (1.24.0)
|
65
|
+
parser (3.3.0.5)
|
65
66
|
ast (~> 2.4.1)
|
66
|
-
|
67
|
+
racc
|
68
|
+
pry (0.14.2)
|
67
69
|
coderay (~> 1.1)
|
68
70
|
method_source (~> 1.0)
|
69
71
|
pry-awesome_print (9.6.11)
|
70
72
|
awesome_print (>= 1.1.0, < 999)
|
71
73
|
pry (>= 0.9.0, < 999)
|
72
|
-
pry-byebug (3.
|
74
|
+
pry-byebug (3.10.1)
|
73
75
|
byebug (~> 11.0)
|
74
|
-
pry (
|
75
|
-
pry-doc (1.
|
76
|
+
pry (>= 0.13, < 0.15)
|
77
|
+
pry-doc (1.5.0)
|
76
78
|
pry (~> 0.11)
|
77
79
|
yard (~> 0.9.11)
|
78
|
-
public_suffix (
|
79
|
-
racc (1.
|
80
|
+
public_suffix (5.0.4)
|
81
|
+
racc (1.7.3)
|
80
82
|
rainbow (3.1.1)
|
81
|
-
rake (13.0
|
82
|
-
regexp_parser (2.
|
83
|
+
rake (13.1.0)
|
84
|
+
regexp_parser (2.9.0)
|
83
85
|
reverse_markdown (2.1.1)
|
84
86
|
nokogiri
|
85
|
-
rexml (3.2.
|
86
|
-
rspec (3.
|
87
|
-
rspec-core (~> 3.
|
88
|
-
rspec-expectations (~> 3.
|
89
|
-
rspec-mocks (~> 3.
|
90
|
-
rspec-core (3.
|
91
|
-
rspec-support (~> 3.
|
92
|
-
rspec-expectations (3.
|
87
|
+
rexml (3.2.6)
|
88
|
+
rspec (3.13.0)
|
89
|
+
rspec-core (~> 3.13.0)
|
90
|
+
rspec-expectations (~> 3.13.0)
|
91
|
+
rspec-mocks (~> 3.13.0)
|
92
|
+
rspec-core (3.13.0)
|
93
|
+
rspec-support (~> 3.13.0)
|
94
|
+
rspec-expectations (3.13.0)
|
93
95
|
diff-lcs (>= 1.2.0, < 2.0)
|
94
|
-
rspec-support (~> 3.
|
95
|
-
rspec-mocks (3.
|
96
|
+
rspec-support (~> 3.13.0)
|
97
|
+
rspec-mocks (3.13.0)
|
96
98
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
|
-
rspec-support (~> 3.
|
98
|
-
rspec-support (3.
|
99
|
-
rubocop (
|
99
|
+
rspec-support (~> 3.13.0)
|
100
|
+
rspec-support (3.13.1)
|
101
|
+
rubocop (1.31.0)
|
100
102
|
parallel (~> 1.10)
|
101
|
-
parser (>=
|
103
|
+
parser (>= 3.1.0.0)
|
102
104
|
rainbow (>= 2.2.2, < 4.0)
|
103
|
-
regexp_parser (>= 1.
|
104
|
-
rexml
|
105
|
-
rubocop-ast (>=
|
105
|
+
regexp_parser (>= 1.8, < 3.0)
|
106
|
+
rexml (>= 3.2.5, < 4.0)
|
107
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
106
108
|
ruby-progressbar (~> 1.7)
|
107
|
-
unicode-display_width (>= 1.4.0, <
|
108
|
-
rubocop-ast (1.
|
109
|
-
parser (>= 3.
|
110
|
-
rubocop-rake (0.
|
111
|
-
rubocop
|
112
|
-
rubocop-rspec (
|
113
|
-
rubocop (~>
|
114
|
-
|
115
|
-
ruby-progressbar (1.11.0)
|
109
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
110
|
+
rubocop-ast (1.31.1)
|
111
|
+
parser (>= 3.3.0.4)
|
112
|
+
rubocop-rake (0.6.0)
|
113
|
+
rubocop (~> 1.0)
|
114
|
+
rubocop-rspec (2.12.1)
|
115
|
+
rubocop (~> 1.31)
|
116
|
+
ruby-progressbar (1.13.0)
|
116
117
|
simple_oauth (0.3.1)
|
117
118
|
simplecov (0.17.1)
|
118
119
|
docile (~> 1.1)
|
119
120
|
json (>= 1.8, < 3)
|
120
121
|
simplecov-html (~> 0.10.0)
|
121
122
|
simplecov-html (0.10.2)
|
122
|
-
solargraph (0.
|
123
|
+
solargraph (0.48.0)
|
123
124
|
backport (~> 1.2)
|
124
125
|
benchmark
|
125
126
|
bundler (>= 1.17.2)
|
@@ -136,7 +137,7 @@ GEM
|
|
136
137
|
yard (~> 0.9, >= 0.9.24)
|
137
138
|
thor (1.0.1)
|
138
139
|
thread_safe (0.3.6)
|
139
|
-
tilt (2.0
|
140
|
+
tilt (2.3.0)
|
140
141
|
twitter (7.0.0)
|
141
142
|
addressable (~> 2.3)
|
142
143
|
buftok (~> 0.2.0)
|
@@ -148,19 +149,14 @@ GEM
|
|
148
149
|
multipart-post (~> 2.0)
|
149
150
|
naught (~> 1.0)
|
150
151
|
simple_oauth (~> 0.3.0)
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
unicode-display_width (1.8.0)
|
155
|
-
vcr (6.1.0)
|
156
|
-
webmock (3.14.0)
|
152
|
+
unicode-display_width (2.5.0)
|
153
|
+
vcr (6.2.0)
|
154
|
+
webmock (3.23.0)
|
157
155
|
addressable (>= 2.8.0)
|
158
156
|
crack (>= 0.3.2)
|
159
157
|
hashdiff (>= 0.4.0, < 2.0.0)
|
160
|
-
webrick (1.7.0)
|
161
158
|
word_wrap (1.0.0)
|
162
|
-
yard (0.9.
|
163
|
-
webrick (~> 1.7.0)
|
159
|
+
yard (0.9.36)
|
164
160
|
|
165
161
|
PLATFORMS
|
166
162
|
ruby
|
@@ -174,7 +170,7 @@ DEPENDENCIES
|
|
174
170
|
pry-doc
|
175
171
|
rake
|
176
172
|
rspec (~> 3.0)
|
177
|
-
rubocop (= 0
|
173
|
+
rubocop (= 1.31.0)
|
178
174
|
rubocop-rake
|
179
175
|
rubocop-rspec
|
180
176
|
simplecov (< 0.18)
|
@@ -183,4 +179,4 @@ DEPENDENCIES
|
|
183
179
|
webmock
|
184
180
|
|
185
181
|
BUNDLED WITH
|
186
|
-
2.
|
182
|
+
2.5.3
|
data/augury.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'This gem turns a twitter feed into a fortune file that you can use with the fortune program'
|
13
13
|
spec.homepage = 'https://github.com/claytron/augury'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.1')
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
18
|
spec.bindir = 'exe'
|
@@ -20,8 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
# Actual dependencies
|
23
|
+
# TODO: The options override in Augury::CLI doesn't work in Thor 1.1+
|
23
24
|
spec.add_dependency 'thor', '~>1.0.0'
|
24
25
|
spec.add_dependency 'twitter', '~>7.0'
|
25
26
|
## For the word_wrap function
|
26
27
|
spec.add_dependency 'word_wrap', '~>1.0'
|
28
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
27
29
|
end
|
data/bin/extract_creds
CHANGED
@@ -4,7 +4,10 @@
|
|
4
4
|
require 'yaml'
|
5
5
|
|
6
6
|
begin
|
7
|
-
augury_config = YAML.load_file(
|
7
|
+
augury_config = YAML.load_file(
|
8
|
+
File.expand_path('~/.augury.yml'),
|
9
|
+
permitted_classes: [Regexp],
|
10
|
+
)
|
8
11
|
puts augury_config['twitter'].collect { |k, v| "export TWITTER_#{k.upcase}=#{v}" }.join("\n")
|
9
12
|
rescue Errno::ENOENT
|
10
13
|
puts 'echo "No config file present (~/.augury.yml) no env vars set"'
|
data/exe/augury
CHANGED
data/lib/augury/cli.rb
CHANGED
@@ -74,6 +74,7 @@ module Augury
|
|
74
74
|
|
75
75
|
private
|
76
76
|
|
77
|
+
# TODO: This override doesn't work in Thor 1.1+
|
77
78
|
def options
|
78
79
|
original_options = super
|
79
80
|
defaults = Thor::CoreExt::HashWithIndifferentAccess.new(
|
@@ -85,7 +86,9 @@ module Augury
|
|
85
86
|
|
86
87
|
config_path = File.expand_path(ENV.fetch('AUGURY_CFG_PATH', '~/.augury.yml'))
|
87
88
|
if File.file?(config_path)
|
88
|
-
config_options = Thor::CoreExt::HashWithIndifferentAccess.new(
|
89
|
+
config_options = Thor::CoreExt::HashWithIndifferentAccess.new(
|
90
|
+
YAML.load_file(config_path, permitted_classes: [Regexp]) || {},
|
91
|
+
)
|
89
92
|
defaults = defaults.merge(config_options)
|
90
93
|
end
|
91
94
|
|
data/lib/augury/fortune.rb
CHANGED
@@ -92,7 +92,7 @@ module Augury
|
|
92
92
|
|
93
93
|
def transforms
|
94
94
|
all_transforms = []
|
95
|
-
all_transforms << [
|
95
|
+
all_transforms << [%r{https?://[^\s]+}, ''] if @config[:remove_links]
|
96
96
|
return all_transforms unless @config[:apply_transforms]
|
97
97
|
|
98
98
|
all_transforms.push(*@config.dig('transforms', @username) || [])
|
data/lib/augury/version.rb
CHANGED
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clayton Parker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -90,7 +90,8 @@ files:
|
|
90
90
|
homepage: https://github.com/claytron/augury
|
91
91
|
licenses:
|
92
92
|
- MIT
|
93
|
-
metadata:
|
93
|
+
metadata:
|
94
|
+
rubygems_mfa_required: 'true'
|
94
95
|
post_install_message:
|
95
96
|
rdoc_options: []
|
96
97
|
require_paths:
|
@@ -99,14 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
100
|
requirements:
|
100
101
|
- - ">="
|
101
102
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
103
|
+
version: '3.1'
|
103
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
105
|
requirements:
|
105
106
|
- - ">="
|
106
107
|
- !ruby/object:Gem::Version
|
107
108
|
version: '0'
|
108
109
|
requirements: []
|
109
|
-
rubygems_version: 3.
|
110
|
+
rubygems_version: 3.5.3
|
110
111
|
signing_key:
|
111
112
|
specification_version: 4
|
112
113
|
summary: Turn a twitter feed into a fortune file
|