onceover 3.13.4 → 3.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onceover/controlrepo.rb +5 -5
- data/lib/onceover/deploy.rb +2 -2
- data/lib/onceover/rake_tasks.rb +2 -2
- data/onceover.gemspec +2 -2
- data/templates/test_spec.rb.erb +3 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d6c972cf07194a1c1e9241024d8eb5d636d65e653496ad23db5153cf054001e
|
4
|
+
data.tar.gz: 70b6ec4fc67378ab886af67a09e82aaae4ae017d403529d6d93362878fabccf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e42b021c7ddf16731d0aee35306bd1a4c3e4c51083d7b1de9c1af2be5b423b79cc2599d3dfa819716e2ad08514948ad9b096796245ddcfb68f27a17465f5c560
|
7
|
+
data.tar.gz: 1fada5b3aa7fc42e714fb34e2f5ccc4cbfb3b5557cd584bb42e76dfd7ff33e583f1d1ddd1c327441ef0354df83864982337eab1c7666e458410fdad94296bbc7
|
data/lib/onceover/controlrepo.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'r10k/puppetfile'
|
2
2
|
require 'erb'
|
3
|
-
require 'json'
|
4
3
|
require 'yaml'
|
5
4
|
require 'find'
|
6
5
|
require 'pathname'
|
7
6
|
require 'thread'
|
7
|
+
require 'multi_json'
|
8
8
|
require 'onceover/beaker'
|
9
9
|
require 'onceover/logger'
|
10
10
|
include Onceover::Logger
|
@@ -499,8 +499,8 @@ class Onceover
|
|
499
499
|
warn "[DEPRECATION] #{__method__} is deprecated due to the removal of Beaker"
|
500
500
|
|
501
501
|
require 'onceover/beaker'
|
502
|
+
require 'multi_json'
|
502
503
|
require 'net/http'
|
503
|
-
require 'json'
|
504
504
|
|
505
505
|
hosts_hash = {}
|
506
506
|
|
@@ -522,7 +522,7 @@ class Onceover
|
|
522
522
|
comment_out = true
|
523
523
|
else
|
524
524
|
comment_out = false
|
525
|
-
box_info =
|
525
|
+
box_info = MultiJson.load(response.body)
|
526
526
|
box_info['current_version']['providers'].each do |provider|
|
527
527
|
if provider['name'] == 'virtualbox'
|
528
528
|
url = provider['original_url']
|
@@ -596,8 +596,8 @@ class Onceover
|
|
596
596
|
def read_facts(facts_file)
|
597
597
|
file = File.read(facts_file)
|
598
598
|
begin
|
599
|
-
result =
|
600
|
-
rescue
|
599
|
+
result = MultiJson.load(file)
|
600
|
+
rescue MultiJson::ParseError
|
601
601
|
raise "Could not parse the file #{facts_file}, check that it is valid JSON and that the encoding is correct"
|
602
602
|
end
|
603
603
|
result
|
data/lib/onceover/deploy.rb
CHANGED
@@ -5,7 +5,7 @@ class Onceover
|
|
5
5
|
require 'onceover/controlrepo'
|
6
6
|
require 'pathname'
|
7
7
|
require 'fileutils'
|
8
|
-
require '
|
8
|
+
require 'multi_json'
|
9
9
|
|
10
10
|
logger.debug 'Deploying locally (R10K)...'
|
11
11
|
|
@@ -96,7 +96,7 @@ class Onceover
|
|
96
96
|
old_manifest_path = "#{repo.tempdir}/#{repo.environmentpath}/production/.onceover_manifest.json"
|
97
97
|
if File.exist? old_manifest_path
|
98
98
|
logger.debug "Found manifest from previous run, parsing..."
|
99
|
-
old_manifest =
|
99
|
+
old_manifest = MultiJson.load(File.read(old_manifest_path))
|
100
100
|
logger.debug "Removing #{old_manifest.count} files"
|
101
101
|
old_manifest.reverse.each do |file|
|
102
102
|
FileUtils.rm_f(File.join("#{repo.tempdir}/#{repo.environmentpath}/production/",file))
|
data/lib/onceover/rake_tasks.rb
CHANGED
@@ -50,7 +50,7 @@ task :generate_nodesets do
|
|
50
50
|
|
51
51
|
require 'onceover/beaker'
|
52
52
|
require 'net/http'
|
53
|
-
require '
|
53
|
+
require 'multi_json'
|
54
54
|
|
55
55
|
repo = Onceover::Controlrepo.new
|
56
56
|
|
@@ -72,7 +72,7 @@ task :generate_nodesets do
|
|
72
72
|
comment_out = true
|
73
73
|
else
|
74
74
|
comment_out = false
|
75
|
-
box_info =
|
75
|
+
box_info = MultiJson.load(response.body)
|
76
76
|
box_info['current_version']['providers'].each do |provider|
|
77
77
|
if provider['name'] == 'virtualbox'
|
78
78
|
url = provider['original_url']
|
data/onceover.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "onceover"
|
7
|
-
s.version = "3.
|
7
|
+
s.version = "3.14.0"
|
8
8
|
s.authors = ["Dylan Ratcliffe"]
|
9
9
|
s.email = ["dylan.ratcliffe@puppet.com"]
|
10
10
|
s.homepage = "https://github.com/dylanratcliffe/onceover"
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
# Runtime dependencies, but also probably dependencies of requiring projects
|
21
21
|
s.add_runtime_dependency 'rake', '>= 10.0.0'
|
22
|
-
s.add_runtime_dependency '
|
22
|
+
s.add_runtime_dependency 'multi_json', '~> 1.10'
|
23
23
|
s.add_runtime_dependency 'backticks', '>= 1.0.2'
|
24
24
|
s.add_runtime_dependency 'rspec-puppet', ">= 2.4.0"
|
25
25
|
s.add_runtime_dependency 'parallel_tests', ">= 2.0.0"
|
data/templates/test_spec.rb.erb
CHANGED
@@ -23,8 +23,8 @@ describe "<%= cls.name %>" do
|
|
23
23
|
# Create a from_json function so that we can parse the output of json for mocked functions
|
24
24
|
before :each do
|
25
25
|
Puppet::Parser::Functions.newfunction(:from_json, :type => :rvalue) { |args|
|
26
|
-
require '
|
27
|
-
|
26
|
+
require 'multi_json'
|
27
|
+
MultiJson.load(args[0])
|
28
28
|
}
|
29
29
|
end
|
30
30
|
<% end -%>
|
@@ -46,7 +46,7 @@ $onceover_node = '<%= node.name %>'
|
|
46
46
|
# End user-specified pre_condition
|
47
47
|
|
48
48
|
<% if @mock_functions -%>
|
49
|
-
<% require '
|
49
|
+
<% require 'multi_json' -%>
|
50
50
|
# Mocking functions
|
51
51
|
<% @mock_functions.each do |function,params| -%>
|
52
52
|
<% if params['returns'].is_a? String -%>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onceover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Ratcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 10.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: '1.10'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: '1.10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: backticks
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|