opal-jquery 0.4.5 → 0.5.0
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 +4 -4
- data/.gitignore +4 -0
- data/CHANGELOG.md +11 -2
- data/config.ru +1 -0
- data/lib/opal/jquery/document.rb +2 -0
- data/lib/opal/jquery/element.rb +3 -0
- data/lib/opal/jquery/event.rb +12 -4
- data/lib/opal/jquery/http.rb +3 -3
- data/lib/opal/jquery/version.rb +1 -1
- data/lib/opal/jquery.rb +1 -1
- data/opal-jquery.gemspec +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c77dd6b6a0370f6608895f558ed760f3eb3209eaa779cf9d5b0b53ba92025702
|
4
|
+
data.tar.gz: 1e5c83c4211904510375188ed3a3439f2e6579007d3e3bdeaf41fd190d2882aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f4338bd0f5c38962cac9b3aba1b39b76849ced9b61702091791296e51e6de9f92e2959becfd6587f62b6fa1fd5af8c951ea473fac13dee22ebba2e329f91b1f
|
7
|
+
data.tar.gz: e4eb64e225f66476611cde51b69af4061bf20f47dec47cb1f4cabefdfe27dc3005c6887d93b27d7bfea1d2f08ccfce6861e9f8856ea733cd7847d0d7a82d5428
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
|
-
## [0.5.0](https://github.com/opal/opal-jquery/compare/v0.4.5
|
1
|
+
## [0.5.0](https://github.com/opal/opal-jquery/compare/v0.4.6...v0.5.0) 2024-01-05
|
2
2
|
|
3
|
-
*
|
3
|
+
* Added `Event#location` (#114)
|
4
|
+
* Add `Event#touch_count`; access each point via an optional `index` on `Event#touch_x`/`Event#touch_y` (#117)
|
5
|
+
* Add setting to prevent payload automatic processing (#103) **breaking**
|
6
|
+
* Remove untaint method for Ruby 3.2 compatibility (#119) **breaking**
|
7
|
+
|
8
|
+
## [0.4.6](https://github.com/opal/opal-jquery/compare/v0.4.5...v0.4.6) 2021-10-11
|
9
|
+
|
10
|
+
* Initialize @@__isReady (#115)
|
11
|
+
|
12
|
+
* Added `Element#select` (#111)
|
4
13
|
|
5
14
|
## [0.4.5](https://github.com/opal/opal-jquery/compare/v0.4.4...v0.4.5) 2021-07-28
|
6
15
|
|
data/config.ru
CHANGED
data/lib/opal/jquery/document.rb
CHANGED
data/lib/opal/jquery/element.rb
CHANGED
data/lib/opal/jquery/event.rb
CHANGED
@@ -163,12 +163,20 @@ class Event
|
|
163
163
|
`#@native.pageY`
|
164
164
|
end
|
165
165
|
|
166
|
-
def
|
167
|
-
`#@native.originalEvent.touches
|
166
|
+
def touch_count
|
167
|
+
`#@native.originalEvent.touches.length`
|
168
168
|
end
|
169
169
|
|
170
|
-
def
|
171
|
-
`#@native.originalEvent.touches[
|
170
|
+
def touch_x(index = 0)
|
171
|
+
`#@native.originalEvent.touches[#{index}].pageX` if index < touch_count
|
172
|
+
end
|
173
|
+
|
174
|
+
def touch_y(index = 0)
|
175
|
+
`#@native.originalEvent.touches[#{index}].pageY` if index < touch_count
|
176
|
+
end
|
177
|
+
|
178
|
+
def location
|
179
|
+
`#@native.originalEvent.location`
|
172
180
|
end
|
173
181
|
|
174
182
|
def ctrl_key
|
data/lib/opal/jquery/http.rb
CHANGED
@@ -161,14 +161,14 @@ class HTTP
|
|
161
161
|
|
162
162
|
@settings.update options
|
163
163
|
|
164
|
-
settings, payload = @settings.to_n, @payload
|
164
|
+
settings, payload = @settings.to_n, @payload.to_n
|
165
165
|
|
166
166
|
%x{
|
167
|
-
if (typeof(
|
167
|
+
if (typeof(payload) === 'string' || settings.processData === false) {
|
168
168
|
settings.data = payload;
|
169
169
|
}
|
170
170
|
else if (payload != nil) {
|
171
|
-
settings.data = payload
|
171
|
+
settings.data = JSON.stringify(payload);
|
172
172
|
settings.contentType = 'application/json';
|
173
173
|
}
|
174
174
|
|
data/lib/opal/jquery/version.rb
CHANGED
data/lib/opal/jquery.rb
CHANGED
data/opal-jquery.gemspec
CHANGED
@@ -4,11 +4,11 @@ require File.expand_path('../lib/opal/jquery/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'opal-jquery'
|
6
6
|
s.version = Opal::JQuery::VERSION
|
7
|
-
s.authors = ['Adam Beynon', 'Elia Schito']
|
7
|
+
s.authors = ['Adam Beynon', 'Elia Schito', 'Andy Maleh']
|
8
8
|
s.email = 'elia@schito.me'
|
9
9
|
s.homepage = 'https://github.com/opal/opal-jquery#readme'
|
10
10
|
s.summary = 'Opal access to jQuery'
|
11
|
-
s.description = 'Opal DOM library for jQuery'
|
11
|
+
s.description = 'Opal DOM library for jQuery (Use jQuery with Ruby code)'
|
12
12
|
|
13
13
|
s.files = `git ls-files`.split("\n")
|
14
14
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-jquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Beynon
|
8
8
|
- Elia Schito
|
9
|
+
- Andy Maleh
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2024-01-06 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: opal
|
@@ -99,7 +100,7 @@ dependencies:
|
|
99
100
|
- - ">="
|
100
101
|
- !ruby/object:Gem::Version
|
101
102
|
version: '0'
|
102
|
-
description: Opal DOM library for jQuery
|
103
|
+
description: Opal DOM library for jQuery (Use jQuery with Ruby code)
|
103
104
|
email: elia@schito.me
|
104
105
|
executables: []
|
105
106
|
extensions: []
|
@@ -186,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
187
|
- !ruby/object:Gem::Version
|
187
188
|
version: '0'
|
188
189
|
requirements: []
|
189
|
-
rubygems_version: 3.
|
190
|
+
rubygems_version: 3.3.6
|
190
191
|
signing_key:
|
191
192
|
specification_version: 4
|
192
193
|
summary: Opal access to jQuery
|