fast_woothee 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8c92fc1683de664d1cef4ef304098313988db1a3
4
- data.tar.gz: 380c68da3d082ef51d0ff1a0b5bc96c87a6686d6
2
+ SHA256:
3
+ metadata.gz: e03ed643b4f7120e27345bf9244a97e7d167bded87e11d6e38760a2f623dbabe
4
+ data.tar.gz: 0724f51f31c727b9b104c757d91c544455a4dac7f6f96ec996c065932d11dd2e
5
5
  SHA512:
6
- metadata.gz: 874d590f6a3ef6fb8f77829f928b14c144225ed6ebb28d6143a543ebcc120030b1d0e8f6b05d1f32a2183ef1d5f707e117ebcfff7cabf7ae3b591f29941bd5b2
7
- data.tar.gz: b0398ceec79273f0182436c3c2495b7d6fa959b9bc081165ef275ec1fd965804ea7ae298d1e40a10dfa34a88cc78fd6594985f0a88ebc4d512a323c65d142215
6
+ metadata.gz: 26bdb483cc6c7665a67ffcc22f099142f758e385f746e901130462c88ec66644a59b7bb599f98b9fde5495bcd3151b4719ede20cad2a210a2932e09056f4937f
7
+ data.tar.gz: 28dac34ba88086abba8fe7c81acf52f85db10be8882aae5400197654d164f03a79c1bb8a8c4f9875d6d44f5723dd3a8ce3db7e41e89c8c5bfd98fc9c7a993bd9
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.2
data/.travis.yml CHANGED
@@ -11,65 +11,65 @@ env:
11
11
  global:
12
12
  - THERMITE_DEBUG_FILENAME: /tmp/thermite-debug.log
13
13
  matrix:
14
- - FWOOTHEE_RUBY_VERSION: 2.3.6
15
- - FWOOTHEE_RUBY_VERSION: 2.4.3
16
- - FWOOTHEE_RUBY_VERSION: 2.5.1
14
+ - FWOOTHEE_RUBY_VERSION: 2.4.6
15
+ - FWOOTHEE_RUBY_VERSION: 2.5.2
16
+ - FWOOTHEE_RUBY_VERSION: 2.6.2
17
17
  matrix:
18
18
  include:
19
19
  - os: linux
20
20
  dist: trusty
21
- env: FWOOTHEE_RUBY_VERSION=2.3.5 RUBY_STATIC=1
21
+ env: FWOOTHEE_RUBY_VERSION=2.6.2 RUBY_STATIC=1
22
22
  - os: linux
23
23
  dist: trusty
24
- env: FWOOTHEE_RUBY_VERSION=2.4.2 RUBY_STATIC=1
24
+ env: FWOOTHEE_RUBY_VERSION=2.4.6 RUBY_STATIC=1
25
25
  - os: linux
26
26
  dist: trusty
27
- env: FWOOTHEE_RUBY_VERSION=2.5.1 RUBY_STATIC=1
27
+ env: FWOOTHEE_RUBY_VERSION=2.5.2 RUBY_STATIC=1
28
28
  - os: osx
29
29
  osx_image: xcode8
30
- env: FWOOTHEE_RUBY_VERSION=2.3.5
30
+ env: FWOOTHEE_RUBY_VERSION=2.6.2
31
31
  - os: osx
32
32
  osx_image: xcode9.3beta
33
- env: FWOOTHEE_RUBY_VERSION=2.3.5
33
+ env: FWOOTHEE_RUBY_VERSION=2.6.2
34
34
  - os: osx
35
35
  osx_image: xcode8
36
- env: FWOOTHEE_RUBY_VERSION=2.3.5 RUBY_STATIC=1
36
+ env: FWOOTHEE_RUBY_VERSION=2.6.2 RUBY_STATIC=1
37
37
  - os: osx
38
38
  osx_image: xcode9.2
39
- env: FWOOTHEE_RUBY_VERSION=2.3.5 RUBY_STATIC=1
39
+ env: FWOOTHEE_RUBY_VERSION=2.6.2 RUBY_STATIC=1
40
40
  - os: osx
41
41
  osx_image: xcode9.3beta
