lono-pro 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +0 -1
- data/lib/lono/pro/help/import.md +1 -1
- data/lib/lono/pro/importer/base.rb +2 -2
- data/lib/lono/pro/importer/converter.rb +1 -1
- data/lib/lono/pro/importer/params.rb +1 -1
- data/lib/lono/pro/importer/service/coder.rb +5 -2
- data/lib/lono/pro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a31793de41cad9bbf7c4be534c30f19a3aebbdd73bc099024717c9e4e46e8359
|
4
|
+
data.tar.gz: 924d5bbea56cb33ccee980288d0cc11e24d2629983bba698e5a00b8bd9d0fd5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0d4d2722b5ddb3815e56a99602f64463215be021fd85174e07d5b0e16b27e73e9efa70f05dadccdf3154c54917fa523396208487bc2659f57a7f5366d54d61b
|
7
|
+
data.tar.gz: 38ca2bcc2782d359783cfa51b40d86e5e150a86d3f92431ce948e2398367c17d32fa48cd6585e097fc348ff972551d3f4f5cc189608f1d5b3c0a0625565ea55f
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.4.0]
|
7
|
+
- exit 1 if ruby code was not able to be translated
|
8
|
+
- fill in imported params file with default values
|
9
|
+
|
6
10
|
## [0.3.0]
|
7
11
|
- only print ruby code to stdout with lono code convert
|
8
12
|
- source can be file or url source
|
data/Gemfile
CHANGED
data/lib/lono/pro/help/import.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
## Example with Output
|
8
8
|
|
9
|
-
$ lono code import https://s3-us-east-2.amazonaws.com/cloudformation-templates-us-east-2/
|
9
|
+
$ lono code import https://s3-us-east-2.amazonaws.com/cloudformation-templates-us-east-2/AutoScalingMultiAZWithNotifications.template --blueprint asg
|
10
10
|
Template imported to: blueprints/asg/app/templates/asg.rb
|
11
11
|
Params file created at configs/asg/development.txt
|
12
12
|
$
|
@@ -22,9 +22,9 @@ class Lono::Pro::Importer
|
|
22
22
|
|
23
23
|
def create_params(template_path)
|
24
24
|
params_path = if @blueprint != @template
|
25
|
-
"configs/#{@blueprint}/#{Lono.env}/#{@template}.txt"
|
25
|
+
"configs/#{@blueprint}/params/#{Lono.env}/#{@template}.txt"
|
26
26
|
else
|
27
|
-
"configs/#{@blueprint}/#{Lono.env}.txt"
|
27
|
+
"configs/#{@blueprint}/params/#{Lono.env}.txt"
|
28
28
|
end
|
29
29
|
params = Params.new(template_path, params_path)
|
30
30
|
params.create
|
@@ -26,16 +26,18 @@ class Lono::Pro::Importer::Service::Coder
|
|
26
26
|
print(data)
|
27
27
|
data["ruby_code"]
|
28
28
|
else
|
29
|
-
puts "Unable to convert template to
|
29
|
+
puts "Unable to convert template to Ruby code."
|
30
30
|
puts "The error has been reported."
|
31
31
|
puts "Non-successful http response status code: #{res.code}"
|
32
32
|
# puts "headers: #{res.each_header.to_h.inspect}"
|
33
|
+
exit 1
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
36
37
|
private
|
37
38
|
def print(data)
|
38
39
|
return unless @options[:print]
|
40
|
+
|
39
41
|
validity = data["valid_ruby"] ? "valid" : "invalid"
|
40
42
|
$stderr.puts <<~EOL
|
41
43
|
INFO: The ruby syntax is #{validity}
|
@@ -44,6 +46,7 @@ private
|
|
44
46
|
EOL
|
45
47
|
ruby_code = data["ruby_code"]
|
46
48
|
puts ruby_code
|
49
|
+
ruby_code
|
47
50
|
end
|
48
51
|
|
49
52
|
def net_http_client(url)
|
@@ -63,6 +66,6 @@ private
|
|
63
66
|
end
|
64
67
|
|
65
68
|
def lono_command
|
66
|
-
"
|
69
|
+
"#{$0} #{ARGV.join(' ')}"
|
67
70
|
end
|
68
71
|
end
|
data/lib/lono/pro/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lono-pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|