Skip to content

Commit 423d1ec

Browse files
author
Bohdan Astapov
committed
0.1.0 Version
1 parent 5220834 commit 423d1ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2471
-2
lines changed

.fixtures.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This file can be used to install module depdencies for unit testing
2+
# See https://github.com/puppetlabs/puppetlabs_spec_helper#using-fixtures for details
3+
---
4+
fixtures:
5+
forge_modules:
6+
# stdlib: "puppetlabs/stdlib"

.gitattributes

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# Auto detect text files and perform LF normalization
2-
* text=auto
1+
*.rb eol=lf
2+
*.erb eol=lf
3+
*.pp eol=lf
4+
*.sh eol=lf

.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.*.sw[op]
2+
.metadata
3+
.yardoc
4+
.yardwarns
5+
*.iml
6+
/.bundle/
7+
/.idea/
8+
/.vagrant/
9+
/coverage/
10+
/bin/
11+
/doc/
12+
/Gemfile.local
13+
/Gemfile.lock
14+
/junit/
15+
/log/
16+
/log/
17+
/pkg/
18+
/spec/fixtures/manifests/
19+
/spec/fixtures/modules/
20+
/tmp/
21+
/vendor/
22+

.pmtignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
docs/
2+
pkg/
3+
Gemfile.lock
4+
Gemfile.local
5+
vendor/
6+
.vendor/
7+
spec/fixtures/manifests/
8+
spec/fixtures/modules/
9+
.vagrant/
10+
.bundle/
11+
.ruby-version
12+
coverage/
13+
log/
14+
.idea/
15+
.dependencies/
16+
.librarian/
17+
Puppetfile.lock
18+
*.iml
19+
.*.sw?
20+
.yardoc/

.project

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>slenky-iis_letsencrypt</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
21+
<nature>com.eclipse.xtext.ui.shared.xtextNature</nature>
22+
</natures>
23+
</projectDescription>

.rspec

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--color
2+
--format documentation

.rubocop.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
require: rubocop-rspec
3+
AllCops:
4+
TargetRubyVersion: '2.1'
5+
Include:
6+
- "./**/*.rb"
7+
Exclude:
8+
- bin/*
9+
- ".vendor/**/*"
10+
- Gemfile
11+
- Rakefile
12+
- pkg/**/*
13+
- spec/fixtures/**/*
14+
- vendor/**/*
15+
Metrics/LineLength:
16+
Description: People have wide screens, use them.
17+
Max: 200
18+
RSpec/BeforeAfterAll:
19+
Description: Beware of using after(:all) as it may cause state to leak between tests.
20+
A necessary evil in acceptance testing.
21+
Exclude:
22+
- spec/acceptance/**/*.rb
23+
RSpec/HookArgument:
24+
Description: Prefer explicit :each argument, matching existing module's style
25+
EnforcedStyle: each
26+
Style/BlockDelimiters:
27+
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
28+
be consistent then.
29+
EnforcedStyle: braces_for_chaining
30+
Style/ClassAndModuleChildren:
31+
Description: Compact style reduces the required amount of indentation.
32+
EnforcedStyle: compact
33+
Style/EmptyElse:
34+
Description: Enforce against empty else clauses, but allow `nil` for clarity.
35+
EnforcedStyle: empty
36+
Style/FormatString:
37+
Description: Following the main puppet project's style, prefer the % format format.
38+
EnforcedStyle: percent
39+
Style/FormatStringToken:
40+
Description: Following the main puppet project's style, prefer the simpler template
41+
tokens over annotated ones.
42+
EnforcedStyle: template
43+
Style/Lambda:
44+
Description: Prefer the keyword for easier discoverability.
45+
EnforcedStyle: literal
46+
Style/RegexpLiteral:
47+
Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
48+
EnforcedStyle: percent_r
49+
Style/TernaryParentheses:
50+
Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
51+
on complex expressions for better readability, but seriously consider breaking
52+
it up.
53+
EnforcedStyle: require_parentheses_when_complex
54+
Style/TrailingCommaInArguments:
55+
Description: Prefer always trailing comma on multiline argument lists. This makes
56+
diffs, and re-ordering nicer.
57+
EnforcedStyleForMultiline: comma
58+
Style/TrailingCommaInLiteral:
59+
Description: Prefer always trailing comma on multiline literals. This makes diffs,
60+
and re-ordering nicer.
61+
EnforcedStyleForMultiline: comma
62+
Style/SymbolArray:
63+
Description: Using percent style obscures symbolic intent of array's contents.
64+
EnforcedStyle: brackets
65+
Style/EndOfLine:
66+
Enabled: false
67+
Style/CollectionMethods:
68+
Enabled: true
69+
Style/MethodCalledOnDoEndBlock:
70+
Enabled: true
71+
Style/StringMethods:
72+
Enabled: true
73+
Metrics/AbcSize:
74+
Enabled: false
75+
Metrics/BlockLength:
76+
Enabled: false
77+
Metrics/ClassLength:
78+
Enabled: false
79+
Metrics/CyclomaticComplexity:
80+
Enabled: false
81+
Metrics/MethodLength:
82+
Enabled: false
83+
Metrics/ModuleLength:
84+
Enabled: false
85+
Metrics/ParameterLists:
86+
Enabled: false
87+
Metrics/PerceivedComplexity:
88+
Enabled: false
89+
RSpec/DescribeClass:
90+
Enabled: false
91+
RSpec/ExampleLength:
92+
Enabled: false
93+
RSpec/MessageExpectation:
94+
Enabled: false
95+
RSpec/MultipleExpectations:
96+
Enabled: false
97+
RSpec/NestedGroups:
98+
Enabled: false
99+
Style/AsciiComments:
100+
Enabled: false
101+
Style/IfUnlessModifier:
102+
Enabled: false
103+
Style/SymbolProc:
104+
Enabled: false

