sass-embedded 0.7.12 → 0.7.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/ext/extconf.rb +15 -10
  3. data/lib/sass/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af7015aac4279ef9b4ea9a4cca2ca236e1722c70db19e4c21a35c9df64d5667e
4
- data.tar.gz: 8dcf794cff743d2e5f24b7bcd817d7bcef2867549fe0eda94634966a96e8e8c4
3
+ metadata.gz: 103336d18b4ff3eba9898df0ee3dc4c28b7f3e9ab81d8548b1665f1636a518ed
4
+ data.tar.gz: 9cba67666361efb314c98798a3de2fc9370e5a6eb0c42b3fdbab96fc4f64a566
5
5
  SHA512:
6
- metadata.gz: 76a76058b210b7ae057ed71dd25f12625a04396c84c447dd8075ca4ff6ca4d52df009243cbd110009902fa727489e79bd20b1798670222cbe3c312f5ade5aa7d
7
- data.tar.gz: f5d40d128f9c9fbaee17728c9092b6b6c86f1908f474a94e6b43918cb2db389154fa246d4b2b9ee083e916d62ba19f9aec767e35cd8d7c39c25462e90a3f9d5c
6
+ metadata.gz: e3d2307ce9fdaaf8635c8803e24a85aa82a3a1ee8b72e5284fe282adc28cb20ee69f9f7a3612ecc5a4e09423034a3d0dc680c47d7eebe489f806da916d85532e
7
+ data.tar.gz: c105838b5b082e657acc917600c0b7fb664e53541800ebda1f4fcd1b44be2f16c3849d06b34c1ba19e82c029144f264d22dacdb678d928cee3a210ba8d90b89d
data/ext/extconf.rb CHANGED
@@ -63,7 +63,7 @@ module Sass
63
63
  raise
64
64
  end
65
65
  rescue StandardError
66
- raise "Failed to get: #{uri}"
66
+ raise "Failed to get: #{uri_s}"
67
67
  end
68
68
 
69
69
  def resolve_tag_name(repo, *requirements, gh_release: true)
@@ -74,16 +74,21 @@ module Sass
74
74
  File.basename file.base_uri.to_s
75
75
  end
76
76
  else
77
- headers = {}
78
- headers['Authorization'] = "token #{ENV['GITHUB_TOKEN']}" if ENV['GITHUB_TOKEN']
79
- if gh_release
80
- URI.parse("https://api.github.com/repos/#{repo}/releases?per_page=100").open(headers) do |file|
81
- JSON.parse(file.read).map { |release| release['tag_name'] }
82
- end
83
- else
84
- URI.parse("https://api.github.com/repos/#{repo}/tags?per_page=100").open(headers) do |file|
85
- JSON.parse(file.read).map { |tag| tag['name'] }
77
+ begin
78
+ headers = {}
79
+ headers['Authorization'] = "token #{ENV['GITHUB_TOKEN']}" if ENV['GITHUB_TOKEN']
80
+ if gh_release
81
+ URI.parse("https://api.github.com/repos/#{repo}/releases?per_page=100").open(headers) do |file|
82
+ JSON.parse(file.read).map { |release| release['tag_name'] }
83
+ end
84
+ else
85
+ URI.parse("https://api.github.com/repos/#{repo}/tags?per_page=100").open(headers) do |file|
86
+ JSON.parse(file.read).map { |tag| tag['name'] }
87
+ end
86
88
  end
89
+ rescue OpenURI::HTTPError
90
+ requirements.requirements
91
+ .map { |requirement| requirement.last.to_s.gsub('.pre.', '-') }
87
92
  end
88
93
  .find { |version| Gem::Version.correct?(version) && requirements.satisfied_by?(Gem::Version.new(version)) }
89
94
  &.to_s
data/lib/sass/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sass
4
- VERSION = '0.7.12'
4
+ VERSION = '0.7.13'
5
5
  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.7.12
4
+ version: 0.7.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
@@ -166,7 +166,7 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
166
166
  licenses:
167
167
  - MIT
168
168
  metadata:
169
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.7.12
169
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.7.13
170
170
  post_install_message:
171
171
  rdoc_options: []
172
172
  require_paths: