graphiti-openapi 0.1.4 → 0.1.5

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: 015cbe6aa63f308b61a42b8f078e964b563e565aab3d366073a7456864229a7e
4
- data.tar.gz: b0ce59a632e8d31d0e6a09a7a05bdc8b350fbf1c271d76d71be5037d30ff3a64
3
+ metadata.gz: 3e72f28f72e39813ba6776fa40544279bbf842fed200b5be56678aa40495981d
4
+ data.tar.gz: ebe5f2fd5206ad29590fec6b6336003e34b3433092a813f47d6caf7cd2c87b4a
5
5
  SHA512:
6
- metadata.gz: efeb4935a85a9b49e8515ccbe0f3de6e3640316fc9828a4f6ddc46ed62cf286b657b437babb9e8b92cdbc1fdb5b5038403d807249b6bde1fec5e7217fc5529d2
7
- data.tar.gz: f46970e19d111d1097d71a4e6ec0513a5e9e03323bdde1b236de98246e5eefab4534179f43461bb55bbd6436b0bf5898a4c78ba45dfd7a833a4a1aeaf9a9d563
6
+ metadata.gz: 706bbdd8b08e6983b576d806e0af2dd23058ba1cc0a90a56be5a4591cf6d341e86ebbd06e137e001aa1525e358b4770f78e3c96abf3e212f411127330f5815dc
7
+ data.tar.gz: 4ba0e5eb35b63240bc917f1cd0984787d20218e47afcf65a5c449943bc40a17dec1aa486969926caf6a1b57515c36f9ea8cfe3c081e97876f916d64a2881948b
@@ -17,6 +17,10 @@ module Graphiti::OpenAPI
17
17
  attribute :schema, Types::Any
18
18
  attribute :path, Types::Coercible::String
19
19
 
20
+ def path
21
+ __attributes__[:path].gsub(/^#{Regexp.escape(ApplicationResource.endpoint_namespace)}/, '')
22
+ end
23
+
20
24
  def resource_path
21
25
  File.join(path.to_s, "{id}")
22
26
  end
@@ -59,7 +63,7 @@ module Graphiti::OpenAPI
59
63
  actions.select(&:collection?)
60
64
  end
61
65
 
62
- memoize :resource_path, :paths, :parameters, :resource, :resource_actions, :collection_actions
66
+ memoize :path, :resource_path, :paths, :parameters, :resource, :resource_actions, :collection_actions
63
67
  end
64
68
 
65
69
  class Endpoints < Hash
@@ -1,5 +1,5 @@
1
1
  module Graphiti
2
2
  module OpenAPI
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti-openapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Semyonov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2019-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties