middleman-automatic-clowncar 4.0.1 → 4.0.3

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: 7d1c5387f4d2ee33f8a4795a178278d3c64f7ba3db81fbb061a468a6b7fc264d
4
- data.tar.gz: 4e767881922623cadde291bd6118a09a9f8d1de486721a8e286734601470febe
3
+ metadata.gz: 6cb5f4a1d2d056c1cbb78aeaa7e7664cda1ccf635d2e59f3f212cd3a86120292
4
+ data.tar.gz: 64efd1a0055266e1b1088168549cff7235012bba8cccfbcc98ff55c476ef36b5
5
5
  SHA512:
6
- metadata.gz: bb9c10cc06567764fe4dbf77640d24467bb05fec9e7c5040bffbeb6582ef65ea56c4dafb90ea065a469f88a1b9ee9faabcb7607a32e3f1ba01692792a26be469
7
- data.tar.gz: 10434cb75830dae162ce46a178aba5c9ee9781cf59545f3ba645142ee82339c1a65f4f79ab9a7e091ee100b45da051564bde5684307a1b8459fc8f2eb6cd814c
6
+ metadata.gz: 39a2c5954571df7fe5bd6cdefb17310ce5e89f10ee7433b47baa134b186820c77deb21d292719fde649536a9549de78182a2dfedcd2b74108325dc8222f280ca
7
+ data.tar.gz: 8f0d69e6ec729802644bbbfbb4a31ad48c6fc23e13221a6afef149171fe4b0c225969b6f69a4e18a32117c251bff088d47ec347458ed80889b319760912e4287
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 2.7.7
@@ -191,6 +191,26 @@ module Middleman
191
191
 
192
192
 
193
193
  helpers do
194
+ def automatic_clowncar_sizes
195
+ Extension.options_hash[:sizes]
196
+ end
197
+
198
+ def automatic_clowncar_escape(str)
199
+ alpha = "a-zA-Z"
200
+ alnum = "#{alpha}\\d"
201
+ unreserved = "\\-_.!~*'()#{alnum}"
202
+ reserved = ";/?:@&=+$,\\[\\]"
203
+ unsafe = Regexp.new("[^#{unreserved}#{reserved}]")
204
+ str.gsub(unsafe) do
205
+ us = $&
206
+ tmp = ''
207
+ us.each_byte do |uc|
208
+ tmp << sprintf('%%%02X', uc)
209
+ end
210
+ tmp
211
+ end.force_encoding(Encoding::US_ASCII)
212
+ end
213
+
194
214
  def automatic_clowncar_tag(name, options={})
195
215
  internal = ""
196
216
 
@@ -216,7 +236,9 @@ module Middleman
216
236
  %Q{<object type="image/svg+xml" style="#{object_style}" data-aspect-ratio="#{width.to_f/height.to_f}" data="#{url}">#{internal}</object>}
217
237
  else
218
238
  data = extensions[:automatic_clowncar].generate_svg(name, true, options)
219
- %Q{<object type="image/svg+xml" style="#{object_style}" data-aspect-ratio="#{width.to_f/height.to_f}" data="data:image/svg+xml,#{::URI.escape(data)}">#{internal}</object>}
239
+ puts "data ==============="
240
+ puts data
241
+ %Q{<object type="image/svg+xml" style="#{object_style}" data-aspect-ratio="#{width.to_f/height.to_f}" data="data:image/svg+xml,#{automatic_clowncar_escape(data)}">#{internal}</object>}
220
242
  end
221
243
  end
222
244
 
@@ -1,3 +1,3 @@
1
1
  module MiddlemanAutomaticClowncar
2
- VERSION = "4.0.1"
2
+ VERSION = "4.0.3"
3
3
  end
@@ -18,20 +18,20 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "middleman-core", "~> 4.3.0"
21
+ spec.add_dependency "middleman-core", "> 4.3.0"
22
22
 
23
- spec.add_dependency("mini_magick", ["~> 3.7.0"])
23
+ spec.add_dependency("mini_magick", ["~> 4.0"])
24
24
  spec.add_dependency "fastimage", "~> 2.0"
25
25
 
26
26
  # These are here to make sure that we don't have any collisions with sprockets
27
27
  spec.add_dependency "middleman-sprockets", "~> 4.1.0"
28
28
  #spec.add_dependency "sass", "~> 3.4.0"
29
29
 
30
- spec.add_development_dependency "middleman", "~> 4.3.0"
31
- spec.add_development_dependency "bundler", "~> 1.5"
30
+ spec.add_development_dependency "middleman", "~> 4.4.0"
31
+ spec.add_development_dependency "bundler", "~> 2.0"
32
32
  spec.add_development_dependency "rake"
33
33
  spec.add_development_dependency "capybara", "~> 2.5.0"
34
- spec.add_development_dependency "cucumber", "~> 2.0"
34
+ spec.add_development_dependency "cucumber", "~> 6.0"
35
35
  spec.add_development_dependency "aruba", "~> 0.14.0"
36
36
  spec.add_development_dependency "byebug"
37
37
  #spec.add_development_dependency "simplecov", "~> 0.8.2"
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-automatic-clowncar
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-09 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.3.0
27
27
  - !ruby/object:Gem::Dependency
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.7.0
33
+ version: '4.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.7.0
40
+ version: '4.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: fastimage
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 4.3.0
75
+ version: 4.4.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 4.3.0
82
+ version: 4.4.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.5'
89
+ version: '2.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.5'
96
+ version: '2.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '2.0'
131
+ version: '6.0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '2.0'
138
+ version: '6.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: aruba
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -173,6 +173,7 @@ extra_rdoc_files: []
173
173
  files:
174
174
  - ".gitignore"
175
175
  - ".ruby-version"
176
+ - ".tool-versions"
176
177
  - ".travis.yml"
177
178
  - Gemfile
178
179
  - LICENSE.txt
@@ -204,7 +205,7 @@ homepage: ''
204
205
  licenses:
205
206
  - MIT
206
207
  metadata: {}
207
- post_install_message:
208
+ post_install_message:
208
209
  rdoc_options: []
209
210
  require_paths:
210
211
  - lib
@@ -219,8 +220,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
220
  - !ruby/object:Gem::Version
220
221
  version: '0'
221
222
  requirements: []
222
- rubygems_version: 3.0.1
223
- signing_key:
223
+ rubygems_version: 3.1.6
224
+ signing_key:
224
225
  specification_version: 4
225
226
  summary: Automatically generated responsive images for middleman.
226
227
  test_files: