opal-rails 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d45a6c9723969146b15e0ad972edf6404c9be369
4
- data.tar.gz: bb9b728766323da3fecfc62055798e56d73edcd2
2
+ SHA256:
3
+ metadata.gz: b314c6a269955167f4f34d06e85c89e8f9c800eeb45e8e502b493507eec0385c
4
+ data.tar.gz: dc06fbc463089f0aa2708f01009abe1450c8040acfb64704582e34ddcccbfa4a
5
5
  SHA512:
6
- metadata.gz: 0eb449a56a0939671ead5111a45afcdfd60535aa20b50277d1b9ba79b43251d1b7b60b9e11614588bb3608ec12b7163a52928945c8dd65d02e1c883018fa7213
7
- data.tar.gz: 0b1acc765c5abf1d3f286990ec792a2caff104b01d9e260facfbd62b93e234f46ec0644ffe2e49c1c8b30c4869eae307e82f22904bf59e5f039fe4f047f474d1
6
+ metadata.gz: 21659200f07711d09a7bc6db2a47578dc5c4f7a26c0e4b6f7dfa64a13601388b1fe173bf3facdf4ba6ef7c6745858e0dbd69e571cfd8f455b674399e3bb4e6de
7
+ data.tar.gz: 5910962dfb5ad9122147ee71a61dec9bfa3523837514397793cce9150808d4207ed03cb06ebe1e5263f6d41df68ee651a8ca2b69a5100e5cd916b0a3069cc3ca
@@ -6,19 +6,27 @@ cache:
6
6
  bundler: true
7
7
 
8
8
  rvm:
9
- - 2.4.0
10
- - 2.3.3
11
- - 2.2.4
9
+ - 2.5.0
10
+ - 2.4.2
11
+ - 2.3.5
12
+ - 2.2.8
12
13
  - 2.1.10
13
14
 
14
- before_script:
15
- # - "export DISPLAY=:99.0"
16
- # - "sh -e /etc/init.d/xvfb start"
17
- - "gem install appraisal"
18
- - "appraisal install"
15
+ gemfile:
16
+ - gemfiles/rails_4_2_opal_master.gemfile
17
+ - gemfiles/rails_5_0_opal_master.gemfile
18
+ - gemfiles/rails_5_1_opal_master.gemfile
19
+ - gemfiles/rails_4_2_opal_0_10.gemfile
20
+ - gemfiles/rails_5_0_opal_0_10.gemfile
21
+ - gemfiles/rails_5_1_opal_0_10.gemfile
19
22
 
20
- script: "appraisal rake"
23
+ before_script: bundle install
24
+ script: "bundle exec rake"
21
25
 
22
- notifications:
23
- irc: "irc.freenode.org#opal"
26
+ before_install:
27
+ - "export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
28
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
29
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
30
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
31
+ - "phantomjs --version"
24
32
 
data/Appraisals CHANGED
@@ -2,19 +2,36 @@ current_ruby = Gem::Version.new(RUBY_VERSION)
2
2
  ruby_2_2_2 = Gem::Version.new('2.2.2')
3
3
  ruby_2_4_0 = Gem::Version.new('2.4.0')
4
4
 
5
- appraise "rails-4-1" do
6
- gem "rails", "~> 4.1.16"
7
- gem "sprockets-rails", "< 3"
8
- end if current_ruby < ruby_2_4_0
5
+ ENV['OPAL_VERSION'] = nil # ensure the env is clean
9
6
 
10
- appraise "rails-4-2" do
11
- gem "rails", "~> 4.2.7"
12
- end
7
+ {
8
+ opal_master: -> gemfile do
9
+ gemfile.gem 'opal', github: 'opal', branch: :master
10
+ gemfile.gem 'opal-rspec', github: 'opal/opal-rspec', branch: 'elia/opal-master'
11
+ gemfile.gem 'opal-sprockets', github: 'opal/opal-sprockets', branch: :master
12
+ end,
13
+ opal_0_10: -> gemfile do
14
+ gemfile.gem 'opal', '~> 0.10.5'
15
+ end,
16
+ }.each do |opal_version, gem_opal|
17
+ appraise "rails-4-1-#{opal_version}" do
18
+ gem "rails", "~> 4.1.16"
19
+ gem "sprockets-rails", "< 3"
20
+ gem_opal[self]
21
+ end if current_ruby < ruby_2_4_0
22
+
23
+ appraise "rails-4-2-#{opal_version}" do
24
+ gem "rails", "~> 4.2.7"
25
+ gem_opal[self]
26
+ end
13
27
 
