sass-embedded 0.13.4 → 0.14.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: 891f4a0e1dbda14a01b411167cc6c9e6e0a73bd42b4a5ac903335619da08f95e
4
- data.tar.gz: 97371b93430f4232eb68d9e5e1b4d15b9f75246ed530935e525160d383f5ec88
3
+ metadata.gz: 1c998b528ffddfc218f32dbefa09559dbdf519cf8a430f8dc9a58d4cae8a7b2a
4
+ data.tar.gz: 84bb150040b3e01d68b7673f00ab08041deb98e357cb653a01ca99e40569f553
5
5
  SHA512:
6
- metadata.gz: 0c4aabe5670786260198093754baaf57a4142894829a2242af0db4268394794b302fce042050e396f3dc495be1036a5df29cf73e47ea1dd661236f3d55692db6
7
- data.tar.gz: 87ebbf21f8c9c87c662b0eca0010d008ec62aab94653059cbc64af607737544413154c3b88133c63c4eec11e15e4175fb05844d3371de44b966aa7382c5a52c4
6
+ metadata.gz: cb4dd021d2dfd85b652dcf88c523e106c84a8ebcfa8e158c02f5a8b43aa4fc852b506dd39b33cf83766253be59bb084b7612a49165883eca4062c9c17b5f1a25
7
+ data.tar.gz: d804392b2bc53fccba57c2d68c86f9118ffe80c24c854cea62b462738185634d59af4e41fc8ea86fabe0db120e16133d15bb3f2822ad3064c1c4e7c467796871
data/ext/sass/extconf.rb CHANGED
@@ -7,10 +7,61 @@ require 'mkmf'
7
7
  require 'open-uri'
8
8
  require_relative '../../lib/sass/embedded/compiler/path'
9
9
  require_relative '../../lib/sass/embedded/compiler/requirements'
10
- require_relative '../../lib/sass/embedded/platform'
11
10
 
12
11
  module Sass
13
12
  class Embedded
13
+ module Platform
14
+ OS = case RbConfig::CONFIG['host_os'].downcase
15
+ when /linux/
16
+ 'linux'
17
+ when /darwin/
18
+ 'darwin'
19
+ when /freebsd/
20
+ 'freebsd'
21
+ when /netbsd/
22
+ 'netbsd'
23
+ when /openbsd/
24
+ 'openbsd'
25
+ when /dragonfly/
26
+ 'dragonflybsd'
27
+ when /sunos|solaris/
28
+ 'solaris'
29
+ when *Gem::WIN_PATTERNS
30
+ 'windows'
31
+ else
32
+ RbConfig::CONFIG['host_os'].downcase
33
+ end
34
+
35
+ OSVERSION = RbConfig::CONFIG['host_os'].gsub(/[^\d]/, '').to_i
36
+
37
+ CPU = RbConfig::CONFIG['host_cpu']
38
+
39
+ ARCH = case CPU.downcase
40
+ when /amd64|x86_64|x64/
41
+ 'x86_64'
42
+ when /i\d86|x86|i86pc/
43
+ 'i386'
44
+ when /ppc64|powerpc64/
45
+ 'powerpc64'
46
+ when /ppc|powerpc/
47
+ 'powerpc'
48
+ when /sparcv9|sparc64/
49
+ 'sparcv9'
50
+ when /arm64|aarch64/ # MacOS calls it "arm64", other operating systems "aarch64"
51
+ 'aarch64'
52
+ when /^arm/
53
+ if OS == 'darwin' # Ruby before 3.0 reports "arm" instead of "arm64" as host_cpu on darwin
54
+ 'aarch64'
55
+ else
56
+ 'arm'
57
+ end
58
+ else
59
+ RbConfig::CONFIG['host_cpu']
60
+ end
61
+ end
62
+
63
+ private_constant :Platform
64
+
14
65
  # The dependency downloader. This downloads all the dependencies during gem
15
66
  # installation. The companion Makefile then unpacks all downloaded
16
67
  # dependencies. By default it downloads the release of each dependency
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../platform'
4
-
5
3
  module Sass
6
4
  class Embedded
7
5
  class Compiler
