lono-pro 0.4.9 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec1f4e571babb526db3598539b72bb9921de4f74f9d53bb5e13047e078dfbff7
4
- data.tar.gz: 262fa8af460642f576bb2a40e2cf70a0b4355b2024dec898fee8ddbff101b8dd
3
+ metadata.gz: d968bc5665d3b2036188cceba1ee1001ad2d3f339da9735b23654fd919a65e3e
4
+ data.tar.gz: 4f161b323dbbafe7c29f6b0ffb192918f52422e8cd94edd7ccd1aaf25f7fd68d
5
5
  SHA512:
6
- metadata.gz: 9b65743cfc4d93eb73a70fcbd367468241285dab7e1d0bad54f107c6ec8b5c97a3c5bd33ab3e0b99e44c398467ad33fe6eb1dd9c79931d46dcbbe6ac4a48ecf2
7
- data.tar.gz: 4250ac5cbd0348edb648c5fb398ffc1013e2793d8130104e29815458c86be6a4e1a42d563c4c78c9c91c027a64cbfa339e8637ced8028644ca600a3543ed3dab
6
+ metadata.gz: 6634078a0b5c368a24e8fb5568bbf2f187ae03bb8390cfed9c94938acca3df247561e043691d4db3203b47c2136f68c949c1ed369601a75c000edef20876ba8a
7
+ data.tar.gz: ad787f67ce76ff0bf32f476ccba86d87f17292bee758ed37c7f15a7467e36e8d5e7cdac89a199c773a679c7e8e54341ddd9ebdfa73b84febdba994fe05231f61
@@ -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
@@ -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.merge(print: true)).run
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 unless @options[:print] || ENV['LONO_PRO_TEST']
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
 
@@ -1,5 +1,5 @@
1
1
  module Lono
2
2
  module Pro
3
- VERSION = "0.4.9"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
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.9
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-30 00:00:00.000000000 Z
11
+ date: 2019-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk