falkorlib 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e14ab75d651ae33dfe78da74a5e623d6a23fd21
4
- data.tar.gz: 7ff9f11d726cea70ad491d32e4386a8d62f5a92d
3
+ metadata.gz: b3016d72370c962b095a38b6c661376d8c5937f4
4
+ data.tar.gz: f7085f04b36a1da05630dedafd8ab66c51db9bc9
5
5
  SHA512:
6
- metadata.gz: d6df092451077e14d6f4244fbf975bc8d9161be626c0cc889bab163fda1113065cd21178b4a6a4979df1b5ce44de5b73a590746755b5925fe502393ce32e9685
7
- data.tar.gz: 67530e57d95dd6227bd01365b9f1dee063761fff27120b1f78a3e69c0fa99344daff3c213492820ac7f501a24aac629ca62e10274602374f03457fe1cd76f5c1
6
+ metadata.gz: 81b1c0874548dfe44c7a2f7a9485ccdf95b4d1e1b978d024570494c6a6a330f9ad3f3f749b480f7297778219465f39f401fbb6f19f7cbb151f2d2a337e2cfb13
7
+ data.tar.gz: 3ee861b38638d8138b190e4f2debc5949c0b918de6a6c10445f81a0b6dfe33dfd2ace0324bd8de2e43ca1a1b262bd5b818905917280ae54d01e8fa17a3d05937
@@ -0,0 +1,15 @@
1
+ falkorlib.gemspec
2
+ .falkorlib.noespec
3
+ .gemtest
4
+ CHANGELOG.md
5
+ Gemfile
6
+ Gemfile.lock
7
+ bin/**/*
8
+ lib/**/*
9
+ LICENCE.md
10
+ Manifest.txt
11
+ Rakefile
12
+ README.md
13
+ spec/**/*
14
+ tasks/**/*
15
+ test/**/*
@@ -0,0 +1,11 @@
1
+ coverage/*
2
+ *.DS_Store
3
+ pkg
4
+ doc/api
5
+ .yardoc
6
+ .bundle
7
+ .rvmrc
8
+ .ruby-*
9
+ *~
10
+ tmp/
11
+ *.noespec
@@ -0,0 +1,21 @@
1
+ language: ruby
2
+ cache: bundler
3
+ bundler_args: "--without=release doc"
4
+ before_install:
5
+ - sudo apt-get update -qq
6
+ - sudo apt-get install -y git-flow git-core
7
+ rvm:
8
+ - 1.9.2
9
+ - 1.9.3
10
+ - 2.0.0
11
+ - 2.1.1
12
+ - 2.1.2
13
+ - rbx-2.2.7
14
+ notifications:
15
+ hipchat:
16
+ rooms:
17
+ secure: E0V9xQtCyPSB+SZ5n+ztdM5tzJ7d1eR+XR1gIBfAwe0JYnRb735B1v0Z3CVBmosKpv16KEoKUDjum1vHGk8fnOOcxoHx+TtTCF1TVpuBtKzXqG6t4YZAYjkGSIBUM1Zd7kXLlsdmdwRToGmKRqblQHutnm0LkyII/CAwaO+UeY8=
18
+ # addons:
19
+ # code_climate:
20
+ # repo_token:
21
+ # secure: "ZBtaK84ZnjyT4X7mGSYDx31HgD94nZccxAzKA2SBjakW/hfsx9sBGOusxYN7EuC6JydjwLFN3MwLfEGMgjC1zxNwvLO9PGQbh52QawKBue09qouitJbOODwUfQgzNHj/Z0x3dMv3X1Qz31gbfDaC6DJsnTtG2q7R7Kni8hq4/FU="
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.3.6)
4
+ falkorlib (0.3.7)
5
5
  awesome_print (~> 1.2)
6
6
  configatron (~> 3.2)
7
7
  diffy (>= 3.0)
@@ -0,0 +1,47 @@
1
+ #! /bin/bash
2
+ ################################################################################
3
+ # bootstrap.sh - Bootstrap a fresh new directory for using FalkorLib and its
4
+ # associated Rake tasks.
5
+ # Creation : 26 Jun 2014
6
+ # Time-stamp: <Jeu 2014-06-26 11:33 svarrette>
7
+ #
8
+ # Copyright (c) 2014 Sebastien Varrette <Sebastien.Varrette@uni.lu>
9
+ # http://varrette.gforge.uni.lu
10
+ ################################################################################
11
+
12
+ RUBY_VERSION='2.1.0'
13
+ GEMSET=`basename $PWD`
14
+
15
+ echo "=> initialize RVM -- see http://rvm.io"
16
+ [ ! -f .ruby-version ] && echo ${RUBY_VERSION} > .ruby-version
17
+ rvm install `cat .ruby-version`
18
+ [ ! -f .ruby-gemset ] && echo ${GEMSET} > .ruby-gemset
19
+
20
+ echo "=> Force reloading RVM configuration within $PWD"
21
+ cd .. && cd -
22
+
23
+ echo "=> installing the Bundler gem -- see http://bundler.io"
24
+ gem install bundler
25
+
26
+ echo "=> setup the FalkorLib gem in the directory ${GEMSET}"
27
+ bundle init
28
+ if ! grep -Fq "falkorlib" Gemfile; then
29
+ echo "gem 'falkorlib'" >> Gemfile
30
+ fi
31
+ bundle
32
+ if [ ! -f Rakefile ]; then
33
+ cat > Rakefile <<EOF
34
+ #
35
+ # Rakefile - Configuration file for rake (http://rake.rubyforge.org/)
36
+ #
37
+ require 'falkorlib'
38
+
39
+ ## placeholder for custom configuration of FalkorLib.config.*
40
+ ## See https://github.com/Falkor/falkorlib
41
+
42
+ require 'falkorlib/tasks/git'
43
+ EOF
44
+
45
+ fi
46
+
47
+ #echo "=> That's all folks!"
@@ -81,17 +81,17 @@ Gem::Specification.new do |s|
81
81
  # of the project. Entries of the manifest are interpreted as Dir[...]
82
82
  # patterns so that lazy people may use wilcards like lib/**/*
