moca_rlibs 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.idea/.gitignore +8 -0
  3. data/.idea/misc.xml +4 -0
  4. data/.idea/modules.xml +8 -0
  5. data/.idea/rlibs.iml +69 -0
  6. data/.idea/vcs.xml +6 -0
  7. data/.rubocop.yml +16 -0
  8. data/Gemfile.lock +52 -10
  9. data/README.md +94 -0
  10. data/lib/moca_rlibs/grape_errors/bad_gateway.rb +14 -0
  11. data/lib/moca_rlibs/grape_errors/bad_request.rb +14 -0
  12. data/lib/moca_rlibs/grape_errors/conflict.rb +14 -0
  13. data/lib/moca_rlibs/grape_errors/forbidden.rb +14 -0
  14. data/lib/moca_rlibs/grape_errors/gateway_timeout.rb +14 -0
  15. data/lib/moca_rlibs/grape_errors/internal_server_error.rb +14 -0
  16. data/lib/moca_rlibs/grape_errors/not_found.rb +14 -0
  17. data/lib/moca_rlibs/grape_errors/reset_content.rb +14 -0
  18. data/lib/moca_rlibs/grape_errors/retry_required.rb +14 -0
  19. data/lib/moca_rlibs/grape_errors/service_unavailable.rb +14 -0
  20. data/lib/moca_rlibs/grape_errors/too_many_requests.rb +14 -0
  21. data/lib/moca_rlibs/grape_errors/unauthorized.rb +14 -0
  22. data/lib/moca_rlibs/grape_validators/email.rb +20 -0
  23. data/lib/moca_rlibs/grape_validators/email_rfc.rb +22 -0
  24. data/lib/moca_rlibs/grape_validators/email_strict.rb +22 -0
  25. data/lib/moca_rlibs/grape_validators/ends_with.rb +27 -0
  26. data/lib/moca_rlibs/grape_validators/length.rb +30 -0
  27. data/lib/moca_rlibs/grape_validators/max.rb +25 -0
  28. data/lib/moca_rlibs/grape_validators/min.rb +25 -0
  29. data/lib/moca_rlibs/grape_validators/only_alpha.rb +20 -0
  30. data/lib/moca_rlibs/grape_validators/only_alpha_numeric.rb +20 -0
  31. data/lib/moca_rlibs/grape_validators/only_ascii.rb +20 -0
  32. data/lib/moca_rlibs/grape_validators/only_numbers.rb +20 -0
  33. data/lib/moca_rlibs/grape_validators/starts_with.rb +27 -0
  34. data/lib/moca_rlibs/grape_validators/url.rb +20 -0
  35. data/lib/moca_rlibs/service.rb +29 -0
  36. data/lib/moca_rlibs/version.rb +1 -1
  37. data/lib/moca_rlibs.rb +29 -0
  38. data/moca_rlibs.gemspec +5 -0
  39. metadata +103 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ef945dc73c8e0fb0aa0234c30f3d01271490337d698cee36ed339ae21d5e13f
4
- data.tar.gz: f57bfaf311fce897170f8c3d07370e131326e9ba12f3ef0c306169cea1356a03
3
+ metadata.gz: df0c70ea60a992a5103f12d59597154ab11a0a2f3b4a2ac4855e3c631d228be6
4
+ data.tar.gz: 593606828276f8504273ac0ff94f457d670db02cee23fd1fcbbc2aa498ee513a
5
5
  SHA512:
