sass-embedded 1.0.11 → 1.0.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d318fa0952fa78467c15820ace20f0039861c56d12abeb6d6c688bc5f36419c7
4
- data.tar.gz: c2866e5cf66c8fe099ca74d1d460477eab2965a1ee4472ad071d72e6f1df9690
3
+ metadata.gz: 1109d7b4c427f498db236fbca59c500d7ae5ff07344fb7a93d9a76d16015beca
4
+ data.tar.gz: 2a668742ded01d8e3d729731384cb93b62f68dcbe2d73cfe2f76a27cf3b50905
5
5
  SHA512:
6
- metadata.gz: 7ebaa98754f41f8286317a699face10c42f0010eae314538f408008ad4b3902ccb3747753c6c38793f88dc8552c6d4ff8c4d2fa70e73cc162ee2279ee274c4a6
7
- data.tar.gz: ec358cc8d2a91764a48bd3516914ff0471929e0cc9f84f239fda19bb24313b30878c7170b819cf4b1c7a631ab53353fbe061da42ecf39c064d855cc778c96700
6
+ metadata.gz: e76783bc4ba9b203c5ed2013b219579a69c3c49b656e987e1c99473d69ea955545066ef839b33593b9550be1122b0491225e355d2ef71a3edad2dacb325bdf38
7
+ data.tar.gz: c7f1c6d9cb633546c387de50bc214f82ba756eff9c98a234a251dc6e69222c113161300229fcf02493769cb097bc605efe4a236cdc5396012c05bf5e0d17e7bf
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.include?('.tar.') || name.end_with?('.tar') }
42
+ mkdir_p dest
43
+ sh 'tar', '-vxC', dest, '-f', archive
44
+ when ->(name) { name.end_with?('.zip') }
45
+ if Gem.win_platform?
46
+ sh 'powershell', '-File', 'unzip.ps1', '-Archive', archive, '-DestinationPath', dest
47
+ else
48
+ sh 'unzip', '-od', dest, archive
49
+ end
46
50
  else
47
- sh 'unzip', '-od', dest, archive
51
+ raise "Unknown archive format #{archive}"
48
52
  end
49
53
  end
50
54
 
@@ -88,49 +92,26 @@ end
88
92
  module Configuration
89
93
  module Platform
90
94
  OS = case RbConfig::CONFIG['host_os'].downcase
91
- when /linux/
92
- 'linux'
93
95
  when /darwin/
94
96
  'darwin'
95
- when /freebsd/
96
- 'freebsd'
97
- when /netbsd/
98
- 'netbsd'
99
- when /openbsd/
100
- 'openbsd'
101
- when /dragonfly/
102
- 'dragonflybsd'
103
- when /sunos|solaris/
104
- 'solaris'
97
+ when /linux/
98
+ 'linux'
105
99
  when *Gem::WIN_PATTERNS
106
100
  'windows'
107
101
  else
108
102
  RbConfig::CONFIG['host_os'].downcase
109
103
  end
110
104
 
111
- OSVERSION = RbConfig::CONFIG['host_os'].gsub(/[^\d]/, '').to_i
112
-
113
- CPU = RbConfig::CONFIG['host_cpu']
114
-
115
- ARCH = case CPU.downcase
105
+ ARCH = case RbConfig::CONFIG['host_cpu'].downcase
116
106
  when /amd64|x86_64|x64/
117
107
  'x86_64'
118
108
  when /i\d86|x86|i86pc/
119
109
  'i386'
120
- when /ppc64|powerpc64/
121
- 'powerpc64'
122
- when /ppc|powerpc/
123
- 'powerpc'
124
- when /sparcv9|sparc64/
125
- 'sparcv9'
126
- when /arm64|aarch64/ # MacOS calls it "arm64", other operating systems "aarch64"
110
+ when /arm64|aarch64/
127
111
  'aarch64'
128
112
  when /^arm/
129
- if OS == 'darwin' # Ruby before 3.0 reports "arm" instead of "arm64" as host_cpu on darwin
130
- 'aarch64'
131
- else
132
- 'arm'
133
- end
113
+ # Ruby before 3.0 reports "arm" instead of "arm64" as host_cpu on darwin
114
+ OS == 'darwin' ? 'aarch64' : 'arm'
134
115
  else
135
116
  RbConfig::CONFIG['host_cpu']
136
117
  end
@@ -197,16 +178,12 @@ module Configuration
197
178
  end
198
179
 
199
180
  arch = case Platform::ARCH
200
- when 'aarch64'
201
- Platform::OS == 'darwin' ? 'x86_64' : 'aarch_64'
202
- when 'sparcv9'
203
- 's390'
204
- when 'i386'
205
- 'x86_32'
206
181
  when 'x86_64'
207
182
  'x86_64'
208
- when 'powerpc64'
209
- 'ppcle_64'
183
+ when 'i386'
184
+ 'x86_32'
185
+ when 'aarch64'
186
+ Platform::OS == 'darwin' ? 'x86_64' : 'aarch_64'
210
187
  else
211
188
  raise release_asset_not_available_error(repo, tag_name)
212
189
  end
data/ext/sass/unzip.ps1 CHANGED
@@ -1,13 +1,13 @@
1
1
  Param(
2
- [Parameter(Mandatory)]
2
+ [Parameter(Mandatory=$true)]
3
3
  [ValidateNotNullOrEmpty()]
4
4
  [string]$Archive,
5
- [Parameter(Mandatory)]
5
+ [Parameter(Mandatory=$true)]
6
6
  [ValidateNotNullOrEmpty()]
7
7
  [string]$DestinationPath
8
8
  )
9
9
  if (Get-Command Expand-Archive -ErrorAction SilentlyContinue) {
10
10
  Get-Item $Archive | Expand-Archive -DestinationPath $DestinationPath -Force
11
11
  } else {
12
- cscript.exe unzip.vbs $Archive $DestinationPath
12
+ cscript unzip.vbs $Archive $DestinationPath
13
13
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '1.0.11'
5
+ VERSION = '1.0.14'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-06 00:00:00.000000000 Z
11
+ date: 2022-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 12.0.0
33
+ version: 12.3.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: 12.0.0
40
+ version: 12.3.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -114,13 +114,12 @@ email:
114
114
  - i@ntk.me
115
115
  executables: []
116
116
  extensions:
117
- - ext/sass/mkrf_conf.rb
117
+ - ext/sass/Rakefile
118
118
  extra_rdoc_files: []
119
119
  files:
120
120
  - LICENSE
121
121
  - README.md
122
122
  - ext/sass/Rakefile
123
- - ext/sass/mkrf_conf.rb
124
123
  - ext/sass/package.json
125
124
  - ext/sass/unzip.ps1
126
125
  - ext/sass/unzip.vbs
@@ -163,8 +162,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
163
162
  licenses:
164
163
  - MIT
165
164
  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
165
+ documentation_uri: https://www.rubydoc.info/gems/sass-embedded/1.0.14
166
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.14
168
167
  funding_uri: https://github.com/sponsors/ntkme
169
168
  post_install_message:
170
169
  rdoc_options: []
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true