Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
Merge 85c703e into 2c7eccd
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanIrimie committed Aug 7, 2019
2 parents 2c7eccd + 85c703e commit d27a7b1
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
sudo: false
language: ruby
dist: trusty
rvm:
- 2.6
- 2.5
- 2.4
- 2.3
- jruby
cache:
bundler: true
before_install:
- gem update --system
- gem install bundler
addons:
sonarcloud:
organization: "puppet"
token:
secure: "775bbcca7b9ed3903ba8beddbb961eb13d885e2d" # encrypted value of your token
script:
# - bundle exec rubocop
# - bundle exec rubycritic --no-browser -s 80 -f console
- bundle exec rake spec
- sonar-scanner
73 changes: 73 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,67 @@ PATH
GEM
remote: https://rubygems.org/
specs:
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
ast (2.4.0)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
byebug (11.0.1)
codeclimate-engine-rb (0.4.1)
virtus (~> 1.0)
coderay (1.1.2)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
coveralls (0.8.23)
json (>= 1.8, < 3)
simplecov (~> 0.16.1)
term-ansicolor (~> 1.3)
thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.3)
docile (1.3.2)
equalizer (0.0.11)
erubis (2.7.0)
flay (2.12.0)
erubis (~> 2.7.0)
path_expander (~> 1.0)
ruby_parser (~> 3.0)
sexp_processor (~> 4.0)
flog (4.6.2)
path_expander (~> 1.0)
ruby_parser (~> 3.1, > 3.1.0)
sexp_processor (~> 4.8)
ice_nine (0.11.2)
jaro_winkler (1.5.3)
json (2.2.0)
kwalify (0.7.2)
launchy (2.4.3)
addressable (~> 2.3)
method_source (0.9.2)
parallel (1.17.0)
parser (2.6.3.0)
ast (~> 2.4.0)
path_expander (1.0.4)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.7.0)
byebug (~> 11.0)
pry (~> 0.10)
psych (3.1.0)
public_suffix (3.1.1)
rainbow (3.0.0)
rake (10.5.0)
reek (5.4.0)
codeclimate-engine-rb (~> 0.4.0)
kwalify (~> 0.7.0)
parser (>= 2.5.0.0, < 2.7, != 2.5.1.1)
psych (~> 3.1.0)
rainbow (>= 2.0, < 4.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
Expand All @@ -39,6 +81,27 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.2)
rubocop (0.74.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.6)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.1)
ruby_parser (3.13.1)
sexp_processor (~> 4.9)
rubycritic (4.1.0)
flay (~> 2.8)
flog (~> 4.4)
launchy (= 2.4.3)
parser (~> 2.6.0)
rainbow (~> 3.0)
reek (~> 5.0, < 6.0)
ruby_parser (~> 3.8)
tty-which (~> 0.4.0)
virtus (~> 1.0)
sexp_processor (4.12.1)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand All @@ -47,7 +110,15 @@ GEM
term-ansicolor (1.7.1)
tins (~> 1.0)
thor (0.20.3)
thread_safe (0.3.6)
tins (1.21.1)
tty-which (0.4.1)
unicode-display_width (1.6.0)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)

PLATFORMS
ruby
Expand All @@ -59,6 +130,8 @@ DEPENDENCIES
pry-byebug (~> 3.0)
rake (~> 10.0)
rspec (~> 3.0)
rubocop (~> 0.74.0)
rubycritic (~> 4.1.0)

BUNDLED WITH
2.0.2
3 changes: 2 additions & 1 deletion facter-ng.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency "pry-byebug", "~> 3.0"
spec.add_development_dependency 'coveralls', '~> 0.8.23'

spec.add_development_dependency 'rubocop', '~> 0.74.0'
spec.add_development_dependency 'rubycritic', '~> 4.1.0'

spec.add_runtime_dependency 'thor', '~> 0.20.3'
end
6 changes: 6 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sonar.projectKey=com.facter:Facter
sonar.projectName=Facter
sonar.projectVersion=1.0-SNAPSHOT
sonar.sources=bin, config, lib
; sonar.exclusions=app/assets/**/*
sonar.ruby.coverage.reportPaths=coverage/.resultset.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe '.load facts for OS' do
RSpec.describe '.load facts for OS' do
it 'load one fact' do
allow_any_instance_of(Module).to receive(:constants).and_return([:NetworkInterface])
fact_hash = Facter::FactLoader.load(:linux)
Expand Down
10 changes: 9 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
require 'bundler/setup'
require_relative '../lib/fact_loader'
require_relative '../lib/facts/linux/network_interface'
require_relative 'facter/fact_loader_test'

# Configure SimpleCov
SimpleCov.start do
track_files 'lib/**/*.rb'
end

default_coverage = 10
SimpleCov.minimum_coverage ENV['COVERAGE'] || default_coverage

# Configure RSpec
RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = '.rspec_status'
Expand Down

0 comments on commit d27a7b1

Please sign in to comment.