6
- metadata.gz: d98655a5a137b9fa954afd4d6a9246fcaa5e8ebacd3a8bb49b4677c35aa01a52aef2e326290c70026c11dd0c1d33c333d50f605c20e6de5451f19afb16cddb37
7
- data.tar.gz: 218c1d9202d4efa6d8669c2c8a2ed8fc5f05a57edcbfd5726e258fea3e9cadd885e9215c064ecc048a169a0d3f2a0597cf160f5e46e84a6986914a17415b0c9a
6
+ metadata.gz: 3bb2f97ef08fe45d873b1ece91d21ea39e0a5fa4d349c65fdb13e2b6ae048dea85cfae4fb7663961ef8d81b441b1d2e59fea86e602e9215c4c830e3cffdb625f
7
+ data.tar.gz: 86284a59c185ca93ff85f7390cb28c1d1f2df962efd654dc6b1f2e23d0ac7a5b5e2625582ecd986e70dc33d516ef4088dfa1f96fc8ba2a25f743f569857b4bea
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Datasource local storage ignored files
5
+ /dataSources/
6
+ /dataSources.local.xml
7
+ # Editor-based HTTP Client requests
8
+ /httpRequests/
data/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 3.0.2" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/rlibs.iml" filepath="$PROJECT_DIR$/.idea/rlibs.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/rlibs.iml ADDED
@@ -0,0 +1,69 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="inheritedJdk" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="activemodel (v6.1.4.1, rbenv: 3.0.2) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="activesupport (v6.1.4.1, rbenv: 3.0.2) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, rbenv: 3.0.2) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, rbenv: 3.0.2) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.22, rbenv: 3.0.2) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="codecov (v0.6.0, rbenv: 3.0.2) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.9, rbenv: 3.0.2) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.4.4, rbenv: 3.0.2) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="docile (v1.4.0, rbenv: 3.0.2) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="dry-configurable (v0.13.0, rbenv: 3.0.2) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="dry-container (v0.9.0, rbenv: 3.0.2) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="dry-core (v0.7.1, rbenv: 3.0.2) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="dry-inflector (v0.2.1, rbenv: 3.0.2) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="dry-logic (v1.2.0, rbenv: 3.0.2) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="dry-types (v1.5.1, rbenv: 3.0.2) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="email_validator (v2.2.3, rbenv: 3.0.2) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="grape (v1.6.0, rbenv: 3.0.2) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.8.11, rbenv: 3.0.2) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.14.4, rbenv: 3.0.2) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="mustermann (v1.1.1, rbenv: 3.0.2) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="mustermann-grape (v1.0.1, rbenv: 3.0.2) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.21.0, rbenv: 3.0.2) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.0.2.0, rbenv: 3.0.2) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="rack (v2.2.3, rbenv: 3.0.2) [gem]" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="rack-accept (v0.4.5, rbenv: 3.0.2) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.0.0, rbenv: 3.0.2) [gem]" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, rbenv: 3.0.2) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="rbs (v1.0.4, rbenv: 3.0.2) [gem]" level="application" />
42
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.1.1, rbenv: 3.0.2) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, rbenv: 3.0.2) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.10.0, rbenv: 3.0.2) [gem]" level="application" />
45
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.10.1, rbenv: 3.0.2) [gem]" level="application" />
46
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.10.1, rbenv: 3.0.2) [gem]" level="application" />
47
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.10.2, rbenv: 3.0.2) [gem]" level="application" />
48
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.10.3, rbenv: 3.0.2) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.22.3, rbenv: 3.0.2) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.13.0, rbenv: 3.0.2) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-performance (v1.12.0, rbenv: 3.0.2) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-rails (v2.12.4, rbenv: 3.0.2) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v2.6.0, rbenv: 3.0.2) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, rbenv: 3.0.2) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="ruby2_keywords (v0.0.5, rbenv: 3.0.2) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="simplecov (v0.21.2, rbenv: 3.0.2) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.12.3, rbenv: 3.0.2) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="simplecov_json_formatter (v0.1.3, rbenv: 3.0.2) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="slack-notifier (v2.4.0, rbenv: 3.0.2) [gem]" level="application" />
60
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.4, rbenv: 3.0.2) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.1.0, rbenv: 3.0.2) [gem]" level="application" />
62
+ <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.5.1, rbenv: 3.0.2) [gem]" level="application" />
63
+ </component>
64
+ <component name="RakeTasksCache">
65
+ <option name="myRootTask">
66
+ <RakeTaskImpl id="rake" />
67
+ </option>
68
+ </component>
69
+ </module>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
data/.rubocop.yml CHANGED
@@ -3,3 +3,19 @@ inherit_from: ./vendor/tools/config/rubocop.yml
3
3
  # 文字列リテラルfrozen強制
4
4
  Style/FrozenStringLiteralComment:
5
5
  Enabled: true
6
+
7
+ # 制限を緩和
8
+ CyclomaticComplexity:
9
+ Max: 16
10
+
11
+ # spec用の一時的モジュール&クラス定義用
12
+ Lint/ConstantDefinitionInBlock:
13
+ Exclude:
14
+ - 'spec/**/*'
15
+ RSpec/LeakyConstantDeclaration:
16
+ Exclude:
17
+ - 'spec/**/*'
18
+
19
+ # 誤作動があるため
20
+ Rails/HttpPositionalArguments:
21
+ Enabled: false
data/Gemfile.lock CHANGED
@@ -1,12 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- moca_rlibs (0.0.2)
4
+ moca_rlibs (0.0.3)
5
+ activemodel
6
+ activesupport
7
+ email_validator
8
+ grape
5
9
  slack-notifier (~> 2.4.0)
6
10
 
7
11
  GEM
