tocer 10.3.0 → 10.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 702ac25e3c36e2654a136716b15816e1d39a3c4f1944517ed4ed7afb504e30f1
4
- data.tar.gz: d2936b0b62ff42c55c1ea5cace729cfd0a0ad5b99418f8728aced4bb8363089e
3
+ metadata.gz: f502b2c16f1de6f7fa1bfb7a14a121d4c6813a4377e4d8d39ff3148a1fb9c51d
4
+ data.tar.gz: a158d9b183195ddc25c8aabac843cd0c40736a72dc269c1091db1b982bb308f3
5
5
  SHA512:
6
- metadata.gz: ca420835d280ba64806ba8de40654cd4f2477af41f4379ed6810390deced91e95ef8c9e9b7b88a0e0dc59d196365d7997317217379e9da655dd49e886068e441
7
- data.tar.gz: cd764af24b2c91e92dc0f8862160bc45210efbc66243c7b71504bf14b468eb5f9368aa6b6cd5aac6c2ce0a75e06d9461c1e75aa5e4eec2addacef9a7ef0d28d9
6
+ metadata.gz: f40354ec43eadb99aaad94d6155071c2ef15fc13598e23ba39ca082659aaffa9881ee731bde4878d2a4a027f9a056f1a1fbccdadc67b959b9c05710e0bf8d4d4
7
+ data.tar.gz: e59e9975bb17627a41fd8d2e6c7e1f99d0d1e5cb2d5a4172249afa09fe49d0771836aa70af88d9e81d8a82900a3876819d68a7e8cfaa3d9fedfc296deadcb31e
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -6,6 +6,8 @@
6
6
 
7
7
  [link=http://badge.fury.io/rb/tocer]
8
8
  image::https://badge.fury.io/rb/tocer.svg[Gem Version]
9
+ [link=https://www.alchemists.io/projects/code_quality]
10
+ image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
9
11
  [link=https://circleci.com/gh/bkuhlmann/tocer]
10
12
  image::https://circleci.com/gh/bkuhlmann/tocer.svg?style=svg[Circle CI Status]
11
13
 
@@ -52,7 +52,7 @@ module Tocer
52
52
  end
53
53
 
54
54
  def transform markdown
55
- Transformers::Finder.call(markdown).then do |transformer|
55
+ Transformers::Finder.new.call(markdown).then do |transformer|
56
56
  url = transformer.url
57
57
  link = transformer.call url_suffix: url_suffix(url)
58
58
  url_count[url] += 1
@@ -5,7 +5,7 @@ module Tocer
5
5
  module Identity
6
6
  NAME = "tocer"
7
7
  LABEL = "Tocer"
8
- VERSION = "10.3.0"
8
+ VERSION = "10.4.0"
9
9
  VERSION_LABEL = "#{LABEL} #{VERSION}"
10
10
  end
11
11
  end
@@ -9,10 +9,18 @@ module Tocer
9
9
  /.*/ => Transformers::Text
10
10
  }.freeze
11
11
 
12
- def self.call markdown
13
- TRANSFORMERS.find { |pattern, transformer| break transformer if pattern.match? markdown }
12
+ def initialize transformers: TRANSFORMERS
13
+ @transformers = transformers
14
+ end
15
+
16
+ def call markdown
17
+ transformers.find { |pattern, transformer| break transformer if pattern.match? markdown }
14
18
  .then { |transformer| transformer.new markdown }
15
19
  end
20
+
21
+ private
22
+
23
+ attr_reader :transformers
16
24
  end
17
25
  end
18
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tocer
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.3.0
4
+ version: 10.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
29
29
  QWc=
30
30
  -----END CERTIFICATE-----
31
- date: 2020-10-18 00:00:00.000000000 Z
31
+ date: 2020-11-14 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: refinements
@@ -36,28 +36,28 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '7.11'
39
+ version: '7.14'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '7.11'
46
+ version: '7.14'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: runcom
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '6.0'
53
+ version: '6.4'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '6.0'
60
+ version: '6.4'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: thor
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -78,56 +78,42 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.6'
81
+ version: '0.7'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.6'
88
+ version: '0.7'
89
89
  - !ruby/object:Gem::Dependency
90
- name: climate_control
90
+ name: bundler-leak
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0.1'
95
+ version: '0.2'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '0.1'
102
+ version: '0.2'
103
103
  - !ruby/object:Gem::Dependency
104
- name: gemsmith
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '14.2'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '14.2'
117
- - !ruby/object:Gem::Dependency
118
- name: git-lint
104
+ name: climate_control
119
105
  requirement: !ruby/object:Gem::Requirement
120
106
  requirements:
121
107
  - - "~>"
122
108
  - !ruby/object:Gem::Version
123
- version: '1.0'
109
+ version: '0.1'
124
110
  type: :development
125
111
  prerelease: false
126
112
  version_requirements: !ruby/object:Gem::Requirement
127
113
  requirements:
128
114
  - - "~>"
129
115
  - !ruby/object:Gem::Version
130
- version: '1.0'
116
+ version: '0.1'
131
117
  - !ruby/object:Gem::Dependency
132
118
  name: guard-rspec
133
119
  requirement: !ruby/object:Gem::Requirement
@@ -204,42 +190,42 @@ dependencies:
204
190
  requirements:
205
191
  - - "~>"
206
192
  - !ruby/object:Gem::Version
207
- version: '3.9'
193
+ version: '3.10'
208
194
  type: :development
209
195
  prerelease: false
210
196
  version_requirements: !ruby/object:Gem::Requirement
211
197
  requirements:
212
198
  - - "~>"
213
199
  - !ruby/object:Gem::Version
214
- version: '3.9'
200
+ version: '3.10'
215
201
  - !ruby/object:Gem::Dependency
216
202
  name: rubocop
217
203
  requirement: !ruby/object:Gem::Requirement
218
204
  requirements:
219
205
  - - "~>"
220
206
  - !ruby/object:Gem::Version
221
- version: '0.89'
207
+ version: '1.3'
222
208
  type: :development
223
209
  prerelease: false
224
210
  version_requirements: !ruby/object:Gem::Requirement
225
211
  requirements:
226
212
  - - "~>"
227
213
  - !ruby/object:Gem::Version
228
- version: '0.89'
214
+ version: '1.3'
229
215
  - !ruby/object:Gem::Dependency
230
216
  name: rubocop-performance
231
217
  requirement: !ruby/object:Gem::Requirement
232
218
  requirements:
233
219
  - - "~>"
234
220
  - !ruby/object:Gem::Version
235
- version: '1.5'
221
+ version: '1.8'
236
222
  type: :development
237
223
  prerelease: false
238
224
  version_requirements: !ruby/object:Gem::Requirement
239
225
  requirements:
240
226
  - - "~>"
241
227
  - !ruby/object:Gem::Version
242
- version: '1.5'
228
+ version: '1.8'
243
229
  - !ruby/object:Gem::Dependency
244
230
  name: rubocop-rake
245
231
  requirement: !ruby/object:Gem::Requirement
@@ -260,14 +246,14 @@ dependencies:
260
246
  requirements:
261
247
  - - "~>"
262
248
  - !ruby/object:Gem::Version
263
- version: '1.39'
249
+ version: '2.0'
264
250
  type: :development
265
251
  prerelease: false
266
252
  version_requirements: !ruby/object:Gem::Requirement
267
253
  requirements:
268
254
  - - "~>"
269
255
  - !ruby/object:Gem::Version
270
- version: '1.39'
256
+ version: '2.0'
271
257
  - !ruby/object:Gem::Dependency
272
258
  name: simplecov
273
259
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file