opal 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +12 -0
- data/Gemfile +2 -0
- data/lib/opal/sprockets/erb.rb +7 -2
- data/lib/opal/sprockets/processor.rb +9 -6
- data/lib/opal/sprockets/source_map_server.rb +3 -1
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/constants.rb +3 -3
- data/opal/corelib/module.rb +1 -1
- data/opal/corelib/runtime.js +3 -4
- data/spec/filters/bugs/module.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 772ee91c9ee9704cd131709a8f06c19659ac24b6
|
4
|
+
data.tar.gz: 5ac6f4a60f1abfe6f91e5c8225c97b2b8c75908c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24d9706110988ad702b9ea2f473cb45beaaa5385e4306690beb35b487eaa9d67d4cc1a50c2ec14b0957762b4e2d6bb24486e72b7f88bed4ebfc91e9352d63927
|
7
|
+
data.tar.gz: 5d59261d5c2701c54b9cef7f8a41a393c2fc3bffecda751895ffd58ccdabef39df7dcacd3a48c96f294da2cfa60acb7b69b920a96dfba206c87ad9fc5acc48fb
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -21,6 +21,18 @@ Whitespace conventions:
|
|
21
21
|
|
22
22
|
|
23
23
|
|
24
|
+
## [0.10.2] - Unreleased
|
25
|
+
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
|
29
|
+
- Fixed inheritance from the `Module` class (#1476)
|
30
|
+
- Fixed source map server with url-encoded paths
|
31
|
+
- Silence Sprockets 3.7 deprecations, full support for Sprockets 4 will be available in Opal 0.11
|
32
|
+
- Don't print the full stack trace with deprecation messages
|
33
|
+
|
34
|
+
|
35
|
+
|
24
36
|
## [0.10.1] - 2016-07-06
|
25
37
|
|
26
38
|
|
data/Gemfile
CHANGED
@@ -3,6 +3,7 @@ gemspec
|
|
3
3
|
|
4
4
|
tilt_version = ENV['TILT_VERSION']
|
5
5
|
rack_version = ENV['RACK_VERSION']
|
6
|
+
sprockets_version = ENV['SPROCKETS_VERSION']
|
6
7
|
|
7
8
|
# Stick with older racc until
|
8
9
|
# https://github.com/tenderlove/racc/issues/22
|
@@ -16,6 +17,7 @@ gem 'thin', platform: :mri if !rack_version || (rack_version < '2')
|
|
16
17
|
|
17
18
|
gem 'rack', rack_version if rack_version
|
18
19
|
gem 'tilt', tilt_version if tilt_version
|
20
|
+
gem 'sprockets', sprockets_version if sprockets_version
|
19
21
|
|
20
22
|
group :repl do
|
21
23
|
gem 'therubyracer', platform: :mri, require: 'v8'
|
data/lib/opal/sprockets/erb.rb
CHANGED
@@ -19,5 +19,10 @@ module Opal
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
Tilt.register 'opalerb',
|
23
|
-
|
22
|
+
Tilt.register 'opalerb', Opal::ERB::Processor
|
23
|
+
|
24
|
+
if Sprockets.respond_to? :register_transformer
|
25
|
+
Sprockets.register_engine '.opalerb', Opal::ERB::Processor, mime_type: 'application/javascript', silence_deprecation: true
|
26
|
+
else
|
27
|
+
Sprockets.register_engine '.opalerb', Opal::ERB::Processor
|
28
|
+
end
|
@@ -120,15 +120,13 @@ module Opal
|
|
120
120
|
|
121
121
|
# @deprecated
|
122
122
|
def self.stubbed_files
|
123
|
-
warn "
|
124
|
-
puts caller(5)
|
123
|
+
warn "DEPRECATION WARNING: `::Opal::Processor.stubbed_files' is deprecated, use `::Opal::Config.stubbed_files' instead"
|
125
124
|
::Opal::Config.stubbed_files
|
126
125
|
end
|
127
126
|
|
128
127
|
# @deprecated
|
129
128
|
def self.stub_file(name)
|
130
|
-
warn "
|
131
|
-
puts caller(5)
|
129
|
+
warn "DEPRECATION WARNING: `::Opal::Processor.stub_file' is deprecated, use `::Opal::Config.stubbed_files << #{name.inspect}.to_s' instead"
|
132
130
|
::Opal::Config.stubbed_files << name.to_s
|
133
131
|
end
|
134
132
|
|
@@ -141,5 +139,10 @@ module Opal
|
|
141
139
|
end
|
142
140
|
end
|
143
141
|
|
144
|
-
Sprockets.
|
145
|
-
Sprockets.register_engine '.
|
142
|
+
if Sprockets.respond_to? :register_transformer
|
143
|
+
Sprockets.register_engine '.rb', Opal::Processor, mime_type: 'application/javascript', silence_deprecation: true
|
144
|
+
Sprockets.register_engine '.opal', Opal::Processor, mime_type: 'application/javascript', silence_deprecation: true
|
145
|
+
else
|
146
|
+
Sprockets.register_engine '.rb', Opal::Processor
|
147
|
+
Sprockets.register_engine '.opal', Opal::Processor
|
148
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
1
3
|
module Opal
|
2
4
|
class SourceMapServer
|
3
5
|
# Carelessly taken from Sprockets::Caching (Sprockets v2)
|
@@ -79,7 +81,7 @@ module Opal
|
|
79
81
|
|
80
82
|
def call(env)
|
81
83
|
prefix_regex = %r{^(?:#{prefix}/|/)}
|
82
|
-
path_info = env['PATH_INFO'].to_s.sub(prefix_regex, '')
|
84
|
+
path_info = CGI.unescape(env['PATH_INFO'].to_s).sub(prefix_regex, '')
|
83
85
|
|
84
86
|
case path_info
|
85
87
|
when %r{^(.*)\.self\.map$}
|
data/lib/opal/version.rb
CHANGED
data/opal/corelib/constants.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
RUBY_PLATFORM = 'opal'
|
2
2
|
RUBY_ENGINE = 'opal'
|
3
|
-
RUBY_VERSION = '2.2.
|
4
|
-
RUBY_ENGINE_VERSION = '0.10.
|
5
|
-
RUBY_RELEASE_DATE = '2016-
|
3
|
+
RUBY_VERSION = '2.2.5'
|
4
|
+
RUBY_ENGINE_VERSION = '0.10.2'
|
5
|
+
RUBY_RELEASE_DATE = '2016-09-09'
|
6
6
|
RUBY_PATCHLEVEL = 0
|
7
7
|
RUBY_REVISION = 0
|
8
8
|
RUBY_COPYRIGHT = 'opal - Copyright (C) 2013-2015 Adam Beynon'
|
data/opal/corelib/module.rb
CHANGED
data/opal/corelib/runtime.js
CHANGED
@@ -472,7 +472,7 @@
|
|
472
472
|
}
|
473
473
|
}
|
474
474
|
else {
|
475
|
-
module = Opal.module_allocate();
|
475
|
+
module = Opal.module_allocate(Module);
|
476
476
|
Opal.create_scope(base.$$scope, module, name);
|
477
477
|
}
|
478
478
|
|
@@ -496,16 +496,15 @@
|
|
496
496
|
// Internal function to create a new module instance. This simply sets up
|
497
497
|
// the prototype hierarchy and method tables.
|
498
498
|
//
|
499
|
-
Opal.module_allocate = function() {
|
499
|
+
Opal.module_allocate = function(superclass) {
|
500
500
|
var mtor = function() {};
|
501
|
-
mtor.prototype =
|
501
|
+
mtor.prototype = superclass.$$alloc.prototype;
|
502
502
|
|
503
503
|
function module_constructor() {}
|
504
504
|
module_constructor.prototype = new mtor();
|
505
505
|
|
506
506
|
var module = new module_constructor();
|
507
507
|
var module_prototype = {};
|
508
|
-
var superclass = Module;
|
509
508
|
|
510
509
|
// @property $$id Each class is assigned a unique `id` that helps
|
511
510
|
// comparation and implementation of `#object_id`
|
data/spec/filters/bugs/module.rb
CHANGED
@@ -68,7 +68,6 @@ opal_filter "Module" do
|
|
68
68
|
fails "Module#class_eval raises a TypeError when the given eval-string can't be converted to string using to_str"
|
69
69
|
fails "Module#class_eval raises a TypeError when the given filename can't be converted to string using to_str"
|
70
70
|
fails "Module#class_eval uses the optional filename and lineno parameters for error messages"
|
71
|
-
fails "Module#class_exec defines method in the receiver's scope"
|
72
71
|
fails "Module#class_variable_defined? converts a non string/symbol/fixnum name to string using to_str"
|
73
72
|
fails "Module#class_variable_defined? raises a TypeError when the given names can't be converted to strings using to_str"
|
74
73
|
fails "Module#class_variable_defined? returns false if a class variables with the given name is defined in an extended module"
|
@@ -103,7 +102,6 @@ opal_filter "Module" do
|
|
103
102
|
fails "Module#include doesn't include module if it is included in a super class"
|
104
103
|
fails "Module#include? raises a TypeError when no module was given"
|
105
104
|
fails "Module#include? returns true if the given module is included by self or one of it's ancestors"
|
106
|
-
fails "Module#initialize is called on subclasses"
|
107
105
|
fails "Module#instance_method gives UnboundMethod method name, Module defined in and Module extracted from"
|
108
106
|
fails "Module#instance_method raises a NameError if the method has been undefined"
|
109
107
|
fails "Module#instance_method raises a TypeError if not passed a symbol"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Beynon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sourcemap
|