Procházet zdrojové kódy

Setup exercism client

- golang 1.4 networking libs favor IPv4; x-api listening on IPv6
  localhost.
- need golang 1.5+

Signed-off-by: Bronwyn Perry-Huston <bronhuston@gmail.com>
Signed-off-by: Cen Ge <cge@corelogic.com>
Signed-off-by: John Ryan <jtigger@infosysengr.com>
Dan Neumann před 10 roky
rodič
revize
b60bbbd2cd
4 změnil soubory, kde provedl 71 přidání a 19 odebrání
  1. 5
    1
      .travis.yml
  2. 35
    0
      bin/journey-setup-ci.sh
  3. 31
    0
      bin/journey-setup-local.sh
  4. 0
    18
      bin/journey-setup.sh

+ 5
- 1
.travis.yml Zobrazit soubor

@@ -6,9 +6,13 @@ jdk:
6 6
 # http://docs.travis-ci.com/user/migrating-from-legacy
7 7
 sudo: false
8 8
 cache: bundler
9
+addons:
10
+  apt:
11
+    packages:
12
+      - tree
9 13
 before_install:
10 14
   - rvm install 2.2.1
11 15
   - rvm use 2.2.1
12 16
 
13 17
 script:
14
-  - bin/journey-setup.sh
18
+  - bin/journey-setup-ci.sh

+ 35
- 0
bin/journey-setup-ci.sh Zobrazit soubor

@@ -0,0 +1,35 @@
1
+#!/bin/bash
2
+
3
+eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.5.3 bash)"
4
+go version
5
+
6
+git clone https://github.com/exercism/x-api
7
+cd x-api
8
+git submodule init -- metadata
9
+git submodule init -- tracks/java
10
+git submodule update
11
+
12
+gem install bundler
13
+bundle install
14
+
15
+RACK_ENV=development rackup&
16
+
17
+sleep 5
18
+
19
+export HOME=$HOME/build/bronhuston
20
+export GOPATH=$HOME
21
+export PATH=$PATH:$GOPATH/bin
22
+go get -u github.com/exercism/cli/exercism
23
+exercism -v
24
+
25
+cd ~
26
+pwd
27
+mkdir -p workspace/exercism/exercises
28
+cd ~/workspace/exercism/exercises
29
+exercism configure --dir=~/workspace/exercism/exercises
30
+exercism configure --api http://localhost:9292
31
+
32
+curl -v 'localhost:9292/v2/exercises/java/bob'
33
+exercism --verbose debug
34
+exercism --verbose fetch java bob
35
+tree java

+ 31
- 0
bin/journey-setup-local.sh Zobrazit soubor

@@ -0,0 +1,31 @@
1
+#!/bin/bash
2
+
3
+git clone https://github.com/exercism/x-api
4
+cd x-api
5
+git submodule init -- metadata
6
+git submodule init -- tracks/java
7
+git submodule update
8
+
9
+gem install bundler
10
+bundle install
11
+
12
+RACK_ENV=development rackup&
13
+
14
+sleep 5
15
+
16
+export GOPATH=$HOME/workspace
17
+export PATH=$PATH:$GOPATH/bin
18
+go get -u github.com/exercism/cli/exercism
19
+exercism -v
20
+
21
+cd ~
22
+mkdir -p workspace/exercism/exercises
23
+cd ~/workspace/exercism/exercises
24
+exercism configure --dir=~/workspace/exercism/exercises
25
+exercism configure --api http://localhost:9292
26
+
27
+curl -v 'localhost:9292/v2/exercises/java/bob'
28
+
29
+exercism --verbose debug
30
+exercism --verbose fetch java bob
31
+tree java

+ 0
- 18
bin/journey-setup.sh Zobrazit soubor

@@ -1,18 +0,0 @@
1
-#!/bin/bash
2
-
3
-git clone https://github.com/exercism/x-api
4
-cd x-api
5
-git submodule init -- metadata
6
-git submodule init -- tracks/java
7
-git submodule update
8
-
9
-gem install bundler
10
-bundle install
11
-
12
-RACK_ENV=development rackup&
13
-
14
-sleep 5
15
-
16
-ps aux | grep rackup
17
-
18
-curl -i 'localhost:9292/tracks/java/hello-world'