8
12
  remote: https://rubygems.org/
9
13
  specs:
14
+ activemodel (6.1.4.1)
15
+ activesupport (= 6.1.4.1)
10
16
  activesupport (6.1.4.1)
11
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
18
  i18n (>= 1.6, < 2)
@@ -14,18 +20,52 @@ GEM
14
20
  tzinfo (~> 2.0)
15
21
  zeitwerk (~> 2.3)
16
22
  ast (2.4.2)
23
+ builder (3.2.4)
17
24
  codecov (0.6.0)
18
25
  simplecov (>= 0.15, < 0.22)
19
26
  concurrent-ruby (1.1.9)
20
27
  diff-lcs (1.4.4)
21
28
  docile (1.4.0)
22
- i18n (1.8.10)
29
+ dry-configurable (0.13.0)
30
+ concurrent-ruby (~> 1.0)
31
+ dry-core (~> 0.6)
32
+ dry-container (0.9.0)
33
+ concurrent-ruby (~> 1.0)
34
+ dry-configurable (~> 0.13, >= 0.13.0)
35
+ dry-core (0.7.1)
36
+ concurrent-ruby (~> 1.0)
37
+ dry-inflector (0.2.1)
38
+ dry-logic (1.2.0)
39
+ concurrent-ruby (~> 1.0)
40
+ dry-core (~> 0.5, >= 0.5)
41
+ dry-types (1.5.1)
42
+ concurrent-ruby (~> 1.0)
43
+ dry-container (~> 0.3)
44
+ dry-core (~> 0.5, >= 0.5)
45
+ dry-inflector (~> 0.1, >= 0.1.2)
46
+ dry-logic (~> 1.0, >= 1.0.2)
47
+ email_validator (2.2.3)
48
+ activemodel
49
+ grape (1.6.0)
50
+ activesupport
51
+ builder
52
+ dry-types (>= 1.1)
53
+ mustermann-grape (~> 1.0.0)
54
+ rack (>= 1.3.0)
55
+ rack-accept
56
+ i18n (1.8.11)
23
57
  concurrent-ruby (~> 1.0)
24
58
  minitest (5.14.4)
59
+ mustermann (1.1.1)
60
+ ruby2_keywords (~> 0.0.1)
61
+ mustermann-grape (1.0.1)
62
+ mustermann (>= 1.0.0)
25
63
  parallel (1.21.0)
26
64
  parser (3.0.2.0)
27
65
  ast (~> 2.4.1)
28
66
  rack (2.2.3)
67
+ rack-accept (0.4.5)
68
+ rack (>= 0.4)
29
69
  rainbow (3.0.0)
30
70
  rake (13.0.6)
31
71
  regexp_parser (2.1.1)
@@ -42,8 +82,8 @@ GEM
42
82
  rspec-mocks (3.10.2)
43
83
  diff-lcs (>= 1.2.0, < 2.0)
44
84
  rspec-support (~> 3.10.0)
45
- rspec-support (3.10.2)
46
- rubocop (1.22.0)
85
+ rspec-support (3.10.3)
86
+ rubocop (1.22.3)
47
87
  parallel (~> 1.10)
48
88
  parser (>= 3.0.0.0)
49
89
  rainbow (>= 2.2.2, < 4.0)
@@ -52,18 +92,19 @@ GEM
52
92
  rubocop-ast (>= 1.12.0, < 2.0)
53
93
  ruby-progressbar (~> 1.7)
54
94
  unicode-display_width (>= 1.4.0, < 3.0)
55
- rubocop-ast (1.12.0)
95
+ rubocop-ast (1.13.0)
56
96
  parser (>= 3.0.1.1)
57
- rubocop-performance (1.11.5)
97
+ rubocop-performance (1.12.0)
58
98
  rubocop (>= 1.7.0, < 2.0)
59
99
  rubocop-ast (>= 0.4.0)
60
- rubocop-rails (2.12.2)
100
+ rubocop-rails (2.12.4)
61
101
  activesupport (>= 4.2.0)
62
102
  rack (>= 1.1)
63
103
  rubocop (>= 1.7.0, < 2.0)
64
- rubocop-rspec (2.5.0)
104
+ rubocop-rspec (2.6.0)
65
105
  rubocop (~> 1.19)
66
106
  ruby-progressbar (1.11.0)
107
+ ruby2_keywords (0.0.5)
67
108
  simplecov (0.21.2)
68
109
  docile (~> 1.1)
69
110
  simplecov-html (~> 0.11)
@@ -74,14 +115,15 @@ GEM
74
115
  tzinfo (2.0.4)
75
116
  concurrent-ruby (~> 1.0)
76
117
  unicode-display_width (2.1.0)
77
- zeitwerk (2.4.2)
118
+ zeitwerk (2.5.1)
78
119
 
79
120
  PLATFORMS
80
- x86_64-darwin-21
121
+ arm64-darwin-21
81
122
 
82
123
  DEPENDENCIES
83
124
  codecov
84
125
  moca_rlibs!
126
+ rack
85
127
  rake
86
128
  rspec
87
129
  rubocop
data/README.md CHANGED
@@ -18,6 +18,100 @@ MocaRlibs::Docker.running_on_docker?
18
18
  MocaRlibs::CodeBuild.running_on_codebuild?
19
19
  ```
20
20
 
21
+ ## Grapeカスタムバリデーション
22
+ メールアドレスのフォーマットチェック(簡易チェック)
23
+ ```ruby
24
+ params do
25
+ requires :email, type: String, email: true
26
+ end
27
+ ```
28
+ メールアドレスのフォーマットチェック(厳密チェック)(推奨)
29
+ ```ruby
30
+ params do
31
+ requires :email, type: String, email_strict: true
32
+ end
33
+ ```
34
+ メールアドレスのフォーマットチェック(RFC-2822, RFC-5321)
35
+ ```ruby
36
+ params do
37
+ requires :email, type: String, email_rfc: true
38
+ end
39
+ ```
40
+ URLのフォーマットチェック
41
+ ```ruby
42
+ params do
43
+ requires :url, type: String, url: true
44
+ end
45
+ ```
46
+ 文字列の長さ制限
47
+ ```ruby
48
+ params do
49
+ requires :name, type: String, length: 4
50
+ requires :bio, type: String, length: 4..512
51
+ end
52
+ ```
53
+ プレフィックス制限
54
+ ```ruby
55
+ params do
56
+ requires :website, type: String, start_with: "https://"
57
+ requires :website, type: String, start_with: %w(http:// https://)
58
+ end
59
+ ```
60
+ サフィックス制限
61
+ ```ruby
62
+ params do
63
+ requires :price, type: String, end_with: "JPY"
64
+ requires :price, type: String, end_with: %w(JPY USD)
65
+ end
66
+ ```
67
+ 数値の最大値制限
68
+ ```ruby
69
+ params do
70
+ requires :level, type: Integer, max: 5
71
+ end
72
+ ```
73
+ 数値の最大値制限(Proc)
74
+ ```ruby
75
+ params do
76
+ requires :level, type: Integer, max: ->(params) { params[:foo] + 1 }
77
+ end
78
+ ```
79
+ 数値の最小値制限
80
+ ```ruby
81
+ params do
82
+ requires :age, type: Integer, min: 0
83
+ end
84
+ ```
85
+ 数値の最小値制限(Proc)
86
+ ```ruby
87
+ params do
88
+ requires :level, type: Integer, min: ->(params) { params[:bar] - 1 }
89
+ end
90
+ ```
91
+ アスキー文字しか含まないこと
92
+ ```ruby
93
+ params do
94
+ requires :text, type: String, only_ascii: true
95
+ end
96
+ ```
97
+ 文字列にアルファベットしか含まないこと
98
+ ```ruby
99
+ params do
100
+ requires :text, type: String, only_alpha: true
101
+ end
102
+ ```
103
+ 文字列に数字しか含まれないこと
104
+ ```ruby
105
+ params do
106
+ requires :text, type: String, only_numbers: true
107
+ end
108
+ ```
109
+ 文字列に英数字しか含まれないこと
110
+ ```ruby
111
+ params do
112
+ requires :text, type: String, only_alpha_numeric: true
113
+ end
114
+ ```
21
115
  ## Slack通知送信用クラス
22
116
  ```ruby
23
117
  # インスタンス化
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # BadGateway (Grape例外拡張)
8
+ class BadGateway < Base
9
+ def initialize
10
+ super(message: '502 Bad Gateway', status: 502)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # BadRequest (Grape例外拡張)
8
+ class BadRequest < Base
9
+ def initialize
10
+ super(message: '400 Bad Request', status: 400)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # Conflict (Grape例外拡張)
8
+ class Conflict < Base
9
+ def initialize
10
+ super(message: '409 Conflict', status: 409)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # Forbidden (Grape例外拡張)
8
+ class Forbidden < Base
9
+ def initialize
10
+ super(message: '403 Forbidden', status: 403)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # GatewayTimeout (Grape例外拡張)
8
+ class GatewayTimeout < Base
9
+ def initialize
10
+ super(message: '504 Gateway Timeout', status: 504)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # InternalServerError (Grape例外拡張)
8
+ class InternalServerError < Base
9
+ def initialize
10
+ super(message: '500 Internal Server Error', status: 500)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # NotFound (Grape例外拡張)
8
+ class NotFound < Base
9
+ def initialize
10
+ super(message: '404 NotFound', status: 404)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # ResetContent (Grape例外拡張)
8
+ class ResetContent < Base
9
+ def initialize
10
+ super(message: '205 ResetContent', status: 205)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # RetryRequired (Grape例外拡張)
8
+ class RetryRequired < Base
9
+ def initialize
10
+ super(message: '418 Retry Required', status: 418)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # ServiceUnavailable (Grape例外拡張)
8
+ class ServiceUnavailable < Base
9
+ def initialize
10
+ super(message: '503 Service Unavailable', status: 503)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # TooManyRequests (Grape例外拡張)
8
+ class TooManyRequests < Base
9
+ def initialize
10
+ super(message: '401 Too Many Requests', status: 429)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'grape'
4
+
5
+ module Grape
6
+ module Exceptions
7
+ # Unauthorized (Grape例外拡張)
8
+ class Unauthorized < Base
9
+ def initialize
10
+ super(message: '401 Unauthorized', status: 401)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/all'
4
+ require 'grape'
5
+
6
+ module MocaRlibs::GrapeValidators
7
+ # メールアドレスのフォーマットチェック(簡易的なチェック)
8
+ class Email < Grape::Validations::Base
9
+ def validate_param!(attr_name, params)
10
+ return if !@required && params[attr_name].blank?
11
+
12
+ # `to_s` is for Symbol.
13
+ parameter = params[attr_name].presence.to_s
14
+ return if parameter.length <= 256 && parameter.match?(/\A[^@]+@[^@]+\z/)
15
+
16
+ message = 'invalid email format'
17
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/all'
4
+ require 'grape'
5
+ require 'active_model'
6
+ require 'email_validator'
7
+
8
+ module MocaRlibs::GrapeValidators
9
+ # メールアドレスのフォーマットチェック(RFC-2822, RFC-5321)
10
+ class EmailRFC < Grape::Validations::Base
11
+ def validate_param!(attr_name, params)
12
+ return if !@required && params[attr_name].blank?
13
+
14
+ # `to_s` is for Symbol.
15
+ parameter = params[attr_name].presence.to_s
16
+ return if EmailValidator.valid?(parameter, { allow_nil: true, mode: :rfc, require_fqdn: false })
17
+
18
+ message = 'invalid email format'
19
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/all'
4
+ require 'grape'
5
+ require 'active_model'
6
+ require 'email_validator'
7
+
8
+ module MocaRlibs::GrapeValidators
9
+ # メールアドレスのフォーマットチェック(厳密チェック)
10
+ class EmailStrict < Grape::Validations::Base
11
+ def validate_param!(attr_name, params)
12
+ return if !@required && params[attr_name].blank?
13
+
14
+ # `to_s` is for Symbol.
15
+ parameter = params[attr_name].presence.to_s
16
+ return if EmailValidator.valid?(parameter, { allow_nil: true, mode: :strict, require_fqdn: false })
17
+
18
+ message = 'invalid email format'
19
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @see https://github.com/jagaapple/grape-extra_validators/blob/master/lib/grape/extra_validators/end_with.rb
4
+
5
+ require 'active_support/all'
6
+ require 'grape'
7
+
8
+ module MocaRlibs::GrapeValidators
9
+ # 文字列の末尾をチェック
10
+ class EndsWith < Grape::Validations::Base
11
+ def validate_param!(attr_name, params)
12
+ return if !@required && params[attr_name].blank?
13
+
14
+ end_with_values = @option.instance_of?(Array) ? @option : [@option]
15
+
16
+ # `to_s` is for Symbol.
17
+ parameter = params[attr_name].presence.to_s
18
+ is_valid = end_with_values.any? { |value| parameter.ends_with?(value.to_s) }
19
+ return if is_valid
20
+
21
+ allow_values = end_with_values.map { |value| "\"#{value}\"" }
22
+ allow_values[allow_values.length - 1] = "or #{allow_values.last}" if allow_values.length > 1
23
+ message = "must end with #{allow_values.join(', ')}"
24
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @see https://github.com/jagaapple/grape-extra_validators/blob/master/lib/grape/extra_validators/length.rb
4
+
5
+ require 'active_support/all'
6
+ require 'grape'
7
+
8
+ module MocaRlibs::GrapeValidators
9
+ # 文字列の長さチェック
10
+ class Length < Grape::Validations::Base
11
+ def validate_param!(attr_name, params)
12
+ return if !@required && params[attr_name].blank?
13
+
14
+ # `to_s` is for Symbol.
15
+ parameter = params[attr_name].presence.to_s
16
+ if @option.instance_of?(Range)
17
+ return if @option.include?(parameter.length)
18
+
19
+ message = "must be #{@option.first} to #{@option.last} characters long"
20
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
21
+ end
22
+
23
+ return if parameter.length == @option
24
+
25
+ unit = 'character'.pluralize(@option)
26
+ message = "must be #{@option} #{unit} long"
27
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @see https://github.com/jagaapple/grape-extra_validators/blob/master/lib/grape/extra_validators/maximum_value.rb
4
+
5
+ require 'active_support/all'
6
+ require 'grape'
7
+
8
+ module MocaRlibs::GrapeValidators
9
+ # 数値の最大値をチェック
10
+ class Max < Grape::Validations::Base
11
+ def validate_param!(attr_name, params)
12
+ return if !@required && params[attr_name].blank?
13
+
14
+ maximum_value = @option.instance_of?(Proc) ? @option.call(params) : @option
15
+ return if maximum_value.blank?
16
+
17
+ value = params[attr_name].to_i
18
+ return if value <= maximum_value
19
+
20
+ message = "must be equal to or below #{maximum_value}"
21
+
22
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @see https://github.com/jagaapple/grape-extra_validators/blob/master/lib/grape/extra_validators/minimum_value.rb
4
+
5
+ require 'active_support/all'
6
+ require 'grape'
7
+
8
+ module MocaRlibs::GrapeValidators
9
+ # 数値の最小値をチェック
10
+ class Min < Grape::Validations::Base
11
+ def validate_param!(attr_name, params)
12
+ return if !@required && params[attr_name].blank?
13
+
14
+ minimum_value = @option.instance_of?(Proc) ? @option.call(params) : @option
15
+ return if minimum_value.blank?
16
+
17
+ value = params[attr_name].to_i
18
+ return if value >= minimum_value
19
+
20
+ message = "must be equal to or above #{minimum_value}"
21
+
22
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/all'
4
+ require 'grape'
5
+
6
+ module MocaRlibs::GrapeValidators
7
+ # 文字列が半角アルファベットのみであることをチェックする
8
+ class OnlyAlpha < Grape::Validations::Base
9
+ def validate_param!(attr_name, params)
10
+ return if !@required && params[attr_name].blank?
11
+
12
+ # `to_s` is for Symbol.
13
+ parameter = params[attr_name].presence.to_s
14
+ return if parameter.match?(/\A[a-zA-Z]*\z/)
15
+
16
+ message = 'contain non-ascii characters'
17
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/all'
4
+ require 'grape'
5
+
6
+ module MocaRlibs::GrapeValidators
7
+ # 文字列が半角英数字のみであることをチェックする
8
+ class OnlyAlphaNumeric < Grape::Validations::Base
9
+ def validate_param!(attr_name, params)
10
+ return if !@required && params[attr_name].blank?
11
+
12
+ # `to_s` is for Symbol.
13
+ parameter = params[attr_name].presence.to_s
14
+ return if parameter.match?(/\A[a-zA-Z0-9]*\z/)
15
+
16
+ message = 'contain non-ascii characters'
17
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/all'
4
+ require 'grape'
5
+
6
+ module MocaRlibs::GrapeValidators
7
+ # アスキー文字のみを許可する
8
+ class OnlyASCII < Grape::Validations::Base
9
+ def validate_param!(attr_name, params)
10
+ return if !@required && params[attr_name].blank?
11
+
12
+ # `to_s` is for Symbol.
13
+ parameter = params[attr_name].presence.to_s
14
+ return if parameter.match?(/\A[\u0000-\u007F]*\z/)
15
+
16
+ message = 'contain non-ascii characters'
17
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/all'
4
+ require 'grape'
5
+
6
+ module MocaRlibs::GrapeValidators
7
+ # 文字列が数字のみであることをチェックする
8
+ class OnlyNumbers < Grape::Validations::Base
9
+ def validate_param!(attr_name, params)
10
+ return if !@required && params[attr_name].blank?
11
+
12
+ # `to_s` is for Symbol.
13
+ parameter = params[attr_name].presence.to_s
14
+ return if parameter.match?(/\A[0-9]*\z/)
15
+
16
+ message = 'contain non-ascii characters'
17
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @see https://github.com/jagaapple/grape-extra_validators/blob/master/lib/grape/extra_validators/start_with.rb
4
+
5
+ require 'active_support/all'
6
+ require 'grape'
7
+
8
+ module MocaRlibs::GrapeValidators
9
+ # 文字列の先頭をチェック
10
+ class StartsWith < Grape::Validations::Base
11
+ def validate_param!(attr_name, params)
12
+ return if !@required && params[attr_name].blank?
13
+
14
+ start_with_values = @option.instance_of?(Array) ? @option : [@option]
15
+
16
+ # `to_s` is for Symbol.
17
+ parameter = params[attr_name].presence.to_s
18
+ is_valid = start_with_values.any? { |value| parameter.starts_with?(value.to_s) }
19
+ return if is_valid
20
+
21
+ allow_values = start_with_values.map { |value| "\"#{value}\"" }
22
+ allow_values[allow_values.length - 1] = "or #{allow_values.last}" if allow_values.length > 1
23
+ message = "must start with #{allow_values.join(', ')}"
24
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/all'
4
+ require 'grape'
5
+
6
+ module MocaRlibs::GrapeValidators
7
+ # URLとして正しいフォーマットかどうかをチェックする
8
+ class URL < Grape::Validations::Base
9
+ def validate_param!(attr_name, params)
10
+ return if !@required && params[attr_name].blank?
11
+
12
+ # `to_s` is for Symbol.
13
+ parameter = params[attr_name].presence.to_s
14
+ return if parameter.match?(/\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/)
15
+
16
+ message = 'invalid url format'
17
+ raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], message: message)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MocaRlibs
4
+ # Rails用サービス層の導入
5
+ class Service
6
+ attr_reader :result
7
+
8
+ def initialize(*_args, **_kwargs, &_block)
9
+ raise NotImplementedError, "#{self.class}##{__method__} was not implemented"
10
+ end
11
+
12
+ # サービスをインスタンス化して処理を実行する
13
+ # 与えられたパラメータを使い、クラスをインスタンス化して、処理を実行する。
14
+ # 処理結果は @result に格納される。
15
+ # @return [Service] サービスのインスタンス
16
+ def self.call!(*args, **kwargs, &block)
17
+ instance = new(*args, **kwargs, &block)
18
+ instance.instance_variable_set(:@result, instance.call!)
19
+ instance
20
+ end
21
+
22
+ # サービスの処理を実行し結果を返す
23
+ # @abstract 継承してサービスの処理を実装する
24
+ # @return [Object] 処理結果
25
+ def call!
26
+ raise NotImplementedError, "#{self.class}##{__method__} was not implemented"
27
+ end
28
+ end
29
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MocaRlibs
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  end
data/lib/moca_rlibs.rb CHANGED
@@ -4,6 +4,35 @@ require_relative 'moca_rlibs/version'
4
4
  require_relative 'moca_rlibs/docker'
