opal-zeitwerk 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: 0f36dc7ffdf5a8199541d6d58709708f90df671da0449a06c5bfe7f43458bab9
4
- data.tar.gz: 784fba6401a4cde561a8a8d9ae6496a8eb6939466743b184733e1b3d2f15e2c2
3
+ metadata.gz: c08d0237fce54d7885badfdda17e4c5b287627af98e41acb14f867ecc7b77631
4
+ data.tar.gz: 365a26b762cc3db8c2577bf093c87010a60315358f69572169a855f054bf7e71
5
5
  SHA512:
6
- metadata.gz: ae630487a822d6ff132420d7909e696dccf7973638979085ad72de3a8ef8f77b0979c7880b1316809258be029922d3152b688cc2efa1d8c5e1ba913aaa95a2ef
7
- data.tar.gz: c4e45ae2cea7800faa76bf52d1bb56737792113b8211b41518ecfe53713b445badc264495b7d52dab11b6a89ee33497fddd2a666e449a10b9f1f19ba9bd05420
6
+ metadata.gz: c1cddfe4dfbfed3c28f8081e44d71cf3c4e6682d7d09ed3ca2f456251eb89b60c490fdaf192d9346c3c263655a1f2821a90791e42987c6693faebe151d503130
7
+ data.tar.gz: e89409525a50a0693ee2f8578020b618c44e2b33fe9561c02b1925c54b1c6c8e61505f80e03209b1244f5bd20c36b6049f514817139eaaa94f9238c5851aef99
data/README.md CHANGED
@@ -167,9 +167,13 @@ should define `Geolocatable`, not `Concerns::Geolocatable`.
167
167
  <a id="markdown-usage" name="usage"></a>
168
168
  ## Usage
169
169
 
170
+ Currently autoloading requires the es6_modules_1_1 branch along with the Opal es6_modules compiler options enabled.
171
+ This option is enabled by default with using [opal-webpack-loader](https://github.com/isomorfeus/opal-webpack-loader) to bundle opal code.
172
+
170
173
  Add to the Gemfile:
171
174
  ```
172
175
  gem 'opal', github: 'janbiedermann/opal', branch: 'es6_modules_1_1' # required
176
+ gem 'opal-webpack-loader', '~> 0.9.7' # required
173
177
  gem 'opal-zeitwerk', '~> 0.0.1'
174
178
  ```
175
179
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Opal
3
3
  module Zeitwerk
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
data/opal/zeitwerk.rb CHANGED
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  require 'opal'
3
2
  require 'corelib/trace_point'
4
3
  require 'securerandom'
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Zeitwerk
4
2
  class Inflector
5
3
  # Very basic snake case -> camel case conversion.
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Kernel
4
2
  module_function
5
3
 
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  require "set"
4
2
  require "securerandom"
5
3
 
@@ -525,7 +523,7 @@ module Zeitwerk
525
523
  # $LOADED_FEATURES stores real paths since Ruby 2.4.4. We set and save the
526
524
  # real path to be able to delete it from $LOADED_FEATURES on unload, and to
527
525
  # be able to do a lookup later in Kernel#require for manual require calls.
528
- realpath = File.realpath(abspath)
526
+ realpath = `Opal.modules.hasOwnProperty(abspath)` ? abspath : File.realpath(abspath)
529
527
  parent.autoload(cname, realpath)
530
528
 
531
529
  autoloads[realpath] = [parent, cname]
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Zeitwerk
4
2
  module Registry # :nodoc: all
5
3
  class << self
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-zeitwerk
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
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -50,8 +50,9 @@ files:
50
50
  homepage: https://github.com/isomorfeus/opal-zeitwerk
51
51
  licenses:
52
52
  - MIT
53
- metadata: {}
54
- post_install_message: "\nopal-zeitwerk 0.0.3:\n \n opal-zeitwerk currently requires
53
+ metadata:
54
+ github_repo: ssh://github.com/isomorfeus/gems
55
+ post_install_message: "\nopal-zeitwerk 0.0.4:\n \n opal-zeitwerk currently requires
55
56
  the es6_modules_1_1 branch of opal, for the Gemfile:\n\n gem 'opal', github: 'janbiedermann/opal',
56
57
  branch: 'es6_modules_1_1'\n\n"
57
58
  rdoc_options: []