ruar 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71e86cbea690ee3e4c66ca5079ba3ae43ffa2d21c1b01e3574a3324b9509d712
4
- data.tar.gz: 4dd935f956cefc3c13fae4ca9c95edefea91c556e92944e36d1d1b7c89b32791
3
+ metadata.gz: 9b47119ed5972f29fca26cc2e2d268f3b7c41ef6108bc97ea4d448f4d98d33fd
4
+ data.tar.gz: 5576a1a1ae592463a5026956c7e1fa72f91fa929e9b0f97826b2edbd18f218fd
5
5
  SHA512:
6
- metadata.gz: 7e31c46a4daa42ad6432b41e78c94004816a908810a4f1f51fd062129ac6244f44b7bcad9be7294a643a57559bdf179a91a60e2be85bc61c7961b908ca3517d6
7
- data.tar.gz: f944938e97821f40ad011c30ebd62bf6586e4931184e3311feff029615503c8308fd117bae4958661a0414bfafacc72c91e86f765c95283ddf02db28d4d184d7
6
+ metadata.gz: 4576334c741e35a2641aa8a760d926bc973d5325e475099c9423760c18fa92f1bee2642fd5ca86171e368644a2c8f10e85f71c3efcb9efb396afee0bceda9093
7
+ data.tar.gz: f2a22e07ed9d95d63696c2093eaaf0ef67b4bf8247f47ce8cade5d9248356f3c3c3fd76a30d0747af5fe72e05d32010f74245b9e0cd547ae2413669578769171
data/README.md CHANGED
@@ -83,7 +83,7 @@ Ruar.setup(
83
83
  archive: archive
84
84
  ).activate
85
85
 
86
- # Require from /tmp/aeae.ruar
86
+ # Require from /tmp/aead.ruar
87
87
  require 'dir/file'
88
88
  ```
89
89
  ## Format
data/ext/ruar/ruar.c CHANGED
@@ -44,7 +44,7 @@ STATIC_ASSERT(sizeof(struct ruar_header) == HEADER_SIZE);
44
44
  /* Constants */
45
45
  static const uint32_t current_major_version = 0;
46
46
  static const uint32_t current_minor_version = 0;
47
- static const uint32_t current_patch_version = 3;
47
+ static const uint32_t current_patch_version = 4;
48
48
 
49
49
  /* Flags */
50
50
  #define PLAIN 0
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Ruar
2
4
  module Compression
3
5
  def self.compress(data)
@@ -16,5 +16,9 @@ module Ruar
16
16
  def eval(path, eval_bind = TOPLEVEL_BINDING)
17
17
  @access.eval(path, eval_bind)
18
18
  end
19
+
20
+ def read(path)
21
+ @access.read(path)
22
+ end
19
23
  end
20
24
  end
data/lib/ruar/ruar.so CHANGED
Binary file
data/lib/ruar/setup.rb CHANGED
@@ -7,9 +7,10 @@ module Ruar
7
7
  end
8
8
 
9
9
  module ClassMethods
10
- def setup(archive: nil, entry: nil)
10
+ def setup(archive: nil, entry: nil, rien: false)
11
11
  @entrypoint ||= Ruar::EntryPoint.new(archive: archive, entry: entry)
12
- @path_prefix ||= Pathname.new('/_from/_ruar/_internal')
12
+ # Rien uses relative path when it compiles the Ruby code
13
+ @path_prefix ||= rien ? Pathname.new('') : Pathname.new('/_from/_ruar/_internal')
13
14
 
14
15
  self
15
16
  end
@@ -33,6 +34,10 @@ module Ruar
33
34
  @entrypoint.eval(path, bind)
34
35
  end
35
36
 
37
+ def read(path)
38
+ @entrypoint.read(path)
39
+ end
40
+
36
41
  def cipher
37
42
  @cipher ||= Ruar::Cipher.new
38
43
  end
data/lib/ruar/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ruar
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kowalski Dark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-21 00:00:00.000000000 Z
11
+ date: 2021-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: binding_of_caller