sass-embedded 0.16.2 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/sass/extconf.rb +3 -48
- data/ext/sass/package.json +5 -0
- data/lib/sass/embedded/version.rb +1 -1
- metadata +4 -4
- data/lib/sass/embedded/compiler/requirements.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c35a262d552f107bf4a13ed024c5c3bfb46da786ff08f4dd116a73211bc9bba
|
4
|
+
data.tar.gz: a0eb5eb4389b4212a66d265eb762511e616d2c5f51c393d2dc7191853501839f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a2b5b0aaa9065d64cf12947c96e129cff83d07e628c61e362f0aa4cf7bbdf02ca479508a3f717eaaac4d1466c45a15efffa18882144e5b951ec0242f286d71f
|
7
|
+
data.tar.gz: b4b2b8991b1640f7c5661aede8b13688cea6feb66d2016b96f9ba19d2bc59fdbd13404d317fa0e86819233c58a2ee22c70a25a60d6982be877b787c8cd27baec
|
data/ext/sass/extconf.rb
CHANGED
@@ -6,7 +6,6 @@ require 'json'
|
|
6
6
|
require 'mkmf'
|
7
7
|
require 'open-uri'
|
8
8
|
require_relative '../../lib/sass/embedded/compiler/path'
|
9
|
-
require_relative '../../lib/sass/embedded/compiler/requirements'
|
10
9
|
|
11
10
|
module Sass
|
12
11
|
class Embedded
|
@@ -123,56 +122,12 @@ module Sass
|
|
123
122
|
raise
|
124
123
|
end
|
125
124
|
|
126
|
-
def resolve_tag_name(repo, *requirements, gh_release: true)
|
127
|
-
requirements = Gem::Requirement.create(*requirements)
|
128
|
-
|
129
|
-
satisfied = lambda { |version|
|
130
|
-
Gem::Version.correct?(version) && requirements.satisfied_by?(Gem::Version.new(version))
|
131
|
-
}
|
132
|
-
|
133
|
-
headers = {}
|
134
|
-
headers['Authorization'] = "token #{ENV['GITHUB_TOKEN']}" if ENV['GITHUB_TOKEN']
|
135
|
-
|
136
|
-
begin
|
137
|
-
if gh_release
|
138
|
-
releases_uri = "https://github.com/#{repo}/releases"
|
139
|
-
uri = "#{releases_uri}/latest"
|
140
|
-
tag_name = URI.parse(uri).open do |file|
|
141
|
-
return nil if file.base_uri == releases_uri
|
142
|
-
|
143
|
-
latest = File.basename file.base_uri.to_s
|
144
|
-
latest if satisfied.call latest
|
145
|
-
end
|
146
|
-
|
147
|
-
return tag_name unless tag_name.nil?
|
148
|
-
|
149
|
-
uri = "https://api.github.com/repos/#{repo}/releases?per_page=100"
|
150
|
-
tag_name = URI.parse(uri).open(headers) do |file|
|
151
|
-
JSON.parse(file.read).map { |release| release['tag_name'] }
|
152
|
-
end
|
153
|
-
.find(satisfied)&.peek
|
154
|
-
else
|
155
|
-
uri = "https://api.github.com/repos/#{repo}/tags?per_page=100"
|
156
|
-
tag_name = URI.parse(uri).open(headers) do |file|
|
157
|
-
JSON.parse(file.read).map { |tag| tag['name'] }
|
158
|
-
end
|
159
|
-
.find(satisfied)&.peek
|
160
|
-
end
|
161
|
-
|
162
|
-
return tag_name unless tag_name.nil?
|
163
|
-
rescue OpenURI::HTTPError => e
|
164
|
-
warn "WARNING: Error fetching #{uri}: #{e}"
|
165
|
-
end
|
166
|
-
|
167
|
-
requirements.requirements
|
168
|
-
.map { |requirement| requirement.last.to_s.gsub('.pre.', '-') }
|
169
|
-
.find(satisfied)&.peek
|
170
|
-
end
|
171
|
-
|
172
125
|
def default_sass_embedded
|
173
126
|
repo = 'sass/dart-sass-embedded'
|
174
127
|
|
175
|
-
|
128
|
+
spec = JSON.parse(File.read(File.absolute_path('package.json', __dir__)))
|
129
|
+
|
130
|
+
tag_name = spec['dependencies']['sass-embedded']
|
176
131
|
|
177
132
|
os = case Platform::OS
|
178
133
|
when 'darwin'
|
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: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- README.md
|
122
122
|
- ext/sass/Makefile
|
123
123
|
- ext/sass/extconf.rb
|
124
|
+
- ext/sass/package.json
|
124
125
|
- ext/sass/unzip.vbs
|
125
126
|
- lib/sass-embedded.rb
|
126
127
|
- lib/sass.rb
|
@@ -135,7 +136,6 @@ files:
|
|
135
136
|
- lib/sass/embedded/compile_context/value_protofier.rb
|
136
137
|
- lib/sass/embedded/compiler.rb
|
137
138
|
- lib/sass/embedded/compiler/path.rb
|
138
|
-
- lib/sass/embedded/compiler/requirements.rb
|
139
139
|
- lib/sass/embedded/legacy.rb
|
140
140
|
- lib/sass/embedded/observer.rb
|
141
141
|
- lib/sass/embedded/protocol_error.rb
|
@@ -165,8 +165,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
|
|
165
165
|
licenses:
|
166
166
|
- MIT
|
167
167
|
metadata:
|
168
|
-
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.
|
169
|
-
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.
|
168
|
+
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.17.0
|
169
|
+
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.17.0
|
170
170
|
funding_uri: https://github.com/sponsors/ntkme
|
171
171
|
post_install_message:
|
172
172
|
rdoc_options: []
|