sass-embedded 1.0.11 → 1.0.12

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: d318fa0952fa78467c15820ace20f0039861c56d12abeb6d6c688bc5f36419c7
4
- data.tar.gz: c2866e5cf66c8fe099ca74d1d460477eab2965a1ee4472ad071d72e6f1df9690
3
+ metadata.gz: e9631b1ae92e967b99d074cfdfbc76008205a5d42fef2b8ec836ebf1fe66945a
4
+ data.tar.gz: f35fc2c63c00668ceaecab94fd78c59f0a567f2a5874994238552a2a8b63e255
5
5
  SHA512:
6
- metadata.gz: 7ebaa98754f41f8286317a699face10c42f0010eae314538f408008ad4b3902ccb3747753c6c38793f88dc8552c6d4ff8c4d2fa70e73cc162ee2279ee274c4a6
7
- data.tar.gz: ec358cc8d2a91764a48bd3516914ff0471929e0cc9f84f239fda19bb24313b30878c7170b819cf4b1c7a631ab53353fbe061da42ecf39c064d855cc778c96700
6
+ metadata.gz: 321eb0134d230e98c852bdbcdbcbb36298f28243791d500f84559491114699ff26e370d5df1e101579d7cf0b307bc6135c4711bdf082dee35508078e5b62c380
7
+ data.tar.gz: 338ac5d737a69066c7b1cc8000e11c6697891138f8810bde32e50990025173739c92d519b164649446b94ef0e44fef2d62c1c3d5d5b6ba60c1e4e62e5770b2e5
data/ext/sass/Rakefile CHANGED
@@ -15,17 +15,13 @@ CLOBBER.include %w[sass_embedded embedded_sass_pb.rb]
15
15
 
16
16
  file 'protoc' do |t|
17
17
  archive = fetch(ENV.fetch(t.name.upcase) { Configuration.default_protoc })
18
- unzip archive, t.name
18
+ unarchive archive, t.name
19
19
  rm archive
20
20
  end
21
21
 
22
22
  file 'sass_embedded' do |t|
23
23
  archive = fetch(ENV.fetch(t.name.upcase) { Configuration.default_sass_embedded })
24
- if Gem.win_platform?
25
- unzip archive
26
- else
27
- sh 'tar', '-vxzf', archive
28
- end
24
+ unarchive archive
29
25
  rm archive
30
26
  end
31
27
 
@@ -40,11 +36,19 @@ end
40
36
  # This is a FileUtils extension that defines several additional commands to be
41
37
  # added to the FileUtils utility functions.
42
38
  module FileUtils
43
- def unzip(archive, dest = '.')
44
- if Gem.win_platform?
45
- sh 'powershell', '-File', 'unzip.ps1', '-Archive', archive, '-DestinationPath', dest
39
+ def unarchive(archive, dest = '.')
40
+ case archive.downcase
41
+ when ->(name) { name.end_with? '.zip' }
42
+ if Gem.win_platform?
43
+ sh 'powershell', '-File', 'unzip.ps1', '-Archive', archive, '-DestinationPath', dest
44
+ else
45
+ sh 'unzip', '-od', dest, archive
46
+ end
47
+ when ->(name) { name.end_with? '.tar.gz' }
48
+ mkdir_p dest
49
+ sh 'tar', '-vxzC', dest, '-f', archive
46
50
  else
47
- sh 'unzip', '-od', dest, archive
51
+ raise "Unknown archive format #{archive}"
48
52
  end
49
53
  end
50
54
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '1.0.11'
5
+ VERSION = '1.0.12'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
@@ -163,8 +163,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
163
163
  licenses:
164
164
  - MIT
165
165
  metadata:
166
- documentation_uri: https://www.rubydoc.info/gems/sass-embedded/1.0.11
167
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.11
166
+ documentation_uri: https://www.rubydoc.info/gems/sass-embedded/1.0.12
167
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.12
168
168
  funding_uri: https://github.com/sponsors/ntkme
169
169
  post_install_message:
170
170
  rdoc_options: []