api_schema 0.2.2.2 → 0.2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_schema/resource_methods.rb +5 -1
- data/lib/api_schema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90d71d97d21d5dc916c1007e58641768385202a8
|
4
|
+
data.tar.gz: 5a1d8e9f48236626f81ea8c428d6a00a786d347f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0436aed4ab1b9d708a0a80036bbf46c516289b1349eaeeaaf205ed090c8bffa9565cee672e399162326e3ad2e5147e582004f959c6b8366e2e09a2e941a7be7
|
7
|
+
data.tar.gz: b30623d75f74c272f0d94181f97dc295261b2660b66393abbed43e071366be98b441aded3079589cbe7ca91fb368ada80fd4c599b986540ea121849355cc4489
|
@@ -3,6 +3,10 @@ module ApiSchema
|
|
3
3
|
|
4
4
|
private
|
5
5
|
|
6
|
+
def base_path(base_path)
|
7
|
+
@base_path = base_path
|
8
|
+
end
|
9
|
+
|
6
10
|
def get(base_path = default_path, extra_path: nil, &block)
|
7
11
|
resource = ResourceDefinition.new(:get, api_version, base_path, extra_path)
|
8
12
|
resource.instance_eval(&block)
|
@@ -39,7 +43,7 @@ module ApiSchema
|
|
39
43
|
end
|
40
44
|
|
41
45
|
def default_path
|
42
|
-
|
46
|
+
@base_path || self.to_s.split("::").last.gsub("Controller", "").split(/(?=[A-Z])/).map(&:downcase).join('_')
|
43
47
|
end
|
44
48
|
end
|
45
49
|
end
|
data/lib/api_schema/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.2.
|
4
|
+
version: 0.2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Chopey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|