Skip to content

Commit f510f1e

Browse files
committed
Update .travis.yml to use elixir 1.5-rc.0. Add foreach implementation to lists
1 parent 2b88724 commit f510f1e

4 files changed

Lines changed: 18 additions & 12 deletions

File tree

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
erlang 20.0
2-
elixir ref-d19a92b
2+
elixir ref-v1.5.0-rc.0
33
nodejs 8.1.0

.travis.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
sudo: false
2-
language: erlang
2+
language: elixir
3+
elixir:
4+
- 1.5.0-rc.0
35
otp_release:
4-
- 20.0-rc1
6+
- 20.0
57
env:
6-
- TRAVIS_NODE_VERSION="7"
8+
- TRAVIS_NODE_VERSION="8"
79
install:
810
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
911
- npm install -g yarn
1012
- yarn
11-
before_script:
12-
- wget http://s3.hex.pm/builds/elixir/master.zip
13-
- unzip -d elixir master.zip
14-
- export PATH=$(pwd)/elixir/bin:${PATH}
15-
- mix local.rebar --force
13+
script:
1614
- mix local.hex --force
15+
- mix local.rebar --force
1716
- mix deps.get
18-
script:
17+
- mix compile
1918
- yarn build
2019
- mix test
2120
- yarn test
@@ -26,4 +25,4 @@ notifications:
2625
- https://webhooks.gitter.im/e/fbd8944d285c0696dc41
2726
on_success: always # options: [always|never|change] default: always
2827
on_failure: always # options: [always|never|change] default: always
29-
on_start: never # options: [always|never|change] default: always
28+
on_start: never # options: [always|never|change] default: always

src/javascript/lib/core/erlang_compat/lists.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ function reverse(list) {
44
return [...list].reverse();
55
}
66

7+
function foreach(fun, list) {
8+
list.forEach(x => fun(x));
9+
10+
return Symbol.for('ok');
11+
}
12+
713
export default {
814
reverse,
15+
foreach,
916
};

test/support/main.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defmodule Main do
22
def start(:normal, [callback]) do
33
callback.("started")
4-
Enum.each(1..5, fn(x) -> JS.console.log(x) end)
4+
Enum.each(%{a: 1}, fn(x) -> JS.console.log(x) end)
55
end
66
end

0 commit comments

Comments
 (0)