.travis.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
sudo: false
3+
dist: trusty
4+
language: ruby
5+
cache: bundler
6+
before_install:
7+
- bundle -v
8+
- rm Gemfile.lock || true
9+
- gem update --system
10+
- gem update bundler
11+
- gem --version
12+
- bundle -v
13+
script:
14+
- 'bundle exec rake $CHECK'
15+
bundler_args: --without system_tests
16+
rvm:
17+
- 2.3.1
18+
- 2.1.7
19+
env:
20+
- PUPPET_GEM_VERSION="~> 4.0" CHECK=spec
21+
matrix:
22+
fast_finish: true
23+
include:
24+
-
25+
env: CHECK=rubocop
26+
-
27+
env: CHECK="syntax lint"
28+
-
29+
env: CHECK=metadata_lint
30+
branches:
31+
only:
32+
- master
33+
- /^v\d/
34+
notifications:
35+
email: false
36+
deploy:
37+
provider: puppetforge
38+
user: puppet
39+
password:
40+
secure: ""
41+
on:
42+
tags: true
43+
all_branches: true
44+
condition: "$DEPLOY_TO_FORGE = yes"

.yardopts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--markup markdown
2+
--output-dir docs/

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## Release 0.1.0
6+
7+
**Features**
8+
9+
**Bugfixes**
10+
11+
**Known Issues**

