falkorlib 0.5.3 → 0.5.4

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: 2b251b68ef9aa5c75e11514017abd5b5802a822a
4
- data.tar.gz: 1ad2b3edcee9a6291f84a9f188b95fca8a6702b3
3
+ metadata.gz: 2e28d97f7a88cce31cc5f23032ccdd23b887d8ce
4
+ data.tar.gz: aec4b454bf7177169e6195026d19c3c21390fe62
5
5
  SHA512:
6
- metadata.gz: ce5d15c59e12f42237e867baf00dbf80b91a0a2c390ac070f1bfea17febc19e28c85d4dad457a2ccaac820d41a1c6878ea0caa337fc37080dd7f5226c6f59e4f
7
- data.tar.gz: 7beca3455d326fc02c40610a524ad0a72cd6753e44fb2eace920f8574c15c42fb47b4541d52092469fc45c57c0508a0c9bfa7fbb5c78c46d6690b9f29d518a4e
6
+ metadata.gz: 15a8dd62ad3968beed584d5122cbf82899fc5192f4b60cb8d314839a2e707867c94c09760cdb74fdbf0d0e6929bdc2516b34c133e1a7af582919a0e55bb0e1ed
7
+ data.tar.gz: 67bc8769082c8a4e08ae1bfafeb7a5066c3a9597752ccf0902d155e18b4238e7742170d022df0017143bca0c8e7c54b2352e8cf3cf2911b412569dce4d26f70f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.5.3)
4
+ falkorlib (0.5.4)
5
5
  artii (>= 2.1)
6
6
  awesome_print (~> 1.2)
7
7
  configatron (~> 3.2)
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Fri 2015-05-15 23:58 svarrette>
3
+ # Time-stamp: <Wed 2015-05-20 16:18 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Puppet Module operations
6
6
  #
@@ -106,7 +106,7 @@ module FalkorLib #:nodoc:
106
106
  when :description
107
107
  config[:summary].nil? ? v : "#{config[:summary]}"
108
108
  when :source
109
- v.empty? ? "https://github.com/#{`whoami`.chomp}/#{config[:name]}" : v
109
+ v.empty? ? "https://github.com/#{config[:name].gsub(/\//,'/puppet-')}" : v
110
110
  else
111
111
  v
112
112
  end
@@ -170,7 +170,7 @@ module FalkorLib #:nodoc:
170
170
  FalkorLib::GitFlow.start('feature', "bootstrapping", moduledir)
171
171
  end
172
172
  [ 'metadata.json',
173
- 'docs/', 'LICENSE', '.gitignore', '.ruby-version', '.ruby-gemset',
173
+ 'docs/', 'mkdocs.yml', 'LICENSE', '.gitignore', '.ruby-version', '.ruby-gemset',
174
174
  'Gemfile', '.vagrant_init.rb', 'Rakefile', 'Vagrantfile' ].each do |f|
175
175
  FalkorLib::Git.add(File.join(moduledir, f))
176
176
  end
@@ -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, 5, 3
22
+ MAJOR, MINOR, PATCH = 0, 5, 4
23
23
 
24
24
  module_function
25
25
 
@@ -2,7 +2,7 @@
2
2
  ##########################################################################
3
3
  # vagrant_init.rb
4
4
  # @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
5
- # Time-stamp: <Lun 2015-03-30 22:42 svarrette>
5
+ # Time-stamp: <Mon 2015-05-25 20:12 svarrette>
6
6
  #
7
7
  # @description
8
8
  #
@@ -23,13 +23,15 @@ error "Unable to find the metadata.json" unless File.exists?(jsonfile)
23
23
 
24
24
  metadata = JSON.parse( IO.read( jsonfile ) )
25
25
  name = metadata["name"].gsub(/^[^\/-]+[\/-]/,'')
26
+ modulepath=`puppet config print modulepath`.chomp
27
+ moduledir=modulepath.split(':').first
28
+
26
29
  metadata["dependencies"].each do |dep|
