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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ad986af06425a0794b57a5ed51f9ff9ff4f3c59
4
- data.tar.gz: 355d94f757b2820464f5b65ceec411061665e378
3
+ metadata.gz: 7fcc9cadffe081a87791e1eaf0e2c15fe8f4ab2e
4
+ data.tar.gz: 730f086a9acc0878301b3357990b144555a1e1a2
5
5
  SHA512:
6
- metadata.gz: f4ae1365bdacbde7816d0cb5091c0c25c4ca803da9709a55b77f5313b54e18c59cc0b8b619e6fc17832dcd473ffe729a906b71f94d2bfd62159cb41c5c1fe69d
7
- data.tar.gz: 82b7611b2e33cca630ab2d2b39d996cc4a8c942e0195a0cf850258028e848b740c3eb98a4020dcec35248a556c870e27cbe817227eace57bde65a047b1b0f4ba
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.gsub('-', '_'),
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.gsub('-', '_'),
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
 
@@ -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
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Heroics
3
- VERSION = '0.0.19'
3
+ VERSION = '0.0.20'
4
4
  end
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.19
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-15 00:00:00.000000000 Z
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: