deplomat 0.2.4 → 0.2.5
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/VERSION +1 -1
- data/deplomat.gemspec +2 -2
- data/lib/deplomat/directives.rb +5 -2
- data/spec/directives_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df4d136b9e1e61a42d838fc1914fa6f056470113f1cde885d940fc9041841f0f
|
4
|
+
data.tar.gz: 4760ac5e0ae77f68592ef418a3ccebdd66f69d0b5063b255968356e736dea29f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f9ca059a63d28588da64445454272ead9197610e41bf32b8c5f8719c841c9853ec99ca46b8b5129f886080c91ebe52557d2e9ede12a859236a393cdad9b5a52
|
7
|
+
data.tar.gz: f4c641572822d1be08f7e11249364a3e01ce55a67236c57b79fdb52bb2638b6dee5e26d3cf468a0826f677473cad74f3291cb2e6b8305340baa61ea2f01dc410
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/deplomat.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: deplomat 0.2.
|
5
|
+
# stub: deplomat 0.2.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "deplomat".freeze
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.5"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
data/lib/deplomat/directives.rb
CHANGED
@@ -60,8 +60,10 @@ def update_requisite_number!(n)
|
|
60
60
|
# or do something else, more complicated.
|
61
61
|
end
|
62
62
|
|
63
|
-
def load_requisites!(counter, requisites_path: "
|
63
|
+
def load_requisites!(counter, requisites_path: "#{Dir.pwd}/deployment_requisites")
|
64
64
|
|
65
|
+
log = []
|
66
|
+
log_requisites_count = "Checking #{requisites_path} dir for requisites..."
|
65
67
|
files = Dir["#{requisites_path}/*.rb"].map do |fn|
|
66
68
|
number = fn.split("/").last.match(/\A\d+_/).to_a.first&.chomp("_")
|
67
69
|
number ? [number, fn] : nil
|
@@ -70,8 +72,9 @@ def load_requisites!(counter, requisites_path: "./deployment_requisites")
|
|
70
72
|
.sort { |x,y| x.first <=> y.first } # Sort files according to the number in front of their names
|
71
73
|
.map { |fn| fn.last } # lose the folded Array we used to store the consecutive requisite number
|
72
74
|
.slice(counter..-1) # lose files whose consecutive requisite number is below or equals the counter
|
75
|
+
log_requisites_count += "found #{files.size} new requisites."
|
76
|
+
log << log_requisites_count
|
73
77
|
|
74
|
-
log = []
|
75
78
|
files.each do |fn|
|
76
79
|
log << "Loading requisite: #{fn.split("/").last }"
|
77
80
|
require fn
|
data/spec/directives_spec.rb
CHANGED
@@ -54,7 +54,7 @@ describe "directives" do
|
|
54
54
|
|
55
55
|
result = load_requisites!(1, requisites_path: "#{File.expand_path(File.dirname(__FILE__))}/deployment_requisites")
|
56
56
|
expect(result[:counter]).to eq(2)
|
57
|
-
expect(result[:log]).to eq(
|
57
|
+
expect(result[:log].last).to eq("Loading requisite: 2_req.rb")
|
58
58
|
execute_tasks!
|
59
59
|
expect($deployment_requisites_test_file1).to be_nil
|
60
60
|
expect($deployment_requisites_test_file2).to be_truthy
|