opal 0.10.1 → 0.10.2

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
  SHA1:
3
- metadata.gz: a6e7fb203e60928ae10285147c9259431ad904bb
4
- data.tar.gz: 4e04607172498e81a8c0bac07618b73063cc1071
3
+ metadata.gz: 772ee91c9ee9704cd131709a8f06c19659ac24b6
4
+ data.tar.gz: 5ac6f4a60f1abfe6f91e5c8225c97b2b8c75908c
5
5
  SHA512:
6
- metadata.gz: 3166f7678e076072e28efca10316e7e5ddb2a0d8affc87a4f6e08292a79ac0302fe07196a6fcfdad690d7afff02f73c22a704415ff4845781a29f9ded725b6d6
7
- data.tar.gz: dbdbe1e68e6af9239ba5edc000225fbe0ada841b01ebd98d3eb95138ee7e541271cc1ae5d663dbbdb244446fe6f07c4f0eaf6dff81dbb0ed8964bbc649309342
6
+ metadata.gz: 24d9706110988ad702b9ea2f473cb45beaaa5385e4306690beb35b487eaa9d67d4cc1a50c2ec14b0957762b4e2d6bb24486e72b7f88bed4ebfc91e9352d63927
7
+ data.tar.gz: 5d59261d5c2701c54b9cef7f8a41a393c2fc3bffecda751895ffd58ccdabef39df7dcacd3a48c96f294da2cfa60acb7b69b920a96dfba206c87ad9fc5acc48fb
@@ -36,7 +36,7 @@ matrix:
36
36
  env: RUN=rspec
37
37
 
38
38
  - rvm: 2.2.4
39
- env: RUN=rspec TILT_VERSION=2.0.1
39
+ env: RUN=rspec TILT_VERSION=2.0.1 SPROCKETS_VERSION='~> 3.7'
40
40
 
41
41
  - rvm: 2.1.10
42
42
  env: RUN=rspec RACK_VERSION='< 2.0'
@@ -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'
@@ -19,5 +19,10 @@ module Opal
19
19
  end
20
20
  end
21
21
 
22
- Tilt.register 'opalerb', Opal::ERB::Processor
23
- Sprockets.register_engine '.opalerb', Opal::ERB::Processor
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 "Deprecated: `::Opal::Processor.stubbed_files' is deprecated, use `::Opal::Config.stubbed_files' instead"
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 "Deprecated: `::Opal::Processor.stub_file' is deprecated, use `::Opal::Config.stubbed_files << #{name.inspect}.to_s' instead"
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.register_engine '.rb', Opal::Processor
145
- Sprockets.register_engine '.opal', Opal::Processor
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$}
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  # WHEN RELEASING:
3
3
  # Remember to update RUBY_ENGINE_VERSION in opal/corelib/constants.rb too!
4
- VERSION = '0.10.1'
4
+ VERSION = '0.10.2'
5
5
  end
@@ -1,8 +1,8 @@
1
1
  RUBY_PLATFORM = 'opal'
2
2
  RUBY_ENGINE = 'opal'
3
- RUBY_VERSION = '2.2.3'
4
- RUBY_ENGINE_VERSION = '0.10.1'
5
- RUBY_RELEASE_DATE = '2016-07-06'
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'
@@ -3,7 +3,7 @@ class Module
3
3
  %x{
4
4
  var module;
5
5
 
6
- module = Opal.module_allocate();
6
+ module = Opal.module_allocate(self);
7
7
  Opal.create_scope(Opal.Module.$$scope, module, null);
8
8
  return module;
9
9
  }
@@ -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 = Module_alloc.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`
@@ -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.1
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-07-06 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sourcemap