42
- env: FWOOTHEE_RUBY_VERSION=2.3.5 RUBY_STATIC=1
42
+ env: FWOOTHEE_RUBY_VERSION=2.6.2 RUBY_STATIC=1
43
43
  - os: osx
44
44
  osx_image: xcode8
45
- env: FWOOTHEE_RUBY_VERSION=2.4.2
45
+ env: FWOOTHEE_RUBY_VERSION=2.4.6
46
46
  - os: osx
47
47
  osx_image: xcode9.3beta
48
- env: FWOOTHEE_RUBY_VERSION=2.4.2
48
+ env: FWOOTHEE_RUBY_VERSION=2.4.6
49
49
  - os: osx
50
50
  osx_image: xcode8
51
- env: FWOOTHEE_RUBY_VERSION=2.4.2 RUBY_STATIC=1
51
+ env: FWOOTHEE_RUBY_VERSION=2.4.6 RUBY_STATIC=1
52
52
  - os: osx
53
53
  osx_image: xcode9.2
54
- env: FWOOTHEE_RUBY_VERSION=2.4.2 RUBY_STATIC=1
54
+ env: FWOOTHEE_RUBY_VERSION=2.4.6 RUBY_STATIC=1
55
55
  - os: osx
56
56
  osx_image: xcode9.3beta
57
- env: FWOOTHEE_RUBY_VERSION=2.4.2 RUBY_STATIC=1
57
+ env: FWOOTHEE_RUBY_VERSION=2.4.6 RUBY_STATIC=1
58
58
  - os: osx
59
59
  osx_image: xcode8
60
- env: FWOOTHEE_RUBY_VERSION=2.5.1
60
+ env: FWOOTHEE_RUBY_VERSION=2.5.2
61
61
  - os: osx
62
62
  osx_image: xcode9.3beta
63
- env: FWOOTHEE_RUBY_VERSION=2.5.1
63
+ env: FWOOTHEE_RUBY_VERSION=2.5.2
64
64
  - os: osx
65
65
  osx_image: xcode8
66
- env: FWOOTHEE_RUBY_VERSION=2.5.1 RUBY_STATIC=1
66
+ env: FWOOTHEE_RUBY_VERSION=2.5.2 RUBY_STATIC=1
67
67
  - os: osx
68
68
  osx_image: xcode9.2
69
- env: FWOOTHEE_RUBY_VERSION=2.5.1 RUBY_STATIC=1
69
+ env: FWOOTHEE_RUBY_VERSION=2.5.2 RUBY_STATIC=1
70
70
  - os: osx
71
71
  osx_image: xcode9.3beta
72
- env: FWOOTHEE_RUBY_VERSION=2.5.1 RUBY_STATIC=1
72
+ env: FWOOTHEE_RUBY_VERSION=2.5.2 RUBY_STATIC=1
73
73
 
74
74
  cache:
75
75
  cargo: true
data/Cargo.lock CHANGED
@@ -1,60 +1,65 @@
1
1
  [[package]]
2
2
  name = "aho-corasick"
3
- version = "0.6.3"
3
+ version = "0.7.3"
4
4
  source = "registry+https://github.com/rust-lang/crates.io-index"
5
5
  dependencies = [
6
- "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
6
+ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
7
7
  ]
8
8
 
9
9
  [[package]]
10
10
  name = "fast_woothee"
11
- version = "1.3.2"
11
+ version = "1.4.0"
12
12
  dependencies = [
13
13
  "ruru 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
14
- "woothee 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
14
+ "woothee 0.8.0 (git+https://github.com/woothee/woothee-rust)",
15
15
  ]
16
16
 
17
17
  [[package]]
18
18
  name = "lazy_static"
19
- version = "0.2.8"
19
+ version = "0.2.11"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+
22
+ [[package]]
23
+ name = "lazy_static"
24
+ version = "1.3.0"
20
25
  source = "registry+https://github.com/rust-lang/crates.io-index"
21
26
 
22
27
  [[package]]
23
28
  name = "libc"
24
- version = "0.2.29"
29
+ version = "0.2.51"
25
30
  source = "registry+https://github.com/rust-lang/crates.io-index"
26
31
 
27
32
  [[package]]
28
33
  name = "memchr"
29
- version = "1.0.1"
34
+ version = "2.2.0"
30
35
  source = "registry+https://github.com/rust-lang/crates.io-index"
