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 +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/puppet-repl/support.rb +5 -2
- data/lib/version.rb +1 -1
- data/spec/fixtures/sample_start_repl.pp +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3c804535c785e4db0f2d562cb33addee4f628d7
|
4
|
+
data.tar.gz: d1520b06a7d8e3cb0d839a8e5fa5f454687e0308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4392aa83af2e328fe838c8fed64876e94611b8d67cf0397e3052bed04a44241e61eb86226c1d04dbdd453701afccb897bb69b9843816c5c4f195cf88d5ed7159
|
7
|
+
data.tar.gz: 2a26d84e4e9f625a21ceca754571484aee2e80a07bfb4accaf0f382afafdc9ba2839f9c64cd4079d12a581fe87b073dd06c248a00574e8ec94dd3e4a6c2cb199
|
data/CHANGELOG.md
CHANGED
data/lib/puppet-repl/support.rb
CHANGED
@@ -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
|
-
|
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(
|
152
|
+
parser.evaluate_string(scope, input, File.expand_path(file))
|
150
153
|
end
|
151
154
|
end
|
152
155
|
|
data/lib/version.rb
CHANGED
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.
|
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.
|
144
|
+
rubygems_version: 2.6.7
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: A repl for the puppet language
|