Skip to content

Commit 387c70e

Browse files
authored
Merge pull request #88 from embulk/fix-travis2
Fix travis to work with embulk 0.9.x
2 parents d08803c + 46cf9d7 commit 387c70e

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ matrix:
44
- env: EMBULK_VERSION=0.8.39
55
rvm: jruby-9.1.5.0 # bundled jruby version
66
jdk: openjdk7 # embulk 0.8.x uses jdk7
7-
# - env: EMBULK_VERSION=0.9.15
8-
# rvm: jruby-9.1.5.0 # bundled jruby version
9-
# jdk: openjdk8 # embulk 0.9.x uses jdk8
10-
# - env: EMBULK_VERSION=latest
11-
# rvm: jruby-9.1.5.0 # ?
12-
# jdk: openjdk8 # ?
13-
# allow_failures:
14-
# - env: EMBULK_VERSION=latest
15-
# before_install:
16-
# - curl -o embulk.jar --create-dirs -L "http://dl.embulk.org/embulk-${EMBULK_VERSION}.jar"
17-
# script: bundle exec env RUBYOPT="-r $PWD/embulk.jar -r embulk" rake test
7+
- env: EMBULK_VERSION=0.9.15
8+
rvm: jruby-9.1.5.0 # bundled jruby version
9+
jdk: openjdk8 # embulk 0.9.x uses jdk8
10+
- env: EMBULK_VERSION=latest
11+
rvm: jruby-9.1.5.0 # ?
12+
jdk: openjdk8 # ?
13+
allow_failures:
14+
- env: EMBULK_VERSION=latest
15+
before_install:
16+
- curl -o embulk.jar --create-dirs -L "http://dl.embulk.org/embulk-${EMBULK_VERSION}.jar"
17+
script: bundle exec env RUBYOPT="-r ./embulk.jar" rake test

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,16 +444,24 @@ $ embulk run -X page_size=1 -b . -l trace example/example.yml
444444
445445
### Run test:
446446
447+
Place your embulk with `.jar` extension:
448+
449+
```
450+
$ cp -a $(which embulk) embulk.jar
451+
```
452+
453+
Run tests with `env RUBYOPT="-r ./embulk.jar`:
454+
447455
```
448-
$ bundle exec rake test
456+
$ bundle exec env RUBYOPT="-r ./embulk.jar" rake test
449457
```
450458
451459
To run tests which actually connects to BigQuery such as test/test\_bigquery\_client.rb,
452460
prepare a json\_keyfile at example/your-project-000.json, then
453461
454462
```
455-
$ bundle exec ruby test/test_bigquery_client.rb
456-
$ bundle exec ruby test/test_example.rb
463+
$ bundle exec env RUBYOPT="-r ./embulk.jar" ruby test/test_bigquery_client.rb
464+
$ bundle exec env RUBYOPT="-r ./embulk.jar" ruby test/test_example.rb
457465
```
458466
459467
### Release gem:

embulk-output-bigquery.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Gem::Specification.new do |spec|
1515
spec.add_dependency 'google-api-client'
1616
spec.add_dependency 'time_with_zone'
1717

18-
spec.add_development_dependency 'embulk', ['>= 0.8.2']
1918
spec.add_development_dependency 'bundler', ['>= 1.10.6']
2019
spec.add_development_dependency 'rake', ['>= 10.0']
2120
end

test/helper.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
require 'test/unit'
44
require 'test/unit/rr'
55

6-
# require 'embulk/java/bootstrap'
76
require 'embulk'
8-
Embulk.setup
7+
begin
8+
# Embulk ~> 0.8.x
9+
Embulk.setup
10+
rescue NotImplementedError
11+
# Embulk ~> 0.9.x
12+
require 'embulk/java/bootstrap'
13+
end
914
Embulk.logger = Embulk::Logger.new('/dev/null')
1015

1116
APP_ROOT = File.expand_path('../', __dir__)

0 commit comments

Comments
 (0)