monban-core 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da14b037f6f5171c93f2ec483393120901d721468871940fd676cade914bfc34
4
- data.tar.gz: 91806b518b767aedbacd499c10179513b9ac9a309d21e030ecca9acd83b06f36
3
+ metadata.gz: 7139cb2cdb21c64c525723323b230c10b195eae4e4d899a157123981b6b6318b
4
+ data.tar.gz: 413baa5f6ad69041cfe45692b893116796702f64f99d2ae287f9de32e257e76c
5
5
  SHA512:
6
- metadata.gz: a7250d275a21b7b0a49ac33426a2312bfcf28320c58de424a9ca52e4b8c139428625bb1385e6a1030475130dfeb9131ad63172d482ef81e69aa8ca1c552d4c2a
7
- data.tar.gz: fd6d37edbcf0cd6041ae4c9617ed68bc724f1ede672d8829de4cc0d61d89e4dc78ec6ed8b58fff007c95198b31c1e8e44f23ad151456641549a4a4ccbed41a61
6
+ metadata.gz: c0d2c76fdd6dfb2a52bedfd69792b2be6d077ba6fa6323ccebbd20489b34389bbbf334988332f69d10f5a44e20065819095aebb7f66a69fa1fd62e4b593dd2fc
7
+ data.tar.gz: 875b6f9482d571726e4af505f2ebbb48bc8b373f0305e0fb846fb410c618f4af8ad7b41c29b2556141461856fc4999e4b13c59ffad9015b6f6f3ce23b5b660db
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # Version : 1.0.0
2
+
3
+ version 1.0.0
4
+
@@ -0,0 +1,10 @@
1
+ # Version : 1.0.0
2
+
3
+ version 1.0.0
4
+
5
+ ## commits
6
+
7
+ * major version up
8
+ * major version
9
+ * fix: readme
10
+ * fix: error -> ERRORS
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- monban-core (0.1.0)
4
+ monban-core (1.0.0)
5
5
  getto-initialize_with (~> 1.0)
6
6
  getto-params (~> 1.0)
7
7
  jwt (~> 2.1)
data/README.md CHANGED
@@ -22,6 +22,26 @@ The authentication plugin for web api based on jwt
22
22
  <a id="Usage"></a>
23
23
  ## Usage
24
24
 
25
+ ### Errors
26
+
27
+ `error` class should be respond to below methods
28
+
29
+ ```ruby
30
+ module Monban
31
+ module Core
32
+ ERRORS = [
33
+ :invalid_account!,
34
+ :invalid_login!,
35
+ :invalid_params!,
36
+ :not_found!,
37
+ :renew_token_expired!,
38
+ :conflict!,
39
+ :server_error!,
40
+ ]
41
+ end
42
+ end
43
+ ```
44
+
25
45
  ## Install
26
46
 
27
47
  Add this line to your application's Gemfile:
@@ -0,0 +1,13 @@
1
+ module Monban
2
+ module Core
3
+ ERRORS = [
4
+ :invalid_account!,
5
+ :invalid_login!,
6
+ :invalid_params!,
7
+ :not_found!,
8
+ :renew_token_expired!,
9
+ :conflict!,
10
+ :server_error!,
11
+ ]
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  module Monban
2
2
  module Core
3
- VERSION = "0.1.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -9,7 +10,7 @@ module Monban
9
10
  class Email < Base
10
11
 
11
12
  initialize_with(
12
- error: [:invalid_params!, :not_found!, :conflict!],
13
+ error: Monban::Core::ERRORS,
13
14
  time: [:now],
14
15
  repository: [
15
16
  :transaction,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -9,7 +10,7 @@ module Monban
9
10
  class LoginId < Base
10
11
 
11
12
  initialize_with(
12
- error: [:invalid_params!, :not_found!, :conflict!],
13
+ error: Monban::Core::ERRORS,
13
14
  time: [:now],
14
15
  repository: [
15
16
  :transaction,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -9,7 +10,7 @@ module Monban
9
10
  class Roles < Base
10
11
 
11
12
  initialize_with(
12
- error: [:invalid_params!, :not_found!],
13
+ error: Monban::Core::ERRORS,
13
14
  time: [:now],
14
15
  repository: [
15
16
  :transaction,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -8,7 +9,7 @@ module Monban
8
9
  class Fetch < Base
9
10
 
10
11
  initialize_with(
11
- error: [:invalid_params!],
12
+ error: Monban::Core::ERRORS,
12
13
  repository: [
13
14
  :login_id,
14
15
  :reset_password_email,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -8,7 +9,7 @@ module Monban
8
9
  class Register < Base
9
10
 
10
11
  initialize_with(
11
- error: [:invalid_params!, :conflict!],
12
+ error: Monban::Core::ERRORS,
12
13
  time: [:now],
13
14
  repository: [
14
15
  :transaction,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -9,7 +10,7 @@ module Monban
9
10
  class Search < Base
10
11
 
11
12
  initialize_with(
12
- error: [:invalid_params!],
13
+ error: Monban::Core::ERRORS,
13
14
  repository: [:search],
14
15
 
15
16
  limit: Integer,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -8,7 +9,7 @@ module Monban
8
9
  class Unregister < Base
9
10
 
10
11
  initialize_with(
11
- error: [:invalid_params!, :not_found!],
12
+ error: Monban::Core::ERRORS,
12
13
  repository: [
13
14
  :transaction,
14
15
  :account_exists?,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -8,7 +9,7 @@ module Monban
8
9
  class Account < Base
9
10
 
10
11
  initialize_with(
11
- error: [:invalid_params!, :invalid_account!],
12
+ error: Monban::Core::ERRORS,
12
13
  time: [:now],
13
14
 
14
15
  account: ::Hash,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -9,7 +10,7 @@ module Monban
9
10
  class Authy < Base
10
11
 
11
12
  initialize_with(
12
- error: [:invalid_params!, :invalid_account!],
13
+ error: Monban::Core::ERRORS,
13
14
  time: [:now],
14
15
  authy: [:register_user],
15
16
  repository: [
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
  require "monban/use_case/auth/token"
3
4
 
@@ -11,7 +12,7 @@ module Monban
11
12
  include Token::Helper
12
13
 
13
14
  initialize_with(
14
- error: [:invalid_params!, :server_error!],
15
+ error: Monban::Core::ERRORS,
15
16
  logger: [:log],
16
17
  time: [:now],
17
18
  token: [:create],
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
  require "monban/use_case/auth/token"
3
4
 
@@ -11,7 +12,7 @@ module Monban
11
12
  include Token::Helper
12
13
 
13
14
  initialize_with(
14
- error: [:invalid_params!, :server_error!],
15
+ error: Monban::Core::ERRORS,
15
16
  logger: [:log],
16
17
  time: [:now],
17
18
  token: [:create],
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "getto/initialize_with"
2
3
 
3
4
  require "monban/use_case/auth/token/full"
@@ -11,7 +12,7 @@ module Monban
11
12
  include Getto::InitializeWith
12
13
 
13
14
  initialize_with(
14
- error: [:server_error!],
15
+ error: Monban::Core::ERRORS,
15
16
  login: Symbol,
16
17
  full: Full,
17
18
  authy: Authy,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
  require "monban/use_case/auth/token"
3
4
 
@@ -11,7 +12,7 @@ module Monban
11
12
  include Token::Helper
12
13
 
13
14
  initialize_with(
14
- error: [:invalid_params!, :renew_token_expired!, :server_error!],
15
+ error: Monban::Core::ERRORS,
15
16
  logger: [:log],
16
17
  time: [:now],
17
18
  token: [:create],
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
  require "monban/use_case/auth/token"
3
4
 
@@ -11,7 +12,7 @@ module Monban
11
12
  include Token::Helper
12
13
 
13
14
  initialize_with(
14
- error: [:server_error!, :invalid_account!],
15
+ error: Monban::Core::ERRORS,
15
16
  time: [:now],
16
17
  logger: [:log],
17
18
  token: [:create],
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -9,7 +10,7 @@ module Monban
9
10
  class Authy < Base
10
11
 
11
12
  initialize_with(
12
- error: [:invalid_params!, :invalid_account!],
13
+ error: Monban::Core::ERRORS,
13
14
  authy: [:verify],
14
15
  repository: [
15
16
  :authy_id,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -10,7 +11,7 @@ module Monban
10
11
  include Getto::InitializeWith
11
12
 
12
13
  initialize_with(
13
- error: [:invalid_params!, :invalid_account!, :invalid_login!],
14
+ error: Monban::Core::ERRORS,
14
15
  repository: [
15
16
  :account_id_by_login_id,
16
17
  :password_salt,
@@ -1,3 +1,4 @@
1
+ require "monban/core"
1
2
  require "monban/use_case/base"
2
3
 
3
4
  require "getto/params"
@@ -10,7 +11,7 @@ module Monban
10
11
  include Getto::InitializeWith
11
12
 
12
13
  initialize_with(
13
- error: [:invalid_params!, :invalid_account!],
14
+ error: Monban::Core::ERRORS,
14
15
  time: [:now],
15
16
  repository: [
16
17
  :valid_reset_password_token?,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monban-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - shun@getto.systems
@@ -122,11 +122,14 @@ files:
122
122
  - ".gitignore"
123
123
  - ".gitlab-ci.yml"
124
124
  - ".travis.yml"
125
+ - CHANGELOG.md
126
+ - CHANGELOG/1.0.0.md
125
127
  - Gemfile
126
128
  - Gemfile.lock
127
129
  - LICENSE
128
130
  - README.md
129
131
  - Rakefile
132
+ - lib/monban/core.rb
130
133
  - lib/monban/core/version.rb
131
134
  - lib/monban/domain/auth.rb
132
135
  - lib/monban/domain/password.rb