27
30
  lib = dep["name"]
28
- run %{ puppet module install #{lib} }
31
+ action = File.directory?("#{moduledir}") ? 'upgrade' : 'install'
32
+ run %{ puppet module #{action} #{lib} }
29
33
  end
30
34
 
31
- modulepath=`puppet config print modulepath`.chomp
32
- moduledir=modulepath.split(':').first
33
35
 
34
36
  puts "Module path: #{modulepath}"
35
37
  puts "Moduledir: #{moduledir}"
@@ -21,7 +21,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
21
21
  }
22
22
  }.each do |name,cfg|
23
23
  boxname = name.to_s.downcase.gsub(/_/, '-')
24
- config.vm.define boxname, :primary => cfg[:primary] do |local|
24
+ config.vm.define boxname, :autostart => (! cfg[:primary].nil?), :primary => cfg[:primary] do |local|
25
25
  #local.vm.primary = true if cfg[:primary]
26
26
  local.vm.box = cfg[:box]
27
27
  local.vm.host_name = ENV['VAGRANT_HOSTNAME'] || name.to_s.downcase.gsub(/_/, '-').concat(".vagrant.com")
@@ -8,14 +8,14 @@ file objects. Learn more [here](http://projects.puppetlabs.com/projects/puppet/w
8
8
 
9
9
  You can use managed files like this:
10
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"
11
+ class <%= config[:shortname] %> {
12
+ package { <%= config[:shortname] %>: ensure => latest }
13
+ file { "/etc/<%= config[:shortname] %>.conf":
14
+ source => "puppet://$servername/modules/<%= config[:shortname] %>/myfile"
15
15
  }
16
16
  }
17
17
 
18
18
  The files are searched for in:
19
19
 
20
- $modulepath/<%= config[:name] %>/files/myfile
20
+ $modulepath/<%= config[:shortname] %>/files/myfile
21
21
 
@@ -10,11 +10,11 @@
10
10
  #
11
11
  # == Parameters:
12
12
  #
13
- # $ensure:: *Default*: 'present'. Ensure the presence (or absence) of <%= config[:name] %>
13
+ # $ensure:: *Default*: 'present'. Ensure the presence (or absence) of <%= config[:shortname] %>
14
14
  #
15
15
  # == Actions:
16
16
  #
17
- # Install and configure <%= config[:name] %>
17
+ # Install and configure <%= config[:shortname] %>
18
18
  #
19
19
  # == Requires:
20
20
  #
@@ -10,15 +10,15 @@ Learn more [here](http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Tem
10
10
 
11
11
  You can use templates like this:
12
12
 
13
- class <%= config[:name] %> {
14
- package { <%= config[:name].gsub(/^puppet-/, '') %>: ensure => latest }
15
- file { "/etc/<%= config[:name] %>.conf":
16
- content => template("<%= config[:name] %>/myfile.erb")
13
+ class <%= config[:shortname] %> {
14
+ package { <%= config[:shortname] %>: ensure => latest }
15
+ file { "/etc/<%= config[:shortname] %>.conf":
16
+ content => template("<%= config[:shortname] %>/myfile.erb")
17
17
  }
18
18
  }
19
19
 
20
20
  The templates are searched for in:
21
21
 
22
- $templatedir/<%= config[:name] %>/myfile.erb
23
- $modulepath/<%= config[:name] %>/templates/myfile.erb
22
+ $templatedir/<%= config[:shortname] %>/myfile.erb
23
+ $modulepath/<%= config[:shortname] %>/templates/myfile.erb
24
24
 
@@ -13,4 +13,4 @@
13
13
  # These are the variables used by the module <%= config[:name] %>
14
14
  #
15
15
  # General internal variables:
16
- $packagename = < %= scope.lookupvar('<%= config[:name] %>::params::packagename') % >
16
+ $packagename = < %= scope.lookupvar('<%= config[:shortname] %>::params::packagename') % >
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falkorlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-19 00:00:00.000000000 Z
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake