decentworks-date-support 0.1.1 → 0.2.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 +4 -4
- data/CHANGELOG.md +81 -0
- data/LICENSE +1 -1
- data/README.md +245 -40
- data/lib/decentworks/date_support/configuration.rb +19 -18
- data/lib/decentworks/date_support/date.rb +4 -541
- data/lib/decentworks/date_support/date_extension.rb +761 -0
- data/lib/decentworks/date_support/date_time.rb +9 -0
- data/lib/decentworks/date_support/time.rb +7 -0
- data/lib/decentworks/date_support/time_extension.rb +742 -0
- data/lib/decentworks/date_support/time_with_zone.rb +12 -0
- data/lib/decentworks/date_support/version.rb +1 -1
- data/lib/decentworks/date_support.rb +5 -1
- data/lib/generators/decentworks/date_support/install/templates/decentworks_date_support.rb.tt +4 -6
- data/sig/decentworks/date_support/configuration.rbs +12 -3
- data/sig/decentworks/date_support/date.rbs +3 -167
- data/sig/decentworks/date_support/date_extension.rbs +244 -0
- data/sig/decentworks/date_support/date_time.rbs +4 -0
- data/sig/decentworks/date_support/time.rbs +4 -0
- data/sig/decentworks/date_support/time_extension.rbs +248 -0
- data/sig/decentworks/date_support/time_with_zone.rbs +21 -0
- data/sig/decentworks/date_support/version.rbs +5 -0
- metadata +14 -13
- data/.rspec +0 -3
- data/.rubocop.yml +0 -8
- data/.ruby-version +0 -1
- data/CODE_OF_CONDUCT.md +0 -132
- data/LICENSE.txt +0 -21
- data/Rakefile +0 -12
- data/Steepfile +0 -43
- data/lib/decentworks/active_support/time_with_zone_support.rb +0 -541
- data/rbs_collection.lock.yaml +0 -288
- data/rbs_collection.yaml +0 -41
- data/sig/decentworks/active_support/time_with_zone_support.rbs +0 -163
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
module Decentworks
|
|
2
|
+
module DateSupport
|
|
3
|
+
# ::Time / ::DateTime / ::ActiveSupport::TimeWithZone が備えている
|
|
4
|
+
# ActiveSupport(DateAndTime::Calculations)由来のメソッド。
|
|
5
|
+
#
|
|
6
|
+
# TimeExtension のself型として指定することで、モジュール内部での
|
|
7
|
+
# レシーバ省略呼び出しを型検査できるようにする。
|
|
8
|
+
# 戻り値はレシーバと同じクラスになるため、型引数Tで表す。
|
|
9
|
+
interface _DateTimeCalculations[T]
|
|
10
|
+
def year: () -> ::Integer
|
|
11
|
+
def month: () -> ::Integer
|
|
12
|
+
def all_day: () -> ::Range[T]
|
|
13
|
+
def beginning_of_day: () -> T
|
|
14
|
+
def end_of_day: () -> T
|
|
15
|
+
def beginning_of_week: (?untyped start_day) -> T
|
|
16
|
+
def beginning_of_month: () -> T
|
|
17
|
+
def end_of_month: () -> T
|
|
18
|
+
def months_ago: (untyped months) -> T
|
|
19
|
+
def months_since: (untyped months) -> T
|
|
20
|
+
def change: (untyped options) -> T
|
|
21
|
+
def advance: (untyped options) -> T
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# ::Time / ::DateTime / ::ActiveSupport::TimeWithZone に共通の日時拡張
|
|
25
|
+
#
|
|
26
|
+
# 戻り値はレシーバと同じクラスになるため、型引数Tで表す。
|
|
27
|
+
# includeする側で TimeExtension[::Time] のように具体的なクラスを渡す。
|
|
28
|
+
#
|
|
29
|
+
# 型引数の上限をモジュール自身(T < TimeExtension[T])にすることで、
|
|
30
|
+
# Tの値に対してモジュール自身のメソッドと自己型由来のメソッドの両方を呼べる。
|
|
31
|
+
# 戻り値をselfで宣言すると、モジュール内部のレシーバ省略呼び出しがモジュール自身の型に
|
|
32
|
+
# 解決されるため MethodBodyTypeMismatch になるが、型引数であれば一致する。
|
|
33
|
+
module TimeExtension[T < TimeExtension[T]] : _DateTimeCalculations[T]
|
|
34
|
+
module ClassMethods
|
|
35
|
+
def whole_months_elapsed: (from: untyped, to: untyped) -> ::Integer
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.included: (untyped base) -> untyped
|
|
39
|
+
|
|
40
|
+
def beginning_of_this_week: -> T
|
|
41
|
+
def end_of_this_week: -> T
|
|
42
|
+
def all_this_week: -> ::Range[T]
|
|
43
|
+
|
|
44
|
+
def beginning_of_this_month: -> T
|
|
45
|
+
def end_of_this_month: -> T
|
|
46
|
+
def all_this_month: -> ::Range[T]
|
|
47
|
+
|
|
48
|
+
def two_months_ago: -> T
|
|
49
|
+
def three_months_ago: -> T
|
|
50
|
+
def four_months_ago: -> T
|
|
51
|
+
def five_months_ago: -> T
|
|
52
|
+
def six_months_ago: -> T
|
|
53
|
+
def half_year_ago: -> T
|
|
54
|
+
def seven_months_ago: -> T
|
|
55
|
+
def eight_months_ago: -> T
|
|
56
|
+
def nine_months_ago: -> T
|
|
57
|
+
def ten_months_ago: -> T
|
|
58
|
+
def eleven_months_ago: -> T
|
|
59
|
+
|
|
60
|
+
def two_months_since: -> T
|
|
61
|
+
def three_months_since: -> T
|
|
62
|
+
def four_months_since: -> T
|
|
63
|
+
def five_months_since: -> T
|
|
64
|
+
def six_months_since: -> T
|
|
65
|
+
def half_year_since: -> T
|
|
66
|
+
def seven_months_since: -> T
|
|
67
|
+
def eight_months_since: -> T
|
|
68
|
+
def nine_months_since: -> T
|
|
69
|
+
def ten_months_since: -> T
|
|
70
|
+
def eleven_months_since: -> T
|
|
71
|
+
|
|
72
|
+
def beginning_of_january: -> T
|
|
73
|
+
def end_of_january: -> T
|
|
74
|
+
def all_january: -> ::Range[T]
|
|
75
|
+
def beginning_of_january?: -> bool
|
|
76
|
+
def end_of_january?: -> bool
|
|
77
|
+
def in_january?: -> bool
|
|
78
|
+
|
|
79
|
+
def beginning_of_february: -> T
|
|
80
|
+
def end_of_february: -> T
|
|
81
|
+
def all_february: -> ::Range[T]
|
|
82
|
+
def beginning_of_february?: -> bool
|
|
83
|
+
def end_of_february?: -> bool
|
|
84
|
+
def in_february?: -> bool
|
|
85
|
+
|
|
86
|
+
def beginning_of_march: -> T
|
|
87
|
+
def end_of_march: -> T
|
|
88
|
+
def all_march: -> ::Range[T]
|
|
89
|
+
def beginning_of_march?: -> bool
|
|
90
|
+
def end_of_march?: -> bool
|
|
91
|
+
def in_march?: -> bool
|
|
92
|
+
|
|
93
|
+
def beginning_of_april: -> T
|
|
94
|
+
def end_of_april: -> T
|
|
95
|
+
def all_april: -> ::Range[T]
|
|
96
|
+
def beginning_of_april?: -> bool
|
|
97
|
+
def end_of_april?: -> bool
|
|
98
|
+
def in_april?: -> bool
|
|
99
|
+
|
|
100
|
+
def beginning_of_may: -> T
|
|
101
|
+
def end_of_may: -> T
|
|
102
|
+
def all_may: -> ::Range[T]
|
|
103
|
+
def beginning_of_may?: -> bool
|
|
104
|
+
def end_of_may?: -> bool
|
|
105
|
+
def in_may?: -> bool
|
|
106
|
+
|
|
107
|
+
def beginning_of_june: -> T
|
|
108
|
+
def end_of_june: -> T
|
|
109
|
+
def all_june: -> ::Range[T]
|
|
110
|
+
def beginning_of_june?: -> bool
|
|
111
|
+
def end_of_june?: -> bool
|
|
112
|
+
def in_june?: -> bool
|
|
113
|
+
|
|
114
|
+
def beginning_of_july: -> T
|
|
115
|
+
def end_of_july: -> T
|
|
116
|
+
def all_july: -> ::Range[T]
|
|
117
|
+
def beginning_of_july?: -> bool
|
|
118
|
+
def end_of_july?: -> bool
|
|
119
|
+
def in_july?: -> bool
|
|
120
|
+
|
|
121
|
+
def beginning_of_august: -> T
|
|
122
|
+
def end_of_august: -> T
|
|
123
|
+
def all_august: -> ::Range[T]
|
|
124
|
+
def beginning_of_august?: -> bool
|
|
125
|
+
def end_of_august?: -> bool
|
|
126
|
+
def in_august?: -> bool
|
|
127
|
+
|
|
128
|
+
def beginning_of_september: -> T
|
|
129
|
+
def end_of_september: -> T
|
|
130
|
+
def all_september: -> ::Range[T]
|
|
131
|
+
def beginning_of_september?: -> bool
|
|
132
|
+
def end_of_september?: -> bool
|
|
133
|
+
def in_september?: -> bool
|
|
134
|
+
|
|
135
|
+
def beginning_of_october: -> T
|
|
136
|
+
def end_of_october: -> T
|
|
137
|
+
def all_october: -> ::Range[T]
|
|
138
|
+
def beginning_of_october?: -> bool
|
|
139
|
+
def end_of_october?: -> bool
|
|
140
|
+
def in_october?: -> bool
|
|
141
|
+
|
|
142
|
+
def beginning_of_november: -> T
|
|
143
|
+
def end_of_november: -> T
|
|
144
|
+
def all_november: -> ::Range[T]
|
|
145
|
+
def beginning_of_november?: -> bool
|
|
146
|
+
def end_of_november?: -> bool
|
|
147
|
+
def in_november?: -> bool
|
|
148
|
+
|
|
149
|
+
def beginning_of_december: -> T
|
|
150
|
+
def end_of_december: -> T
|
|
151
|
+
def all_december: -> ::Range[T]
|
|
152
|
+
def beginning_of_december?: -> bool
|
|
153
|
+
def end_of_december?: -> bool
|
|
154
|
+
def in_december?: -> bool
|
|
155
|
+
|
|
156
|
+
def beginning_of_first_quarter: -> T
|
|
157
|
+
def end_of_first_quarter: -> T
|
|
158
|
+
def all_first_quarter: -> ::Range[T]
|
|
159
|
+
def beginning_of_first_quarter?: -> bool
|
|
160
|
+
def end_of_first_quarter?: -> bool
|
|
161
|
+
def in_first_quarter?: -> bool
|
|
162
|
+
|
|
163
|
+
def beginning_of_second_quarter: -> T
|
|
164
|
+
def end_of_second_quarter: -> T
|
|
165
|
+
def all_second_quarter: -> ::Range[T]
|
|
166
|
+
def beginning_of_second_quarter?: -> bool
|
|
167
|
+
def end_of_second_quarter?: -> bool
|
|
168
|
+
def in_second_quarter?: -> bool
|
|
169
|
+
|
|
170
|
+
def beginning_of_third_quarter: -> T
|
|
171
|
+
def end_of_third_quarter: -> T
|
|
172
|
+
def all_third_quarter: -> ::Range[T]
|
|
173
|
+
def beginning_of_third_quarter?: -> bool
|
|
174
|
+
def end_of_third_quarter?: -> bool
|
|
175
|
+
def in_third_quarter?: -> bool
|
|
176
|
+
|
|
177
|
+
def beginning_of_fourth_quarter: -> T
|
|
178
|
+
def end_of_fourth_quarter: -> T
|
|
179
|
+
def all_fourth_quarter: -> ::Range[T]
|
|
180
|
+
def beginning_of_fourth_quarter?: -> bool
|
|
181
|
+
def end_of_fourth_quarter?: -> bool
|
|
182
|
+
def in_fourth_quarter?: -> bool
|
|
183
|
+
|
|
184
|
+
def beginning_of_first_half: -> T
|
|
185
|
+
def end_of_first_half: -> T
|
|
186
|
+
def all_first_half: -> ::Range[T]
|
|
187
|
+
def beginning_of_first_half?: -> bool
|
|
188
|
+
def end_of_first_half?: -> bool
|
|
189
|
+
def in_first_half?: -> bool
|
|
190
|
+
|
|
191
|
+
def beginning_of_second_half: -> T
|
|
192
|
+
def end_of_second_half: -> T
|
|
193
|
+
def all_second_half: -> ::Range[T]
|
|
194
|
+
def beginning_of_second_half?: -> bool
|
|
195
|
+
def end_of_second_half?: -> bool
|
|
196
|
+
def in_second_half?: -> bool
|
|
197
|
+
|
|
198
|
+
def this_quarter_number: -> ::Integer
|
|
199
|
+
def beginning_of_this_quarter: -> T
|
|
200
|
+
def end_of_this_quarter: -> T
|
|
201
|
+
def all_this_quarter: -> ::Range[T]
|
|
202
|
+
|
|
203
|
+
def this_half_number: -> ::Integer
|
|
204
|
+
def beginning_of_this_half: -> T
|
|
205
|
+
def end_of_this_half: -> T
|
|
206
|
+
def all_this_half: -> ::Range[T]
|
|
207
|
+
|
|
208
|
+
def fiscal_year: -> ::Integer
|
|
209
|
+
def beginning_of_fiscal_year: -> T
|
|
210
|
+
def end_of_fiscal_year: -> T
|
|
211
|
+
def all_fiscal_year: -> ::Range[T]
|
|
212
|
+
|
|
213
|
+
def beginning_of_next_quarter: -> T
|
|
214
|
+
def end_of_next_quarter: -> T
|
|
215
|
+
def all_next_quarter: -> ::Range[T]
|
|
216
|
+
def beginning_of_prev_quarter: -> T
|
|
217
|
+
def end_of_prev_quarter: -> T
|
|
218
|
+
def all_prev_quarter: -> ::Range[T]
|
|
219
|
+
|
|
220
|
+
def beginning_of_next_half: -> T
|
|
221
|
+
def end_of_next_half: -> T
|
|
222
|
+
def all_next_half: -> ::Range[T]
|
|
223
|
+
def beginning_of_prev_half: -> T
|
|
224
|
+
def end_of_prev_half: -> T
|
|
225
|
+
def all_prev_half: -> ::Range[T]
|
|
226
|
+
|
|
227
|
+
def next_fiscal_year: -> ::Integer
|
|
228
|
+
def beginning_of_next_fiscal_year: -> T
|
|
229
|
+
def end_of_next_fiscal_year: -> T
|
|
230
|
+
def all_next_fiscal_year: -> ::Range[T]
|
|
231
|
+
def prev_fiscal_year: -> ::Integer
|
|
232
|
+
def beginning_of_prev_fiscal_year: -> T
|
|
233
|
+
def end_of_prev_fiscal_year: -> T
|
|
234
|
+
def all_prev_fiscal_year: -> ::Range[T]
|
|
235
|
+
|
|
236
|
+
# ActiveSupportのメソッドの上書き
|
|
237
|
+
def quarter: -> ::Integer
|
|
238
|
+
def beginning_of_quarter: -> T
|
|
239
|
+
def at_beginning_of_quarter: -> T
|
|
240
|
+
def end_of_quarter: -> T
|
|
241
|
+
def at_end_of_quarter: -> T
|
|
242
|
+
def all_quarter: -> ::Range[T]
|
|
243
|
+
def next_quarter: -> T
|
|
244
|
+
def prev_quarter: -> T
|
|
245
|
+
def last_quarter: -> T
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module ActiveSupport
|
|
2
|
+
class TimeWithZone
|
|
3
|
+
include ::Decentworks::DateSupport::TimeExtension[::ActiveSupport::TimeWithZone]
|
|
4
|
+
extend ::Decentworks::DateSupport::TimeExtension::ClassMethods
|
|
5
|
+
|
|
6
|
+
# ::ActiveSupport::TimeWithZone は method_missing で ::Time に委譲しているため
|
|
7
|
+
# gem_rbs_collection の activesupport には定義がない。
|
|
8
|
+
# TimeExtension のself型(_DateTimeCalculations)を満たすために宣言する。
|
|
9
|
+
# change / advance は activesupport 側で定義済みのため、ここには含めない。
|
|
10
|
+
def year: () -> ::Integer
|
|
11
|
+
def month: () -> ::Integer
|
|
12
|
+
def all_day: () -> ::Range[untyped]
|
|
13
|
+
def beginning_of_day: () -> untyped
|
|
14
|
+
def end_of_day: () -> untyped
|
|
15
|
+
def beginning_of_week: (?untyped start_day) -> untyped
|
|
16
|
+
def beginning_of_month: () -> untyped
|
|
17
|
+
def end_of_month: () -> untyped
|
|
18
|
+
def months_ago: (untyped months) -> untyped
|
|
19
|
+
def months_since: (untyped months) -> untyped
|
|
20
|
+
end
|
|
21
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decentworks-date-support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- decentworks
|
|
@@ -25,34 +25,34 @@ dependencies:
|
|
|
25
25
|
version: '8.1'
|
|
26
26
|
description: 日付機能拡張ライブラリ
|
|
27
27
|
email:
|
|
28
|
-
-
|
|
28
|
+
- yutaka.mizomoto@sr-decentworks.com
|
|
29
29
|
executables: []
|
|
30
30
|
extensions: []
|
|
31
31
|
extra_rdoc_files: []
|
|
32
32
|
files:
|
|
33
|
-
- ".rspec"
|
|
34
|
-
- ".rubocop.yml"
|
|
35
|
-
- ".ruby-version"
|
|
36
33
|
- CHANGELOG.md
|
|
37
|
-
- CODE_OF_CONDUCT.md
|
|
38
34
|
- LICENSE
|
|
39
|
-
- LICENSE.txt
|
|
40
35
|
- README.md
|
|
41
|
-
- Rakefile
|
|
42
|
-
- Steepfile
|
|
43
36
|
- lib/decentworks-date-support.rb
|
|
44
|
-
- lib/decentworks/active_support/time_with_zone_support.rb
|
|
45
37
|
- lib/decentworks/date_support.rb
|
|
46
38
|
- lib/decentworks/date_support/configuration.rb
|
|
47
39
|
- lib/decentworks/date_support/date.rb
|
|
40
|
+
- lib/decentworks/date_support/date_extension.rb
|
|
41
|
+
- lib/decentworks/date_support/date_time.rb
|
|
42
|
+
- lib/decentworks/date_support/time.rb
|
|
43
|
+
- lib/decentworks/date_support/time_extension.rb
|
|
44
|
+
- lib/decentworks/date_support/time_with_zone.rb
|
|
48
45
|
- lib/decentworks/date_support/version.rb
|
|
49
46
|
- lib/generators/decentworks/date_support/install/install_generator.rb
|
|
50
47
|
- lib/generators/decentworks/date_support/install/templates/decentworks_date_support.rb.tt
|
|
51
|
-
- rbs_collection.lock.yaml
|
|
52
|
-
- rbs_collection.yaml
|
|
53
|
-
- sig/decentworks/active_support/time_with_zone_support.rbs
|
|
54
48
|
- sig/decentworks/date_support/configuration.rbs
|
|
55
49
|
- sig/decentworks/date_support/date.rbs
|
|
50
|
+
- sig/decentworks/date_support/date_extension.rbs
|
|
51
|
+
- sig/decentworks/date_support/date_time.rbs
|
|
52
|
+
- sig/decentworks/date_support/time.rbs
|
|
53
|
+
- sig/decentworks/date_support/time_extension.rbs
|
|
54
|
+
- sig/decentworks/date_support/time_with_zone.rbs
|
|
55
|
+
- sig/decentworks/date_support/version.rbs
|
|
56
56
|
homepage: https://github.com/SrDecentWorks/decentworks-date-support/tree/main
|
|
57
57
|
licenses:
|
|
58
58
|
- MIT
|
|
@@ -60,6 +60,7 @@ metadata:
|
|
|
60
60
|
homepage_uri: https://github.com/SrDecentWorks/decentworks-date-support/tree/main
|
|
61
61
|
source_code_uri: https://github.com/SrDecentWorks/decentworks-date-support/tree/main
|
|
62
62
|
changelog_uri: https://github.com/SrDecentWorks/decentworks-date-support/blob/main/CHANGELOG.md
|
|
63
|
+
rubygems_mfa_required: 'true'
|
|
63
64
|
rdoc_options: []
|
|
64
65
|
require_paths:
|
|
65
66
|
- lib
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4.0.6
|
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
-
identity and orientation.
|
|
11
|
-
|
|
12
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
Examples of behavior that contributes to a positive environment for our
|
|
18
|
-
community include:
|
|
19
|
-
|
|
20
|
-
* Demonstrating empathy and kindness toward other people
|
|
21
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
-
* Giving and gracefully accepting constructive feedback
|
|
23
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
-
and learning from the experience
|
|
25
|
-
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
-
community
|
|
27
|
-
|
|
28
|
-
Examples of unacceptable behavior include:
|
|
29
|
-
|
|
30
|
-
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
-
any kind
|
|
32
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
-
* Public or private harassment
|
|
34
|
-
* Publishing others' private information, such as a physical or email address,
|
|
35
|
-
without their explicit permission
|
|
36
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
-
professional setting
|
|
38
|
-
|
|
39
|
-
## Enforcement Responsibilities
|
|
40
|
-
|
|
41
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
-
or harmful.
|
|
45
|
-
|
|
46
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
-
decisions when appropriate.
|
|
50
|
-
|
|
51
|
-
## Scope
|
|
52
|
-
|
|
53
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
-
an individual is officially representing the community in public spaces.
|
|
55
|
-
Examples of representing our community include using an official email address,
|
|
56
|
-
posting via an official social media account, or acting as an appointed
|
|
57
|
-
representative at an online or offline event.
|
|
58
|
-
|
|
59
|
-
## Enforcement
|
|
60
|
-
|
|
61
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
-
reported to the community leaders responsible for enforcement at
|
|
63
|
-
[INSERT CONTACT METHOD].
|
|
64
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
-
|
|
66
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
-
reporter of any incident.
|
|
68
|
-
|
|
69
|
-
## Enforcement Guidelines
|
|
70
|
-
|
|
71
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
-
|
|
74
|
-
### 1. Correction
|
|
75
|
-
|
|
76
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
-
unprofessional or unwelcome in the community.
|
|
78
|
-
|
|
79
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
-
clarity around the nature of the violation and an explanation of why the
|
|
81
|
-
behavior was inappropriate. A public apology may be requested.
|
|
82
|
-
|
|
83
|
-
### 2. Warning
|
|
84
|
-
|
|
85
|
-
**Community Impact**: A violation through a single incident or series of
|
|
86
|
-
actions.
|
|
87
|
-
|
|
88
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
-
interaction with the people involved, including unsolicited interaction with
|
|
90
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
-
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
-
ban.
|
|
94
|
-
|
|
95
|
-
### 3. Temporary Ban
|
|
96
|
-
|
|
97
|
-
**Community Impact**: A serious violation of community standards, including
|
|
98
|
-
sustained inappropriate behavior.
|
|
99
|
-
|
|
100
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
-
communication with the community for a specified period of time. No public or
|
|
102
|
-
private interaction with the people involved, including unsolicited interaction
|
|
103
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
-
Violating these terms may lead to a permanent ban.
|
|
105
|
-
|
|
106
|
-
### 4. Permanent Ban
|
|
107
|
-
|
|
108
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
-
|
|
112
|
-
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
-
community.
|
|
114
|
-
|
|
115
|
-
## Attribution
|
|
116
|
-
|
|
117
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
-
version 2.1, available at
|
|
119
|
-
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
-
|
|
121
|
-
Community Impact Guidelines were inspired by
|
|
122
|
-
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
-
|
|
124
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
-
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
-
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
-
|
|
128
|
-
[homepage]: https://www.contributor-covenant.org
|
|
129
|
-
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
-
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
-
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
-
[translations]: https://www.contributor-covenant.org/translations
|
data/LICENSE.txt
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 YutakaMizomoto
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
data/Rakefile
DELETED
data/Steepfile
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# D = Steep::Diagnostic
|
|
2
|
-
#
|
|
3
|
-
# target :lib do
|
|
4
|
-
# signature "sig"
|
|
5
|
-
# ignore_signature "sig/test"
|
|
6
|
-
#
|
|
7
|
-
# check "lib" # Directory name
|
|
8
|
-
# check "path/to/source.rb" # File name
|
|
9
|
-
# check "app/models/**/*.rb" # Glob
|
|
10
|
-
# # ignore "lib/templates/*.rb"
|
|
11
|
-
#
|
|
12
|
-
# # library "pathname" # Standard libraries
|
|
13
|
-
# # library "strong_json" # Gems
|
|
14
|
-
#
|
|
15
|
-
# # configure_code_diagnostics(D::Ruby.default) # `default` diagnostics setting (applies by default)
|
|
16
|
-
# # configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
|
|
17
|
-
# # configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
|
|
18
|
-
# # configure_code_diagnostics(D::Ruby.silent) # `silent` diagnostics setting
|
|
19
|
-
# # configure_code_diagnostics do |hash| # You can setup everything yourself
|
|
20
|
-
# # hash[D::Ruby::NoMethod] = :information
|
|
21
|
-
# # end
|
|
22
|
-
# end
|
|
23
|
-
|
|
24
|
-
# target :test do
|
|
25
|
-
# unreferenced! # Skip type checking the `lib` code when types in `test` target is changed
|
|
26
|
-
# signature "sig/test" # Put RBS files for tests under `sig/test`
|
|
27
|
-
# check "test" # Type check Ruby scripts under `test`
|
|
28
|
-
#
|
|
29
|
-
# configure_code_diagnostics(D::Ruby.lenient) # Weak type checking for test code
|
|
30
|
-
#
|
|
31
|
-
# # library "pathname" # Standard libraries
|
|
32
|
-
# end
|
|
33
|
-
|
|
34
|
-
target :lib do
|
|
35
|
-
# 型検査をしたいrubyファイルが格納されているディレクトリ名
|
|
36
|
-
check "lib"
|
|
37
|
-
|
|
38
|
-
# 型定義を記述するRBSファイルが格納されているディレクトリ名
|
|
39
|
-
signature "sig"
|
|
40
|
-
|
|
41
|
-
# 取り込みたいライブラリ
|
|
42
|
-
# library "pathname"
|
|
43
|
-
end
|