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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6449e2a04348ed1fa97a08d0e452a7bd612eb45bf807aaddd4c32b2a22a6b1c6
4
- data.tar.gz: 7d93dcf1e360f4a43aa36ace53db60009a7aa0062a734f9472ca14825c59db49
3
+ metadata.gz: 0d6c972cf07194a1c1e9241024d8eb5d636d65e653496ad23db5153cf054001e
4
+ data.tar.gz: 70b6ec4fc67378ab886af67a09e82aaae4ae017d403529d6d93362878fabccf5
5
5
  SHA512:
6
- metadata.gz: '038b4af7edbfd3cf592c425c3de222a3166be32d301999948cb93e2fc62555b3a349cfd412a918aa4a4457d819bc47b80eebb3e1eb007c14f0424352783ec95f'
7
- data.tar.gz: 727fb90aec81e72997768799dabd11860423413b176de03e94fdf1d01e0d4451efd7e68aeb61b13d9c60ca8d1c7372ed013b1e34eeb5ffd70f907ceaaf5971f1
6
+ metadata.gz: e42b021c7ddf16731d0aee35306bd1a4c3e4c51083d7b1de9c1af2be5b423b79cc2599d3dfa819716e2ad08514948ad9b096796245ddcfb68f27a17465f5c560
7
+ data.tar.gz: 1fada5b3aa7fc42e714fb34e2f5ccc4cbfb3b5557cd584bb42e76dfd7ff33e583f1d1ddd1c327441ef0354df83864982337eab1c7666e458410fdad94296bbc7
@@ -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 = JSON.parse(response.body)
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 = JSON.parse(file)
600
- rescue JSON::ParserError
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
@@ -5,7 +5,7 @@ class Onceover
5
5
  require 'onceover/controlrepo'
6
6
  require 'pathname'
7
7
  require 'fileutils'
8
- require 'json'
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 = JSON.parse(File.read(old_manifest_path))
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))
@@ -50,7 +50,7 @@ task :generate_nodesets do
50
50
 
51
51
  require 'onceover/beaker'
52
52
  require 'net/http'
53
- require 'json'
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 = JSON.parse(response.body)
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']
@@ -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.13.4"
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 'json', '>= 1.8.2'
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"
@@ -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 'json'
27
- JSON.parse(args[0])
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 'json' -%>
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.13.4
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-12 00:00:00.000000000 Z
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: json
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.8.2
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.8.2
40
+ version: '1.10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: backticks
43
43
  requirement: !ruby/object:Gem::Requirement