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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3faae31e1ae0eb0582f9021b5038477b6bc2444e68053ff5facf623cd88e59cb
4
- data.tar.gz: 3e1c734aa1c10a1fd91be519a703be20d591e99ffc48cf05fe424cfbcba11ac2
3
+ metadata.gz: df4d136b9e1e61a42d838fc1914fa6f056470113f1cde885d940fc9041841f0f
4
+ data.tar.gz: 4760ac5e0ae77f68592ef418a3ccebdd66f69d0b5063b255968356e736dea29f
5
5
  SHA512:
6
- metadata.gz: b257ed53f917a994e36ab3df9637475db8ed3fd5a69d8dfd54013ac644ad2496580b0be20983899834407c9e23e869fcdb613b67fcb543e81e8e2e6aeb21fc19
7
- data.tar.gz: 618bb3bc727eed467c19df74d4423538ad31150fa8f7a75d32b48da50d09c39031ca4679bdd0341b73b382a40804198acb6cc4b4059934e8ed090dec9d555aa6
6
+ metadata.gz: 5f9ca059a63d28588da64445454272ead9197610e41bf32b8c5f8719c841c9853ec99ca46b8b5129f886080c91ebe52557d2e9ede12a859236a393cdad9b5a52
7
+ data.tar.gz: f4c641572822d1be08f7e11249364a3e01ce55a67236c57b79fdb52bb2638b6dee5e26d3cf468a0826f677473cad74f3291cb2e6b8305340baa61ea2f01dc410
data/Gemfile.lock CHANGED
@@ -46,7 +46,7 @@ GEM
46
46
  multi_xml (~> 0.5)
47
47
  rack (>= 1.2, < 3)
48
48
  psych (3.0.2)
49
- rack (2.0.5)
49
+ rack (2.0.6)
50
50
  rake (12.3.1)
51
51
  rdoc (6.0.4)
52
52
  rspec (3.7.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
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.4 ruby lib
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.4"
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]
@@ -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: "./deployment_requisites")
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
@@ -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(["Loading requisite: 2_req.rb"])
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deplomat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko