Skip to content

Commit 44ba204

Browse files
committedDec 7, 2014
Move core files under opal/jquery dir rather than opal-jquery
1 parent 035b78c commit 44ba204

14 files changed

+27
-21
lines changed
 

Diff for: ‎CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# EDGE
22

3+
* Move all files under `opal/jquery` require namespace, rather than
4+
current `opal-jquery` require paths.
5+
36
* Add `Browser::Window` class, and make `::Window` an instance of it.
47

58
* Make `Document` include `Browser::DocumentMethods` which is a simple

Diff for: ‎lib/opal/jquery.rb

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
require 'opal'
2-
require 'opal/jquery/version'
1+
if RUBY_ENGINE == 'opal'
2+
require 'opal/jquery/window'
3+
require 'opal/jquery/document'
4+
require 'opal/jquery/element'
5+
require 'opal/jquery/event'
6+
require 'opal/jquery/http'
7+
require 'opal/jquery/kernel'
8+
else
9+
require 'opal'
10+
require 'opal/jquery/version'
311

4-
Opal.append_path File.expand_path('../../../opal', __FILE__).untaint
12+
Opal.append_path File.expand_path('../..', __FILE__).untaint
13+
end
File renamed without changes.

Diff for: ‎opal/opal-jquery/document.rb renamed to ‎lib/opal/jquery/document.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
require 'opal-jquery/constants'
2-
require 'opal-jquery/element'
1+
require 'opal/jquery/constants'
2+
require 'opal/jquery/element'
33

44
module Browser
55
# {Document} includes these methods to extend {Element}.

Diff for: ‎opal/opal-jquery/element.rb renamed to ‎lib/opal/jquery/element.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require 'native'
2-
require 'opal-jquery/constants'
2+
require 'opal/jquery/constants'
33

44
# {Element} is a toll-free bridged class that maps to native jQuery instances.
55
#

Diff for: ‎opal/opal-jquery/event.rb renamed to ‎lib/opal/jquery/event.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'opal-jquery/constants'
1+
require 'opal/jquery/constants'
22

33
# {Event} wraps native jQuery events into a ruby api. Instances of events
44
# can be accessed by {#to_n}.

Diff for: ‎opal/opal-jquery/http.rb renamed to ‎lib/opal/jquery/http.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'json'
22
require 'native'
33
require 'promise'
4-
require 'opal-jquery/constants'
4+
require 'opal/jquery/constants'
55

66
# {HTTP} is used to perform a `XMLHttpRequest` in ruby. It is a simple wrapper
77
# around jQuerys' `$.ajax` call. `XMLHttpRequest` is not wrapped directly as
File renamed without changes.

Diff for: ‎opal/opal-jquery/local_storage.rb renamed to ‎lib/opal/jquery/local_storage.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ module Browser
1111
# LocalStorage is not included by default when you require opal-jquery, so
1212
# you will need to require it explicitly in your code:
1313
#
14-
# require 'opal-jquery'
15-
# require 'opal-jquery/local_storage'
14+
# require 'opal/jquery'
15+
# require 'opal/jquery/local_storage'
1616
#
1717
# puts LocalStorage
1818
# # => #<LocalStorage>

Diff for: ‎opal/opal-jquery/rspec.rb renamed to ‎lib/opal/jquery/rspec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Browser
88
#
99
# require 'application'
1010
# require 'opal-rspec'
11-
# require 'opal-jquery/rspec'
11+
# require 'opal/jquery/rspec'
1212
#
1313
# Once required, the module is registered with `rspec` for all example
1414
# groups.

Diff for: ‎opal/opal-jquery/window.rb renamed to ‎lib/opal/jquery/window.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'opal-jquery/element'
1+
require 'opal/jquery/element'
22

33
module Browser
44
# {Window} instances are {Native} objects used to wrap native window instances.

Diff for: ‎opal/opal-jquery.rb

-6
This file was deleted.

Diff for: ‎spec/local_storage_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require 'spec_helper'
2-
require 'opal-jquery/local_storage'
2+
require 'opal/jquery/local_storage'
33

44
describe LocalStorage do
55
before { subject.clear }

Diff for: ‎spec/spec_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'opal-rspec'
2-
require 'opal-jquery'
3-
require 'opal-jquery/rspec'
2+
require 'opal/jquery'
3+
require 'opal/jquery/rspec'
44

55
module JQueryTestHelpers
66
def find(selector)

0 commit comments

Comments
 (0)
Please sign in to comment.