31
- dependencies = [
32
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
33
- ]
34
36
 
35
37
  [[package]]
36
38
  name = "regex"
37
- version = "0.2.2"
39
+ version = "1.1.5"
38
40
  source = "registry+https://github.com/rust-lang/crates.io-index"
39
41
  dependencies = [
40
- "aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
41
- "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
42
- "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
43
- "thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
44
- "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
42
+ "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
43
+ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
44
+ "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
45
+ "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
46
+ "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
45
47
  ]
46
48
 
47
49
  [[package]]
48
50
  name = "regex-syntax"
49
- version = "0.4.1"
51
+ version = "0.6.6"
50
52
  source = "registry+https://github.com/rust-lang/crates.io-index"
53
+ dependencies = [
54
+ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
55
+ ]
51
56
 
52
57
  [[package]]
53
58
  name = "ruby-sys"
54
59
  version = "0.2.20"
55
60
  source = "registry+https://github.com/rust-lang/crates.io-index"
56
61
  dependencies = [
57
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
62
+ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
58
63
  ]
59
64
 
60
65
  [[package]]
@@ -62,57 +67,48 @@ name = "ruru"
62
67
  version = "0.9.3"
63
68
  source = "registry+https://github.com/rust-lang/crates.io-index"
64
69
  dependencies = [
65
- "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
70
+ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
66
71
  "ruby-sys 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
67
72
  ]
68
73
 
69
74
  [[package]]
70
75
  name = "thread_local"
71
- version = "0.3.4"
76
+ version = "0.3.6"
72
77
  source = "registry+https://github.com/rust-lang/crates.io-index"
73
78
  dependencies = [
74
- "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
75
- "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
79
+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
76
80
  ]
77
81
 
78
82
  [[package]]
79
- name = "unreachable"
80
- version = "1.0.0"
83
+ name = "ucd-util"
84
+ version = "0.1.3"
81
85
  source = "registry+https://github.com/rust-lang/crates.io-index"
82
- dependencies = [
83
- "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
84
- ]
85
86
 
86
87
  [[package]]
87
88
  name = "utf8-ranges"
88
- version = "1.0.0"
89
- source = "registry+https://github.com/rust-lang/crates.io-index"
90
-
91
- [[package]]
92
- name = "void"
93
89
  version = "1.0.2"
94
90
  source = "registry+https://github.com/rust-lang/crates.io-index"
95
91
 
96
92
  [[package]]
97
93
  name = "woothee"
98
- version = "0.7.3"
99
- source = "registry+https://github.com/rust-lang/crates.io-index"
94
+ version = "0.8.0"
95
+ source = "git+https://github.com/woothee/woothee-rust#4a082422424cfe07fcbbcc7f520ef26ce4c2bb7c"
100
96
  dependencies = [
101
- "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
102
- "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
97
+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
98
+ "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
103
99
  ]
104
100
 
105
101
  [metadata]
106
- "checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
107
- "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
108
- "checksum libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8a014d9226c2cc402676fbe9ea2e15dd5222cd1dd57f576b5b283178c944a264"
109
- "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
110
- "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
111
- "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
102
+ "checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c"
103
+ "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
104
+ "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
105
+ "checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917"
106
+ "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
107
+ "checksum regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "559008764a17de49a3146b234641644ed37d118d1ef641a0bb573d146edc6ce0"
108
+ "checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96"
112
109
  "checksum ruby-sys 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e71509f17ce93733dc196258e168b58050490a156b04563816a8120a74ba04c7"
113
110
  "checksum ruru 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6486d6c50b7a08246a492a61893635c1977d41c138041d443eb603f6298e0273"
114
- "checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14"
115
- "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
116
- "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
117
- "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
118
- "checksum woothee 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e7c2cece51be2a2f25518a9efdd303d5ca8dfa619272f091e7dedbba95d1873"
111
+ "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
112
+ "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86"
113
+ "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
114
+ "checksum woothee 0.8.0 (git+https://github.com/woothee/woothee-rust)" = "<none>"
data/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "fast_woothee"
3
- version = "1.3.2"
3
+ version = "1.4.0"
4
4
  authors = ["Ian Ker-Seymer <i.kerseymer@gmail.com>"]
