mini_suffix 0.3.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c3f65d0b7aa566e043a131ba8bec90b666a74e51
4
- data.tar.gz: 9ecb681e664faabdc1aa12797fcb16e6d0456319
2
+ SHA256:
3
+ metadata.gz: da562466a7635ef4abe50e473d7314be39a80487aa3d77fbb39cee066b0a5d64
4
+ data.tar.gz: 963f965dbeb5b87c876a818f1e0d4fa6a53b66ec56f5a12ac4a7ae7e890aa302
5
5
  SHA512:
6
- metadata.gz: 285ba55404360a24fda9ccbfb80fa5116b77ec52e2ab2d5c2791129884f7db119d272fcff843b805438c7c1d10a247b9cb1fe617a91402bb3a2b4f19372a4698
7
- data.tar.gz: a8df30f6c91c4e7fe1a19a123cab748241919337d76e4097a84cbf61d5d6c6b562da3bb9277d4f6cb2895a118fcc04be67c34031784e2c6d1c38fad32357c318
6
+ metadata.gz: 1938b29e11700f29a1f3ca7956d1fa9513ab48a0ebd91dcb6e037fbb772744485dc30702b50ec04eab953ad3832fac8eb5c2c4d378f2dede939d933fb12b4499
7
+ data.tar.gz: 0f442e1772a36e5932d6e942c8c0824da1a5b9b3c12e1c8c1ee2b488540f16452b42d7397959d5df7487f511ea62f02e2c6f489c9fa9ec53cdc364e67c83e0a8
@@ -0,0 +1,34 @@
1
+ name: Mini Suffix Tests
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - master
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ name: Ruby ${{ matrix.ruby }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby: ["2.7", "2.6", "2.5"]
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ - name: Bundler cache
23
+ uses: actions/cache@v2
24
+ with:
25
+ path: vendor/bundle
26
+ key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
27
+ restore-keys: |
28
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-
29
+ - name: Setup gems
30
+ run: |
31
+ bundle config path vendor/bundle
32
+ bundle install --jobs 4
33
+ - name: Tests
34
+ run: bundle exec rspec
@@ -1,3 +1,16 @@
1
+ # 0.3.2
2
+
3
+ * Bump libpsl to v0.21.1, and bump binaries
4
+ * Add binary for Apple silicon devices
5
+
6
+ *davidtaylorhq*
7
+
8
+ # 0.3.1
9
+
10
+ * Add libpsl shared libary for Linux ppc64le
11
+
12
+ *runlevel5*
13
+
1
14
  # 0.3.0
2
15
 
3
16
  * Add libpsl shared library for osx support.
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  ## Installation
4
4
 
5
5
  ### Debian
6
- `sudo apt-get install libpsl-dev`
7
6
 
8
7
  Add this line to your application's Gemfile:
9
8
 
@@ -31,7 +30,7 @@ MiniSuffix.domain("www.careers.gov.sg")
31
30
  # => "careers.gov.sg"
32
31
  ```
33
32
 
34
- ##Benchmark
33
+ ## Benchmark
35
34
 
36
35
  ```
37
36
  # benchmark/bench.rb
@@ -59,6 +58,15 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
59
58
 
60
59
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
61
60
 
61
+ ## Updating libpsl
62
+
63
+ Libpsl binaries are bundled with the gem. The current version is checked out as a submodule in `./libpsl/`. To update, checkout a later commit
64
+ in the submodule (ideally matching an upstream release tag). You will then need to rebuild the binaries for all architectures. This requires running `./build-libpsl.sh` in each environment. Depending on your setup, you may be able to accomplish that via virtual machines and/or Docker.
65
+
66
+ Check the comments in `./build-libpsl.sh` for more information.
67
+
68
+ The submodule bump and updated binaries should be checked in to the repository.
69
+
62
70
  ## Contributing
63
71
 
64
72
  Bug reports and pull requests are welcome on GitHub at https://github.com/discourse/mini_suffix.
@@ -0,0 +1,28 @@
1
+ #! /bin/bash
2
+
3
+ set -e
4
+ export DEBIAN_FRONTEND=noninteractive
5
+ cd $(dirname ${BASH_SOURCE[0]})/libpsl
6
+
7
+ # A rough script to build libpsl from source, and move the binary to the /vendor directory.
8
+ #
9
+ # On linux, you will need a number of dependencies:
10
+ # apt-get update
11
+ # apt-get install -y meson gcc clang libtool llvm-dev valgrind python3 python3-setuptools libicu-dev
12
+ #
13
+ # On macOS, run this script in the homebrew build environment using `brew sh -c ./build-libpsl.sh`
14
+ #
15
+ # If you're running this, make sure to update the binaries for all other architectures as well
16
+
17
+ rm -rf builddir
18
+ meson builddir --buildtype=release -Druntime=no -Dbuiltin=libicu
19
+ ninja -C builddir
20
+ ninja -C builddir test
21
+
22
+ if [[ "$OSTYPE" == "darwin"* ]]; then
23
+ cp builddir/src/libpsl.dylib ../vendor/libpsl.darwin-$(arch).dylib
24
+ else
25
+ cp builddir/src/libpsl.so ../vendor/libpsl.$(arch).so
26
+ fi
27
+
28
+ echo "Done $(arch)"
@@ -5,8 +5,10 @@ module MiniSuffix
5
5
  extend FFI::Library
6
6
 
7
7
  ffi_lib [
8
- File.join(File.dirname(File.expand_path('..', __FILE__)), 'vendor/libpsl.so'),
9
- File.join(File.dirname(File.expand_path('..', __FILE__)), 'vendor/libpsl.dylib'),
8
+ File.join(File.dirname(File.expand_path('..', __FILE__)), 'vendor/libpsl.x86_64.so'),
9
+ File.join(File.dirname(File.expand_path('..', __FILE__)), 'vendor/libpsl.ppc64le.so'),
10
+ File.join(File.dirname(File.expand_path('..', __FILE__)), 'vendor/libpsl.darwin-i386.dylib'),
11
+ File.join(File.dirname(File.expand_path('..', __FILE__)), 'vendor/libpsl.darwin-arm64.dylib'),
10
12
  ]
11
13
 
12
14
  attach_function :psl_builtin, [], :pointer
@@ -1,3 +1,3 @@
1
1
  module MiniSuffix
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_dependency 'ffi', '~> 1.9'
25
25
 
26
- spec.add_development_dependency "bundler", "~> 1.16"
26
+ spec.add_development_dependency "bundler"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
28
28
  spec.add_development_dependency "rspec", "~> 3.0"
29
29
  end
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_suffix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guo Xiang Tan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-30 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.16'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.16'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,17 +66,17 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
- description:
69
+ description:
70
70
  email:
71
71
  - tgx@discourse.org
72
72
  executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - ".github/workflows/ci.yml"
76
77
  - ".gitignore"
77
78
  - ".gitmodules"
78
79
  - ".rspec"
79
- - ".travis.yml"
80
80
  - CHANGELOG.md
81
81
  - Gemfile
82
82
  - LICENSE.txt
@@ -85,16 +85,19 @@ files:
85
85
  - benchmark/bench.rb
86
86
  - bin/console
87
87
  - bin/setup
88
+ - build-libpsl.sh
88
89
  - lib/mini_suffix.rb
89
90
  - lib/mini_suffix/version.rb
90
91
  - mini_suffix.gemspec
91
- - vendor/libpsl.dylib
92
- - vendor/libpsl.so
92
+ - vendor/libpsl.darwin-arm64.dylib
93
+ - vendor/libpsl.darwin-i386.dylib
94
+ - vendor/libpsl.ppc64le.so
95
+ - vendor/libpsl.x86_64.so
93
96
  homepage: https://github.com/discourse/mini_suffix
94
97
  licenses:
95
98
  - MIT
96
99
  metadata: {}
97
- post_install_message:
100
+ post_install_message:
98
101
  rdoc_options: []
99
102
  require_paths:
100
103
  - lib
@@ -109,9 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
112
  - !ruby/object:Gem::Version
110
113
  version: '0'
111
114
  requirements: []
112
- rubyforge_project:
113
- rubygems_version: 2.6.13
114
- signing_key:
115
+ rubygems_version: 3.1.4
116
+ signing_key:
115
117
  specification_version: 4
116
118
  summary: FFI wrapper for libpsl
117
119
  test_files: []
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4.2
5
- before_install: gem install bundler -v 1.16.0
Binary file
Binary file