heroics 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/heroics/client_generator.rb +6 -6
- data/lib/heroics/schema.rb +2 -2
- data/lib/heroics/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fcc9cadffe081a87791e1eaf0e2c15fe8f4ab2e
|
4
|
+
data.tar.gz: 730f086a9acc0878301b3357990b144555a1e1a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69da806503628e6636782d95693c40548d3958aba3dff089e12dcd6264707d3d588c83c2d98f960fcdc6d57eb47d194686aab2114b84eb2c7209dd8dfc62b5c0
|
7
|
+
data.tar.gz: 4d2fbd0ad96211843edc9836afdcdb77e64c309f19017ed757473475159fd453f4cca3afe113bea629dd152fcff7abd5af4a49d17c997e9a8601a95476b35289
|
@@ -21,12 +21,12 @@ module Heroics
|
|
21
21
|
schema.resources.each do |resource_schema|
|
22
22
|
links = []
|
23
23
|
resource_schema.links.each do |link_schema|
|
24
|
-
links << GeneratorLink.new(link_schema.name
|
24
|
+
links << GeneratorLink.new(link_schema.name,
|
25
25
|
link_schema.description,
|
26
26
|
link_schema.parameter_details,
|
27
27
|
link_schema.needs_request_body?)
|
28
28
|
end
|
29
|
-
resources << GeneratorResource.new(resource_schema.name
|
29
|
+
resources << GeneratorResource.new(resource_schema.name,
|
30
30
|
resource_schema.description,
|
31
31
|
links)
|
32
32
|
end
|
@@ -48,7 +48,7 @@ module Heroics
|
|
48
48
|
attr_reader :name, :description, :links
|
49
49
|
|
50
50
|
def initialize(name, description, links)
|
51
|
-
@name = name
|
51
|
+
@name = Heroics.ruby_name(name)
|
52
52
|
@description = description
|
53
53
|
@links = links
|
54
54
|
end
|
@@ -65,7 +65,7 @@ module Heroics
|
|
65
65
|
attr_reader :name, :description, :parameters, :takes_body
|
66
66
|
|
67
67
|
def initialize(name, description, parameters, takes_body)
|
68
|
-
@name = name
|
68
|
+
@name = Heroics.ruby_name(name)
|
69
69
|
@description = description
|
70
70
|
@parameters = parameters
|
71
71
|
if takes_body
|
@@ -75,12 +75,12 @@ module Heroics
|
|
75
75
|
|
76
76
|
# list of parameters for method signature, body is optional
|
77
77
|
def method_signature
|
78
|
-
@parameters.map { |info| info.name == 'body' ? "body = {}" : info.name }.join(', ')
|
78
|
+
@parameters.map { |info| info.name == 'body' ? "body = {}" : Heroics.ruby_name(info.name) }.join(', ')
|
79
79
|
end
|
80
80
|
|
81
81
|
# list of parameters to pass along from method signature to client calls
|
82
82
|
def parameter_names
|
83
|
-
@parameters.map { |info| info.name }.join(', ')
|
83
|
+
@parameters.map { |info| Heroics.ruby_name(info.name) }.join(', ')
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
data/lib/heroics/schema.rb
CHANGED
@@ -355,8 +355,8 @@ module Heroics
|
|
355
355
|
attr_reader :resource_name, :description
|
356
356
|
|
357
357
|
def initialize(resource_name, name, description)
|
358
|
-
@resource_name = resource_name
|
359
|
-
@name = name
|
358
|
+
@resource_name = Heroics.ruby_name(resource_name)
|
359
|
+
@name = Heroics.ruby_name(name)
|
360
360
|
@description = description
|
361
361
|
end
|
362
362
|
|
data/lib/heroics/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- geemus
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-02-
|
12
|
+
date: 2017-02-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -212,3 +212,4 @@ signing_key:
|
|
212
212
|
specification_version: 4
|
213
213
|
summary: A Ruby client generator for HTTP APIs described with a JSON schema
|
214
214
|
test_files: []
|
215
|
+
has_rdoc:
|