Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal-jquery
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e1f9a738a4d8
Choose a base ref
...
head repository: opal/opal-jquery
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9d5f4cb8b692
Choose a head ref
  • 8 commits
  • 5 files changed
  • 1 contributor

Commits on Oct 7, 2014

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    06c522b View commit details
  2. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    46c9df9 View commit details
  3. Quotes

    elia committed Oct 7, 2014

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    69e9117 View commit details
  4. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    3d8a01d View commit details
  5. Update to latest opal-rspec

    elia committed Oct 7, 2014

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    f38fc9d View commit details
  6. Add spec requires to config.ru

    elia committed Oct 7, 2014

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    331336a View commit details
  7. Fix Element#animate async spcs

    elia committed Oct 7, 2014

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    faeffbf View commit details
  8. Whitespace

    elia committed Oct 7, 2014

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    9d5f4cb View commit details
Showing with 18 additions and 16 deletions.
  1. +2 −5 Gemfile
  2. +3 −0 config.ru
  3. +3 −2 opal-jquery.gemspec
  4. +2 −1 opal/opal-jquery/element.rb
  5. +8 −8 spec/element/animations_spec.rb
7 changes: 2 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
source "https://rubygems.org"
source 'https://rubygems.org'
gemspec

gem 'opal'
gem 'opal-rspec', '0.3.0.beta2'

gem 'rake'
gem 'opal', github: 'opal/opal'
3 changes: 3 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
require 'bundler'
Bundler.require

require 'opal-rspec'
Opal.append_path File.expand_path('../spec', __FILE__)

run Opal::Server.new { |s|
s.main = 'opal/rspec/sprockets_runner'
s.append_path 'spec'
5 changes: 3 additions & 2 deletions opal-jquery.gemspec
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_paths = ['lib']

s.add_runtime_dependency 'opal', ['>= 0.5.0', '< 1.0.0']
s.add_development_dependency 'opal-rspec', '~> 0.3.0'
s.add_runtime_dependency 'opal', '~> 0.7.0.dev'
s.add_development_dependency 'opal-rspec', '~> 0.4.0.beta1'
s.add_development_dependency 'yard'
s.add_development_dependency 'rake'
end
3 changes: 2 additions & 1 deletion opal/opal-jquery/element.rb
Original file line number Diff line number Diff line change
@@ -35,10 +35,11 @@ def self.parse(str)
end

def self.expose(*methods)
method = nil
%x{
for (var i = 0, length = methods.length, method; i < length; i++) {
method = methods[i];
self._proto['$' + method] = self._proto[method];
#{alias_native method, method}
}
return nil;
16 changes: 8 additions & 8 deletions spec/element/animations_spec.rb
Original file line number Diff line number Diff line change
@@ -23,11 +23,11 @@
foo = Element.find "#animate-foo"
foo.animate :width => "200px", :speed => 100

set_timeout 105 do
run_async {
run_async {
set_timeout 150 do
(foo.css("width").to_f > 199).should eq(true)
}
end
end
}
end

async "should accept a block as a callback" do
@@ -36,11 +36,11 @@
foo.add_class "finished"
end

set_timeout 405 do
run_async {
run_async {
set_timeout 405 do
foo.class_name.should eq("finished")
}
end
end
}
end
end
end