error_response 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/error_response.rb +7 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a542fc68200b61b3f071fcc379cabbf154571c3e3bb732e1a9cf68d0ad416744
4
- data.tar.gz: 64c340f79364c03c296e6082edefabb8451af5a3878925db99f9994dc82d025e
3
+ metadata.gz: 89dfae134289bf7bbcc43d119e0e94bffca2022dcaa82aa32ae62dabf6d016b7
4
+ data.tar.gz: 8f3b6b890ba7191734fe1d2ae21102149ebb84ca4ee6102b1d608b21357b44ba
5
5
  SHA512:
6
- metadata.gz: a03d605b108bcf3cd152d95980160f36d35ce08423fb0522bfc34c72cb7b1469b3160bb5bbee7051b53b4b87a4881abafdefc0bdc1383c3207cf5c4fdc6f81f9
7
- data.tar.gz: 523b24c397f90dcd07f253556bc97ffc807ccf55a1a6790906bda169d7ad7b0dc112c5701783b08fb771c130b05eb55b47b01427012c20e025d8919bf637e6de
6
+ metadata.gz: 06e1f7500a4f97c6448611eb6dea6ea52decf9703aa560805c79ce7d473a025cce114edd1110623d6c6e26669129ccd50513a23be2f638a4d179644838beeada
7
+ data.tar.gz: 0c9e59ed9a5421fb3fab7ac591df3cc1163ed9eca82dcdcbb395ebf2f101cf47834b5ab3b54b3841a8c27f4b76ee061c9a3c35252197068afea868c11ff56615
@@ -1,4 +1,6 @@
1
1
  require 'yaml'
2
+ require 'open-uri'
3
+
2
4
  class ErrorResponse
3
5
  YAML_PATH = 'config/error_response.yml'
4
6
 
@@ -26,6 +28,11 @@ class ErrorResponse
26
28
  }
27
29
  end
28
30
 
31
+ def self.load_remote(remote_file)
32
+ content = open(remote_file){|f| f.read}
33
+ @hash = YAML.load(content)
34
+ end
35
+
29
36
  private
30
37
 
31
38
  def self.yaml_hash
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: error_response
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kdan Mobile Software Developer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-17 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: use for error_response
14
14
  email: dev@kdanmobile.com