gitmoji-regex 1.0.1 → 1.0.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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +39 -11
- data/CODE_OF_CONDUCT.md +79 -29
- data/CONTRIBUTING.md +133 -35
- data/README.md +422 -216
- data/REEK +0 -0
- data/RUBOCOP.md +71 -0
- data/SECURITY.md +12 -4
- data/checksums/gitmoji-regex-1.0.2.gem.sha256 +1 -0
- data/checksums/gitmoji-regex-1.0.2.gem.sha512 +1 -0
- data/checksums/gitmoji-regex-1.0.3.gem.sha256 +1 -0
- data/checksums/gitmoji-regex-1.0.3.gem.sha512 +1 -0
- data/lib/gitmoji/regex/reference.rb +44 -4
- data/lib/gitmoji/regex/version.rb +5 -1
- data/lib/gitmoji/regex.rb +17 -2
- data/sig/gitmoji/regex.rbs +31 -0
- data/src/gitmojis.json +597 -0
- data.tar.gz.sig +0 -0
- metadata +160 -67
- metadata.gz.sig +4 -0
- data/spec/config/rspec/rspec_core.rb +0 -13
- data/spec/gitmoji/regex/reference_spec.rb +0 -73
- data/spec/gitmoji/regex/version_spec.rb +0 -5
- data/spec/gitmoji/regex_spec.rb +0 -17
- data/spec/spec_helper.rb +0 -59
metadata
CHANGED
@@ -1,14 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitmoji-regex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
|
-
cert_chain:
|
11
|
-
|
9
|
+
cert_chain:
|
10
|
+
- |
|
11
|
+
-----BEGIN CERTIFICATE-----
|
12
|
+
MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
|
13
|
+
ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
|
14
|
+
A2NvbTAeFw0yNTA1MDQxNTMzMDlaFw00NTA0MjkxNTMzMDlaMEMxFTATBgNVBAMM
|
15
|
+
DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
|
16
|
+
LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAruUoo0WA
|
17
|
+
uoNuq6puKWYeRYiZekz/nsDeK5x/0IEirzcCEvaHr3Bmz7rjo1I6On3gGKmiZs61
|
18
|
+
LRmQ3oxy77ydmkGTXBjruJB+pQEn7UfLSgQ0xa1/X3kdBZt6RmabFlBxnHkoaGY5
|
19
|
+
mZuZ5+Z7walmv6sFD9ajhzj+oIgwWfnEHkXYTR8I6VLN7MRRKGMPoZ/yvOmxb2DN
|
20
|
+
coEEHWKO9CvgYpW7asIihl/9GMpKiRkcYPm9dGQzZc6uTwom1COfW0+ZOFrDVBuV
|
21
|
+
FMQRPswZcY4Wlq0uEBLPU7hxnCL9nKK6Y9IhdDcz1mY6HZ91WImNslOSI0S8hRpj
|
22
|
+
yGOWxQIhBT3fqCBlRIqFQBudrnD9jSNpSGsFvbEijd5ns7Z9ZMehXkXDycpGAUj1
|
23
|
+
to/5cuTWWw1JqUWrKJYoifnVhtE1o1DZ+LkPtWxHtz5kjDG/zR3MG0Ula0UOavlD
|
24
|
+
qbnbcXPBnwXtTFeZ3C+yrWpE4pGnl3yGkZj9SMTlo9qnTMiPmuWKQDatAgMBAAGj
|
25
|
+
fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQE8uWvNbPVNRXZ
|
26
|
+
HlgPbc2PCzC4bjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG
|
27
|
+
A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD
|
28
|
+
ggGBAJbnUwfJQFPkBgH9cL7hoBfRtmWiCvdqdjeTmi04u8zVNCUox0A4gT982DE9
|
29
|
+
wmuN12LpdajxZONqbXuzZvc+nb0StFwmFYZG6iDwaf4BPywm2e/Vmq0YG45vZXGR
|
30
|
+
L8yMDSK1cQXjmA+ZBKOHKWavxP6Vp7lWvjAhz8RFwqF9GuNIdhv9NpnCAWcMZtpm
|
31
|
+
GUPyIWw/Cw/2wZp74QzZj6Npx+LdXoLTF1HMSJXZ7/pkxLCsB8m4EFVdb/IrW/0k
|
32
|
+
kNSfjtAfBHO8nLGuqQZVH9IBD1i9K6aSs7pT6TW8itXUIlkIUI2tg5YzW6OFfPzq
|
33
|
+
QekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA
|
34
|
+
0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p
|
35
|
+
DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt
|
36
|
+
L9nRqA==
|
37
|
+
-----END CERTIFICATE-----
|
38
|
+
date: 2025-08-20 00:00:00.000000000 Z
|
12
39
|
dependencies:
|
13
40
|
- !ruby/object:Gem::Dependency
|
14
41
|
name: version_gem
|
@@ -17,6 +44,9 @@ dependencies:
|
|
17
44
|
- - "~>"
|
18
45
|
- !ruby/object:Gem::Version
|
19
46
|
version: '1.1'
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.1.8
|
20
50
|
type: :runtime
|
21
51
|
prerelease: false
|
22
52
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,76 +54,67 @@ dependencies:
|
|
24
54
|
- - "~>"
|
25
55
|
- !ruby/object:Gem::Version
|
26
56
|
version: '1.1'
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 1.1.8
|
27
60
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
61
|
+
name: stone_checksums
|
29
62
|
requirement: !ruby/object:Gem::Requirement
|
30
63
|
requirements:
|
31
|
-
- - "
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 4.4.1
|
34
|
-
- - "<"
|
64
|
+
- - "~>"
|
35
65
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
66
|
+
version: '1.0'
|
37
67
|
type: :development
|
38
68
|
prerelease: false
|
39
69
|
version_requirements: !ruby/object:Gem::Requirement
|
40
70
|
requirements:
|
41
|
-
- - "
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 4.4.1
|
44
|
-
- - "<"
|
71
|
+
- - "~>"
|
45
72
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
73
|
+
version: '1.0'
|
47
74
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
75
|
+
name: appraisal2
|
49
76
|
requirement: !ruby/object:Gem::Requirement
|
50
77
|
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 2.0.2
|
54
78
|
- - "~>"
|
55
79
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
80
|
+
version: '3.0'
|
57
81
|
type: :development
|
58
82
|
prerelease: false
|
59
83
|
version_requirements: !ruby/object:Gem::Requirement
|
60
84
|
requirements:
|
61
|
-
- - ">="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: 2.0.2
|
64
85
|
- - "~>"
|
65
86
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
87
|
+
version: '3.0'
|
67
88
|
- !ruby/object:Gem::Dependency
|
68
|
-
name:
|
89
|
+
name: rspec-benchmark
|
69
90
|
requirement: !ruby/object:Gem::Requirement
|
70
91
|
requirements:
|
71
92
|
- - "~>"
|
72
93
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
94
|
+
version: '0.6'
|
74
95
|
type: :development
|
75
96
|
prerelease: false
|
76
97
|
version_requirements: !ruby/object:Gem::Requirement
|
77
98
|
requirements:
|
78
99
|
- - "~>"
|
79
100
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
101
|
+
version: '0.6'
|
81
102
|
- !ruby/object:Gem::Dependency
|
82
|
-
name: rspec
|
103
|
+
name: rspec-block_is_expected
|
83
104
|
requirement: !ruby/object:Gem::Requirement
|
84
105
|
requirements:
|
85
106
|
- - "~>"
|
86
107
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
108
|
+
version: '1.0'
|
88
109
|
type: :development
|
89
110
|
prerelease: false
|
90
111
|
version_requirements: !ruby/object:Gem::Requirement
|
91
112
|
requirements:
|
92
113
|
- - "~>"
|
93
114
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
115
|
+
version: '1.0'
|
95
116
|
- !ruby/object:Gem::Dependency
|
96
|
-
name:
|
117
|
+
name: rspec_junit_formatter
|
97
118
|
requirement: !ruby/object:Gem::Requirement
|
98
119
|
requirements:
|
99
120
|
- - "~>"
|
@@ -107,7 +128,7 @@ dependencies:
|
|
107
128
|
- !ruby/object:Gem::Version
|
108
129
|
version: '0.6'
|
109
130
|
- !ruby/object:Gem::Dependency
|
110
|
-
name: rspec-
|
131
|
+
name: rspec-stubbed_env
|
111
132
|
requirement: !ruby/object:Gem::Requirement
|
112
133
|
requirements:
|
113
134
|
- - "~>"
|
@@ -121,93 +142,165 @@ dependencies:
|
|
121
142
|
- !ruby/object:Gem::Version
|
122
143
|
version: '1.0'
|
123
144
|
- !ruby/object:Gem::Dependency
|
124
|
-
name:
|
145
|
+
name: silent_stream
|
125
146
|
requirement: !ruby/object:Gem::Requirement
|
126
147
|
requirements:
|
127
148
|
- - "~>"
|
128
149
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
150
|
+
version: '1.0'
|
130
151
|
- - ">="
|
131
152
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
153
|
+
version: 1.0.11
|
133
154
|
type: :development
|
134
155
|
prerelease: false
|
135
156
|
version_requirements: !ruby/object:Gem::Requirement
|
136
157
|
requirements:
|
137
158
|
- - "~>"
|
138
159
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
160
|
+
version: '1.0'
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: 1.0.11
|
164
|
+
- !ruby/object:Gem::Dependency
|
165
|
+
name: http
|
166
|
+
requirement: !ruby/object:Gem::Requirement
|
167
|
+
requirements:
|
168
|
+
- - ">="
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: 4.4.1
|
171
|
+
- - "<"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '6'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
140
178
|
- - ">="
|
141
179
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
180
|
+
version: 4.4.1
|
181
|
+
- - "<"
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
version: '6'
|
143
184
|
- !ruby/object:Gem::Dependency
|
144
|
-
name:
|
185
|
+
name: json
|
145
186
|
requirement: !ruby/object:Gem::Requirement
|
146
187
|
requirements:
|
147
188
|
- - ">="
|
148
189
|
- !ruby/object:Gem::Version
|
149
|
-
version:
|
190
|
+
version: 2.7.6
|
191
|
+
- - "~>"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '2.7'
|
150
194
|
type: :development
|
151
195
|
prerelease: false
|
152
196
|
version_requirements: !ruby/object:Gem::Requirement
|
153
197
|
requirements:
|
154
198
|
- - ">="
|
155
199
|
- !ruby/object:Gem::Version
|
156
|
-
version:
|
157
|
-
|
200
|
+
version: 2.7.6
|
201
|
+
- - "~>"
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '2.7'
|
204
|
+
- !ruby/object:Gem::Dependency
|
205
|
+
name: rake
|
206
|
+
requirement: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - "~>"
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '13.0'
|
211
|
+
type: :development
|
212
|
+
prerelease: false
|
213
|
+
version_requirements: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - "~>"
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '13.0'
|
218
|
+
description: "\U0001F61C A regular expression matching Gitmoji (a subset of Unicode
|
219
|
+
Emoji) symbolsFund overlooked open source projects - bottom of stack, dev/test dependencies:
|
220
|
+
floss-funding.dev"
|
158
221
|
email:
|
159
|
-
-
|
222
|
+
- floss@galtzo.com
|
160
223
|
executables: []
|
161
224
|
extensions: []
|
162
|
-
extra_rdoc_files:
|
225
|
+
extra_rdoc_files:
|
226
|
+
- CHANGELOG.md
|
227
|
+
- CODE_OF_CONDUCT.md
|
228
|
+
- CONTRIBUTING.md
|
229
|
+
- LICENSE.txt
|
230
|
+
- README.md
|
231
|
+
- REEK
|
232
|
+
- RUBOCOP.md
|
233
|
+
- SECURITY.md
|
234
|
+
- checksums/gitmoji-regex-1.0.2.gem.sha256
|
235
|
+
- checksums/gitmoji-regex-1.0.2.gem.sha512
|
236
|
+
- checksums/gitmoji-regex-1.0.3.gem.sha256
|
237
|
+
- checksums/gitmoji-regex-1.0.3.gem.sha512
|
238
|
+
- sig/gitmoji/regex.rbs
|
163
239
|
files:
|
164
240
|
- CHANGELOG.md
|
165
241
|
- CODE_OF_CONDUCT.md
|
166
242
|
- CONTRIBUTING.md
|
167
243
|
- LICENSE.txt
|
168
244
|
- README.md
|
245
|
+
- REEK
|
246
|
+
- RUBOCOP.md
|
169
247
|
- SECURITY.md
|
248
|
+
- checksums/gitmoji-regex-1.0.2.gem.sha256
|
249
|
+
- checksums/gitmoji-regex-1.0.2.gem.sha512
|
250
|
+
- checksums/gitmoji-regex-1.0.3.gem.sha256
|
251
|
+
- checksums/gitmoji-regex-1.0.3.gem.sha512
|
170
252
|
- lib/gitmoji/regex.rb
|
171
253
|
- lib/gitmoji/regex/reference.rb
|
172
254
|
- lib/gitmoji/regex/version.rb
|
173
|
-
-
|
174
|
-
-
|
175
|
-
|
176
|
-
- spec/gitmoji/regex_spec.rb
|
177
|
-
- spec/spec_helper.rb
|
178
|
-
homepage: https://github.com/pboling/gitmoji-regex
|
255
|
+
- sig/gitmoji/regex.rbs
|
256
|
+
- src/gitmojis.json
|
257
|
+
homepage: https://github.com/galtzo-floss/gitmoji-regex
|
179
258
|
licenses:
|
180
259
|
- MIT
|
181
260
|
metadata:
|
182
|
-
homepage_uri: https://
|
183
|
-
source_code_uri: https://github.com/
|
184
|
-
changelog_uri: https://github.com/
|
185
|
-
bug_tracker_uri: https://github.com/
|
186
|
-
documentation_uri: https://www.rubydoc.info/gems/gitmoji-regex/1.0.
|
187
|
-
|
261
|
+
homepage_uri: https://gitmoji-regex.galtzo.com/
|
262
|
+
source_code_uri: https://github.com/galtzo-floss/gitmoji-regex/tree/v1.0.3
|
263
|
+
changelog_uri: https://github.com/galtzo-floss/gitmoji-regex/blob/v1.0.3/CHANGELOG.md
|
264
|
+
bug_tracker_uri: https://github.com/galtzo-floss/gitmoji-regex/issues
|
265
|
+
documentation_uri: https://www.rubydoc.info/gems/gitmoji-regex/1.0.3
|
266
|
+
funding_uri: https://github.com/sponsors/pboling
|
267
|
+
wiki_uri: https://github.com/galtzo-floss/gitmoji-regex/wiki
|
268
|
+
news_uri: https://www.railsbling.com/tags/gitmoji-regex
|
269
|
+
discord_uri: https://discord.gg/3qme4XHNKN
|
188
270
|
rubygems_mfa_required: 'true'
|
189
|
-
|
190
|
-
|
271
|
+
rdoc_options:
|
272
|
+
- "--title"
|
273
|
+
- "gitmoji-regex - \U0001F61C A regular expression for Gitmoji symbols"
|
274
|
+
- "--main"
|
275
|
+
- checksums/**/*.sha256
|
276
|
+
- checksums/**/*.sha512
|
277
|
+
- sig/**/*.rbs
|
278
|
+
- CHANGELOG.md
|
279
|
+
- CITATION.cff
|
280
|
+
- CODE_OF_CONDUCT.md
|
281
|
+
- CONTRIBUTING.md
|
282
|
+
- LICENSE.txt
|
283
|
+
- README.md
|
284
|
+
- REEK
|
285
|
+
- RUBOCOP.md
|
286
|
+
- SECURITY.md
|
287
|
+
- "--line-numbers"
|
288
|
+
- "--inline-source"
|
289
|
+
- "--quiet"
|
191
290
|
require_paths:
|
192
291
|
- lib
|
193
292
|
required_ruby_version: !ruby/object:Gem::Requirement
|
194
293
|
requirements:
|
195
294
|
- - ">="
|
196
295
|
- !ruby/object:Gem::Version
|
197
|
-
version: 2.
|
296
|
+
version: 2.3.0
|
198
297
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
298
|
requirements:
|
200
299
|
- - ">="
|
201
300
|
- !ruby/object:Gem::Version
|
202
301
|
version: '0'
|
203
302
|
requirements: []
|
204
|
-
rubygems_version: 3.
|
205
|
-
signing_key:
|
303
|
+
rubygems_version: 3.7.1
|
206
304
|
specification_version: 4
|
207
|
-
summary: A regular expression for Gitmoji symbols
|
208
|
-
test_files:
|
209
|
-
- spec/spec_helper.rb
|
210
|
-
- spec/config/rspec/rspec_core.rb
|
211
|
-
- spec/gitmoji/regex_spec.rb
|
212
|
-
- spec/gitmoji/regex/version_spec.rb
|
213
|
-
- spec/gitmoji/regex/reference_spec.rb
|
305
|
+
summary: "\U0001F61C A regular expression for Gitmoji symbols"
|
306
|
+
test_files: []
|
metadata.gz.sig
ADDED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RSpec.configure do |config|
|
4
|
-
# Enable flags like --only-failures and --next-failure
|
5
|
-
config.example_status_persistence_file_path = ".rspec_status"
|
6
|
-
|
7
|
-
# Disable RSpec exposing methods globally on `Module` and `main`
|
8
|
-
config.disable_monkey_patching!
|
9
|
-
|
10
|
-
config.expect_with :rspec do |c|
|
11
|
-
c.syntax = :expect
|
12
|
-
end
|
13
|
-
end
|
@@ -1,73 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RSpec.describe Gitmoji::Regex::Reference do
|
4
|
-
subject(:instance) { described_class.instance }
|
5
|
-
|
6
|
-
it "Cached reference has all gitmoji" do
|
7
|
-
expect(instance.to_a).to eq(["🎨", "⚡️", "🔥", "🐛", "🚑️", "✨", "📝", "🚀", "💄", "🎉", "✅",
|
8
|
-
"🔒️", "🔐", "🔖", "🚨", "🚧", "💚", "⬇️", "⬆️", "📌", "👷", "📈",
|
9
|
-
"♻️", "➕", "➖", "🔧", "🔨", "🌐", "✏️", "💩", "⏪️", "🔀", "📦️",
|
10
|
-
"👽️", "🚚", "📄", "💥", "🍱", "♿️", "💡", "🍻", "💬", "🗃️", "🔊",
|
11
|
-
"🔇", "👥", "🚸", "🏗️", "📱", "🤡", "🥚", "🙈", "📸", "⚗️", "🔍️",
|
12
|
-
"🏷️", "🌱", "🚩", "🥅", "💫", "🗑️", "🛂", "🩹", "🧐", "⚰️", "🧪",
|
13
|
-
"👔", "🩺", "🧱", "🧑💻", "💸"])
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "#compare_src" do
|
17
|
-
it "Cached source is current" do
|
18
|
-
expect(instance.compare_src).to be(true)
|
19
|
-
end
|
20
|
-
|
21
|
-
it "detects change" do
|
22
|
-
allow(File).to receive(:read).and_return("a", "b")
|
23
|
-
expect(instance.compare_src).to be(false)
|
24
|
-
end
|
25
|
-
|
26
|
-
it "reads files" do
|
27
|
-
allow(File).to receive(:read).and_return("a", "b")
|
28
|
-
instance.compare_src
|
29
|
-
expect(File).to have_received(:read).twice
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
it "Cached source is current" do
|
34
|
-
expect(instance.current_src).to eq(instance.next_src)
|
35
|
-
end
|
36
|
-
|
37
|
-
it "Cached pattern is current" do
|
38
|
-
expect(instance.cached_pattern).to eq(instance.fetched_pattern)
|
39
|
-
end
|
40
|
-
|
41
|
-
describe "#compare_json" do
|
42
|
-
it "Cached reference is current" do
|
43
|
-
expect(instance.compare_json).to be(true)
|
44
|
-
end
|
45
|
-
|
46
|
-
it "detects change" do
|
47
|
-
allow(Regexp).to receive(:union).and_return("a", "b")
|
48
|
-
expect(instance.compare_json).to be(false)
|
49
|
-
end
|
50
|
-
|
51
|
-
it "calls pattern" do
|
52
|
-
allow(Regexp).to receive(:union).and_return("a", "b")
|
53
|
-
instance.compare_json
|
54
|
-
expect(Regexp).to have_received(:union).twice
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
describe "#write_json" do
|
59
|
-
it "writes" do
|
60
|
-
allow(File).to receive(:write).with(described_class::GITMOJI_PATH, anything)
|
61
|
-
instance.write_json
|
62
|
-
expect(File).to have_received(:write)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
describe "#write_src" do
|
67
|
-
it "writes" do
|
68
|
-
allow(File).to receive(:write).with(described_class::LIB_SRC, anything)
|
69
|
-
instance.write_src
|
70
|
-
expect(File).to have_received(:write)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
data/spec/gitmoji/regex_spec.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RSpec.describe Gitmoji::Regex do
|
4
|
-
GITMOJI_REF.to_a.each do |gitmoji|
|
5
|
-
it "matches #{gitmoji}" do
|
6
|
-
expect(gitmoji).to match(Gitmoji::Regex::REGEX)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
describe "regex.rb source template" do
|
11
|
-
let(:template_file) { File.read(described_class::Reference::TEMPLATE_SRC) }
|
12
|
-
|
13
|
-
it "has the template token" do
|
14
|
-
expect(template_file).to include("REGEX = Regexp.new(\"% gitmojiRegex %\")")
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "version_gem/rspec"
|
4
|
-
|
5
|
-
DEBUG = ENV["DEBUG"] == "true"
|
6
|
-
|
7
|
-
ruby_version = Gem::Version.new(RUBY_VERSION)
|
8
|
-
minimum_version = ->(version, engine = "ruby") { ruby_version >= Gem::Version.new(version) && RUBY_ENGINE == engine }
|
9
|
-
actual_version = lambda do |major, minor|
|
10
|
-
actual = Gem::Version.new(ruby_version)
|
11
|
-
major == actual.segments[0] && minor == actual.segments[1] && RUBY_ENGINE == "ruby"
|
12
|
-
end
|
13
|
-
debugging = minimum_version.call("2.7") && DEBUG
|
14
|
-
RUN_COVERAGE = minimum_version.call("2.6") && (ENV["COVER_ALL"] || ENV["CI_CODECOV"] || ENV["CI"].nil?)
|
15
|
-
ALL_FORMATTERS = actual_version.call(2, 7) && (ENV["COVER_ALL"] || ENV["CI_CODECOV"] || ENV["CI"])
|
16
|
-
|
17
|
-
if DEBUG
|
18
|
-
if debugging
|
19
|
-
require "byebug"
|
20
|
-
elsif minimum_version.call("2.7", "jruby")
|
21
|
-
require "pry-debugger-jruby"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
if RUN_COVERAGE
|
26
|
-
require "simplecov" # Config file `.simplecov` is run immediately when simplecov loads
|
27
|
-
require "codecov"
|
28
|
-
require "simplecov-json"
|
29
|
-
require "simplecov-lcov"
|
30
|
-
require "simplecov-cobertura"
|
31
|
-
# This will override any formatter set in .simplecov
|
32
|
-
if ALL_FORMATTERS
|
33
|
-
SimpleCov::Formatter::LcovFormatter.config do |c|
|
34
|
-
c.report_with_single_file = true
|
35
|
-
c.single_report_path = "coverage/lcov.info"
|
36
|
-
end
|
37
|
-
|
38
|
-
SimpleCov.formatters = [
|
39
|
-
SimpleCov::Formatter::HTMLFormatter,
|
40
|
-
SimpleCov::Formatter::CoberturaFormatter, # XML for Jenkins
|
41
|
-
SimpleCov::Formatter::LcovFormatter,
|
42
|
-
SimpleCov::Formatter::JSONFormatter, # For CodeClimate
|
43
|
-
SimpleCov::Formatter::Codecov # For CodeCov
|
44
|
-
]
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# This gem
|
49
|
-
require "gitmoji/regex"
|
50
|
-
|
51
|
-
# Not required by default, as it is not part of the gem's API, primarily for specs and maintainers
|
52
|
-
require "gitmoji/regex/reference"
|
53
|
-
|
54
|
-
# RSpec Configs
|
55
|
-
require "config/rspec/rspec_core"
|
56
|
-
|
57
|
-
# Support Files
|
58
|
-
|
59
|
-
GITMOJI_REF = Gitmoji::Regex::Reference.instance
|