falkorlib 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/falkorlib/puppet/modules.rb +5 -5
- data/lib/falkorlib/tasks/puppet_modules.rake +21 -21
- data/lib/falkorlib/version.rb +1 -1
- data/templates/puppet/modules/.vagrant_init.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7825e01ee768736886c085f58a2846e3bcdc5737
|
4
|
+
data.tar.gz: 100270e4b1e8b15d56c059b2a626ef1f1f3b2ef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bfaf83f566c0e27f6fc4bf67daaf8fc611a6596a85b41aa700567c2a75c249f8c31d19480e237e32ed14ae36a9d2bd43f1edf33d6971e21aaf58bd3dfe97067
|
7
|
+
data.tar.gz: a4eb74d8fa50a326d788169e428a6c40e1a83da5b89c97261d2c3eff8e0a8a46155d14b4147295f0c6082569578ec52312064acc9873c068374d3aa760e40dc8
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Thu 2015-05-07 18:14 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for the main Puppet Module operations
|
6
6
|
#
|
@@ -71,6 +71,7 @@ module FalkorLib #:nodoc:
|
|
71
71
|
error "Undefined type #{type}" if t.empty?
|
72
72
|
result = []
|
73
73
|
Dir["#{moduledir}/manifests/**/*.pp"].each do |ppfile|
|
74
|
+
puts "=> testing #{ppfile}"
|
74
75
|
File.read(ppfile).scan(/^[ \t]*#{t}[\s]+([0-9a-zA-z:-]+).*$/).each do |line|
|
75
76
|
result << line[0]
|
76
77
|
end
|
@@ -80,7 +81,6 @@ module FalkorLib #:nodoc:
|
|
80
81
|
end
|
81
82
|
|
82
83
|
|
83
|
-
|
84
84
|
####
|
85
85
|
# Initialize a new Puppet Module named `name` in `rootdir`.
|
86
86
|
# Supported options:
|
@@ -130,7 +130,7 @@ module FalkorLib #:nodoc:
|
|
130
130
|
"name" => "puppetlabs-stdlib",
|
131
131
|
"version_range" => ">= 1.0.0"
|
132
132
|
}]
|
133
|
-
config[:params] = [
|
133
|
+
config[:params] = [ 'ensure', 'protocol', 'port', 'packagename' ]
|
134
134
|
#ap config
|
135
135
|
# Bootstrap the directory
|
136
136
|
templatedir = File.join( FalkorLib.templates, 'puppet', 'modules')
|
@@ -260,7 +260,7 @@ module FalkorLib #:nodoc:
|
|
260
260
|
if File.exist?(params_manifest)
|
261
261
|
params = []
|
262
262
|
File.read(params_manifest).scan(/^\s*\$(.*)\s*=/) do |m|
|
263
|
-
params << $1 unless $1.nil?
|
263
|
+
params << $1.gsub(/\s+$/,'') unless $1.nil?
|
264
264
|
end
|
265
265
|
metadata[:params] = params.uniq
|
266
266
|
end
|
@@ -329,7 +329,7 @@ module FalkorLib #:nodoc:
|
|
329
329
|
:no_interaction => false
|
330
330
|
})
|
331
331
|
metadata = metadata(moduledir)
|
332
|
-
|
332
|
+
ap metadata
|
333
333
|
i = 0
|
334
334
|
templatedir = File.join( FalkorLib.templates, 'puppet', 'modules', subdir)
|
335
335
|
error "Unable to find the template directory '#{templatedir}" unless File.directory?( templatedir )
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
3
|
# puppet_modules.rake - Special tasks for the management of Puppet modules
|
4
|
-
# Time-stamp: <
|
4
|
+
# Time-stamp: <Thu 2015-05-07 17:38 svarrette>
|
5
5
|
#
|
6
6
|
# Copyright (c) 2014 Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
7
7
|
# http://varrette.gforge.uni.lu
|
@@ -194,26 +194,26 @@ PuppetSyntax.exclude_paths = exclude_tests_paths
|
|
194
194
|
#.........................................................................
|
195
195
|
# rspec-puppet tasks -- see http://rspec-puppet.com/tutorial/
|
196
196
|
#
|
197
|
-
require 'rspec/core/rake_task'
|
198
|
-
|
199
|
-
########## rspec #################
|
200
|
-
desc "Run all RSpec code examples"
|
201
|
-
RSpec::Core::RakeTask.new(:rspec) do |t|
|
202
|
-
|
203
|
-
end
|
204
|
-
|
205
|
-
SPEC_SUITES = (Dir.entries('spec') - ['.', '..','fixtures']).select {|e| File.directory? "spec/#{e}" }
|
206
|
-
namespace :rspec do
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
end
|
216
|
-
task :default => :rspec
|
197
|
+
# require 'rspec/core/rake_task'
|
198
|
+
|
199
|
+
# ########## rspec #################
|
200
|
+
# desc "Run all RSpec code examples"
|
201
|
+
# RSpec::Core::RakeTask.new(:rspec) do |t|
|
202
|
+
# t.rspec_opts = File.read("spec/spec.opts").chomp || ""
|
203
|
+
# end
|
204
|
+
|
205
|
+
# SPEC_SUITES = (Dir.entries('spec') - ['.', '..','fixtures']).select {|e| File.directory? "spec/#{e}" }
|
206
|
+
# namespace :rspec do
|
207
|
+
# SPEC_SUITES.each do |suite|
|
208
|
+
# ############ rspec:{classes,defines...} ##########
|
209
|
+
# desc "Run #{suite} RSpec code examples"
|
210
|
+
# RSpec::Core::RakeTask.new(suite) do |t|
|
211
|
+
# t.pattern = "spec/#{suite}/**/*_spec.rb"
|
212
|
+
# t.rspec_opts = File.read("spec/spec.opts").chomp || ""
|
213
|
+
# end
|
214
|
+
# end
|
215
|
+
# end
|
216
|
+
# task :default => :rspec
|
217
217
|
|
218
218
|
|
219
219
|
|
data/lib/falkorlib/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
##########################################################################
|
3
3
|
# vagrant_init.rb
|
4
4
|
# @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
5
|
-
# Time-stamp: <
|
5
|
+
# Time-stamp: <Lun 2015-03-30 22:42 svarrette>
|
6
6
|
#
|
7
7
|
# @description
|
8
8
|
#
|
@@ -31,8 +31,8 @@ end
|
|
31
31
|
modulepath=`puppet config print modulepath`.chomp
|
32
32
|
moduledir=modulepath.split(':').first
|
33
33
|
|
34
|
-
puts "#{modulepath}"
|
35
|
-
puts "#{moduledir}"
|
34
|
+
puts "Module path: #{modulepath}"
|
35
|
+
puts "Moduledir: #{moduledir}"
|
36
36
|
|
37
|
-
info "set symlink to the '#{
|
37
|
+
info "set symlink to the '#{basedir}' module for local developments"
|
38
38
|
run %{ ln -s #{basedir} #{moduledir}/#{name} } unless File.exists?("#{moduledir}/#{name}")
|
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.4.
|
4
|
+
version: 0.4.6
|
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-
|
11
|
+
date: 2015-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|