5
5
  require_relative 'moca_rlibs/codebuild'
6
6
  require_relative 'moca_rlibs/slack_notifier'
7
+ require_relative 'moca_rlibs/service'
8
+ require_relative 'moca_rlibs/grape_validators/length'
9
+ require_relative 'moca_rlibs/grape_validators/ends_with'
10
+ require_relative 'moca_rlibs/grape_validators/starts_with'
11
+ require_relative 'moca_rlibs/grape_validators/max'
12
+ require_relative 'moca_rlibs/grape_validators/min'
13
+ require_relative 'moca_rlibs/grape_validators/email'
14
+ require_relative 'moca_rlibs/grape_validators/email_strict'
15
+ require_relative 'moca_rlibs/grape_validators/email_rfc'
16
+ require_relative 'moca_rlibs/grape_validators/url'
17
+ require_relative 'moca_rlibs/grape_validators/only_ascii'
18
+ require_relative 'moca_rlibs/grape_validators/only_numbers'
19
+ require_relative 'moca_rlibs/grape_validators/only_alpha'
20
+ require_relative 'moca_rlibs/grape_validators/only_alpha_numeric'
21
+ require_relative 'moca_rlibs/grape_errors/bad_gateway'
22
+ require_relative 'moca_rlibs/grape_errors/bad_request'
23
+ require_relative 'moca_rlibs/grape_errors/conflict'
24
+ require_relative 'moca_rlibs/grape_errors/forbidden'
25
+ require_relative 'moca_rlibs/grape_errors/gateway_timeout'
26
+ require_relative 'moca_rlibs/grape_errors/internal_server_error'
27
+ require_relative 'moca_rlibs/grape_errors/not_found'
28
+ require_relative 'moca_rlibs/grape_errors/reset_content'
29
+ require_relative 'moca_rlibs/grape_errors/retry_required'
30
+ require_relative 'moca_rlibs/grape_errors/service_unavailable'
31
+ require_relative 'moca_rlibs/grape_errors/too_many_requests'
32
+ require_relative 'moca_rlibs/grape_errors/unauthorized'
33
+
34
+ require 'active_model'
35
+ require 'email_validator'
7
36
 
8
37
  # Ruby&Rails用ツールセット
9
38
  module MocaRlibs
data/moca_rlibs.gemspec CHANGED
@@ -27,9 +27,14 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ['lib']
29
29
 
30
+ spec.add_dependency 'activemodel'
31
+ spec.add_dependency 'activesupport'
32
+ spec.add_dependency 'email_validator'
33
+ spec.add_dependency 'grape'
30
34
  spec.add_dependency 'slack-notifier', '~> 2.4.0'
31
35
 
32
36
  spec.add_development_dependency 'codecov'
37
+ spec.add_development_dependency 'rack'
33
38
  spec.add_development_dependency 'rake'
34
39
  spec.add_development_dependency 'rspec'
35
40
  spec.add_development_dependency 'rubocop'
metadata CHANGED
@@ -1,15 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moca_rlibs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mocaberos
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-03 00:00:00.000000000 Z
11
+ date: 2021-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activemodel
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: email_validator
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: grape
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
13
69
  - !ruby/object:Gem::Dependency
14
70
  name: slack-notifier
15
71
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +94,20 @@ dependencies:
38
94
  - - ">="
39
95
  - !ruby/object:Gem::Version
40
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rack
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
41
111
  - !ruby/object:Gem::Dependency
42
112
  name: rake
43
113
  requirement: !ruby/object:Gem::Requirement
@@ -145,6 +215,11 @@ extra_rdoc_files: []
145
215
  files:
146
216
  - ".gitignore"
147
217
  - ".gitmodules"
218
+ - ".idea/.gitignore"
219
+ - ".idea/misc.xml"
220
+ - ".idea/modules.xml"
221
+ - ".idea/rlibs.iml"
222
+ - ".idea/vcs.xml"
148
223
  - ".rspec"
149
224
  - ".rubocop.yml"
150
225
  - CHANGELOG.md
@@ -162,6 +237,32 @@ files:
162
237
  - lib/moca_rlibs.rb
163
238
  - lib/moca_rlibs/codebuild.rb
164
239
  - lib/moca_rlibs/docker.rb
240
+ - lib/moca_rlibs/grape_errors/bad_gateway.rb
241
+ - lib/moca_rlibs/grape_errors/bad_request.rb
242
+ - lib/moca_rlibs/grape_errors/conflict.rb
243
+ - lib/moca_rlibs/grape_errors/forbidden.rb
244
+ - lib/moca_rlibs/grape_errors/gateway_timeout.rb
245
+ - lib/moca_rlibs/grape_errors/internal_server_error.rb
246
+ - lib/moca_rlibs/grape_errors/not_found.rb
247
+ - lib/moca_rlibs/grape_errors/reset_content.rb
248
+ - lib/moca_rlibs/grape_errors/retry_required.rb
249
+ - lib/moca_rlibs/grape_errors/service_unavailable.rb
250
+ - lib/moca_rlibs/grape_errors/too_many_requests.rb
251
+ - lib/moca_rlibs/grape_errors/unauthorized.rb
252
+ - lib/moca_rlibs/grape_validators/email.rb
253
+ - lib/moca_rlibs/grape_validators/email_rfc.rb
254
+ - lib/moca_rlibs/grape_validators/email_strict.rb
255
+ - lib/moca_rlibs/grape_validators/ends_with.rb
256
+ - lib/moca_rlibs/grape_validators/length.rb
257
+ - lib/moca_rlibs/grape_validators/max.rb
258
+ - lib/moca_rlibs/grape_validators/min.rb
259
+ - lib/moca_rlibs/grape_validators/only_alpha.rb
260
+ - lib/moca_rlibs/grape_validators/only_alpha_numeric.rb
261
+ - lib/moca_rlibs/grape_validators/only_ascii.rb
262
+ - lib/moca_rlibs/grape_validators/only_numbers.rb
263
+ - lib/moca_rlibs/grape_validators/starts_with.rb
264
+ - lib/moca_rlibs/grape_validators/url.rb
265
+ - lib/moca_rlibs/service.rb
165
266
  - lib/moca_rlibs/slack_notifier.rb
166
267
  - lib/moca_rlibs/version.rb
167
268
  - moca_rlibs.gemspec