Skip to content

Commit 06de73a

Browse files
committed
update to latest standards / rubocop
1 parent ebbd595 commit 06de73a

17 files changed

+231
-34
lines changed

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/.bundle/
22
/vendor/
33
/.yardoc
4-
/Gemfile.lock
54
/_yardoc/
65
/coverage/
76
/doc/
87
/pkg/
98
/spec/reports/
109
/tmp/
11-
*.gem
1210
/bin/*
11+
12+
# rspec failure tracking
13+
.rspec_status

.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AllCops:
2-
TargetRubyVersion: 2.7
2+
TargetRubyVersion: 2.6
33
Exclude:
44
- bin/**/*
55
- vendor/**/*

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
language: ruby
22
rvm:
3-
- 2.7.2
3+
- 2.7
4+
- 2.6

Gemfile

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
# Specify your gem's dependencies in augury.gemspec
46
gemspec
7+
8+
gem 'rake'
9+
10+
# Testing
11+
gem 'rspec', '~>3.0'
12+
gem 'simplecov'
13+
14+
# Debugging
15+
gem 'pry'
16+
gem 'pry-awesome_print'
17+
gem 'pry-byebug'
18+
19+
# Linting / completion
20+
gem 'rubocop-rake'
21+
gem 'rubocop-rspec'
22+
gem 'solargraph'

