puppet-repl 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 408591cb70bc73f12741cabe810d1f58e07a22fd
4
- data.tar.gz: a3ab223176561bb31ef3ad0ea22835d30d57e8cb
3
+ metadata.gz: f3c804535c785e4db0f2d562cb33addee4f628d7
4
+ data.tar.gz: d1520b06a7d8e3cb0d839a8e5fa5f454687e0308
5
5
  SHA512:
6
- metadata.gz: dbf76410d58fcf91583aae4e2106be760a1e8618094610e7bbc793231e66fe5814a8b062e38825366efb1ffd50eb0cf8d0af8d07e5192c1243585e81ad0417f0
7
- data.tar.gz: fb82f8c440e493467740582e554378a4e2c8f3e7f334f631164a28c73aad6e66fa1c5f734b41c1894561e0fcf146a93715f16a8316e43239abc65bd6d870c527
6
+ metadata.gz: 4392aa83af2e328fe838c8fed64876e94611b8d67cf0397e3052bed04a44241e61eb86226c1d04dbdd453701afccb897bb69b9843816c5c4f195cf88d5ed7159
7
+ data.tar.gz: 2a26d84e4e9f625a21ceca754571484aee2e80a07bfb4accaf0f382afafdc9ba2839f9c64cd4079d12a581fe87b073dd06c248a00574e8ec94dd3e4a6c2cb199
@@ -1,3 +1,5 @@
1
+ ## 0.3.4
2
+ * Fixes issue with temporay file not being unique
1
3
  ## 0.3.3
2
4
  * Adds ability to call breakpoints from within repl
3
5
  * Adds newline for each multiline input
@@ -1,5 +1,7 @@
1
1
  require 'puppet/pops'
2
2
  require 'facterdb'
3
+ require 'tempfile'
4
+
3
5
  # load all the generators found in the generators directory
4
6
  Dir.glob(File.join(File.dirname(__FILE__),'support', '*.rb')).each do |file|
5
7
  require_relative File.join('support', File.basename(file, '.rb'))
@@ -140,13 +142,14 @@ module PuppetRepl
140
142
  # in order to call native functions we need to set the global_scope
141
143
  ast = generate_ast(input)
142
144
  # record the input for puppet to retrieve and reference later
143
- File.open('.puppet_repl_input.pp', 'w') do |f|
145
+ file = Tempfile.new(['puppet_repl_input', '.pp'])
146
+ File.open(file, 'w') do |f|
144
147
  f.write(input)
145
148
  end
146
149
  Puppet.override( {:code => input, :global_scope => scope, :loaders => scope.compiler.loaders } , 'For puppet-repl') do
147
150
  # because the repl is not a module we leave the modname blank
148
151
  scope.environment.known_resource_types.import_ast(ast, '')
149
- parser.evaluate_string(scope, input, File.expand_path('.puppet_repl_input.pp'))
152
+ parser.evaluate_string(scope, input, File.expand_path(file))
150
153
  end
151
154
  end
152
155
 
@@ -1,3 +1,3 @@
1
1
  module PuppetRepl
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
@@ -9,4 +9,5 @@ class sample_test_breakpoint(
9
9
  range(1,5).map | $num | {
10
10
  start_repl()
11
11
  }
12
- }
12
+ }
13
+ include sample_test_breakpoint
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-repl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Osman
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubyforge_project:
144
- rubygems_version: 2.6.6
144
+ rubygems_version: 2.6.7
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: A repl for the puppet language