plz 0.0.9 → 0.1.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
  SHA1:
3
- metadata.gz: 61c460aa6b8d8420a207412cd8eb6b4f021fa1ec
4
- data.tar.gz: 54758d244a1c9327be1fdbf792b39fcf1e771923
3
+ metadata.gz: 9f816c8d4bae071f929bcf28be92356e8e0f09e6
4
+ data.tar.gz: 629ccafae62941b40f0bba8f2c940f930224db9e
5
5
  SHA512:
6
- metadata.gz: d041b2b035559bdbefeb2ca63a7c40232840e2c9ea2a4859512e5c8509fed86e45aa7af0a0b7153df8dc9ec70b6d4797a71390ce2a56b7e58f4e3855c3dd7d78
7
- data.tar.gz: bed7866059fee8e2227e0944e235a6f405d74d931a5648f381883c9b6b0a4a89b72968d282715e26c1074ec56ae2a0a6b83aaba004c2d92fa586dd524ca9785c
6
+ metadata.gz: c89e94a5db1039fb38a36acdc2d1a73c5b36adc4789e8421b0436f314015b29e118bb773afa2c587d8451e60421ebd5f9918bab6b28b5740c0f6156dc08b7a7d
7
+ data.tar.gz: 52dc00c48044fd44de75551d6bd909eb9135381e6578f56ed6021147e120e941f2f857032fcb1d5f733c5adc83666aff8385f129ed7a7271341b82f54a4d9c13
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.0
2
+ * Shape up --help feature
3
+
1
4
  ## 0.0.9
2
5
  * Show example args if URI Template and example value defined
3
6
 
data/lib/plz.rb CHANGED
@@ -3,6 +3,7 @@ require "active_support/core_ext/hash/slice"
3
3
  require "active_support/core_ext/module/delegation"
4
4
  require "active_support/core_ext/string/inflections"
5
5
  require "active_support/core_ext/string/strip"
6
+ require "cgi"
6
7
  require "faraday"
7
8
  require "faraday_middleware"
8
9
  require "json"
@@ -21,12 +21,12 @@ module Plz
21
21
  schema.links.select do |link|
22
22
  link.href && link.method && link.title
23
23
  end.map do |link|
24
- str = " plz #{link.title.underscore} #{target_name.underscore}"
24
+ str = " plz #{link.title.underscore} #{target_name}"
25
25
  if key = link.href[/{(.+)}/, 1]
26
- name = key.gsub(/[()]/, "").split("/").last
26
+ name = CGI.unescape(key).gsub(/[()]/, "").split("/").last
27
27
  if property = link.parent.properties[name]
28
28
  if example = property.data["example"]
29
- str << " #{name}=#{example.inspect}"
29
+ str << " #{name}=#{example}"
30
30
  end
31
31
  end
32
32
  end
data/lib/plz/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plz
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura