Skip to content

Commit bafa52e

Browse files
committed
Add task style:travis to lint .travis.yml
1 parent c870b84 commit bafa52e

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ source 'https://rubygems.org'
44
group :development do
55
gem 'emeril', '~> 0.8.0'
66
gem 'rake', '~> 11.1.2'
7+
gem 'travis', '~> 1.8.2'
78
end # group
89

910
group :test do

Gemfile.lock

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ GEM
44
addressable (2.4.0)
55
artifactory (2.3.2)
66
ast (2.2.0)
7+
backports (3.6.8)
78
berkshelf (4.3.2)
89
addressable (~> 2.3, >= 2.3.4)
910
berkshelf-api-client (~> 2.0, >= 2.0.2)
@@ -86,8 +87,12 @@ GEM
8687
emeril (0.8.0)
8788
chef (> 0.10.10)
8889
erubis (2.7.0)
90+
ethon (0.9.0)
91+
ffi (>= 1.3.0)
8992
faraday (0.9.2)
9093
multipart-post (>= 1.2, < 3)
94+
faraday_middleware (0.10.0)
95+
faraday (>= 0.7.4, < 0.10)
9196
fauxhai (3.4.0)
9297
net-ssh
9398
ffi (1.9.10)
@@ -102,6 +107,13 @@ GEM
102107
treetop (~> 1.4)
103108
yajl-ruby (~> 1.1)
104109
fuzzyurl (0.8.0)
110+
gh (0.14.0)
111+
addressable
112+
backports
113+
faraday (~> 0.8)
114+
multi_json (~> 1.0)
115+
net-http-persistent (>= 2.7)
116+
net-http-pipeline
105117
gherkin (3.2.0)
106118
hashie (3.4.4)
107119
highline (1.7.8)
@@ -111,6 +123,8 @@ GEM
111123
json (1.8.3)
112124
kitchen-docker (2.4.0)
113125
test-kitchen (>= 1.0.0)
126+
launchy (2.4.3)
127+
addressable (~> 2.3)
114128
libyajl2 (1.2.0)
115129
mini_portile2 (2.0.0)
116130
minitar (0.5.4)
@@ -131,6 +145,8 @@ GEM
131145
molinillo (0.4.5)
132146
multi_json (1.11.3)
133147
multipart-post (2.0.0)
148+
net-http-persistent (2.9.4)
149+
net-http-pipeline (1.0.1)
134150
net-scp (1.2.1)
135151
net-ssh (>= 2.6.5)
136152
net-sftp (2.1.2)
@@ -165,6 +181,9 @@ GEM
165181
polyglot (0.3.5)
166182
powerpack (0.1.1)
167183
proxifier (1.0.3)
184+
pusher-client (0.6.2)
185+
json
186+
websocket (~> 1.0)
168187
rack (1.6.4)
169188
rainbow (2.1.0)
170189
rake (11.1.2)
@@ -245,13 +264,25 @@ GEM
245264
thor (0.19.1)
246265
timers (4.0.4)
247266
hitimes
267+
travis (1.8.2)
268+
backports
269+
faraday (~> 0.9)
270+
faraday_middleware (~> 0.9, >= 0.9.1)
271+
gh (~> 0.13)
272+
highline (~> 1.6)
273+
launchy (~> 2.1)
274+
pusher-client (~> 0.4)
275+
typhoeus (~> 0.6, >= 0.6.8)
248276
treetop (1.6.5)
249277
polyglot (~> 0.3)
278+
typhoeus (0.8.0)
279+
ethon (>= 0.8.0)
250280
unicode-display_width (1.0.3)
251281
uuidtools (2.1.5)
252282
varia_model (0.4.1)
253283
buff-extensions (~> 1.0)
254284
hashie (>= 2.0.2, < 4.0.0)
285+
websocket (1.2.3)
255286
wmi-lite (1.0.0)
256287
yajl-ruby (1.2.1)
257288

@@ -267,6 +298,7 @@ DEPENDENCIES
267298
rake (~> 11.1.2)
268299
rubocop (~> 0.39.0)
269300
test-kitchen (~> 1.8.0)
301+
travis (~> 1.8.2)
270302

271303
BUNDLED WITH
272304
1.12.1

tasks/style.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# - $ git submodule add git://github.com/etsy/foodcritic-rules.git spec/foodcritic/etsy
2727

2828
#----------------------------------------------------------------------- style
29-
# Style tests. Rubocop and Foodcritic
29+
# Style tests. Rubocop, Foodcritic, and Travis
3030
namespace :style do
3131
begin
3232
require 'rubocop/rake_task'
@@ -60,7 +60,17 @@
6060
sh 'git submodule update --init --recursive'
6161
end # task
6262
end # namespace
63+
64+
begin
65+
require 'travis'
66+
desc 'Run lint checks on .travis.yml'
67+
task :travis do
68+
sh 'bundle exec travis lint -x'
69+
end # task
70+
rescue LoadError, NameError
71+
STDOUT.puts '[WARN] Travis gem not loaded'.yellow
72+
end
6373
end # namespace
6474

6575
desc 'Run all style checks'
66-
task :style => ['style:chef', 'style:ruby']
76+
task :style => ['style:chef', 'style:ruby', 'style:travis']

0 commit comments

Comments
 (0)