From 95df6b61720b14762646985b07841f60df72f70f Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Mon, 4 Mar 2013 15:20:29 -0700 Subject: [PATCH 1/8] first commit --- .fixtures.yml | 5 +++++ .gitignore | 2 ++ Gemfile | 13 +++++++++++++ LICENSE | 13 +++++++++++++ Modulefile | 10 ++++++++++ README.md | 19 +++++++++++++++++++ Rakefile | 8 ++++++++ manifests/init.pp | 16 ++++++++++++++++ spec/spec_helper.rb | 1 + 9 files changed, 87 insertions(+) create mode 100644 .fixtures.yml create mode 100644 .gitignore create mode 100644 Gemfile create mode 100644 LICENSE create mode 100644 Modulefile create mode 100644 README.md create mode 100644 Rakefile create mode 100644 manifests/init.pp create mode 100644 spec/spec_helper.rb diff --git a/.fixtures.yml b/.fixtures.yml new file mode 100644 index 0000000..070159a --- /dev/null +++ b/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + symlinks: + "foo": "#{source_dir}" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd69f93 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +pkg/ +spec/fixtures/ diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..1c587a7 --- /dev/null +++ b/Gemfile @@ -0,0 +1,13 @@ +source :rubygems + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +gem 'rake' +gem 'puppetlabs_spec_helper' +gem 'puppet-lint' + +# vim:ft=ruby diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7546c39 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright (C) 2012-2013 Joshua Hoblitt + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Modulefile b/Modulefile new file mode 100644 index 0000000..4b9a6b1 --- /dev/null +++ b/Modulefile @@ -0,0 +1,10 @@ +name 'jhoblitt-module_skel' +version '0.0.1' + +author 'Joshua Hoblitt ' +license 'Apache' +project_page 'https://github.com/jhoblitt/puppet-module_skel' +source 'https://github.com/jhoblitt/puppet-module_skel.git' +summary 'module skeleton' +description 'module skeleton' +dependency 'puppetlabs/stdlib', '>= 1.0.0' diff --git a/README.md b/README.md new file mode 100644 index 0000000..341a2ee --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +Puppet module_skel Module +========================= + +Description +----------- + +Examples +-------- + +Support +------- + +Please log tickets and issues at [github](https://github.com/jhoblitt/puppet-module_skel/issues) + +Copyright +--------- + +Copyright (C) 2013 Joshua Hoblitt + diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..03d386b --- /dev/null +++ b/Rakefile @@ -0,0 +1,8 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' + +#PuppetLint.configuration.send("disable_class_inherits_from_params_class") +#PuppetLint.configuration.send("disable_variable_scope") +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", 'tests/**/*.pp'] + +task :default => [:spec, :lint] diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..8b3aea0 --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,16 @@ +# == Class: module_skel +# +# simple template +# +# === Authors +# +# Joshua Hoblitt +# +# === Copyright +# +# Copyright (C) 2013 Joshua Hoblitt +# + +class module_skel { + +} diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..2c6f566 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' From e86f789df5dd2f8736a96677a495a939f675b4b2 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 2 Aug 2013 10:55:26 -0700 Subject: [PATCH 2/8] install ruby gems from https://rubygems.org instead of :rubygems To resolve this warning: The source :rubygems is deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 1c587a7..f73773f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source :rubygems +source 'https://rubygems.org' if puppetversion = ENV['PUPPET_GEM_VERSION'] gem 'puppet', puppetversion, :require => false From c46ff1e60c1abb980a5396241a4c3cd3955464f7 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 2 Aug 2013 10:57:17 -0700 Subject: [PATCH 3/8] git ignore Gemfile.lock --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index fd69f93..03fa3ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ pkg/ spec/fixtures/ +Gemfile.lock From 4050f0dbc139107f75cc80a588101d20932bb039 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 2 Aug 2013 11:20:47 -0700 Subject: [PATCH 4/8] add a default .travis.yml --- .travis.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..80fcb3d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,31 @@ +language: ruby +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 + - ruby-head +env: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.0.0" + - PUPPET_GEM_VERSION="~> 3.1.0" + - PUPPET_GEM_VERSION="~> 3.2.1" +matrix: + allow_failures: + - rvm: ruby-head + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.0.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: ruby-head + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: ruby-head + env: PUPPET_GEM_VERSION="~> 3.0.0" + - rvm: ruby-head + env: PUPPET_GEM_VERSION="~> 3.1.0" +notifications: + email: false From fb932f9d5a7da23feb018db4e538d79297da009d Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Sat, 3 Aug 2013 23:16:17 -0700 Subject: [PATCH 5/8] add example spec test --- .fixtures.yml | 2 +- spec/classes/module_skel_spec.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 spec/classes/module_skel_spec.rb diff --git a/.fixtures.yml b/.fixtures.yml index 070159a..d46293b 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -2,4 +2,4 @@ fixtures: repositories: "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" symlinks: - "foo": "#{source_dir}" + "module_skel": "#{source_dir}" diff --git a/spec/classes/module_skel_spec.rb b/spec/classes/module_skel_spec.rb new file mode 100644 index 0000000..12f4046 --- /dev/null +++ b/spec/classes/module_skel_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +describe 'module_skel', :type => 'class' do + + describe 'for osfamily RedHat' do + it { should contain_class('module_skel') } + end + +end From 435661dcac87e7f18fef7968297df0b09f0d282c Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Sat, 3 Aug 2013 23:18:35 -0700 Subject: [PATCH 6/8] add travis-ci build placard --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 341a2ee..46c4f48 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,23 @@ Puppet module_skel Module ========================= +[![Build Status](https://travis-ci.org/jhoblitt/puppet-module_skel.png)](https://travis-ci.org/jhoblitt/puppet-module_skel) + + Description ----------- + Examples -------- + Support ------- Please log tickets and issues at [github](https://github.com/jhoblitt/puppet-module_skel/issues) + Copyright --------- From 6a679905b3d2ff07d05dec9e9c65cc57947eb407 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 23 Aug 2013 14:06:53 -0700 Subject: [PATCH 7/8] add puppet-syntax support --- Gemfile | 1 + Rakefile | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index f73773f..af9879b 100644 --- a/Gemfile +++ b/Gemfile @@ -9,5 +9,6 @@ end gem 'rake' gem 'puppetlabs_spec_helper' gem 'puppet-lint' +gem 'puppet-syntax' # vim:ft=ruby diff --git a/Rakefile b/Rakefile index 03d386b..6ae60ce 100644 --- a/Rakefile +++ b/Rakefile @@ -1,8 +1,14 @@ require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-syntax/tasks/puppet-syntax' require 'puppet-lint/tasks/puppet-lint' +#PuppetSyntax.exclude_paths = ["vendor/**/*"] #PuppetLint.configuration.send("disable_class_inherits_from_params_class") #PuppetLint.configuration.send("disable_variable_scope") PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", 'tests/**/*.pp'] -task :default => [:spec, :lint] +task :default => [ + :syntax, + :lint, + :spec, +] From ed6a68b7f745fc70831a0fd551b80fe337a42d1f Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 23 Aug 2013 14:09:27 -0700 Subject: [PATCH 8/8] ignore patch related files *{.orig,.rej,.patch} --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 03fa3ef..b7a885f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ pkg/ spec/fixtures/ Gemfile.lock +*.orig +*.rej +*.patch