8
6
  PATH = File.absolute_path(
9
- "../../../../ext/sass/sass_embedded/dart-sass-embedded#{Platform::OS == 'windows' ? '.bat' : ''}", __dir__
7
+ "../../../../ext/sass/sass_embedded/dart-sass-embedded#{Gem.win_platform? ? '.bat' : ''}", __dir__
10
8
  )
11
9
  end
12
10
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'uri'
4
- require_relative 'platform'
5
4
 
6
5
  module Sass
7
6
  class Embedded
@@ -18,7 +17,7 @@ module Sass
18
17
 
19
18
  def path_to_file_url(path)
20
19
  if File.absolute_path? path
21
- URI_PARSER.escape "#{FILE_SCHEME}#{Platform::OS == 'windows' ? File::SEPARATOR : ''}#{path}"
20
+ URI_PARSER.escape "#{FILE_SCHEME}#{Gem.win_platform? ? File::SEPARATOR : ''}#{path}"
22
21
  else
23
22
  URI_PARSER.escape path
24
23
  end
@@ -26,7 +25,7 @@ module Sass
26
25
 
27
26
  def file_url_to_path(url)
28
27
  if url.start_with? FILE_SCHEME
29
- URI_PARSER.unescape url[(FILE_SCHEME.length + (Platform::OS == 'windows' ? 1 : 0))..]
28
+ URI_PARSER.unescape url[(FILE_SCHEME.length + (Gem.win_platform? ? 1 : 0))..]
30
29
  else
31
30
  URI_PARSER.unescape url
32
31
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '0.13.4'
5
+ VERSION = '0.14.0'
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: 0.13.4
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -175,7 +175,6 @@ files:
175
175
  - lib/sass/embedded/compiler/path.rb
176
176
  - lib/sass/embedded/compiler/requirements.rb
177
177
  - lib/sass/embedded/observer.rb
178
- - lib/sass/embedded/platform.rb
179
178
  - lib/sass/embedded/protocol_error.rb
180
179
  - lib/sass/embedded/render.rb
181
180
  - lib/sass/embedded/url.rb
@@ -192,8 +191,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
192
191
  licenses:
193
192
  - MIT
194
193
  metadata:
195
- documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.13.4
196
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.13.4
194
+ documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.14.0
195
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.14.0
197
196
  funding_uri: https://github.com/sponsors/ntkme
198
197
  post_install_message:
199
198
  rdoc_options: []
@@ -1,55 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Sass
4
- class Embedded
5
- module Platform
6
- OS = case RbConfig::CONFIG['host_os'].downcase
7
- when /linux/
8
- 'linux'
9
- when /darwin/
10
- 'darwin'
11
- when /freebsd/
12
- 'freebsd'
13
- when /netbsd/
14
- 'netbsd'
15
- when /openbsd/
16
- 'openbsd'
17
- when /dragonfly/
18
- 'dragonflybsd'
19
- when /sunos|solaris/
20
- 'solaris'
21
- when /mingw|mswin/
22
- 'windows'
23
- else
24
- RbConfig::CONFIG['host_os'].downcase
25
- end
26
-
27
- OSVERSION = RbConfig::CONFIG['host_os'].gsub(/[^\d]/, '').to_i
28
-
29
- CPU = RbConfig::CONFIG['host_cpu']
30
-
31
- ARCH = case CPU.downcase
32
- when /amd64|x86_64|x64/
33
- 'x86_64'
34
- when /i\d86|x86|i86pc/
35
- 'i386'
36
- when /ppc64|powerpc64/
37
- 'powerpc64'
38
- when /ppc|powerpc/
39
- 'powerpc'
40
- when /sparcv9|sparc64/
41
- 'sparcv9'
42
- when /arm64|aarch64/ # MacOS calls it "arm64", other operating systems "aarch64"
43
- 'aarch64'
44
- when /^arm/
45
- if OS == 'darwin' # Ruby before 3.0 reports "arm" instead of "arm64" as host_cpu on darwin
46
- 'aarch64'
47
- else
48
- 'arm'
49
- end
50
- else
51
- RbConfig::CONFIG['host_cpu']
52
- end
53
- end
54
- end
55
- end