Skip to content

Commit f42e369

Browse files
committed
feat: remove jruby support
BREAKING CHANGE: remove jruby support
1 parent fbf9ec0 commit f42e369

File tree

16 files changed

+100
-516
lines changed

16 files changed

+100
-516
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
/spec/reports/
88
/tmp/
99
/.ruby-version
10-
/.mvn
1110

1211
# rspec failure tracking
1312
.rspec_status
14-
15-
*.jar

.travis.yml

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rvm:
99
- 2.6.1
1010
env:
1111
- SKIP_RPC_TESTS=true
12-
before_install:
12+
before_install:
1313
- gem install bundler -v 2.0.1
1414
- sudo apt-get update
1515
- sudo apt-get install -y libsodium-dev
@@ -18,38 +18,3 @@ install:
1818
- bundle install
1919
script:
2020
- bundle exec rake
21-
22-
stages:
23-
- test
24-
- deploy
25-
jobs:
26-
include:
27-
- rvm: jruby
28-
before_install:
29-
- gem install bundler -v 2.0.1
30-
install:
31-
- bundle install
32-
- jruby -rjars/installer -e 'Jars::Installer.vendor_jars!'
33-
- stage: deploy
34-
if: 'tag IS present AND env(GITHUB_TOKEN) IS present'
35-
rvm: jruby
36-
before_install:
37-
- gem install bundler -v 2.0.1
38-
install:
39-
- bundle install
40-
- jruby -rjars/installer -e 'Jars::Installer.vendor_jars!'
41-
script:
42-
- bundle exec rake jar
43-
- export CKB_VERSION=$(bundle exec ruby -e 'require "ckb"; puts CKB::VERSION')
44-
- echo "java -jar ckb-console-${CKB_VERSION}.jar" > ckb-console-${CKB_VERSION}.bat
45-
- zip ckb-console-${CKB_VERSION}-jar.zip ckb-console-${CKB_VERSION}.jar ckb-console-${CKB_VERSION}.bat
46-
deploy:
47-
provider: releases
48-
api_key: "$GITHUB_TOKEN"
49-
file_glob: true
50-
file: ckb-console-*-jar.zip
51-
skip_cleanup: true
52-
prerelease: true
53-
on:
54-
tags: true
55-
condition: '"$GITHUB_TOKEN" != ""'

Gemfile.lock

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ GEM
1616
connection_pool (2.2.2)
1717
diff-lcs (1.3)
1818
ffi (1.11.1)
19-
ffi (1.11.1-java)
2019
jaro_winkler (1.5.2)
21-
jaro_winkler (1.5.2-java)
2220
method_source (0.9.2)
2321
net-http-persistent (3.0.1)
2422
connection_pool (~> 2.2)
@@ -28,10 +26,6 @@ GEM
2826
pry (0.12.2)
2927
coderay (~> 1.1.0)
3028
method_source (~> 0.9.0)
31-
pry (0.12.2-java)
32-
coderay (~> 1.1.0)
33-
method_source (~> 0.9.0)
34-
spoon (~> 0.0)
3529
rainbow (3.0.0)
3630
rake (10.5.0)
3731
rbnacl (6.0.1)
@@ -40,29 +34,26 @@ GEM
4034
rspec-core (~> 3.8.0)
4135
rspec-expectations (~> 3.8.0)
4236
rspec-mocks (~> 3.8.0)
43-
rspec-core (3.8.0)
37+
rspec-core (3.8.1)
4438
rspec-support (~> 3.8.0)
45-
rspec-expectations (3.8.2)
39+
rspec-expectations (3.8.4)
4640
diff-lcs (>= 1.2.0, < 2.0)
4741
rspec-support (~> 3.8.0)
48-
rspec-mocks (3.8.0)
42+
rspec-mocks (3.8.1)
4943
diff-lcs (>= 1.2.0, < 2.0)
5044
rspec-support (~> 3.8.0)
51-
rspec-support (3.8.0)
45+
rspec-support (3.8.2)
5246
rubocop (0.69.0)
5347
jaro_winkler (~> 1.5.1)
5448
parallel (~> 1.10)
5549
parser (>= 2.6)
5650
rainbow (>= 2.2.2, < 4.0)
5751
ruby-progressbar (~> 1.7)
5852
unicode-display_width (>= 1.4.0, < 1.7)
59-
ruby-progressbar (1.10.0)
60-
spoon (0.0.6)
61-
ffi
53+
ruby-progressbar (1.10.1)
6254
unicode-display_width (1.6.0)
6355

6456
PLATFORMS
65-
java
6657
ruby
6758

6859
DEPENDENCIES

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ bundle install
4444
bundle exec bin/console
4545
```
4646

47-
Or download a jar from releases page, which does not require libsecp256k1 and
48-
libsodium but only JRE to run the console:
49-
50-
```
51-
java -jar ckb-console-VERSION.jar
52-
```
53-
5447
## Usage
5548

5649
RPC interface returns parsed `JSON` object
@@ -107,8 +100,6 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
107100

108101
To install this gem onto your local machine, run `bundle exec rake install`.
109102

110-
To create a jar using JRuby, run `bundle exec rake jar`.
111-
112103
## License
113104

114105
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Rakefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,4 @@ require "rspec/core/rake_task"
55

66
RSpec::Core::RakeTask.new(:spec)
77

8-
if RUBY_PLATFORM == "java"
9-
require "warbler"
10-
Warbler::Task.new
11-
end
12-
138
task default: :spec

bin/setup

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@ IFS=$'\n\t'
44
set -vx
55

66
bundle install
7-
8-
if ruby --version 2> /dev/null | grep '^jruby' &> /dev/null; then
9-
jruby -rjars/installer -e 'Jars::Installer.vendor_jars!'
10-
fi

ckb-sdk-ruby.gemspec

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ lib = File.expand_path("../lib", __FILE__)
22
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
33
require "ckb/version"
44

5-
is_jruby = RUBY_PLATFORM == 'java'
6-
75
Gem::Specification.new do |spec|
86
spec.name = "ckb-sdk-ruby"
97
spec.version = CKB::VERSION
@@ -44,13 +42,6 @@ Gem::Specification.new do |spec|
4442
spec.add_development_dependency "pry", "~> 0.12.2"
4543

4644
spec.add_dependency "net-http-persistent", "~> 3.0.0"
47-
48-
if !is_jruby
49-
spec.add_dependency "rbnacl", "~> 6.0", ">= 6.0.1"
50-
spec.add_dependency "bitcoin-secp256k1", "~> 0.5.0"
51-
else
52-
spec.add_development_dependency "warbler", "~> 2.0"
53-
54-
spec.requirements << "jar org.bouncycastle, bcprov-jdk15on, 1.61"
55-
end
45+
spec.add_dependency "rbnacl", "~> 6.0", ">= 6.0.1"
46+
spec.add_dependency "bitcoin-secp256k1", "~> 0.5.0"
5647
end

config/warble.rb

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

lib/ckb-sdk-ruby_jars.rb

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

lib/ckb.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
require "ckb/address"
1414
require "ckb/key"
1515

16-
require "ckb-sdk-ruby_jars" if RUBY_PLATFORM == "java"
17-
1816
module CKB
1917
class Error < StandardError; end
2018
# Your code goes here...

0 commit comments

Comments
 (0)