opal-file 1.0.0 → 1.0.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/lib/opal-file.rb +6 -2
- data/lib/opal-file/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7afa6266d7fc712de72195f81e6a6edf6e5760ed
|
4
|
+
data.tar.gz: c5dc8c8935ef4aa0c2593d41bb9bbc48843d0436
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71e01b9b78ef427f596c4461a23e7e78931712a4427497ae8163ca1dea0736c363ab87930c074166a04fb4f670d68c25f02131d256d8843298bb2ddc43885c50
|
7
|
+
data.tar.gz: 8b38f6d8c372efb7fa0b6e3dbfdddcff2a96070c69b4da3d72c61ef2da1db3df28638c0d65c0cfeba1e90eeba5475aa74b6989be7ad35a40282e24ba67efa59b
|
data/lib/opal-file.rb
CHANGED
@@ -157,11 +157,15 @@ if RUBY_ENGINE == "opal"
|
|
157
157
|
# IO
|
158
158
|
|
159
159
|
def read(filename, options)
|
160
|
-
|
160
|
+
handle_errno do
|
161
|
+
fs.JS.readFileSync(filename, { encoding: "utf8" }.to_n)
|
162
|
+
end
|
161
163
|
end
|
162
164
|
|
163
165
|
def write(filename, content)
|
164
|
-
|
166
|
+
handle_errno do
|
167
|
+
fs.JS.writeFileSync(filename, content.to_s)
|
168
|
+
end
|
165
169
|
end
|
166
170
|
|
167
171
|
private
|
data/lib/opal-file/version.rb
CHANGED