sass-embedded 0.1.0 → 0.1.1
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 +4 -4
- data/ext/sass_embedded/.gitignore +2 -1
- data/ext/sass_embedded/Makefile +14 -2
- data/ext/sass_embedded/extconf.rb +60 -1
- data/lib/sass/version.rb +1 -1
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 604bb4648958324aedb4a486c281994eb04bc6a2e685e946c07e62ca83ded8ed
|
4
|
+
data.tar.gz: 14730abcf938ee7fe9410a1f0055292c6abf95c95a1a7ab2c6f0d7dc3f2893c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 629f7ec2916c32f7821153b47c4c6ebeba09d3995d89273113e9b2ebdb0d477eca9f4ae027fd5144e4b6bdc52c83d2eedc9ca8edcac3d1ea6b79f5f86d528f04
|
7
|
+
data.tar.gz: 2b89c4871759f23a1c3e69d53ca61b1a8e45804435e0d84800beec43aa2bc860c707e3a5d10910e855cbf9d3fece3de658c97739b491b26a1c6aba43dec94fa9
|
data/ext/sass_embedded/Makefile
CHANGED
@@ -1,23 +1,35 @@
|
|
1
1
|
.PHONY: install
|
2
2
|
install:
|
3
3
|
ifeq ($(OS),Windows_NT)
|
4
|
-
powershell -command "Get-Item
|
4
|
+
powershell -command "Get-Item sass_embedded-*.zip | Expand-Archive -DestinationPath (Get-Location) -Force"
|
5
|
+
powershell -command "Get-Item protoc-*.zip | Expand-Archive -DestinationPath protoc -Force"
|
6
|
+
./protoc/bin/protoc --ruby_out=. embedded_sass.proto
|
5
7
|
else
|
6
|
-
tar -vxzf
|
8
|
+
tar -vxzf sass_embedded-*.tar.gz
|
9
|
+
unzip -od protoc protoc-*.zip
|
10
|
+
./protoc/bin/protoc --ruby_out=. embedded_sass.proto
|
7
11
|
endif
|
8
12
|
|
9
13
|
.PHONY: clean
|
10
14
|
clean:
|
11
15
|
ifeq ($(OS),Windows_NT)
|
12
16
|
powershell -command "Remove-Item sass_embedded -Recurse -Force -ErrorAction Ignore"
|
17
|
+
powershell -command "Remove-Item protoc -Recurse -Force -ErrorAction Ignore"
|
18
|
+
powershell -command "Remove-Item embedded_sass_pb.rb -Recurse -Force -ErrorAction Ignore"
|
13
19
|
else
|
14
20
|
rm -rf sass_embedded
|
21
|
+
rm -rf protoc
|
22
|
+
rm -rf embedded_sass_pb.rb
|
15
23
|
endif
|
16
24
|
|
17
25
|
.PHONY: distclean
|
18
26
|
distclean: clean
|
19
27
|
ifeq ($(OS),Windows_NT)
|
20
28
|
powershell -command "Remove-Item sass_embedded-*.zip -Force -ErrorAction Ignore"
|
29
|
+
powershell -command "Remove-Item protoc-*.zip -Force -ErrorAction Ignore"
|
30
|
+
powershell -command "Remove-Item embedded_sass.proto -Force -ErrorAction Ignore"
|
21
31
|
else
|
22
32
|
rm -rf sass_embedded-*.tar.gz
|
33
|
+
rm -rf protoc-*.zip
|
34
|
+
rm -rf embedded_sass.proto
|
23
35
|
endif
|
@@ -46,7 +46,6 @@ def download_sass_embedded
|
|
46
46
|
raise "Unsupported Arch: #{Sass::Platform::ARCH}"
|
47
47
|
end
|
48
48
|
|
49
|
-
|
50
49
|
ext = case os
|
51
50
|
when "windows"
|
52
51
|
"zip"
|
@@ -63,8 +62,68 @@ def download_sass_embedded
|
|
63
62
|
end
|
64
63
|
end
|
65
64
|
|
65
|
+
def download_protoc
|
66
|
+
repo = "protocolbuffers/protobuf"
|
67
|
+
|
68
|
+
tag = URI.open('https://github.com/protocolbuffers/protobuf/releases/latest') { |file|
|
69
|
+
File.basename file.base_uri.to_s
|
70
|
+
}
|
71
|
+
|
72
|
+
release = tag[1..-1]
|
73
|
+
|
74
|
+
os = case Sass::Platform::OS
|
75
|
+
when "darwin"
|
76
|
+
"osx"
|
77
|
+
when "linux"
|
78
|
+
"linux"
|
79
|
+
when "windows"
|
80
|
+
"win"
|
81
|
+
else
|
82
|
+
raise "Unsupported OS: #{Sass::Platform::OS}"
|
83
|
+
end
|
84
|
+
|
85
|
+
arch = case Sass::Platform::ARCH
|
86
|
+
when "aarch64"
|
87
|
+
"aarch_64"
|
88
|
+
when "sparcv9"
|
89
|
+
"s390"
|
90
|
+
when "i386"
|
91
|
+
"x86_32"
|
92
|
+
when "x86_64"
|
93
|
+
"x86_64"
|
94
|
+
when "powerpc64"
|
95
|
+
"ppcle_64"
|
96
|
+
else
|
97
|
+
raise "Unsupported Arch: #{Sass::Platform::ARCH}"
|
98
|
+
end
|
99
|
+
|
100
|
+
os_arch = case os
|
101
|
+
when "win"
|
102
|
+
os + arch.split('_').last
|
103
|
+
else
|
104
|
+
os + '-' + arch
|
105
|
+
end
|
106
|
+
|
107
|
+
ext = "zip"
|
108
|
+
|
109
|
+
url = "https://github.com/#{repo}/releases/download/#{tag}/protoc-#{release}-#{os_arch}.#{ext}"
|
110
|
+
|
111
|
+
begin
|
112
|
+
download url
|
113
|
+
rescue
|
114
|
+
raise "Failed to download: #{url}"
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def download_embedded_sass_proto
|
119
|
+
url = "https://raw.githubusercontent.com/sass/embedded-protocol/HEAD/embedded_sass.proto"
|
120
|
+
download url
|
121
|
+
end
|
122
|
+
|
66
123
|
system("make", "-C", __dir__, "distclean")
|
67
124
|
download_sass_embedded
|
125
|
+
download_protoc
|
126
|
+
download_embedded_sass_proto
|
68
127
|
system("make", "-C", __dir__, "install")
|
69
128
|
|
70
129
|
File.open(File.absolute_path("sass_embedded.#{RbConfig::CONFIG['DLEXT']}", __dir__), "w") {}
|
data/lib/sass/version.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
@@ -110,7 +110,6 @@ files:
|
|
110
110
|
- Rakefile
|
111
111
|
- ext/sass_embedded/.gitignore
|
112
112
|
- ext/sass_embedded/Makefile
|
113
|
-
- ext/sass_embedded/embedded_sass_pb.rb
|
114
113
|
- ext/sass_embedded/extconf.rb
|
115
114
|
- lib/sass.rb
|
116
115
|
- lib/sass/embedded/compiler.rb
|