rack-traffic-signal 0.1.2 → 0.1.3
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 +4 -4
- data/.github/.commit_template +33 -0
- data/README.md +3 -3
- data/lib/rack/traffic_signal/middleware.rb +1 -0
- data/lib/rack/traffic_signal/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d81e73362fc51012e7b7a8afa97aaa6c6cf7e6ca
|
4
|
+
data.tar.gz: 0d0bee67463dfebd1a6f8a5437be44e7e98ae295
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eabdc1b337cb4c8e391c28ee498c83f49aba1ab79335e3d556d0b5f13815c1faafd6d7a148bbf97d6dd5d4e9dd0670fd0af5a50f2f86012b1f32ac669bd1d5b5
|
7
|
+
data.tar.gz: 9b4b3f88db9010f8bc0cfae25b9f38cdc7f27e2892e97140c15c3c7194119bd4fd402c2be5d04ac4a19656dec32be465dd922aed0cc5ceee5575d4bc466c2167
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
# ==== Emojis ====
|
4
|
+
# 🐛 :bug: バグ修正
|
5
|
+
# 👍 :+1: 機能改善
|
6
|
+
# ✨ :sparkles: 部分的な機能追加
|
7
|
+
# 🎉 :tada: 盛大に祝うべき大きな機能追加
|
8
|
+
# ♻️ :recycle: リファクタリング
|
9
|
+
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
|
10
|
+
# 💚 :green_heart: テストやCIの修正・改善
|
11
|
+
# 👕 :shirt: Lintエラーの修正やコードスタイルの修正
|
12
|
+
# 🚀 :rocket: パフォーマンス改善
|
13
|
+
# 🆙 :up: 依存パッケージなどのアップデート
|
14
|
+
# 🔒 :lock: 新機能の公開範囲の制限
|
15
|
+
# 👮 :cop: セキュリティ関連の改善
|
16
|
+
|
17
|
+
# ==== Format ====
|
18
|
+
# :emoji: Subject
|
19
|
+
#
|
20
|
+
# Commit body...
|
21
|
+
|
22
|
+
# ==== The Seven Rules ====
|
23
|
+
# 1. Separate subject from body with a blank line
|
24
|
+
# 2. Limit the subject line to 50 characters
|
25
|
+
# 3. Capitalize the subject line
|
26
|
+
# 4. Do not end the subject line with a period
|
27
|
+
# 5. Use the imperative mood in the subject line
|
28
|
+
# 6. Wrap the body at 72 characters
|
29
|
+
# 7. Use the body to explain what and why vs. how
|
30
|
+
#
|
31
|
+
# How to Write a Git Commit Message http://chris.beams.io/posts/git-commit/
|
32
|
+
|
33
|
+
# for http://memo.goodpatch.co/2016/07/beautiful-commits-with-emojis/
|
data/README.md
CHANGED
@@ -82,7 +82,7 @@ Rack::TrafficSignal.setup do |config|
|
|
82
82
|
{ methods: [:post], path: "/users" }
|
83
83
|
],
|
84
84
|
update: [
|
85
|
-
{ methods: [:put], path: %r{/users/\d+}}
|
85
|
+
{ methods: [:put], path: %r{/users/\d+}, status: 404, body: { meta: '404' }.to_json }
|
86
86
|
]
|
87
87
|
}
|
88
88
|
}
|
@@ -101,14 +101,14 @@ Rack::TrafficSignal.setup do |config|
|
|
101
101
|
# Block to judge whether maintenance mode should be skipped.
|
102
102
|
# For example, you can skip maintenance mode with specific path or internal access.
|
103
103
|
config.skip_by do |env|
|
104
|
-
Rack::TrafficSignal.skip_path?(env) || Rack::TrafficSignal.internal_access?
|
104
|
+
Rack::TrafficSignal.skip_path?(env) || Rack::TrafficSignal.internal_access?(env)
|
105
105
|
end
|
106
106
|
|
107
107
|
# Block to judge whether maintenance mode should be skipped with warning.
|
108
108
|
# For example, you can skip maintenance mode with specific path or internal access.
|
109
109
|
# Warn by add 'X-RACK-TRAFFIC-SIGNAL-MAINTENANCE' to response header.
|
110
110
|
config.skip_with_warning_by do |env|
|
111
|
-
Rack::TrafficSignal.skip_path?(env) || Rack::TrafficSignal.internal_access?
|
111
|
+
Rack::TrafficSignal.skip_path?(env) || Rack::TrafficSignal.internal_access?(env)
|
112
112
|
end
|
113
113
|
end
|
114
114
|
```
|
@@ -61,6 +61,7 @@ module Rack
|
|
61
61
|
|
62
62
|
def maintenance_application(method, path)
|
63
63
|
enabled_maintenance_mode = config.maintenance_status
|
64
|
+
return nil if enabled_maintenance_mode.length == 0
|
64
65
|
|
65
66
|
enabled_cfg = if enabled_maintenance_mode.include? :all
|
66
67
|
config.maintenance_group.values.inject([]) do |a, p|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-traffic-signal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- keigo yamamoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ipaddress
|
@@ -102,6 +102,7 @@ executables: []
|
|
102
102
|
extensions: []
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
|
+
- ".github/.commit_template"
|
105
106
|
- ".gitignore"
|
106
107
|
- ".rspec"
|
107
108
|
- ".travis.yml"
|