opal-zeitwerk 0.0.3 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ module Zeitwerk::Loader::Callbacks
13
13
 
14
14
  # "constant #{cpath(*cref)} loaded from file #{file}" if cdef?(*cref)
15
15
  if !cdef?(*cref)
16
- raise Zeitwerk::NameError, "expected file #{file} to define constant #{cpath(*cref)}, but didn't"
16
+ raise Zeitwerk::NameError.new("expected file #{file} to define constant #{cpath(*cref)}, but didn't", cref.last)
17
17
  end
18
18
  end
19
19
 
@@ -25,11 +25,8 @@ module Zeitwerk::Loader::Callbacks
25
25
  # @return [void]
26
26
  def on_dir_autoloaded(dir)
27
27
  if cref = autoloads.delete(dir)
28
- autovivified_module = if vivify_mod_dir && dir.start_with?(vivify_mod_dir)
29
- cref[0].const_set(cref[1], vivify_mod_class.new)
30
- else
31
- cref[0].const_set(cref[1], Module.new)
32
- end
28
+ autovivified_module = cref[0].const_set(cref[1], Module.new)
29
+
33
30
  # "module #{autovivified_module.name} autovivified from directory #{dir}"
34
31
 
35
32
  to_unload[autovivified_module.name] = [dir, cref] if reloading_enabled?
@@ -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.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2021-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0
19
+ version: 1.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0
26
+ version: 1.2.0
27
27
  description: |2
28
28
  A port of the Zeitwerk autoloader to Opal.
29
29
  Zeitwerk implements constant autoloading with Ruby semantics. Each gem
@@ -50,10 +50,12 @@ 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
55
- the es6_modules_1_1 branch of opal, for the Gemfile:\n\n gem 'opal', github: 'janbiedermann/opal',
56
- branch: 'es6_modules_1_1'\n\n"
53
+ metadata:
54
+ github_repo: ssh://github.com/isomorfeus/gems
55
+ post_install_message: "\nopal-zeitwerk 0.2.1:\n \n opal-zeitwerk currently requires
56
+ the es6_modules_1_2 branch of opal, for the Gemfile:\n\n gem 'opal', github: 'janbiedermann/opal',
57
+ branch: 'es6_modules_1_2'\n\n Commit 04c59bcb6ec124d021d464d12a45e7dae892456f from
58
+ 7.1.2020 or later.\n\n"
57
59
  rdoc_options: []
58
60
  require_paths:
59
61
  - lib
@@ -68,8 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
70
  - !ruby/object:Gem::Version
69
71
  version: '0'
70
72
  requirements: []
71
- rubygems_version: 3.0.6
72
- signing_key:
73
+ rubygems_version: 3.2.15
74
+ signing_key:
73
75
  specification_version: 4
74
76
  summary: Opal constant autoloader using Zeitwerk
75
77
  test_files: []