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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d16c885ecc2244dedb62a305988a3119768c17dc
4
- data.tar.gz: a3c607eb9ec54baea72f10b704ab02ceb4d5e595
3
+ metadata.gz: 90d71d97d21d5dc916c1007e58641768385202a8
4
+ data.tar.gz: 5a1d8e9f48236626f81ea8c428d6a00a786d347f
5
5
  SHA512:
6
- metadata.gz: 559137990458f47c04250aa5a8f125727fa075763ee84814c250b0b045c5f29ab358daeb88033c112050e781df59eba13377656b0d84fa54d80206d68a2195e7
7
- data.tar.gz: 1fb654b77552faa11e16e85f8fc3b4cb0c728b59d4329b0e2f571cf99d669d087d3b4cfc32481b11125a5f11e51974d9f5d1def2638a718581d186f149f83349
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
- self.to_s.split("::").last.gsub("Controller", "").split(/(?=[A-Z])/).map(&:downcase).join('_')
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
@@ -1,3 +1,3 @@
1
1
  module ApiSchema
2
- VERSION = "0.2.2.2"
2
+ VERSION = "0.2.2.3"
3
3
  end
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.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-14 00:00:00.000000000 Z
11
+ date: 2018-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport