summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.rubocop_todo.yml29
-rw-r--r--README.md2
-rw-r--r--oxidized.gemspec27
-rw-r--r--spec/spec_helper.rb8
4 files changed, 25 insertions, 41 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index b91409a..ac9dca5 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -6,14 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
-# Offense count: 5
-# Cop supports --auto-correct.
-# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
-# Include: **/*.gemspec
-Gemspec/OrderedDependencies:
- Exclude:
- - 'oxidized.gemspec'
-
# Offense count: 1
# Configuration parameters: Include.
# Include: **/*.gemspec
@@ -84,12 +76,6 @@ Layout/ElseAlignment:
- 'lib/oxidized/output/gitcrypt.rb'
- 'lib/oxidized/source/csv.rb'
-# Offense count: 1
-# Cop supports --auto-correct.
-Layout/EmptyLineAfterMagicComment:
- Exclude:
- - 'oxidized.gemspec'
-
# Offense count: 17
# Cop supports --auto-correct.
# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
@@ -338,7 +324,6 @@ Layout/SpaceInsideArrayLiteralBrackets:
Exclude:
- 'lib/oxidized/input/ssh.rb'
- 'lib/oxidized/input/telnet.rb'
- - 'oxidized.gemspec'
# Offense count: 29
# Cop supports --auto-correct.
@@ -384,12 +369,6 @@ Layout/SpaceInsideParens:
- 'lib/oxidized/input/telnet.rb'
- 'lib/oxidized/model/asa.rb'
-# Offense count: 5
-# Cop supports --auto-correct.
-Layout/SpaceInsidePercentLiteralDelimiters:
- Exclude:
- - 'oxidized.gemspec'
-
# Offense count: 6
# Cop supports --auto-correct.
Layout/SpaceInsideRangeLiteral:
@@ -758,18 +737,11 @@ Style/EmptyMethod:
Exclude:
- 'lib/oxidized/hook.rb'
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/Encoding:
- Exclude:
- - 'oxidized.gemspec'
-
# Offense count: 2
# Cop supports --auto-correct.
Style/ExpandPathArguments:
Exclude:
- 'bin/console'
- - 'oxidized.gemspec'
# Offense count: 6
# Cop supports --auto-correct.
@@ -944,7 +916,6 @@ Style/PercentLiteralDelimiters:
Exclude:
- 'lib/oxidized/config.rb'
- 'lib/oxidized/input/ssh.rb'
- - 'oxidized.gemspec'
# Offense count: 22
# Cop supports --auto-correct.
diff --git a/README.md b/README.md
index 9e52792..76b9add 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Oxidized [![Build Status](https://travis-ci.org/ytti/oxidized.svg)](https://travis-ci.org/ytti/oxidized) [![Gem Version](https://badge.fury.io/rb/oxidized.svg)](http://badge.fury.io/rb/oxidized) [![Join the chat at https://gitter.im/oxidized/Lobby](https://badges.gitter.im/oxidized/Lobby.svg)](https://gitter.im/oxidized/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+# Oxidized [![Build Status](https://travis-ci.org/ytti/oxidized.svg)](https://travis-ci.org/ytti/oxidized) [![codecov.io](https://codecov.io/gh/ytti/oxidized/coverage.svg?branch=master)](https://codecov.io/gh/ytti/oxidized?branch=master) [![Gem Version](https://badge.fury.io/rb/oxidized.svg)](http://badge.fury.io/rb/oxidized) [![Join the chat at https://gitter.im/oxidized/Lobby](https://badges.gitter.im/oxidized/Lobby.svg)](https://gitter.im/oxidized/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Oxidized is a network device configuration backup tool. It's a RANCID replacement!
diff --git a/oxidized.gemspec b/oxidized.gemspec
index dfcaf4c..105da7e 100644
--- a/oxidized.gemspec
+++ b/oxidized.gemspec
@@ -1,39 +1,44 @@
-# coding: utf-8
-lib = File.expand_path('../lib', __FILE__)
+
+lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'oxidized/version'
Gem::Specification.new do |s|
s.name = 'oxidized'
s.version = Oxidized::VERSION
- s.licenses = %w( Apache-2.0 )
+ s.licenses = %w[Apache-2.0]
s.platform = Gem::Platform::RUBY
- s.authors = [ 'Saku Ytti', 'Samer Abdel-Hafez', 'Anton Aksola' ]
- s.email = %w( saku@ytti.fi sam@arahant.net aakso@iki.fi)
+ s.authors = ['Saku Ytti', 'Samer Abdel-Hafez', 'Anton Aksola']
+ s.email = %w[saku@ytti.fi sam@arahant.net aakso@iki.fi]
s.homepage = 'http://github.com/ytti/oxidized'
s.summary = 'feeble attempt at rancid'
s.description = 'software to fetch configuration from network devices and store them'
s.rubyforge_project = s.name
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
- s.executables = %w( oxidized )
+ s.executables = %w[oxidized]
s.require_path = 'lib'
s.required_ruby_version = '>= 2.0.0'
s.add_runtime_dependency 'asetus', '~> 0.1'
- s.add_runtime_dependency 'slop', '~> 3.5'
s.add_runtime_dependency 'net-ssh', '~> 4.1.0'
s.add_runtime_dependency 'rugged', '~> 0.21', '>= 0.21.4'
+ s.add_runtime_dependency 'slop', '~> 3.5'
if defined?(RUBY_VERSION) && RUBY_VERSION > '2.3'
s.add_runtime_dependency 'net-telnet', '~> 0'
end
+
+ s.add_development_dependency 'simplecov'
+ if ENV['CI'] == 'true'
+ s.add_development_dependency 'codecov'
+ end
- s.add_development_dependency 'pry', '~> 0'
s.add_development_dependency 'bundler', '~> 1.10'
- s.add_development_dependency 'rake', '~> 10.0'
+ s.add_development_dependency 'git', '~> 1'
s.add_development_dependency 'minitest', '~> 5.8'
s.add_development_dependency 'mocha', '~> 1.1'
- s.add_development_dependency 'git', '~> 1'
- s.add_development_dependency 'rubocop', '~> 0.55.0'
+ s.add_development_dependency 'pry', '~> 0'
s.add_development_dependency 'rails_best_practices', '~> 1.19'
+ s.add_development_dependency 'rake', '~> 10.0'
+ s.add_development_dependency 'rubocop', '~> 0.55.0'
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 2b49a6c..fc5167f 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,11 @@
+require 'simplecov'
+SimpleCov.start
+
+if ENV['CI'] == 'true'
+ require 'codecov'
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
+end
+
require 'minitest/autorun'
require 'mocha/minitest'
require 'oxidized'