14
- appraise "rails-5-0" do
15
- gem "rails", "~> 5.0.0"
16
- end if current_ruby >= ruby_2_2_2
28
+ appraise "rails-5-0-#{opal_version}" do
29
+ gem "rails", "~> 5.0.0"
30
+ gem_opal[self]
31
+ end if current_ruby >= ruby_2_2_2
17
32
 
18
- appraise "rails-5-1" do
19
- gem "rails", "~> 5.1.0"
20
- end if current_ruby >= ruby_2_2_2
33
+ appraise "rails-5-1-#{opal_version}" do
34
+ gem "rails", "~> 5.1.0"
35
+ gem_opal[self]
36
+ end if current_ruby >= ruby_2_2_2
37
+ end
@@ -21,7 +21,19 @@ Whitespace conventions:
21
21
 
22
22
 
23
23
 
24
- ## [0.9.3] - 2017-05-08
24
+ ## [0.9.4](https://github.com/opal/opal-rails/compare/v0.9.3...HEAD) - 2018-02-13
25
+
26
+
27
+ ### Changed
28
+
29
+ - Improved documentation simplifying the basic usage example
30
+ - Allow Opal v0.11
31
+ - Improved testing
32
+
33
+
34
+
35
+
36
+ ## [0.9.3](https://github.com/opal/opal-rails/compare/v0.9.2...v0.9.3) - 2017-05-08
25
37
 
26
38
 
27
39
  ### Added
@@ -202,7 +214,6 @@ Whitespace conventions:
202
214
 
203
215
 
204
216
 
205
- [Unreleased]: https://github.com/opal/opal-rails/compare/v0.9.2...HEAD
206
217
  [0.9.2]: https://github.com/opal/opal-rails/compare/v0.9.1...v0.9.2
207
218
  [0.9.1]: https://github.com/opal/opal-rails/compare/v0.9.0...v0.9.1
208
219
  [0.9.0]: https://github.com/opal/opal-rails/compare/v0.8.1...v0.9.0
data/Gemfile CHANGED
@@ -4,3 +4,18 @@ gemspec
4
4
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.2')
5
5
  gem 'rails', '< 5'
6
6
  end
