Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Commit

Permalink
Enable travis/rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjfisher committed Nov 2, 2017
1 parent e99ee0b commit b5ebee0
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
AllCops:
TargetRubyVersion: 2.1
Exclude:
- 'vendor/**/*'

Metrics/LineLength:
Max: 140

Metrics/AbcSize:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/BlockLength:
Exclude:
- spec/**/*_spec.rb

Metrics/PerceivedComplexity:
Enabled: false

Metrics/ModuleLength:
Max: 175

Style/RegexpLiteral:
EnforcedStyle: percent_r
Enabled: True
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
sudo: false
language: ruby
cache: bundler
dist: trusty
before_install:
- bundle -v
- rm Gemfile.lock || true
- gem update --system
- gem update bundler
- bundle -v
script:
- 'bundle exec rake test'
rvm:
- 2.1.9
- 2.4.2
branches:
only:
- master
- /^v\d/
notifications:
email: false
irc:
on_success: always
on_failure: always
channels:
- "chat.freenode.org#voxpupuli-notifications"
8 changes: 8 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
desc 'Run all tests'
task test: %i[rubocop spec]

require 'rubocop/rake_task'
RuboCop::RakeTask.new

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
6 changes: 5 additions & 1 deletion puppet-webhook.gemspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# coding: utf-8
# rubocop:disable Metrics/BlockLength
Gem::Specification.new do |spec|
spec.name = 'puppet_webhook'
spec.summary = 'Sinatra Webhook Server for Puppet/R10K'
spec.version = '0.0.1'
spec.platform = Gem::Platform::RUBY
spec.required_ruby_version = '>= 2.1.9'
spec.authors = ['Vox Pupuli']
spec.email = 'voxpupuli@groups.io'
spec.files = Dir[
Expand All @@ -26,4 +27,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'slack-notifier'
spec.add_runtime_dependency 'webrick'
spec.add_development_dependency 'github_changelog_generator'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rubocop'
end

0 comments on commit b5ebee0

Please sign in to comment.