api_recipes 0.7.0 → 0.7.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
  SHA256:
3
- metadata.gz: 409a786b8eff1b1fd48bdbb1f5c8a14cea860056581f86f0c994ce8436874f53
4
- data.tar.gz: d8923466ea1f2109a8528e2d7e55d402c5ed2e45b714612081bda920d3e03fe4
3
+ metadata.gz: dfd5a3d85babd54baa4d9001c52362cc5dfff4421cf3f9e7a2417e78b3f5eb2b
4
+ data.tar.gz: 316bd1cefa28669906a4e87a56ef7e64ed14369cf2099262ad5ed85fa0544b05
5
5
  SHA512:
6
- metadata.gz: 70aa364742f8dc27d38c1fa0f5d9fec9a0c6b294421fac1413ed34379b39f2c28ae4cb993d51f67bfa4ddda16fe6b8074fe6646680b7a3fcb45c8d98e3f75d5b
7
- data.tar.gz: fd4885cd695a4356c4f57417f77bc914a9b0104372d8eb37fb6d0531831348e9da38f2d99a394fbdc9802cd9a20bc99b3289cf4c18f92683b0fd9f9644d5f555
6
+ metadata.gz: 28bd374672f163b8912794f12e33bbaaa9168f03940651dda9fba2bb88899b5202ea51cace5ed0a814508eef4dcbb195ac32826590c12d1e5d91a31f66a93d84
7
+ data.tar.gz: 0bbb7e6ec0b1f02254449edfb03731b05927e5ac3bdc51a3fc2c2a89ae8ccbe79238f70ebe022978611ca4e49a0e9b1b95c96a3c4977360f36686424371b492e
data/lib/api_recipes.rb CHANGED
@@ -26,18 +26,16 @@ module ApiRecipes
26
26
  if self.respond_to? endpoint_name
27
27
  raise EndpointNameClashError.new(self, endpoint_name)
28
28
  else
29
- ep = Endpoint.new(endpoint_name, configs)
30
- ApiRecipes.copy_global_authorizations_to_endpoint ep
31
- ApiRecipes._aprcps_thread_storage[endpoint_name] = {}
32
- ApiRecipes._aprcps_thread_storage[endpoint_name][self] = ep
33
-
34
29
  define_method endpoint_name do
35
30
  unless ApiRecipes._aprcps_thread_storage[endpoint_name]
36
31
  ApiRecipes._aprcps_thread_storage[endpoint_name] = {}
37
32
  end
38
33
  unless ApiRecipes._aprcps_thread_storage[endpoint_name][self.class]
39
- ApiRecipes._aprcps_thread_storage[endpoint_name][self.class] = ep.clone
34
+ ep = Endpoint.new(endpoint_name, configs)
35
+ ApiRecipes.copy_global_authorizations_to_endpoint ep
36
+ ApiRecipes._aprcps_thread_storage[endpoint_name][self.class] = ep
40
37
  end
38
+
41
39
  ApiRecipes._aprcps_thread_storage[endpoint_name][self.class]
42
40
  end
43
41
  define_singleton_method endpoint_name do
@@ -45,8 +43,11 @@ module ApiRecipes
45
43
  ApiRecipes._aprcps_thread_storage[endpoint_name] = {}
46
44
  end
47
45
  unless ApiRecipes._aprcps_thread_storage[endpoint_name][self]
48
- ApiRecipes._aprcps_thread_storage[endpoint_name][self] = ep.clone
46
+ ep = Endpoint.new(endpoint_name, configs)
47
+ ApiRecipes.copy_global_authorizations_to_endpoint ep
48
+ ApiRecipes._aprcps_thread_storage[endpoint_name][self] = ep
49
49
  end
50
+
50
51
  ApiRecipes._aprcps_thread_storage[endpoint_name][self]
51
52
  end
52
53
  end
@@ -1,3 +1,3 @@
1
1
  module ApiRecipes
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Verlato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-08 00:00:00.000000000 Z
11
+ date: 2019-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj