onceover 3.10.0 → 3.10.1

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
  SHA1:
3
- metadata.gz: c14126b8e9eacece852e8c46c72f444cc44c1922
4
- data.tar.gz: a378a1096ca8d649bd63b25e81cc5d782d4fe618
3
+ metadata.gz: 26f9c7a1bdb380409f00dc89152a022908b92bba
4
+ data.tar.gz: 90f95215b81359dd95b6a122ea6cefb1e27c3b1d
5
5
  SHA512:
6
- metadata.gz: 379f509f4a9f6a249cc40a771b01979d6416f33fc862e2fa046a8a8b8d788592d6120c853fbdd4aaca50269dd10077c1e596f887a951f116e9fb04b0d331c3df
7
- data.tar.gz: 5e62b583ce26d0092e49d9374eaa98b940a5e281686538e4f93cae43a135cdf5d834b52a9c838da771b1a9089c340dc9ad935b9f931f21a8a8643d8547b916b4
6
+ metadata.gz: bd2b084340148315db003af2457595f6a49b5e7b64569e396ae1635a0019bcb3157069e9c7b93c79fdb9360ed9790e147667a5b2f8d9c37f7d6fdf5d3b0b47d6
7
+ data.tar.gz: e165111f42591d5aa0241893c25fd2f6be1d55b8deb250a2fcab5e53c9bea606d58d262183b7237120c70a2e3dbbffbc3ec762b21a5a8ee5cef99fa8362daa3e
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.10.0"
7
+ s.version = "3.10.1"
8
8
  s.authors = ["Dylan Ratcliffe"]
9
9
  s.email = ["dylan.ratcliffe@puppet.com"]
10
10
  s.homepage = "https://github.com/dylanratcliffe/onceover"
@@ -23,30 +23,28 @@ test_matrix:
23
23
 
24
24
  functions:
25
25
  return_string:
26
- type: rvalue
27
26
  returns: string
28
27
  return_number:
29
- type: rvalue
30
28
  returns: 400
31
29
  return_boolean:
32
- type: rvalue
33
30
  returns: true
34
31
  return_array:
35
- type: rvalue
36
32
  returns:
37
33
  - 1
38
34
  - 2
39
35
  - 3
40
36
  return_hash:
41
- type: rvalue
42
37
  returns:
43
38
  foo: bar
44
39
  profile::fail_puppet:
45
- type: rvalue
46
- returns: null
40
+ returns:
41
+ hash: cool
42
+ yeah:
43
+ - arrays
44
+ - are
45
+ - great
47
46
  profile::fail_ruby:
48
- type: rvalue
49
- returns: null
47
+ returns: "\r\n\t C:\\windows"
50
48
 
51
49
  opts:
52
50
  :debug: true
@@ -49,7 +49,14 @@ $onceover_node = '<%= node.name %>'
49
49
  <% require 'json' -%>
50
50
  # Mocking functions
51
51
  <% @mock_functions.each do |function,params| -%>
52
- function <%= function %> (*$args) { from_json('<%= params['returns'].to_json %>') }
52
+ <% if params['returns'].is_a? String -%>
53
+ <% require 'pry' -%>
54
+ <% binding.pry -%>
55
+ <% json = params['returns'].dump[1..-2].to_json -%>
56
+ <% else -%>
57
+ <% json = params['returns'].to_json -%>
58
+ <% end -%>
59
+ function <%= function %> (*$args) { from_json('<%= json %>') }
53
60
  <% end -%>
54
61
  <% end -%>
55
62
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onceover
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.0
4
+ version: 3.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Ratcliffe