Skip to content

Commit 782d166

Browse files
authored
Merge pull request #101 from JoyStream/development
dev to master - v0.2.0
2 parents eceb772 + 3c64098 commit 782d166

19 files changed

Lines changed: 213 additions & 513 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ conanbuildinfo*
77
node_modules/
88
dist/
99
joystream.log
10+
bin/

.travis.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,52 @@
1-
dist: trusty
2-
sudo: false
31
language: node_js
2+
43
node_js:
54
- "7"
6-
os:
7-
- osx
8-
- linux
5+
6+
matrix:
7+
include:
8+
- os: linux
9+
dist: trusty
10+
sudo: false
11+
- os: osx
12+
osx_image: xcode7.3
13+
sudo: false
14+
915
addons:
1016
apt:
1117
sources:
1218
- george-edison55-precise-backports
1319
packages:
1420
- cmake
1521
- cmake-data
22+
apt:
23+
packages:
24+
- fakeroot
25+
1626
before_install:
17-
- if [ "$TRAVIS_OS_NAME" = osx ]; then pip install conan; else pip install --user conan; fi
18-
- "conan remote add joystream https://api.bintray.com/conan/joystream/joystream True"
27+
- if [[ "$TRAVIS_OS_NAME" = osx ]]; then
28+
rvm install ruby-2.3.3;
29+
rvm --default use 2.3.3;
30+
ruby --version;
31+
brew update;
32+
brew upgrade python;
33+
export PATH="/usr/local/opt/python/libexec/bin:$PATH";
34+
export PYTHONPATH=`brew --prefix`/lib/python2.7/site-packages:$PYTHONPATH;
35+
pip install --upgrade pip setuptools;
36+
fi
37+
# Install conan
38+
- if [ "$TRAVIS_OS_NAME" = osx ]; then
39+
pip install "conan==0.28.1";
40+
pip uninstall pyopenssl;
41+
pip uninstall cryptography;
42+
pip install "pyopenssl>=16.0.0, <17.0.0";
43+
else
44+
pip install --user "conan==0.28.1";
45+
fi
46+
- conan remote add joystream https://api.bintray.com/conan/joystream/joystream True
47+
48+
install:
49+
50+
script:
51+
- npm install
52+
- npm test

appveyor.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
platform:
2+
- x64
3+
4+
environment:
5+
# Node version
6+
nodejs_version: "7"
7+
8+
init:
9+
- git config --global core.autocrlf input
10+
11+
install:
12+
- ps: Install-Product node $env:nodejs_version $env:platform
13+
# use npm@4.6.1 due to issues between npm5 and postinstall-build module behaviour
14+
# https://github.com/exogen/postinstall-build/issues/29
15+
- npm install -g npm@4.6.1
16+
- npm config set loglevel warn
17+
- pip install "conan==0.28.1"
18+
- conan remote add joystream https://api.bintray.com/conan/joystream/joystream True
19+
20+
build_script:
21+
- npm install
22+
23+
deploy_script:
24+
25+
test: on
26+
27+
test_script:
28+
npm test

build.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,21 @@ if(process.platform === 'win32') {
1111
process.chdir('../');
1212
}
1313

14-
function clean() {
14+
function clean () {
15+
function remove (path) {
16+
if (!fs.existsSync(path)) return
17+
try {
18+
fs.unlinkSync(path)
19+
} catch (e) {}
20+
}
21+
22+
remove('./conaninfo.txt')
23+
remove('./conanbuildinfo.cmake')
24+
remove('./conanbuildinfo.txt')
25+
1526
try {
16-
fs.unlinkSync('./conaninfo.txt')
17-
fs.unlinkSync('./conanbuildinfo.cmake')
18-
rimraf.sync(CMAKEJS_BUILD_DIR)
19-
} catch(e){}
27+
rimraf.sync(CMAKEJS_BUILD_DIR)
28+
} catch (e) {}
2029
}
2130

2231
function getRuntimeAndVersion() {
@@ -132,6 +141,7 @@ function rebuild(opts){
132141
}
133142

134143
clean()
144+
135145
getRuntimeAndVersion()
136146
.then(conanInstall)
137147
.then(rebuild)

conanfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ class JoyStreamNode(ConanFile):
55
requires = ("Libtorrent/1.1.1@joystream/stable",
66
"LibtorrentNode/0.0.6@joystream/stable",
77
"CoinCore/0.1.2@joystream/stable",
8-
"Common/0.1.2@joystream/stable",
8+
"Common/0.1.3@joystream/stable",
99
"PaymentChannel/0.1.2@joystream/stable",
1010
"ProtocolWire/0.1.2@joystream/stable",
11-
"ProtocolStateMachine/0.1.2@joystream/stable",
12-
"ProtocolSession/0.1.4@joystream/stable",
13-
"Extension/0.1.6@joystream/stable",
11+
"ProtocolStateMachine/0.2.0@joystream/stable",
12+
"ProtocolSession/0.2.1@joystream/stable",
13+
"Extension/0.2.0@joystream/stable",
1414
"Boost/1.60.0@lasote/stable",
1515
"OpenSSL/1.0.2j@lasote/stable")
1616

examples/.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
purchase/buyer/
2-
purchase/seller/
1+
buyer/downloads/
2+
seller/downloads/
33

4-
dht/buyer/
5-
dht/seller/
4+
sintel.mp4
5+
"stock footage - clouds.m2ts"
6+
joystream.log

examples/basic/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/basic/basic.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

examples/buyer/buyer.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ function letsBuy (torrent) {
4747
})
4848
})
4949

50+
torrent.on('allSellersGone', function() {
51+
lookingForSeller = true
52+
})
53+
5054
// Wait for one suitable seller and start downloading
5155
torrent.on('peerPluginStatusUpdates', function (peerStatuses) {
5256
if (!lookingForSeller) return

examples/dht/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)