sass-embedded 1.0.3 → 1.0.4

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: 62088f9ce8ff61f56c3191f1d7f941779f92583975db9b763a88f99c0255e8e3
4
- data.tar.gz: 3db4302a699a5b014b271f809a9e3f32e94ae5c841ff114bc2d37bcff1563d43
3
+ metadata.gz: 5c43ad7fb335b99c12bdc65c8a37af7a239a737f4c8655590ce35ea6be51ca3d
4
+ data.tar.gz: cbc99b11c3330928a9582cb8befba681fd49db77868e0acdbadde4c7ba14a6ec
5
5
  SHA512:
6
- metadata.gz: b1eb7486f98a12739ce4b9f19cacc3a13b96e005c6a5cf74053baad538375f5d2c3180a85cfa5b7b264ffda1c8e89ec72ae9f83fc3701ea114ffcdbedf59e3a8
7
- data.tar.gz: 47d6f81a0617b759b9ca605ee645245197d9ff5e05da6a6ecce93c13fce8d77cd9e8f7c68f61a2da85f6b0e9ca2fd96a6527d842bf9be88bf62ac83e792ef693
6
+ metadata.gz: a77c23cd962c9936b9474f9ea0402095b2c65d0e4fca6bc848364d17211f37947e87ccfdf0db3dfff14477bcf6d3a2dadbf1dcc6ed127b6c1424e33b80cb3920
7
+ data.tar.gz: 64bb51ebf0b1d6dadd39ceb73be714ed1090478dcafa43a34a465032a189a3ac6389aa035d3d0420cd9a243f2b2164d1e9e4b122d5e7f67c8bdd877b455aa1f1
data/ext/sass/Makefile CHANGED
@@ -9,14 +9,14 @@ EXTCONF = ruby -- extconf.rb
9
9
  all: embedded_sass_pb.rb sass_embedded
10
10
 
11
11
  .PHONY: install
12
- install: clean
13
-
14
- .PHONY: uninstall
15
- uninstall:
16
- $(RM) embedded_sass_pb.rb sass_embedded
12
+ install: distclean
17
13
 
18
14
  .PHONY: clean
19
15
  clean:
16
+ $(RM) embedded_sass_pb.rb sass_embedded
17
+
18
+ .PHONY: distclean
19
+ distclean:
20
20
  $(RM) embedded_sass.proto protoc protoc-* sass_embedded-*
21
21
 
22
22
  ifeq ($(OS),Windows_NT)
data/ext/sass/extconf.rb CHANGED
@@ -104,14 +104,24 @@ module Sass
104
104
  end
105
105
  end
106
106
 
107
- def fetch(uri_s)
108
- uri = URI.parse(uri_s)
109
- path = URI::DEFAULT_PARSER.unescape(uri.path)
107
+ def fetch(uri_or_path)
108
+ begin
109
+ uri = URI.parse(uri_or_path)
110
+ path = URI::DEFAULT_PARSER.unescape(uri.path)
111
+ raise if uri.instance_of?(URI::Generic) && !File.file?(path)
112
+ rescue StandardError
113
+ raise unless File.file?(uri_or_path)
114
+
115
+ uri = nil
116
+ path = uri_or_path
117
+ end
118
+
110
119
  dest = File.absolute_path(File.basename(path), __dir__)
111
- if uri.is_a?(URI::File) || uri.instance_of?(URI::Generic)
120
+
121
+ if uri.nil? || uri.is_a?(URI::File) || uri.instance_of?(URI::Generic)
112
122
  puts "cp -- #{path} #{dest}"
113
123
  FileUtils.copy_file(path, dest)
114
- elsif uri.respond_to? :open
124
+ elsif uri.respond_to?(:open)
115
125
  puts "curl -fsSLo #{dest} -- #{uri}"
116
126
  uri.open do |stream|
117
127
  File.binwrite(dest, stream.read)
@@ -120,7 +130,7 @@ module Sass
120
130
  raise
121
131
  end
122
132
  rescue StandardError
123
- raise "Failed to fetch #{uri_s}"
133
+ raise "Failed to fetch #{uri_or_path}"
124
134
  end
125
135
 
126
136
  def default_sass_embedded
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '1.0.3'
5
+ VERSION = '1.0.4'
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.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-27 00:00:00.000000000 Z
11
+ date: 2022-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -162,8 +162,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
162
162
  licenses:
163
163
  - MIT
164
164
  metadata:
165
- documentation_uri: https://www.rubydoc.info/gems/sass-embedded/1.0.3
166
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.3
165
+ documentation_uri: https://www.rubydoc.info/gems/sass-embedded/1.0.4
166
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.4
167
167
  funding_uri: https://github.com/sponsors/ntkme
168
168
  post_install_message:
169
169
  rdoc_options: []