puppet-repl 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/puppet-repl/cli.rb +29 -2
- data/lib/version.rb +1 -1
- data/puppet-repl.gemspec +3 -3
- 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: f4519dc48054ca323c370206dcff4ef6176bf71c
|
4
|
+
data.tar.gz: d44b234c9b5c22bfa183485e85f2684985b54899
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d62feb4b6134fdf6f791432760497f6202a0607a71fbb7f3bde02655f7914cac5f6baf1177f60f13db740973e7c5ed1c1eff3d9b44c8f84778439f553967eb14
|
7
|
+
data.tar.gz: fdb5b9ea4d7b7e8327fc84028308dead5a1a71fb04ebf88db2a7bd7f92b7715f5003e48e091f12886a500d47aa2614717c6712421c5a6e19a45d3771a2133445
|
data/CHANGELOG.md
CHANGED
@@ -1,26 +1,36 @@
|
|
1
|
+
## 0.2.1
|
2
|
+
* Fixes #2 - adds support for multiline input
|
3
|
+
|
1
4
|
## 0.2.0
|
2
5
|
* Fixes #19 - lock down dependency versions
|
3
6
|
* fixes #18 - add ability to filter out functions based on namespace
|
4
7
|
* fixes #15 - node classes return error
|
5
8
|
* fixes #16 - use auto complete on functions and variables
|
6
9
|
* Fixes #14 - add functionality to set node object from remote source
|
10
|
+
* adds support for server_facts
|
7
11
|
* fixes other minor bugs found along the way
|
8
12
|
* adds ability to list classification parameters from ENC
|
13
|
+
|
9
14
|
## 0.1.1
|
10
15
|
* adds ability to load files or urls
|
16
|
+
|
11
17
|
## 0.1.0
|
12
18
|
* ensure the title of classes contains quotes
|
13
19
|
* adds support to import a file or import from stdin
|
14
20
|
* added additional ap support for puppet::pops::types
|
15
21
|
* adds ability to print resources and classes
|
16
22
|
* adds the ability to pass in a scope
|
23
|
+
|
17
24
|
## 0.0.8
|
18
25
|
* adds ability to list currently loaded classes
|
19
26
|
* adds formatted output using awesome print
|
20
27
|
* adds verbose type output when creating resources
|
28
|
+
|
21
29
|
## 0.0.7
|
22
30
|
* Added ability to list scope variables
|
31
|
+
|
23
32
|
## 0.0.6
|
24
33
|
* Bug fix for puppet 3.8
|
34
|
+
|
25
35
|
## 0.0.5
|
26
36
|
* Added ability to set puppet log level
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/puppet-repl/cli.rb
CHANGED
@@ -153,11 +153,38 @@ Type "exit", "functions", "vars", "krt", "facts", "resources", "classes",
|
|
153
153
|
output
|
154
154
|
end
|
155
155
|
|
156
|
+
# tries to determine if the input is going to be a multiline input
|
157
|
+
# by reading the parser error message
|
158
|
+
def multiline_input?(e)
|
159
|
+
case e.message
|
160
|
+
when /Syntax error at end of file/i
|
161
|
+
true
|
162
|
+
else
|
163
|
+
false
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
156
167
|
# reads input from stdin, since readline requires a tty
|
157
168
|
# we cannot read from other sources as readline requires a file object
|
169
|
+
# we parse the string after each input to determine if the input is a multiline_input
|
170
|
+
# entry. If it is multiline we run through the loop again and concatenate the
|
171
|
+
# input
|
158
172
|
def read_loop
|
159
|
-
|
160
|
-
|
173
|
+
line_number = 1
|
174
|
+
full_buffer = ''
|
175
|
+
while buf = Readline.readline("#{line_number}:>> ", true)
|
176
|
+
begin
|
177
|
+
line_number = line_number.next
|
178
|
+
full_buffer += buf
|
179
|
+
parser.parse_string(full_buffer)
|
180
|
+
rescue Puppet::ParseErrorWithIssue => e
|
181
|
+
if multiline_input?(e)
|
182
|
+
out_buffer.print ' '
|
183
|
+
next
|
184
|
+
end
|
185
|
+
end
|
186
|
+
handle_input(full_buffer)
|
187
|
+
full_buffer = ''
|
161
188
|
end
|
162
189
|
end
|
163
190
|
|
data/lib/version.rb
CHANGED
data/puppet-repl.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: puppet-repl 0.2.
|
5
|
+
# stub: puppet-repl 0.2.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "puppet-repl"
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Corey Osman"]
|
14
|
-
s.date = "2016-05-
|
14
|
+
s.date = "2016-05-19"
|
15
15
|
s.description = "A interactive command line tool for evaluating the puppet language"
|
16
16
|
s.email = "corey@nwops.io"
|
17
17
|
s.executables = ["prepl"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-repl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Osman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet
|