Gemfile

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2+
3+
def location_for(place_or_version, fake_version = nil)
4+
if place_or_version =~ %r{\A(git[:@][^#]*)#(.*)}
5+
[fake_version, { git: Regexp.last_match(1), branch: Regexp.last_match(2), require: false }].compact
6+
elsif place_or_version =~ %r{\Afile:\/\/(.*)}
7+
['>= 0', { path: File.expand_path(Regexp.last_match(1)), require: false }]
8+
else
9+
[place_or_version, { require: false }]
10+
end
11+
end
12+
13+
def gem_type(place_or_version)
14+
if place_or_version =~ %r{\Agit[:@]}
15+
:git
16+
elsif !place_or_version.nil? && place_or_version.start_with?('file:')
17+
:file
18+
else
19+
:gem
20+
end
21+
end
22+
23+
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
24+
minor_version = ruby_version_segments[0..1].join('.')
25+
26+
group :development do
27+
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
28+
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
29+
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
30+
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
31+
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
32+
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
33+
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
34+
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
35+
end
36+
37+
puppet_version = ENV['PUPPET_GEM_VERSION']
38+
puppet_type = gem_type(puppet_version)
39+
facter_version = ENV['FACTER_GEM_VERSION']
40+
hiera_version = ENV['HIERA_GEM_VERSION']
41+
42+
def puppet_older_than?(version)
43+
puppet_version = ENV['PUPPET_GEM_VERSION']
44+
!puppet_version.nil? &&
45+
Gem::Version.correct?(puppet_version) &&
46+
Gem::Requirement.new("< #{version}").satisfied_by?(Gem::Version.new(puppet_version.dup))
47+
end
48+
49+
gems = {}
50+
51+
gems['puppet'] = location_for(puppet_version)
52+
53+
# If facter or hiera versions have been specified via the environment
54+
# variables, use those versions. If not, and if the puppet version is < 3.5.0,
55+
# use known good versions of both for puppet < 3.5.0.
56+
if facter_version
57+
gems['facter'] = location_for(facter_version)
58+
elsif puppet_type == :gem && puppet_older_than?('3.5.0')
59+
gems['facter'] = ['>= 1.6.11', '<= 1.7.5', require: false]
60+
end
61+
62+
if hiera_version
63+
gems['hiera'] = location_for(ENV['HIERA_GEM_VERSION'])
64+
elsif puppet_type == :gem && puppet_older_than?('3.5.0')
65+
gem['hiera'] = ['>= 1.0.0', '<= 1.3.0', require: false]
66+
end
67+
68+
if Gem.win_platform? && (puppet_type != :gem || puppet_older_than?('3.5.0'))
69+
# For Puppet gems < 3.5.0 (tested as far back as 3.0.0) on Windows
70+
if puppet_type == :gem
71+
gems['ffi'] = ['1.9.0', require: false]
72+
gems['minitar'] = ['0.5.4', require: false]
73+
gems['win32-eventlog'] = ['0.5.3', '<= 0.6.5', require: false]
74+
gems['win32-process'] = ['0.6.5', '<= 0.7.5', require: false]
75+
gems['win32-security'] = ['~> 0.1.2', '<= 0.2.5', require: false]
76+
gems['win32-service'] = ['0.7.2', '<= 0.8.8', require: false]
77+
else
78+
gems['ffi'] = ['~> 1.9.0', require: false]
79+
gems['minitar'] = ['~> 0.5.4', require: false]
80+
gems['win32-eventlog'] = ['~> 0.5', '<= 0.6.5', require: false]
81+
gems['win32-process'] = ['~> 0.6', '<= 0.7.5', require: false]
82+
gems['win32-security'] = ['~> 0.1', '<= 0.2.5', require: false]
83+
gems['win32-service'] = ['~> 0.7', '<= 0.8.8', require: false]
84+
end
85+
86+
gems['win32-dir'] = ['~> 0.3', '<= 0.4.9', require: false]
87+
88+
if RUBY_VERSION.start_with?('1.')
89+
gems['win32console'] = ['1.3.2', require: false]
90+
# sys-admin was removed in Puppet 3.7.0 and doesn't compile under Ruby 2.x
91+
gems['sys-admin'] = ['1.5.6', require: false]
92+
end
93+
94+
# Puppet < 3.7.0 requires these.
95+
# Puppet >= 3.5.0 gem includes these as requirements.
96+
# The following versions are tested to work with 3.0.0 <= puppet < 3.7.0.
97+
gems['win32-api'] = ['1.4.8', require: false]
98+
gems['win32-taskscheduler'] = ['0.2.2', require: false]
99+
gems['windows-api'] = ['0.4.3', require: false]
100+
gems['windows-pr'] = ['1.2.3', require: false]
101+
elsif Gem.win_platform?
102+
# If we're using a Puppet gem on Windows which handles its own win32-xxx gem
103+
# dependencies (>= 3.5.0), set the maximum versions (see PUP-6445).
104+
gems['win32-dir'] = ['<= 0.4.9', require: false]
105+
gems['win32-eventlog'] = ['<= 0.6.5', require: false]
106+
gems['win32-process'] = ['<= 0.7.5', require: false]
107+
gems['win32-security'] = ['<= 0.2.5', require: false]
108+
gems['win32-service'] = ['<= 0.8.8', require: false]
109+
end
110+
111+
gems.each do |gem_name, gem_params|
112+
gem gem_name, *gem_params
113+
end
114+
115+
# Evaluate Gemfile.local and ~/.gemfile if they exist
116+
extra_gemfiles = [
117+
"#{__FILE__}.local",
118+
File.join(Dir.home, '.gemfile'),
119+
]
120+
121+
extra_gemfiles.each do |gemfile|
122+
if File.file?(gemfile) && File.readable?(gemfile)
123+
eval(File.read(gemfile), binding)
124+
end
125+
end
126+
# vim: syntax=ruby

0 commit comments

Comments
 (0)