lono-pro 0.4.9 → 0.5.0
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 +3 -0
- data/lib/lono/pro/code.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: d968bc5665d3b2036188cceba1ee1001ad2d3f339da9735b23654fd919a65e3e
|
4
|
+
data.tar.gz: 4f161b323dbbafe7c29f6b0ffb192918f52422e8cd94edd7ccd1aaf25f7fd68d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6634078a0b5c368a24e8fb5568bbf2f187ae03bb8390cfed9c94938acca3df247561e043691d4db3203b47c2136f68c949c1ed369601a75c000edef20876ba8a
|
7
|
+
data.tar.gz: ad787f67ce76ff0bf32f476ccba86d87f17292bee758ed37c7f15a7467e36e8d5e7cdac89a199c773a679c7e8e54341ddd9ebdfa73b84febdba994fe05231f61
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
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.5.0]
|
7
|
+
- fix Converter#run result to return String
|
8
|
+
|
6
9
|
## [0.4.9]
|
7
10
|
- #2 improve error response with error data
|
8
11
|
- yellow color for invalid ruby syntax warning
|
data/lib/lono/pro/code.rb
CHANGED
@@ -16,7 +16,7 @@ module Lono::Pro
|
|
16
16
|
long_desc Help.text("code/convert")
|
17
17
|
option :casing, default: "as-is", desc: "Controls casing of logical ids. IE: as-is, camelcase or underscore"
|
18
18
|
def convert(source)
|
19
|
-
Importer::Converter.new(source, options
|
19
|
+
Importer::Converter.new(source, options).run
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -23,8 +23,10 @@ class Lono::Pro::Importer::Service::Coder
|
|
23
23
|
|
24
24
|
if res.code == "200"
|
25
25
|
data = JSON.load(res.body)
|
26
|
-
print(data) # returns data["ruby_code"] / passthrough
|
26
|
+
ruby_code = print(data) # returns data["ruby_code"] / passthrough
|
27
|
+
ruby_code
|
27
28
|
else
|
29
|
+
puts "errored"
|
28
30
|
puts "Unable to convert template to Ruby code."
|
29
31
|
puts "The error has been reported."
|
30
32
|
puts "Non-successful http response status code: #{res.code}"
|
@@ -35,7 +37,7 @@ class Lono::Pro::Importer::Service::Coder
|
|
35
37
|
|
36
38
|
private
|
37
39
|
def print(data)
|
38
|
-
return
|
40
|
+
return if ENV['LONO_PRO_TEST']
|
39
41
|
|
40
42
|
if data["error"]
|
41
43
|
# Code was processed but there was this error with an HTTP 200 OK
|
@@ -52,6 +54,7 @@ private
|
|
52
54
|
else
|
53
55
|
$stderr.puts "WARN: The generated Ruby code is has #{validity} syntax. Providing because it may be small errors.".color(:yellow) # note redirection disables color
|
54
56
|
end
|
57
|
+
|
55
58
|
$stderr.puts <<~EOL
|
56
59
|
Translated ruby code below:
|
57
60
|
|
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.5.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-
|
11
|
+
date: 2019-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|