83
83
  #
84
- here = File.expand_path(File.dirname(__FILE__))
85
- s.files = File.readlines(File.join(here, '.Manifest.txt')).
86
- inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
87
- collect{|x| x[(1+here.size)..-1]}
84
+ # here = File.expand_path(File.dirname(__FILE__))
85
+ # s.files = File.readlines(File.join(here, '.Manifest.txt')).
86
+ # inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
87
+ # collect{|x| x[(1+here.size)..-1]}
88
88
 
89
89
  # Test files included in this gem.
90
90
  #
91
91
  s.test_files = Dir["test/**/*"] + Dir["spec/**/*"]
92
92
 
93
93
  # Alternative:
94
- #s.files = `git ls-files`.split("\n")
94
+ s.files = `git ls-files`.split("\n")
95
95
  #s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
96
96
  #s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
97
97
 
@@ -19,7 +19,7 @@ module FalkorLib #:nodoc:
19
19
  # MAJOR: Defines the major version
20
20
  # MINOR: Defines the minor version
21
21
  # PATCH: Defines the patch version
22
- MAJOR, MINOR, PATCH = 0, 3, 6
22
+ MAJOR, MINOR, PATCH = 0, 3, 7
23
23
 
24
24
  module_function
25
25
 
@@ -0,0 +1,6 @@
1
+ .DS_Store
2
+ .vagrant
3
+ /.bundle/*
4
+ .ruby-*
5
+ .falkorlib.yaml
6
+ /pkg/*
@@ -0,0 +1,6 @@
1
+ # A sample Gemfile
2
+ source "https://rubygems.org"
3
+
4
+ # gem "rails"
5
+ gem 'falkorlib' #, :path => '~/git/github.com/Falkor/falkorlib'
6
+ gem "puppet"
@@ -0,0 +1,87 @@
1
+ -*- mode: markdown; mode: auto-fill; fill-column: 80 -*-
2
+
3
+ # <%= config[:name].gsub(/.*-/, '').capitalize %> Puppet Module
4
+
5
+ [![Puppet Forge](http://img.shields.io/puppetforge/v/<%= config[:name].gsub(/-/,"/") %>.svg)](<%= config[:forge_url] %>)
6
+ [![License](http://img.shields.io/:license-<%= config[:license].gsub(/-/, '') %>-blue.svg)](LICENSE)
7
+ ![Supported Platforms](http://img.shields.io/badge/platform-<%= config[:platforms].join('|') %>-lightgrey.svg)
8
+
9
+ <%= config[:summary] %>
10
+
11
+
12
+ Copyright (c) <%= Time.now.year %> <%= config[:author] %> <<%= config[:mail] %>>
13
+
14
+
15
+ * [Online Project Page](<%= config[:project_page] %>) -- [Sources](<%= config[:source] %>) -- [Issues](<%= config[:issues_url] %>)
16
+
17
+ ## Synopsis
18
+
19
+ <%= config[:description] %>
20
+
21
+ The various operations of this repository are piloted from a `Rakefile` which
22
+ assumes that you have [RVM](https://rvm.io/) installed on your system.
23
+
24
+ ## Dependencies
25
+
26
+ See `metadata.json`.
27
+
28
+ ## <%= config[:name].gsub(/.*-/, '') %> class parameters
29
+
30
+ * `$ensure` [Default: 'present']: Ensure <%= config[:name].gsub(/^puppet-/,'')
31
+ %> is present, absent etc.
32
+
33
+ ## Usage
34
+
35
+ ### class <%= config[:name].gsub(/.*-/, '') %>
36
+
37
+ include '<%= config[:name].gsub(/.*-/,'') %>'
38
+
39
+
40
+ ## Documentation
41
+
42
+ Please refer to the header of each manifest files to understand the usage of
43
+ classes and definitions associated to the '<%= config[:name] %>' module.
44
+
45
+ Alternatively, generate automatically the documentation via
46
+ [`puppet doc`](http://docs.puppetlabs.com/man/doc.html) as follows:
47
+
48
+ $> rake doc # Not yet implemented
49
+
50
+ For other information, please refer to the `metadata.json` file in this directory
51
+
52
+ ## Librarian-Puppet / R10K Setup
53
+
54
+ You can of course configure <%= config[:name] %> in your `Puppetfile` to make it
55
+ available with [Librarian puppet](http://librarian-puppet.com/) or
56
+ [r10k](https://github.com/adrienthebo/r10k) by adding the following entry:
57
+
58
+ mod <%= config[:name] %>,
59
+ :git => <%= config[:source] %>,
60
+ :ref => <%= FalkorLib.config[:gitflow][:branches][:master] %>
61
+
62
+
63
+ ## Issues / Feature request
64
+
65
+ You can submit bug / issues / feature request using the
66
+ [<%= config[:name] %> Tracker](<%= config[:issues_url] %>).
67
+
68
+
69
+ ## Developments / Contributing to the code
70
+
71
+ If you want to contribute to the code, you shall be aware of the way this module
72
+ is organized.
73
+ These elements are detailed on [`doc/contributing.md`](doc/contributing.md)
74
+
75
+ You are more than welcome to contribute to its development by
76
+ [sending a pull request](https://help.github.com/articles/using-pull-requests).
77
+
78
+ ## Resources
79
+
80
+ ### Git
81
+
82
+ You should become familiar (if not yet) with Git. Consider these resources:
83
+
84
+ * [Git book](http://book.git-scm.com/index.html)
85
+ * [Github:help](http://help.github.com/mac-set-up-git/)
86
+ * [Git reference](http://gitref.org/)
87
+
@@ -0,0 +1,28 @@
1
+ #
2
+ # Rakefile - Configuration file for rake (http://rake.rubyforge.org/)
3
+ #
4
+ require 'falkorlib'
5
+
6
+ ## placeholder for custom configuration of FalkorLib.config.*
7
+ ## See https://github.com/Falkor/falkorlib
8
+
9
+ # Adapt the versioning aspects
10
+ FalkorLib.config.versioning do |c|
11
+ c[:type] = 'puppet_module'
12
+ end
13
+
14
+ # Adapt the Git flow aspects
15
+ FalkorLib.config.gitflow do |c|
16
+ c[:branches] = {
17
+ :master => 'production',
18
+ :develop => 'devel'
19
+ }
20
+ end
21
+
22
+
23
+ require 'falkorlib/tasks/git'
24
+ require 'falkorlib/tasks/puppet'
25
+
26
+ ##############################################################################
27
+ #TOP_SRCDIR = File.expand_path(File.join(File.dirname(__FILE__), "."))
28
+
@@ -0,0 +1,140 @@
1
+ -*- mode: markdown; mode: auto-fill; fill-column: 80 -*-
2
+
3
+ # <%= config[:name].gsub(/.*-/, '').capitalize %> Puppet Module Developments
4
+
5
+ If you want to contribute to the code, you shall be aware of the way this module
6
+ is organized.
7
+
8
+ ### Directory Layout
9
+
10
+ <%= config[:name] %>/ # Main directory
11
+ `-- metadata.json # Module configuration - cf [here](https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html#write-a-metadatajson-file)
12
+ `-- README.md # This file
13
+ `-- files/ # Contains static files, which managed nodes can download
14
+ `-- lib/ # custom facts/type/provider definitions
15
+ `-- manifests/
16
+ `-- init.pp # Main manifests file
17
+ `-- classes/ # Hold manifest for <%= config[:name] %> classes/
18
+ `-- <%= config[:name] %>.pp # defines the <%= config[:name] %> class
19
+ `-- <%= config[:name] %>-params.pp # <%= config[:name] %> module variables
20
+ `-- definitions/ # Hold manifest for <%= config[:name] %> definitions
21
+ `-- <%= config[:name] %>-mydef.pp # defines the <%= config[:name] %>::mydef definition `-- templates/ # Module ERB template files
22
+ `-- tests/ # Contains examples showing how to declare the module’s classes and defined type
23
+ `-- spec/ # Contains spec tests for any plugins in the lib directory
24
+ `-- Rakefile # Definition of the [rake](https://github.com/jimweirich/rake) tasks
25
+ `-- .ruby-{version,gemset} # [RVM](https://rvm.io/) configuration
26
+ `-- Gemfile[.lock] # [Bundler](http://bundler.io/) configuration
27
+ `-- .git/ # Hold git configuration
28
+
29
+ ### Git Branching Model
30
+
31
+ The Git branching model for this repository follows the guidelines of
32
+ [gitflow](http://nvie.com/posts/a-successful-git-branching-model/).
33
+ In particular, the central repository holds two main branches with an infinite
34
+ lifetime:
35
+
36
+ * `<%= FalkorLib.config[:gitflow][:branches][:master] %>`: the branch holding
37
+ tags of the successive releases of this tutorial
38
+ * `<%= FalkorLib.config[:gitflow][:branches][:develop] %>`: the main branch
39
+ where the sources are in a state with the latest delivered development changes
40
+ for the next release. This is the *default* branch you get when you clone the
41
+ repository, and the one on which developments will take places.
42
+
43
+ You should therefore install [git-flow](https://github.com/nvie/gitflow), and
44
+ probably also its associated
45
+ [bash completion](https://github.com/bobthecow/git-flow-completion).
46
+
47
+ ### Ruby, [RVM](https://rvm.io/) and [Bundler](http://bundler.io/)
48
+
49
+ The various operations that can be conducted from this repository are piloted
50
+ from a `Rakefile` and assumes you have a running Ruby installation.
51
+
52
+ The bootstrapping of your repository is based on [RVM](https://rvm.io/), **thus
53
+ ensure this tools are installed on your system** -- see
54
+ [installation notes](https://rvm.io/rvm/install).
55
+
56
+ The ruby stuff part of this repository corresponds to the following files:
57
+
58
+ * `.ruby-{version,gemset}`: [RVM](https://rvm.io/) configuration, use the name of the
59
+ project as [gemset](https://rvm.io/gemsets) name
60
+ * `Gemfile[.lock]`: used by `[bundle](http://bundler.io/)`
61
+
62
+ You should now be able to access the list of available tasks by running:
63
+
64
+ $> rake -T
65
+
66
+ You probably wants to activate the bash-completion for rake tasks.
67
+ I personnaly use the one provided [here](https://github.com/ai/rake-completion)
68
+
69
+ Also, some of the tasks are hidden. Run `rake -T -A` to list all of them.
70
+
71
+ ### Repository Setup
72
+
73
+ Then, to make your local copy of the repository ready to use the
74
+ [git-flow](https://github.com/nvie/gitflow) workflow and the local
75
+ [RVM](https://rvm.io/) setup, you have to run the following commands once you
76
+ cloned it for the first time:
77
+
78
+ $> rake setup
79
+
80
+ ### RSpec tests
81
+
82
+ A set of unitary tests are defined to validate the different function of my
83
+ library using [Rspec](http://rspec.info/)
84
+
85
+ You can run these tests by issuing:
86
+
87
+ $> rake rspec # NOT YET IMPLEMENTED
88
+
89
+ By conventions, you will find all the currently implemented tests in the `spec/`
90
+ directory, in files having the `_spec.rb` suffix. This is expected from the
91
+ `rspec` task of the `Rakefile`.
92
+
93
+ **Important** Kindly stick to this convention, and feature tests for all
94
+ definitions/classes/modules you might want to add.
95
+
96
+ ### Releasing mechanism
97
+
98
+ The operation consisting of releasing a new version of this repository is
99
+ automated by a set of tasks within the `Rakefile`.
100
+
101
+ In this context, a version number have the following format:
102
+
103
+ <major>.<minor>.<patch>
104
+
105
+ where:
106
+
107
+ * `< major >` corresponds to the major version number
108
+ * `< minor >` corresponds to the minor version number
109
+ * `< patch >` corresponds to the patching version number
110
+
111
+ Example: `1.2.0`
112
+
113
+ The current version number is stored in the file `metadata.json`.
114
+ For more information on the version, run:
115
+
116
+ $> rake version:info
117
+
118
+ If a new version number such be bumped, you simply have to run:
119
+
120
+ $> rake version:bump:{major,minor,patch}
121
+
122
+ This will start the release process for you using `git-flow`.
123
+ Then, to make the release effective, just run:
124
+
125
+ $> rake version:release
126
+
127
+ This will finalize the release using `git-flow`, create the appropriate tag and
128
+ merge all things the way they should be.
129
+
130
+ # Contributing Notes
131
+
132
+ This project is released under the terms of the [<%= config[:license] %> Licence](LICENSE).
133
+ So you are more than welcome to contribute to its development as follows:
134
+
135
+ 1. Fork it
136
+ 2. Create your feature branch (`rake git:feature:start[<feature_name>]`)
137
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
138
+ 4. Push to the branch (`git flow feature publish <feature_name>`)
139
+ 5. Create new Pull Request
140
+
@@ -0,0 +1,21 @@
1
+ Files
2
+ =====
3
+
4
+ Puppet comes with both a client and server for copying files around. The file
5
+ serving function is provided as part of the central Puppet daemon,
6
+ puppetmasterd, and the client function is used through the source attribute of
7
+ file objects. Learn more [here](http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration)
8
+
9
+ You can use managed files like this:
10
+
11
+ class <%= config[:name] %> {
12
+ package { <%= config[:name].gsub(/^puppet-/, '') %>: ensure => latest }
13
+ file { "/etc/<%= config[:name] %>.conf":
14
+ source => "puppet://$servername/modules/<%= config[:name] %>/myfile"
15
+ }
16
+ }
17
+
18
+ The files are searched for in:
19
+
20
+ $modulepath/<%= config[:name] %>/files/myfile
21
+