rails-swagger 0.1.0 → 0.1.1

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: 8b89c6bd9042fab14f38e6fd3521e3fa12a33490
4
- data.tar.gz: fd06df4097b8b28ffb1b25f7eb70fb9a39adeab3
3
+ metadata.gz: 60dcbcd8c29a1f62409b5a74ada9fe10156d81d3
4
+ data.tar.gz: 78f746f92e9e12c8b6bd8f5c1f2149d3a4efadfd
5
5
  SHA512:
6
- metadata.gz: 75d982c6a1d3813c9d3ffb413314305f1bfc8626ea63d218df0c8e0c57a6d03e921dfea64f2f9d2b007f56f561773f9c5cf217ec7544ee054a595240005ae754
7
- data.tar.gz: 0f4da4227fb7fac70c09d58804e009182ed4faa6503eeae552a13eb85a5f68fd2181654d22a5fdeb766d6962c1d6b5619d9d987ddd98b91f9dc3ce28042cbe99
6
+ metadata.gz: 35344fdc0cc7b480c0f30759657acce83f284b6a3e945be64bb1b4b6010501d0407ba2ed808603d89f0a9d8f724ec44ca9d8a7221b34086f75c7fbd28f7e7461
7
+ data.tar.gz: 8734547b54976c568bcf36b14c953395943487d6e019a19567c7bbbe1dda14756879965068954110373536c9486462a69249bacda519aed5914fe62d527fb552
@@ -1,4 +1,3 @@
1
- require "json-schema"
2
1
  require "rails/swagger/controller"
3
2
  require "rails/swagger/router"
4
3
  require "rails/swagger/engine"
@@ -20,7 +20,7 @@ module Rails
20
20
  # the current request.
21
21
  def swagger_endpoint
22
22
  key = "#{params[:controller]}##{params[:action]}"
23
- endpoint = swagger_engine.endpoints[key]
23
+ swagger_engine.endpoints[key]
24
24
  end
25
25
 
26
26
  # Validates request parameters against the Swagger API spec
@@ -9,7 +9,7 @@ module Rails
9
9
  end
10
10
  # Translates path params from {bracket} syntax to :symbol syntax
11
11
  def path
12
- self[:url].gsub /\{(.+)\}/, ':\\1'
12
+ self[:url].gsub(/\{(.+)\}/, ':\\1')
13
13
  end
14
14
  end
15
15
 
@@ -41,7 +41,7 @@ module Rails
41
41
  # Adds an individual endpoint to the routing tree
42
42
  def << route
43
43
  raise "Argument must be an Endpoint" unless Endpoint === route
44
- base, *subroute = route[:_path].split '/' # Split out first element
44
+ _base, *subroute = route[:_path].split '/' # Split out first element
45
45
  if subroute.count == 0
46
46
  route[:_path] = ""
47
47
  @endpoints << route
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-swagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenaniah Cerny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-17 00:00:00.000000000 Z
11
+ date: 2017-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: json-schema
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: bundler
29
15
  requirement: !ruby/object:Gem::Requirement