Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9697373
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
16 KB
Subscribers
None
View Options
diff --git a/.gitignore b/.gitignore
index f6e8b46..a102277 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,24 +1,23 @@
-#This file is generated by ModuleSync, do not edit.
-pkg/
-Gemfile.lock
-Gemfile.local
-vendor/
-spec/fixtures/manifests/
-spec/fixtures/modules/
-log/
-junit/
-.vagrant/
+# This file is generated by ModuleSync, do not edit.
+*.iml
+.*.sw[op]
+.DS_Store
.bundle/
-coverage/
-log/
.idea/
.metadata
-*.iml
-.*.sw[op]
+.vagrant/
.yardoc
.yardwarns
-.DS_Store
+Gemfile.local
+Gemfile.lock
+bin/
+coverage/
+doc/
+junit/
+log/
+pkg/
+spec/fixtures/manifests/
+spec/fixtures/modules/
tmp/
vendor/
-doc/
diff --git a/.rubocop.yml b/.rubocop.yml
index 5aadd1b..515ef63 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,508 +1,98 @@
-require: rubocop-rspec
+---
+require:
+ - rubocop-rspec
AllCops:
- TargetRubyVersion: 1.9
+ TargetRubyVersion: '2.1'
Include:
- - ./**/*.rb
+ - "./**/*.rb"
Exclude:
- - vendor/**/*
- - .vendor/**/*
- - pkg/**/*
- - spec/fixtures/**/*
-Lint/ConditionPosition:
- Enabled: True
-
-Lint/ElseLayout:
- Enabled: True
-
-Lint/UnreachableCode:
- Enabled: True
-
-Lint/UselessComparison:
- Enabled: True
-
-Lint/EnsureReturn:
- Enabled: True
-
-Lint/HandleExceptions:
- Enabled: True
-
-Lint/LiteralInCondition:
- Enabled: True
-
-Lint/ShadowingOuterLocalVariable:
- Enabled: True
-
-Lint/LiteralInInterpolation:
- Enabled: True
-
-Style/HashSyntax:
- Enabled: True
-
-Style/RedundantReturn:
- Enabled: True
-
-Lint/AmbiguousOperator:
- Enabled: True
-
-Lint/AssignmentInCondition:
- Enabled: True
-
-Style/SpaceBeforeComment:
- Enabled: True
-
-Style/AndOr:
- Enabled: True
-
-Style/RedundantSelf:
- Enabled: True
-
-# Method length is not necessarily an indicator of code quality
-Metrics/MethodLength:
- Enabled: False
-
-# Module length is not necessarily an indicator of code quality
-Metrics/ModuleLength:
- Enabled: False
-
-Style/WhileUntilModifier:
- Enabled: True
-
-Lint/AmbiguousRegexpLiteral:
- Enabled: True
-
-Lint/Eval:
- Enabled: True
-
-Lint/BlockAlignment:
- Enabled: True
-
-Lint/DefEndAlignment:
- Enabled: True
-
-Lint/EndAlignment:
- Enabled: True
-
-Lint/DeprecatedClassMethods:
- Enabled: True
-
-Lint/Loop:
- Enabled: True
-
-Lint/ParenthesesAsGroupedExpression:
- Enabled: True
-
-Lint/RescueException:
- Enabled: True
-
-Lint/StringConversionInInterpolation:
- Enabled: True
-
-Lint/UnusedBlockArgument:
- Enabled: True
-
-Lint/UnusedMethodArgument:
- Enabled: True
-
-Lint/UselessAccessModifier:
- Enabled: True
-
-Lint/UselessAssignment:
- Enabled: True
-
-Lint/Void:
- Enabled: True
-
-Style/AccessModifierIndentation:
- Enabled: True
-
-Style/AccessorMethodName:
- Enabled: True
-
-Style/Alias:
- Enabled: True
-
-Style/AlignArray:
- Enabled: True
-
-Style/AlignHash:
- Enabled: True
-
-Style/AlignParameters:
- Enabled: True
-
-Metrics/BlockNesting:
- Enabled: True
-
-Style/AsciiComments:
- Enabled: True
-
-Style/Attr:
- Enabled: True
-
-Style/BracesAroundHashParameters:
- Enabled: True
-
-Style/CaseEquality:
- Enabled: True
-
-Style/CaseIndentation:
- Enabled: True
-
-Style/CharacterLiteral:
- Enabled: True
-
-Style/ClassAndModuleCamelCase:
- Enabled: True
-
-Style/ClassAndModuleChildren:
- Enabled: False
-
-Style/ClassCheck:
- Enabled: True
-
-# Class length is not necessarily an indicator of code quality
-Metrics/ClassLength:
- Enabled: False
-
-Style/ClassMethods:
- Enabled: True
-
-Style/ClassVars:
- Enabled: True
-
-Style/WhenThen:
- Enabled: True
-
-Style/WordArray:
- Enabled: True
-
-Style/UnneededPercentQ:
- Enabled: True
-
-Style/Tab:
- Enabled: True
-
-Style/SpaceBeforeSemicolon:
- Enabled: True
-
-Style/TrailingBlankLines:
- Enabled: True
-
-Style/SpaceInsideBlockBraces:
- Enabled: True
-
-Style/SpaceInsideBrackets:
- Enabled: True
-
-Style/SpaceInsideHashLiteralBraces:
- Enabled: True
-
-Style/SpaceInsideParens:
- Enabled: True
-
-Style/LeadingCommentSpace:
- Enabled: True
-
-Style/SpaceBeforeFirstArg:
- Enabled: True
-
-Style/SpaceAfterColon:
- Enabled: True
-
-Style/SpaceAfterComma:
- Enabled: True
-
-Style/SpaceAfterMethodName:
- Enabled: True
-
-Style/SpaceAfterNot:
- Enabled: True
-
-Style/SpaceAfterSemicolon:
- Enabled: True
-
-Style/SpaceAroundEqualsInParameterDefault:
- Enabled: True
-
-Style/SpaceAroundOperators:
- Enabled: True
-
-Style/SpaceBeforeBlockBraces:
- Enabled: True
-
-Style/SpaceBeforeComma:
- Enabled: True
-
-Style/CollectionMethods:
- Enabled: True
-
-Style/CommentIndentation:
- Enabled: True
-
-Style/ColonMethodCall:
- Enabled: True
-
-Style/CommentAnnotation:
- Enabled: True
-
-# 'Complexity' is very relative
-Metrics/CyclomaticComplexity:
- Enabled: False
-
-Style/ConstantName:
- Enabled: True
-
-Style/Documentation:
- Enabled: False
-
-Style/DefWithParentheses:
- Enabled: True
-
-Style/PreferredHashMethods:
- Enabled: True
-
-Style/DotPosition:
- EnforcedStyle: trailing
-
-Style/DoubleNegation:
- Enabled: True
-
-Style/EachWithObject:
- Enabled: True
-
-Style/EmptyLineBetweenDefs:
- Enabled: True
-
-Style/IndentArray:
- Enabled: True
-
-Style/IndentHash:
- Enabled: True
-
-Style/IndentationConsistency:
- Enabled: True
-
-Style/IndentationWidth:
- Enabled: True
-
-Style/EmptyLines:
- Enabled: True
-
-Style/EmptyLinesAroundAccessModifier:
- Enabled: True
-
-Style/EmptyLiteral:
- Enabled: True
-
-# Configuration parameters: AllowURI, URISchemes.
+ - bin/*
+ - ".vendor/**/*"
+ - Gemfile
+ - Rakefile
+ - pkg/**/*
+ - spec/fixtures/**/*
+ - vendor/**/*
+inherit_from: .rubocop_todo.yml
Metrics/LineLength:
- Enabled: False
-
-Style/MethodCallParentheses:
- Enabled: True
-
-Style/MethodDefParentheses:
- Enabled: True
-
-Style/LineEndConcatenation:
- Enabled: True
-
-Style/TrailingWhitespace:
- Enabled: True
-
-Style/StringLiterals:
- Enabled: True
-
-Style/TrailingCommaInArguments:
- Enabled: True
-
-Style/TrailingCommaInLiteral:
- Enabled: True
-
-Style/GlobalVars:
- Enabled: True
-
-Style/GuardClause:
- Enabled: True
-
-Style/IfUnlessModifier:
- Enabled: True
-
-Style/MultilineIfThen:
- Enabled: True
-
-Style/NegatedIf:
- Enabled: True
-
-Style/NegatedWhile:
- Enabled: True
-
-Style/Next:
- Enabled: True
-
-Style/SingleLineBlockParams:
- Enabled: True
-
-Style/SingleLineMethods:
- Enabled: True
-
-Style/SpecialGlobalVars:
- Enabled: True
-
-Style/TrivialAccessors:
- Enabled: True
-
-Style/UnlessElse:
- Enabled: True
-
-Style/VariableInterpolation:
- Enabled: True
-
-Style/VariableName:
- Enabled: True
-
-Style/WhileUntilDo:
- Enabled: True
-
-Style/EvenOdd:
- Enabled: True
-
-Style/FileName:
- Enabled: True
-
-Style/For:
- Enabled: True
-
-Style/Lambda:
- Enabled: True
-
-Style/MethodName:
- Enabled: True
-
-Style/MultilineTernaryOperator:
- Enabled: True
-
-Style/NestedTernaryOperator:
- Enabled: True
-
-Style/NilComparison:
- Enabled: True
-
+ Description: People have wide screens, use them.
+ Max: 200
+RSpec/BeforeAfterAll:
+ Description: Beware of using after(:all) as it may cause state to leak between tests.
+ A necessary evil in acceptance testing.
+ Exclude:
+ - spec/acceptance/**/*.rb
+RSpec/HookArgument:
+ Description: Prefer explicit :each argument, matching existing module's style
+ EnforcedStyle: each
+Style/BlockDelimiters:
+ Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
+ be consistent then.
+ EnforcedStyle: braces_for_chaining
+Style/ClassAndModuleChildren:
+ Description: Compact style reduces the required amount of indentation.
+ EnforcedStyle: compact
+Style/EmptyElse:
+ Description: Enforce against empty else clauses, but allow `nil` for clarity.
+ EnforcedStyle: empty
Style/FormatString:
- Enabled: True
-
-Style/MultilineBlockChain:
- Enabled: True
-
-Style/Semicolon:
- Enabled: True
-
-Style/SignalException:
- Enabled: True
-
-Style/NonNilCheck:
- Enabled: True
-
-Style/Not:
- Enabled: True
-
-Style/NumericLiterals:
- Enabled: True
-
-Style/OneLineConditional:
- Enabled: True
-
-Style/OpMethod:
- Enabled: True
-
-Style/ParenthesesAroundCondition:
- Enabled: True
-
-Style/PercentLiteralDelimiters:
- Enabled: True
-
-Style/PerlBackrefs:
- Enabled: True
-
-Style/PredicateName:
- Enabled: True
-
-Style/RedundantException:
- Enabled: True
-
-Style/SelfAssignment:
- Enabled: True
-
-Style/Proc:
- Enabled: True
-
-Style/RaiseArgs:
- Enabled: True
-
-Style/RedundantBegin:
- Enabled: True
-
-Style/RescueModifier:
- Enabled: True
-
-# based on https://github.com/voxpupuli/modulesync_config/issues/168
+ Description: Following the main puppet project's style, prefer the % format format.
+ EnforcedStyle: percent
+Style/FormatStringToken:
+ Description: Following the main puppet project's style, prefer the simpler template
+ tokens over annotated ones.
+ EnforcedStyle: template
+Style/Lambda:
+ Description: Prefer the keyword for easier discoverability.
+ EnforcedStyle: literal
Style/RegexpLiteral:
+ Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
EnforcedStyle: percent_r
- Enabled: True
-
-Lint/UnderscorePrefixedVariableName:
- Enabled: True
-
-Metrics/ParameterLists:
- Enabled: False
-
-Lint/RequireParentheses:
- Enabled: True
-
-Style/SpaceBeforeFirstArg:
- Enabled: True
-
-Style/ModuleFunction:
- Enabled: True
-
-Lint/Debugger:
- Enabled: True
-
-Style/IfWithSemicolon:
- Enabled: True
-
-Style/Encoding:
- Enabled: True
-
-Style/BlockDelimiters:
- Enabled: True
-
-Style/MultilineBlockLayout:
- Enabled: True
-
-# 'Complexity' is very relative
+Style/TernaryParentheses:
+ Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
+ on complex expressions for better readability, but seriously consider breaking
+ it up.
+ EnforcedStyle: require_parentheses_when_complex
+Style/TrailingCommaInArguments:
+ Description: Prefer always trailing comma on multiline argument lists. This makes
+ diffs, and re-ordering nicer.
+ EnforcedStyleForMultiline: comma
+Style/TrailingCommaInLiteral:
+ Description: Prefer always trailing comma on multiline literals. This makes diffs,
+ and re-ordering nicer.
+ EnforcedStyleForMultiline: comma
+Style/SymbolArray:
+ Description: Using percent style obscures symbolic intent of array's contents.
+ EnforcedStyle: brackets
+Style/CollectionMethods:
+ Enabled: true
+Style/MethodCalledOnDoEndBlock:
+ Enabled: true
+Style/StringMethods:
+ Enabled: true
Metrics/AbcSize:
- Enabled: False
-
-# 'Complexity' is very relative
+ Enabled: false
+Metrics/BlockLength:
+ Enabled: false
+Metrics/ClassLength:
+ Enabled: false
+Metrics/CyclomaticComplexity:
+ Enabled: false
+Metrics/MethodLength:
+ Enabled: false
+Metrics/ModuleLength:
+ Enabled: false
+Metrics/ParameterLists:
+ Enabled: false
Metrics/PerceivedComplexity:
- Enabled: False
-
-Lint/UselessAssignment:
- Enabled: True
-
-Style/ClosingParenthesisIndentation:
- Enabled: False
-
-# RSpec
-
-# We don't use rspec in this way
+ Enabled: false
RSpec/DescribeClass:
- Enabled: False
-
-# Example length is not necessarily an indicator of code quality
-RSpec/ExampleLength:
- Enabled: False
-
-RSpec/NamedSubject:
- Enabled: False
+ Enabled: false
+RSpec/MessageExpectation:
+ Enabled: false
+Style/AsciiComments:
+ Enabled: false
+Style/IfUnlessModifier:
+ Enabled: false
+Style/SymbolProc:
+ Enabled: false
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
new file mode 100644
index 0000000..e69de29
diff --git a/.travis.yml b/.travis.yml
index 38d2263..b5d3180 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,32 +1,29 @@
#This file is generated by ModuleSync, do not edit.
---
sudo: false
language: ruby
cache: bundler
script: "bundle exec rake release_checks"
-#Inserting below due to the following issue: https://github.com/travis-ci/travis-ci/issues/3531#issuecomment-88311203
-before_install:
- - gem update bundler
matrix:
fast_finish: true
include:
- rvm: 2.3.1
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.3.1
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/centos-7
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.4.1
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 5.0"
- rvm: 2.1.9
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.0"
notifications:
email: false
diff --git a/Gemfile b/Gemfile
index 8bd07c7..84b23f2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,77 +1,84 @@
#This file is generated by ModuleSync, do not edit.
source ENV['GEM_SOURCE'] || "https://rubygems.org"
# Determines what type of gem is requested based on place_or_version.
def gem_type(place_or_version)
if place_or_version =~ /^git:/
:git
elsif place_or_version =~ /^file:/
:file
else
:gem
end
end
# Find a location or specific version for a gem. place_or_version can be a
# version, which is most often used. It can also be git, which is specified as
# `git://somewhere.git#branch`. You can also use a file source location, which
# is specified as `file://some/location/on/disk`.
def location_for(place_or_version, fake_version = nil)
if place_or_version =~ /^(git[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place_or_version =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place_or_version, { :require => false }]
end
end
# Used for gem conditionals
-supports_windows = false
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
+# The following gems are not included by default as they require DevKit on Windows.
+# You should probably include them in a Gemfile.local or a ~/.gemfile
+#gem 'pry' #this may already be included in the gemfile
+#gem 'pry-stack_explorer', :require => false
+#if RUBY_VERSION =~ /^2/
+# gem 'pry-byebug'
+#else
+# gem 'pry-debugger'
+#end
+
group :development do
gem "puppet-module-posix-default-r#{minor_version}", :require => false, :platforms => "ruby"
gem "puppet-module-win-default-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
gem "puppet-module-posix-dev-r#{minor_version}", :require => false, :platforms => "ruby"
gem "puppet-module-win-dev-r#{minor_version}", '0.0.7', :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
gem "json_pure", '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "fast_gettext", '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", :require => false, :platforms => "ruby"
gem "puppet-module-win-system-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 3')
gem "beaker-pe", :require => false
gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION'])
gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
gem "puppet-blacksmith", '~> 3.4', :require => false
- gem "beaker-task_helper"
end
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
# Only explicitly specify Facter/Hiera if a version has been specified.
# Otherwise it can lead to strange bundler behavior. If you are seeing weird
# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
# to `1` and then run bundle install.
gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
-
# Evaluate Gemfile.local if it exists
if File.exists? "#{__FILE__}.local"
eval(File.read("#{__FILE__}.local"), binding)
end
# Evaluate ~/.gemfile if it exists
if File.exists?(File.join(Dir.home, '.gemfile'))
eval(File.read(File.join(Dir.home, '.gemfile')), binding)
end
# vim:ft=ruby
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Aug 18, 11:33 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3315605
Attached To
rSPPG PostgreSQL puppet module
Event Timeline
Log In to Comment