5
5
  repository = "https://github.com/ianks/fast_woothee"
6
6
  publish = false
@@ -9,7 +9,7 @@ publish = false
9
9
  crate-type = ["dylib"]
10
10
 
11
11
  [dependencies]
12
- woothee = "^0.7"
12
+ woothee = { git = "https://github.com/woothee/woothee-rust" }
13
13
  ruru = "^0.9"
14
14
 
15
15
  [package.metadata.thermite]
data/Gemfile CHANGED
@@ -3,3 +3,5 @@ source 'https://rubygems.org'
3
3
 
4
4
  # Specify your gem's dependencies in fast_woothee.gemspec
5
5
  gemspec
6
+
7
+ gem 'thermite'
data/fast_woothee.gemspec CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'fast_woothee'
8
- spec.version = '1.3.2'
8
+ spec.version = '1.4.0'
9
9
  spec.authors = ['Ian Ker-Seymer']
10
10
  spec.email = ['i.kerseymer@gmail.com']
11
11
 
data/lib/fast_woothee.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
- require 'thermite/fiddle'
3
2
 
4
- gem_root = File.dirname(File.dirname(__FILE__))
3
+ require 'fiddle'
5
4
 
6
- Thermite::Fiddle.load_module 'initialize_fast_woothee',
7
- cargo_project_path: gem_root,
8
- ruby_project_path: gem_root
5
+ gem_root = File.dirname(File.dirname(__FILE__))
6
+ extension_path = File.join(gem_root, 'lib/fast_woothee.so')
7
+ library = ::Fiddle.dlopen(extension_path)
8
+ initalize_func = library['initialize_fast_woothee']
9
+ ::Fiddle::Function.new(initalize_func, [], ::Fiddle::TYPE_VOIDP).call
data/src/lib.rs CHANGED
@@ -18,13 +18,13 @@ methods!(
18
18
  match parser.parse(ua_string.unwrap_or(RString::new("")).to_str()) {
19
19
  None => hash,
20
20
  Some(result) => {
21
- hash.store(Symbol::new("name"), RString::new(result.name));
22
- hash.store(Symbol::new("category"), RString::new(result.category));
23
- hash.store(Symbol::new("os"), RString::new(result.os));
21
+ hash.store(Symbol::new("name"), RString::new(&result.name));
22
+ hash.store(Symbol::new("category"), RString::new(&result.category));
23
+ hash.store(Symbol::new("os"), RString::new(&result.os));
24
24
  hash.store(Symbol::new("os_version"), RString::new(&*result.os_version));
25
- hash.store(Symbol::new("browser_type"), RString::new(result.browser_type));
25
+ hash.store(Symbol::new("browser_type"), RString::new(&result.browser_type));
26
26
  hash.store(Symbol::new("version"), RString::new(&*result.version));
27
- hash.store(Symbol::new("vendor"), RString::new(result.vendor));
27
+ hash.store(Symbol::new("vendor"), RString::new(&result.vendor));
28
28
  hash
29
29
  }
30
30
  }
@@ -42,7 +42,7 @@ methods!(
42
42
  #[no_mangle]
43
43
  pub extern fn initialize_fast_woothee() {
44
44
  Class::new("FastWoothee", None).define(|itself| {
45
- itself.const_set("VERSION", &RString::new("1.3.2").freeze());
45
+ itself.const_set("VERSION", &RString::new("1.4.0").freeze());
46
46
  itself.def_self("parse", parse);
47
47
  itself.def_self("crawler?", crawler);
48
48
  });
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_woothee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-10 00:00:00.000000000 Z
11
+ date: 2019-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thermite
@@ -133,6 +133,7 @@ files:
133
133
  - ".gitignore"
134
134
  - ".gitmodules"
135
135
  - ".rspec"
136
+ - ".ruby-version"
136
137
  - ".travis.yml"
137
138
  - Cargo.lock
138
139
  - Cargo.toml
@@ -162,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
163
  - !ruby/object:Gem::Version
163
164
  version: '0'
164
165
  requirements: []
165
- rubyforge_project:
166
- rubygems_version: 2.6.14
166
+ rubygems_version: 3.0.3
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: Ruby bindings for woothee-rust