7
+
8
+ if ENV['OPAL_VERSION'] == 'master'
9
+ gem 'opal', github: 'opal', branch: :master
10
+ gem 'opal-rspec', github: 'opal/opal-rspec', branch: 'elia/opal-master'
11
+ gem 'opal-sprockets', github: 'opal/opal-sprockets', branch: :master
12
+ end
13
+
14
+ # NOTE:
15
+ #
16
+ # building capybara-webkit with homebrew:
17
+ #
18
+ # brew install qt@5.5
19
+ # export PATH=(brew --prefix qt@5.5)/bin:"$PATH"
20
+ # bundle install
21
+ #
data/README.md CHANGED
@@ -44,8 +44,28 @@ For a full list of the available configuration options please refer to: [lib/opa
44
44
 
45
45
  ## Usage
46
46
 
47
- Rename `app/assets/javascripts/application.js` to `app/assets/javascripts/application.js.rb` and
48
- replace the Sprockets directives with plain requires as follows:
47
+ ### Basic example
48
+
49
+ 1. Rename `app/assets/javascripts/application.js` to `app/assets/javascripts/application.js.rb`
50
+ 2. Replace the Sprockets directives with plain requires
51
+
52
+ ```ruby
53
+ # Require the opal runtime and core library
54
+ require 'opal'
55
+
56
+ # For Rails 5.1 and above, otherwise use 'opal_ujs'
57
+ require 'rails_ujs'
58
+
59
+ # Require of JS libraries will be forwarded to sprockets as is
60
+ require 'turbolinks'
61
+
62
+ # a Ruby equivalent of the require_tree Sprockets directive is available
63
+ require_tree '.'
64
+
65
+ puts "hello world!"
66
+ ```
67
+
68
+ ### A more extensive example
49
69
 
50
70
  ```ruby
51
71
  require 'opal'
@@ -81,18 +101,19 @@ $$[:document].addEventListener(:DOMContentLoaded, -> {
81
101
  ```
82
102
 
83
103
 
84
- ### Using Sprockets directives
104
+ ### Using Sprockets directives and `application.js`
85
105
 
86
- If you want to use `application.js` (instead of `application.js.rb`) and keep Sprockets directives, you'll need to load the Opal files you require via Sprockets manually, e.g.:
106
+ If you want to use `application.js` (instead of `application.js.rb`) and keep using Sprockets directives, you'll need to load the Opal files you require via Sprockets manually, e.g.:
87
107
 
88
108
  ```js
89
109
  //= require opal
90
- //= require opal_ujs
110
+ //= require rails_ujs
91
111
  //= require turbolinks
92
112
  //= require_tree .
93
- //= require foobar
113
+ //= require app
94
114
 
95
- Opal.load('foobar');
115
+ Opal.load('opal');
116
+ Opal.load('app');
96
117
  ```
97
118
 
98
119
 
@@ -1,3 +1,5 @@
1
+ require 'opal/sprockets'
2
+
1
3
  module OpalHelper
2
4
  def opal_tag(opal_code = nil, &block)
3
5
  opal_code ||= capture(&block)
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module Rails
3
- VERSION = '0.9.3'
3
+ VERSION = '0.9.4'
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.add_dependency 'sprockets-rails', '>= 2.3.3', '< 4.0'
30
30
  s.add_dependency 'jquery-rails'
31
31
 
32
- s.add_dependency 'opal', '>= 0.8.0', '< 0.11'
32
+ s.add_dependency 'opal', '>= 0.10.0', '< 0.12'
33
33
  s.add_dependency 'opal-jquery', '~> 0.4.0'
34
34
  s.add_dependency 'opal-sprockets', '~> 0.4.1'
35
35
  s.add_dependency 'opal-activesupport', '>= 0.0.5'
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
38
38
  s.add_development_dependency 'launchy'
39
39
  s.add_development_dependency 'capybara', '~> 2.3'
40
40
  s.add_development_dependency 'poltergeist', '~> 1.15.0'
41
- s.add_development_dependency 'rspec-rails', '~> 3.0'
41
+ s.add_development_dependency 'rspec-rails'
42
42
  s.add_development_dependency 'appraisal', '~> 2.1'
43
43
  s.add_development_dependency 'sqlite3'
44
44
  s.add_development_dependency 'capybara-webkit'
@@ -10,7 +10,7 @@ RSpec.configure do |config|
10
10
  end
11
11
 
12
12
  Capybara.register_driver :poltergeist do |app|
13
- Capybara::Poltergeist::Driver.new(app, phantomjs_logger: PoltergeistConsole)
13
+ Capybara::Poltergeist::Driver.new(app, phantomjs_logger: PoltergeistConsole, timeout: 150)
14
14
  end
15
15
 
16
16
  Capybara.javascript_driver = :poltergeist
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elia Schito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-08 00:00:00.000000000 Z
11
+ date: 2018-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -70,20 +70,20 @@ dependencies:
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: 0.8.0
73
+ version: 0.10.0
74
74
  - - "<"
75
75
  - !ruby/object:Gem::Version
76
- version: '0.11'
76
+ version: '0.12'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 0.8.0
83
+ version: 0.10.0
84
84
  - - "<"
85
85
  - !ruby/object:Gem::Version
86
- version: '0.11'
86
+ version: '0.12'
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: opal-jquery
89
89
  requirement: !ruby/object:Gem::Requirement
@@ -186,16 +186,16 @@ dependencies:
186
186
  name: rspec-rails
187
187
  requirement: !ruby/object:Gem::Requirement
188
188
  requirements:
189
- - - "~>"
189
+ - - ">="
190
190
  - !ruby/object:Gem::Version
191
- version: '3.0'
191
+ version: '0'
192
192
  type: :development
193
193
  prerelease: false
194
194
  version_requirements: !ruby/object:Gem::Requirement
195
195
  requirements:
196
- - - "~>"
196
+ - - ">="
197
197
  - !ruby/object:Gem::Version
198
- version: '3.0'
198
+ version: '0'
199
199
  - !ruby/object:Gem::Dependency
200
200
  name: appraisal
201
201
  requirement: !ruby/object:Gem::Requirement
@@ -319,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  version: '0'
320
320
  requirements: []
321
321
  rubyforge_project: opal-rails
322
- rubygems_version: 2.6.8
322
+ rubygems_version: 2.7.4
323
323
  signing_key:
324
324
  specification_version: 4
325
325
  summary: Rails bindings for opal JS engine