bigid_auth 0.1.0 → 0.1.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: 2de69a3a8e79498bdbbd8f42581b050cefd23994aecc8eba211b96769ee7f713
4
- data.tar.gz: 4874fbf692c691a47837623e08872f91a534125063bf110a5047faed6527f28c
3
+ metadata.gz: 7f45c2559c85156c23be8006c158e2d2ad481f24df3b249492e91bc78ce98bbc
4
+ data.tar.gz: f5960d62a9124cdadf99b259775e90249d0e4e4d629f1a6f38ca9ebd17f337ff
5
5
  SHA512:
6
- metadata.gz: f84e0666522ac76565b3a5dfe1f36d5eec5f5962a30f8072ff0d737e73cff5bbe180124938b05c4adb22218acaeb3bb4b400805d6f97182008a4fe2f25341424
7
- data.tar.gz: e1ce0d03e9ff4e70154410c0340af8c83018a699676ce9addc97ee62f2ba9f94d57406cd6459b49bdd192d91a9a07a41ba7290263156a9dcb52ed0c9a3d88029
6
+ metadata.gz: a51b222efcc1a2d424473b6bb4ee0ddb59fd27a2f5fef7d52d2575285ddff408f538481cf2986a32fbb0b69553fd898ed567e9986e9dcc9b8cd4268aea976e09
7
+ data.tar.gz: 77071623167b535be8197fecd123bc102a4dc015620f2e1f334efaac59bf1a691e85326ec04ee6fb7a4cbe2b9b8a2df3b585c2359400ba827551036822340cc8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.1.1
4
+
5
+ * Fix a problem with the locale initialization in Rails projects
6
+
3
7
  ## v0.1.0
4
8
 
5
9
  * Initial release of Bigid Auth
@@ -9,6 +9,6 @@ module Bigid
9
9
  # Major - Incremented for incompatible changes with previous release (or big enough new features)
10
10
  # Minor - Incremented for new backwards-compatible features + deprecations
11
11
  # Patch - Incremented for backwards-compatible bug fixes
12
- VERSION = "0.1.0"
12
+ VERSION = "0.1.1"
13
13
  end
14
14
  end
data/lib/bigid_auth.rb CHANGED
@@ -22,6 +22,9 @@ require "bigid/auth/bad_request_error"
22
22
  require "bigid/auth/invalid_credentials_error"
23
23
  require "bigid/auth/server_error"
24
24
 
25
+ I18n.load_path += Dir[File.join(__dir__, "locales", "**/*.yml")]
26
+ I18n.reload! if I18n.backend.initialized?
27
+
25
28
  module Bigid
26
29
  BASE_URL = "https://bigid.bigdatacorp.com.br"
27
30
 
@@ -54,9 +57,5 @@ module Bigid
54
57
  module Auth
55
58
  AUTH_ENDPOINT = "https://accesstoken.bigdatacorp.com.br"
56
59
  TOKEN_EXPIRATION = 60_000
57
-
58
- I18n.load_path << Dir["#{File.expand_path('config/locales')}/*.yml"]
59
- I18n.config.available_locales = :en, :'pt-BR'
60
- I18n.default_locale = :en
61
60
  end
62
61
  end
@@ -0,0 +1,8 @@
1
+ en:
2
+ errors:
3
+ bigid:
4
+ auth:
5
+ authentication_error: An error ocurred during the authentication
6
+ bad_request_error: The request body or format is invalid
7
+ invalid_credentials_error: The credentials informed are invalid
8
+ server_error: An internal server error ocurred
@@ -0,0 +1,8 @@
1
+ 'pt-BR':
2
+ errors:
3
+ bigid:
4
+ auth:
5
+ authentication_error: Ocorreu um erro durante a autenticação
6
+ bad_request_error: O corpo ou formato da requisição é inválido
7
+ invalid_credentials_error: As credenciais informadas são inválidas
8
+ server_error: Ocorreu um erro inesperado no servidor
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigid_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danilo Carolino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-18 00:00:00.000000000 Z
11
+ date: 2021-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.0
19
+ version: 1.4.1
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: '1.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 1.4.0
29
+ version: 1.4.1
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '1.0'
@@ -242,12 +242,17 @@ files:
242
242
  - lib/bigid/auth/server_error.rb
243
243
  - lib/bigid/auth/version.rb
244
244
  - lib/bigid_auth.rb
245
+ - lib/locales/en.yml
246
+ - lib/locales/pt-BR.yml
245
247
  - spec/bigid_auth_spec.rb
246
248
  - spec/spec_helper.rb
247
249
  homepage: https://github.com/Quasar-Flash/bigid-auth-ruby
248
250
  licenses:
249
251
  - MIT
250
- metadata: {}
252
+ metadata:
253
+ changelog_uri: https://github.com/Quasar-Flash/bigid-auth-ruby/blob/master/CHANGELOG.md
254
+ source_code_uri: https://github.com/Quasar-Flash/bigid-auth-ruby
255
+ bug_tracker_uri: https://github.com/Quasar-Flash/bigid-auth-ruby/issues
251
256
  post_install_message:
252
257
  rdoc_options: []
253
258
  require_paths:
@@ -256,7 +261,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
256
261
  requirements:
257
262
  - - ">="
258
263
  - !ruby/object:Gem::Version
259
- version: '0'
264
+ version: '2.5'
260
265
  required_rubygems_version: !ruby/object:Gem::Requirement
261
266
  requirements:
262
267
  - - ">="