Skip to content

Commit c601ea7

Browse files
authored
Merge pull request #92 from opal/staging
10th composite staging pull request
2 parents a9a1592 + c5662c9 commit c601ea7

File tree

11 files changed

+25
-22
lines changed

11 files changed

+25
-22
lines changed

.github/workflows/build.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ jobs:
1919
browser: chrome
2020
os: ubuntu-latest
2121
opal: master
22-
- name: Chromium/Linux/Opal-master/PromiseV2
22+
- name: Chromium/Linux/Opal-1.3/PromiseV2
2323
browser: chrome
2424
os: ubuntu-latest
25-
opal: master
25+
opal: 1.3
2626
promise: v2
27-
- name: Chromium/Linux/Opal-1.2
27+
- name: Chromium/Linux/Opal-1.3
2828
browser: chrome
2929
os: ubuntu-latest
30-
opal: 1.2
31-
- name: Chromium/Linux/Opal-1.1
30+
opal: 1.3
31+
- name: Chromium/Linux/Opal-1.2
3232
browser: chrome
3333
os: ubuntu-latest
34-
opal: 1.1
34+
opal: 1.2
3535
- name: Chromium/Linux/Opal-1.0
3636
browser: chrome
3737
os: ubuntu-latest
@@ -72,7 +72,7 @@ jobs:
7272
- uses: actions/checkout@v2
7373
- name: set environment variables
7474
run: |
75-
echo "OPAL_VERSION=${{ matrix.combo.opal || '1.2' }}" >> $GITHUB_ENV
75+
echo "OPAL_VERSION=${{ matrix.combo.opal || '1.3' }}" >> $GITHUB_ENV
7676
echo "OPAL_BROWSER_PROMISE=${{ matrix.combo.promise || 'v1' }}" >> $GITHUB_ENV
7777
- uses: ruby/setup-ruby@v1
7878
with:

Gemfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gem 'rack'
77
gem 'sinatra'
88
gem 'sinatra-websocket'
99
# For opal-rspec, a release is needed
10-
gem 'opal-rspec', github: 'opal/opal-rspec', submodules: true # '>= 0.8.0.alpha1'
10+
gem 'opal-rspec', github: 'hmdne/opal-rspec', branch: 'opal-1.3', submodules: true # '>= 0.8.0.alpha1'
1111
gem 'opal-sprockets'
1212
# Force build of eventmachine on Windows
1313
gem 'eventmachine', github: 'eventmachine/eventmachine' if RUBY_PLATFORM =~ /mingw/
@@ -16,7 +16,7 @@ gem 'eventmachine', github: 'eventmachine/eventmachine' if RUBY_PLATFORM =~ /min
1616
# runner
1717
gem 'selenium-webdriver', require: false
1818
gem 'rest-client', require: false
19-
gem 'webdrivers', github: 'hmdne/webdrivers', require: false
19+
gem 'webdrivers', require: false
2020
gem 'rexml', require: false
2121

2222
# browser
@@ -27,6 +27,4 @@ when /\./
2727
else
2828
gem 'opal', github: 'opal/opal', ref: ENV['OPAL_VERSION']
2929
end
30-
# At this time, we need to use a branch. Please see:
31-
# https://github.com/meh/paggio/issues/7
32-
gem 'paggio', github: 'hmdne/paggio'
30+

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ _Gemfile_
2121
```ruby
2222
source 'https://rubygems.org/'
2323

24-
gem 'paggio', github: 'hmdne/paggio'
2524
gem 'opal-browser'
2625
```
2726

Rakefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'bundler'
22
Bundler.require
3+
require 'bundler/gem_tasks'
34

45
require 'webdrivers'
56
load 'webdrivers/Rakefile'

examples/component/app/application.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require "opal"
22
require "console"
3+
require "promise"
34
require "browser/setup/full"
45

56
# Let's test some element before we have been initialized.
@@ -15,7 +16,7 @@ class MyCounter < Browser::DOM::Element::Custom
1516

1617
self.observed_attributes = %w[value]
1718

18-
def initialize
19+
def initialize(node)
1920
super
2021
end
2122

index.html.erb

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<html>
33
<head>
44
<title>Opal Browser - RSpec Runner</title>
5-
5+
</head>
6+
<body>
67
<script>
78
window.onerror = function(msg, url, line) {
89
var error = document.createElement("div");
@@ -18,8 +19,6 @@
1819
<script src="spec/wgxpath.install.js"></script>
1920

2021
<%= javascript_include_tag @server.main %>
21-
</head>
22-
<body>
2322
</body>
2423
</html>
2524

opal-browser.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Gem::Specification.new {|s|
1717
s.require_paths = ['lib']
1818

1919
s.add_dependency 'opal', ['>= 1.0', '< 2.0']
20-
s.add_dependency 'paggio'
20+
s.add_dependency 'paggio', '>= 0.3.0'
2121
}

opal/browser/dom/node.rb

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ def self.new(value)
3838
end
3939
end
4040

41+
def initialize(node)
42+
raise ArgumentError, "Please ensure that #initialize of #{self.class} accepts one argument" unless node
43+
super
44+
end
45+
4146
# Return true of the other element is the same underlying DOM node.
4247
#
4348
# @return [Boolean]

opal/browser/socket.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ module Browser
44
# connection.
55
#
66
# @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
7-
class Socket
7+
class Socket < IO
88
def self.supported?
99
Browser.supports? :WebSocket
1010
end
1111

1212
include Native::Wrapper
13-
include IO::Writable
13+
include IO::Writable if defined? IO::Writable
1414
include Event::Target
1515

1616
target {|value|

opal/browser/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Browser
2-
VERSION = '0.2.0'
2+
VERSION = '0.3.0'
33
end

spec/dom/element/custom_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
def create_custom_class(name, observed_attrs = [])
1010
Class.new(Browser::DOM::Element::Custom) do
11-
def initialize
11+
def initialize(node)
1212
super
1313
$scratchpad[:initialized] = true
1414
end

0 commit comments

Comments
 (0)