Gemfile.lock

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
PATH
2+
remote: .
3+
specs:
4+
augury (0.3.1)
5+
equalizer (~> 0.0)
6+
facets (~> 3.0)
7+
parseconfig (~> 1.0)
8+
thor (~> 1.0)
9+
twitter (~> 7.0)
10+
wannabe_bool (~> 0.7)
11+
12+
GEM
13+
remote: https://rubygems.org/
14+
specs:
15+
addressable (2.7.0)
16+
public_suffix (>= 2.0.2, < 5.0)
17+
ast (2.4.1)
18+
awesome_print (1.8.0)
19+
backport (1.1.2)
20+
benchmark (0.1.1)
21+
buftok (0.2.0)
22+
byebug (11.1.3)
23+
coderay (1.1.3)
24+
diff-lcs (1.4.4)
25+
docile (1.3.4)
26+
domain_name (0.5.20190701)
27+
unf (>= 0.0.5, < 1.0.0)
28+
e2mmap (0.1.0)
29+
equalizer (0.0.11)
30+
facets (3.1.0)
31+
ffi (1.14.2)
32+
ffi-compiler (1.0.1)
33+
ffi (>= 1.0.0)
34+
rake
35+
http (4.4.1)
36+
addressable (~> 2.3)
37+
http-cookie (~> 1.0)
38+
http-form_data (~> 2.2)
39+
http-parser (~> 1.2.0)
40+
http-cookie (1.0.3)
41+
domain_name (~> 0.5)
42+
http-form_data (2.3.0)
43+
http-parser (1.2.2)
44+
ffi-compiler
45+
http_parser.rb (0.6.0)
46+
jaro_winkler (1.5.4)
47+
kramdown (2.3.0)
48+
rexml
49+
kramdown-parser-gfm (1.1.0)
50+
kramdown (~> 2.0)
51+
memoizable (0.4.2)
52+
thread_safe (~> 0.3, >= 0.3.1)
53+
method_source (1.0.0)
54+
mini_portile2 (2.5.0)
55+
multipart-post (2.1.1)
56+
naught (1.1.0)
57+
nokogiri (1.11.0)
58+
mini_portile2 (~> 2.5.0)
59+
racc (~> 1.4)
60+
parallel (1.20.1)
61+
parseconfig (1.0.8)
62+
parser (2.7.2.0)
63+
ast (~> 2.4.1)
64+
pry (0.13.1)
65+
coderay (~> 1.1)
66+
method_source (~> 1.0)
67+
pry-awesome_print (9.6.11)
68+
awesome_print (>= 1.1.0, < 999)
69+
pry (>= 0.9.0, < 999)
70+
pry-byebug (3.9.0)
71+
byebug (~> 11.0)
72+
pry (~> 0.13.0)
73+
public_suffix (4.0.6)
74+
racc (1.5.2)
75+
rainbow (3.0.0)
76+
rake (13.0.3)
77+
regexp_parser (2.0.3)
78+
reverse_markdown (2.0.0)
79+
nokogiri
80+
rexml (3.2.4)
81+
rspec (3.10.0)
82+
rspec-core (~> 3.10.0)
83+
rspec-expectations (~> 3.10.0)
84+
rspec-mocks (~> 3.10.0)
85+
rspec-core (3.10.1)
86+
rspec-support (~> 3.10.0)
87+
rspec-expectations (3.10.1)
88+
diff-lcs (>= 1.2.0, < 2.0)
89+
rspec-support (~> 3.10.0)
90+
rspec-mocks (3.10.1)
91+
diff-lcs (>= 1.2.0, < 2.0)
92+
rspec-support (~> 3.10.0)
93+
rspec-support (3.10.1)
94+
rubocop (1.7.0)
95+
parallel (~> 1.10)
96+
parser (>= 2.7.1.5)
97+
rainbow (>= 2.2.2, < 4.0)
98+
regexp_parser (>= 1.8, < 3.0)
99+
rexml
100+
rubocop-ast (>= 1.2.0, < 2.0)
101+
ruby-progressbar (~> 1.7)
102+
unicode-display_width (>= 1.4.0, < 2.0)
103+
rubocop-ast (1.4.0)
104+
parser (>= 2.7.1.5)
105+
rubocop-rake (0.5.1)
106+
rubocop
107+
rubocop-rspec (2.1.0)
108+
rubocop (~> 1.0)
109+
rubocop-ast (>= 1.1.0)
110+
ruby-progressbar (1.11.0)
111+
simple_oauth (0.3.1)
112+
simplecov (0.21.0)
113+
docile (~> 1.1)
114+
simplecov-html (~> 0.11)
115+
simplecov_json_formatter (~> 0.1)
116+
simplecov-html (0.12.3)
117+
simplecov_json_formatter (0.1.2)
118+
solargraph (0.40.1)
119+
backport (~> 1.1)
120+
benchmark
121+
bundler (>= 1.17.2)
122+
e2mmap
123+
jaro_winkler (~> 1.5)
124+
kramdown (~> 2.3)
125+
kramdown-parser-gfm (~> 1.1)
126+
parser (~> 2.3)
127+
reverse_markdown (>= 1.0.5, < 3)
128+
rubocop (>= 0.52)
129+
thor (~> 1.0)
130+
tilt (~> 2.0)
131+
yard (~> 0.9, >= 0.9.24)
132+
thor (1.0.1)
133+
thread_safe (0.3.6)
134+
tilt (2.0.10)
135+
twitter (7.0.0)
136+
addressable (~> 2.3)
137+
buftok (~> 0.2.0)
138+
equalizer (~> 0.0.11)
139+
http (~> 4.0)
140+
http-form_data (~> 2.0)
141+
http_parser.rb (~> 0.6.0)
142+
memoizable (~> 0.4.0)
143+
multipart-post (~> 2.0)
144+
naught (~> 1.0)
145+
simple_oauth (~> 0.3.0)
146+
unf (0.1.4)
147+
unf_ext
148+
unf_ext (0.0.7.7)
149+
unicode-display_width (1.7.0)
150+
wannabe_bool (0.7.1)
151+
yard (0.9.26)
152+
153+
PLATFORMS
154+
ruby
155+
156+
DEPENDENCIES
157+
augury!
158+
pry
159+
pry-awesome_print
160+
pry-byebug
161+
rake
162+
rspec (~> 3.0)
163+
rubocop-rake
164+
rubocop-rspec
165+
simplecov
166+
solargraph
167+
168+
BUNDLED WITH
169+
2.1.4

Rakefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
require "bundler/gem_tasks"
2-
require "rspec/core/rake_task"
1+
# frozen_string_literal: true
2+
3+
require 'bundler/gem_tasks'
4+
require 'rspec/core/rake_task'
35

46
RSpec::Core::RakeTask.new(:spec)
57

6-
task :default => :spec
8+
task default: :spec

augury.gemspec

+7-23
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# coding: utf-8
2-
lib = File.expand_path('../lib', __FILE__)
3-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4-
require 'augury/version'
1+
# frozen_string_literal: true
2+
3+
require_relative 'lib/augury/version'
54

65
Gem::Specification.new do |spec|
76
spec.name = 'augury'
87
spec.version = Augury::VERSION
98
spec.authors = ['Clayton Parker']
109
spec.email = ['[email protected]']
1110

12-
spec.summary = %q{Turn a twitter feed into a fortune file}
13-
spec.description = %q{This gem turns a twitter feed into a fortune file that you can use with the fortune program}
11+
spec.summary = 'Turn a twitter feed into a fortune file'
12+
spec.description = 'This gem turns a twitter feed into a fortune file that you can use with the fortune program'
1413
spec.homepage = 'https://github.com/claytron/augury'
1514
spec.license = 'MIT'
15+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
1616

1717
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
1818
spec.bindir = 'exe'
@@ -26,22 +26,6 @@ Gem::Specification.new do |spec|
2626
## Handle booleans from simple config
2727
spec.add_dependency 'wannabe_bool', '~>0.7'
2828
## For the word_wrap function
29-
spec.add_dependency 'facets', '~>3.0'
3029
spec.add_dependency 'equalizer', '~>0.0'
31-
32-
# Development dependencies
33-
## Setup
34-
spec.add_development_dependency 'bundler'
35-
spec.add_development_dependency 'rake'
36-
## Testing
37-
spec.add_development_dependency 'rspec', '~>3.10'
38-
spec.add_development_dependency 'fakefs', '~>1.0'
39-
## Debugging
40-
spec.add_development_dependency 'pry'
41-
spec.add_development_dependency 'pry-byebug'
42-
spec.add_development_dependency 'pry-awesome_print'
43-
## Linting / completion
44-
spec.add_development_dependency 'rubocop-rspec'
45-
spec.add_development_dependency 'rubocop-rake'
46-
spec.add_development_dependency 'solargraph'
30+
spec.add_dependency 'facets', '~>3.0'
4731
end

lib/augury.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
require "augury/version"
1+
# frozen_string_literal: true
2+
3+
require 'augury/version'
24

35
module Augury
4-
# Your code goes here...
56
end
67

78
require 'augury/fortune'

lib/augury/cli.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'thor'
24
require 'augury'
35

lib/augury/exception.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Augury
24
class TwitterConfigError < StandardError
35
def message

lib/augury/fortune.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'facets/string/word_wrap'
24
require 'parseconfig'
35
require 'twitter'
@@ -77,6 +79,7 @@ def augury_config(username, path, width, append, count)
7779
def twitter_config
7880
config = @config.params['twitter']
7981
raise Augury::TwitterConfigError unless config
82+
8083
@twitter = Twitter::REST::Client.new do |cfg|
8184
cfg.consumer_key = config['consumer_key']
8285
cfg.consumer_secret = config['consumer_secret']

lib/augury/version.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Augury
2-
VERSION = "0.3.1"
4+
VERSION = '0.3.1'
35
end

spec/lib/augury/cli_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'spec_helper'
24
require 'augury/cli'
35

spec/lib/augury/fortune_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'spec_helper'
24

35
describe Augury::Fortune do

spec/lib/augury/version_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'spec_helper'
24

35
describe Augury::VERSION do

spec/lib/augury_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'spec_helper'
24

35
describe Augury do

spec/spec_helper.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1+
# frozen_string_literal: true
2+
23
require 'augury'
4+
5+
RSpec.configure do |config|
6+
end

0 commit comments

Comments
 (0)