File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 1
1
source 'https://rubygems.org/'
2
2
3
3
gemspec
4
+ gem 'embulk'
4
5
gem 'embulk-parser-none'
5
6
gem 'embulk-parser-jsonl'
6
7
gem 'pry-nav'
Original file line number Diff line number Diff line change @@ -455,23 +455,34 @@ $ curl -o embulk.jar --create-dirs -L "http://dl.embulk.org/embulk-latest.jar"
455
455
$ chmod a+x embulk.jar
456
456
```
457
457
458
- Investigate JRUBY\_VERSION included in the embulk.jar:
458
+ Investigate JRUBY\_VERSION and Bundler::VERSION included in the embulk.jar:
459
459
460
460
```
461
461
$ echo JRUBY_VERSION | ./embulk.jar irb
462
462
2019-08-10 00:59:11.866 +0900: Embulk v0.9.17
463
463
Switch to inspect mode.
464
464
JRUBY_VERSION
465
465
"X.X.X.X"
466
+
467
+ $ echo "require 'bundler'; Bundler::VERSION" | ./embulk.jar irb
468
+ 2019-08-10 01:59:10.460 +0900: Embulk v0.9.17
469
+ Switch to inspect mode.
470
+ require 'bundler'; Bundler::VERSION
471
+ "Y.Y.Y"
466
472
```
467
473
468
- Install the same version of jruby (change X.X.X.X to the version shown above):
474
+ Install the same version of jruby (change X.X.X.X to the version shown above) and bundler :
469
475
470
476
```
471
477
$ rbenv install jruby-X.X.X.X
472
478
$ rbenv local jruby-X.X.X.X
473
- $ gem install bundler
474
- $ bundle install
479
+ $ gem install bundler -v Y.Y.Y
480
+ ```
481
+
482
+ Install dependencies (NOTE: Use bundler included in the embulk.jar, otherwise, `gem 'embulk'` is not found):
483
+
484
+ ```
485
+ $ ./embulk.jar bundle install --path vendor/bundle
475
486
```
476
487
477
488
Run tests with `env RUBYOPT="-r ./embulk.jar`:
Original file line number Diff line number Diff line change 1
1
require_relative './helper'
2
+ require 'bundler'
2
3
3
4
# 1. Prepare example/your-project-000.json
4
5
# 2. embulk bundle
9
10
else
10
11
class TestExample < Test ::Unit ::TestCase
11
12
def embulk_path
12
- if File . exist? ( "#{ ENV [ 'PATH' ] } /.embulk/bin/embulk" )
13
- "#{ ENV [ 'PATH' ] } /.embulk/bin/embulk"
13
+ if File . exist? ( "#{ ENV [ 'HOME' ] } /.embulk/bin/embulk" )
14
+ "#{ ENV [ 'HOME' ] } /.embulk/bin/embulk"
15
+ elsif File . exist? ( "#{ ENV [ 'PWD' ] } /embulk.jar" )
16
+ "#{ ENV [ 'PWD' ] } /embulk.jar"
14
17
elsif File . exist? ( "/usr/local/bin/embulk" )
15
18
"/usr/local/bin/embulk"
16
19
else
@@ -19,7 +22,7 @@ def embulk_path
19
22
end
20
23
21
24
def embulk_run ( config_path )
22
- Bundler . with_clean_env do
25
+ :: Bundler . with_clean_env do
23
26
cmd = "#{ embulk_path } run -X page_size=1 -b . -l trace #{ config_path } "
24
27
puts "=" * 64
25
28
puts cmd
You can’t perform that action at this time.
0 commit comments