opal 0.8.0.rc2 → 0.8.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/CHANGELOG.md +58 -18
- data/lib/opal/sprockets/source_map_server.rb +1 -1
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/hash.rb +16 -2
- data/opal/corelib/variables.rb +2 -2
- data/spec/opal/core/hash/has_value_spec.rb +13 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b5e00792787aefc0842b3c9447e02b0a700081
|
4
|
+
data.tar.gz: 097ece680f61aaca4b7fd4e0b0ec11f3dae434c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce94cda65dca8cdbc6991a8bf7e09a51d8fa1b67776f9062f34171c9b9ba7f0f7763d5e540f4e529dff89698cfc8ea548557572062653ce03ced35cea8706a10
|
7
|
+
data.tar.gz: e2e4c8a6385f356e9b71bb32a1e8d806d82e5e32db1b15629405eaa9545593b81b95bc04f620bd12f234da369891d9b85534fb0bc9d0aba3e5f18c8d7cd2ad8f
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
## edge (upcoming 0.8.0)
|
2
2
|
|
3
|
+
* Update to Sprockets v3.0.
|
4
|
+
|
5
|
+
* Delegate dependency management directly to Sprockets (when used) making sourcemaps swift again.
|
6
|
+
This means code generated by sprockets will always need to be bootstrapped via `Opal.load` or `Opal.require`.
|
7
|
+
Luckily `Opal::Processor.load_asset_code(sprockets, name)` does just that in the right way.
|
8
|
+
|
9
|
+
* Enable operator inlining by default in the compiler.
|
10
|
+
|
11
|
+
* Fix `Promise#always`.
|
12
|
+
|
3
13
|
* Fix `String#split` when no match is found and a limit is provided
|
4
14
|
|
5
15
|
* Fix `require_tree(".")` when used from file at the root of the assets paths
|
6
16
|
|
7
17
|
* `Hash[]` implementation fully compliant with rubyspec
|
8
18
|
|
9
|
-
* Removed minitest from stdlib. It's not part of MRI and it never belonged there, checkout the opal-minitest gem instead.
|
19
|
+
* Removed `minitest` from stdlib. It's not part of MRI and it never belonged there, checkout the `opal-minitest` gem instead.
|
10
20
|
|
11
21
|
* Parser: Allow trailing comma in paren arglists, after normal args as
|
12
22
|
well as assoc args.
|
@@ -17,23 +27,53 @@
|
|
17
27
|
* Parser: Fix bug where keyword arguments could not be parsed if
|
18
28
|
method definition did not have parens around arguments.
|
19
29
|
|
20
|
-
*
|
21
|
-
|
22
|
-
* `
|
23
|
-
|
24
|
-
* `Array#product`
|
25
|
-
|
26
|
-
* `
|
27
|
-
|
28
|
-
* `
|
29
|
-
|
30
|
-
* `
|
31
|
-
|
32
|
-
*
|
33
|
-
|
34
|
-
*
|
35
|
-
|
36
|
-
|
30
|
+
* Newly compliant with RubySpec:
|
31
|
+
* `Array#bsearch`
|
32
|
+
* `Array#combination`
|
33
|
+
* `Array#permutation`
|
34
|
+
* `Array#product`
|
35
|
+
* `Array#rotate!`
|
36
|
+
* `Array#rotate`
|
37
|
+
* `Array#sample`
|
38
|
+
* `Array#to_h`
|
39
|
+
* `Array#values_at`
|
40
|
+
* `Array#zip`
|
41
|
+
* `Enumerator#with_index`
|
42
|
+
* `Kernel#===`
|
43
|
+
* `Kernel#Array`
|
44
|
+
* `Kernel#Float`
|
45
|
+
* `Kernel#Hash`
|
46
|
+
* `Kernel#Integer`
|
47
|
+
* `Kernel#String`
|
48
|
+
* `Kernel#format`
|
49
|
+
* `Kernel#sprintf`
|
50
|
+
* `MatchData#==`
|
51
|
+
* `MatchData#eql?`
|
52
|
+
* `MatchData#values_at`
|
53
|
+
* `Module#instance_methods`
|
54
|
+
* `Regexp#match`
|
55
|
+
* `String#%`
|
56
|
+
* `String#===`
|
57
|
+
* `String#==`
|
58
|
+
* `String#[]`
|
59
|
+
* `String#each_line`
|
60
|
+
* `String#eql?`
|
61
|
+
* `String#index`
|
62
|
+
* `String#inspect`
|
63
|
+
* `String#lines`
|
64
|
+
* `String#match`
|
65
|
+
* `String#next`
|
66
|
+
* `String#oct`
|
67
|
+
* `String#scan`
|
68
|
+
* `String#slice`
|
69
|
+
* `String#split`
|
70
|
+
* `String#succ`
|
71
|
+
* `String#to_i`
|
72
|
+
* `String#try_convert`
|
73
|
+
|
74
|
+
* Misc corelib fixes:
|
75
|
+
* `Module#const_get` accepts a scoped constant name
|
76
|
+
* `Regexp#===` sets global match data vars
|
37
77
|
|
38
78
|
## 0.7.2 2015-04-23
|
39
79
|
|
data/lib/opal/version.rb
CHANGED
data/opal/corelib/hash.rb
CHANGED
@@ -539,8 +539,22 @@ class Hash
|
|
539
539
|
|
540
540
|
def has_value?(value)
|
541
541
|
%x{
|
542
|
-
|
543
|
-
|
542
|
+
var _map = self.map,
|
543
|
+
smap = self.smap,
|
544
|
+
keys = self.keys, key, map, khash;
|
545
|
+
|
546
|
+
for (var i = 0, length = keys.length; i < length; i++) {
|
547
|
+
key = keys[i];
|
548
|
+
|
549
|
+
if (key.$$is_string) {
|
550
|
+
map = smap;
|
551
|
+
khash = key;
|
552
|
+
} else {
|
553
|
+
map = _map;
|
554
|
+
khash = key.$hash();
|
555
|
+
}
|
556
|
+
|
557
|
+
if (#{`map[khash]` == value}) {
|
544
558
|
return true;
|
545
559
|
}
|
546
560
|
}
|
data/opal/corelib/variables.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
describe 'Hash#has_value?' do
|
2
|
+
context 'when hash contains provided value' do
|
3
|
+
it 'returns true' do
|
4
|
+
expect({ a: 1 }.has_value?(1)).to eq(true)
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
context 'when hash does not contain provided value' do
|
9
|
+
it 'returns false' do
|
10
|
+
expect({ a: 1 }.has_value?(2)).to eq(false)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.0.
|
4
|
+
version: 0.8.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Beynon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sourcemap
|
@@ -485,6 +485,7 @@ files:
|
|
485
485
|
- spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb
|
486
486
|
- spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb
|
487
487
|
- spec/opal/core/fixtures/require_tree_files/other/other 1.rb
|
488
|
+
- spec/opal/core/hash/has_value_spec.rb
|
488
489
|
- spec/opal/core/kernel/Array_spec.rb
|
489
490
|
- spec/opal/core/kernel/block_given_spec.rb
|
490
491
|
- spec/opal/core/kernel/class_spec.rb
|
@@ -1081,6 +1082,7 @@ test_files:
|
|
1081
1082
|
- spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb
|
1082
1083
|
- spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb
|
1083
1084
|
- spec/opal/core/fixtures/require_tree_files/other/other 1.rb
|
1085
|
+
- spec/opal/core/hash/has_value_spec.rb
|
1084
1086
|
- spec/opal/core/kernel/Array_spec.rb
|
1085
1087
|
- spec/opal/core/kernel/block_given_spec.rb
|
1086
1088
|
- spec/opal/core/kernel/class_spec.rb
|