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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc4a584b02baef5fc270ec2ce84d7843c01f3656e64aa0c30e303a1d4c123313
4
- data.tar.gz: d2230700daf1964f727ca1e5d5c695244cdb1d304700ad15997526ccb62ad31c
3
+ metadata.gz: 6c35a262d552f107bf4a13ed024c5c3bfb46da786ff08f4dd116a73211bc9bba
4
+ data.tar.gz: a0eb5eb4389b4212a66d265eb762511e616d2c5f51c393d2dc7191853501839f
5
5
  SHA512:
6
- metadata.gz: 9fc031920618a3bc5b40a5c146b7ef8fc56b9d048b5c481b214425f3e17b72d05651ef1645b29ac08a15c5504d0c48b4f6605e6e5c13224560a9b26d212b13e9
7
- data.tar.gz: e2a1e112ab8241f2a5393d01b237d1a9d41dcca7f386fdaa42a287c5a9cd82d4a6ec909775598a4235a373573ff76381df302f07f16861399ecad35734ea9913
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
- tag_name = resolve_tag_name(repo, Compiler::REQUIREMENTS)
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'
@@ -0,0 +1,5 @@
1
+ {
2
+ "dependencies": {
3
+ "sass-embedded": "1.49.8"
4
+ }
5
+ }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '0.16.2'
5
+ VERSION = '0.17.0'
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: 0.16.2
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.16.2
169
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.16.2
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: []
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Sass
4
- class Embedded
5
- class Compiler
6
- REQUIREMENTS = '~> 1.49.8'
7
- end
8
- end
9
- end