fast_woothee 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -0
- data/.travis.yml +21 -21
- data/Cargo.lock +43 -47
- data/Cargo.toml +2 -2
- data/Gemfile +2 -0
- data/fast_woothee.gemspec +1 -1
- data/lib/fast_woothee.rb +6 -5
- data/src/lib.rs +6 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e03ed643b4f7120e27345bf9244a97e7d167bded87e11d6e38760a2f623dbabe
|
4
|
+
data.tar.gz: 0724f51f31c727b9b104c757d91c544455a4dac7f6f96ec996c065932d11dd2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
15
|
-
- FWOOTHEE_RUBY_VERSION: 2.
|
16
|
-
- FWOOTHEE_RUBY_VERSION: 2.
|
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.
|
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.
|
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.
|
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.
|
30
|
+
env: FWOOTHEE_RUBY_VERSION=2.6.2
|
31
31
|
- os: osx
|
32
32
|
osx_image: xcode9.3beta
|
33
|
-
env: FWOOTHEE_RUBY_VERSION=2.
|
33
|
+
env: FWOOTHEE_RUBY_VERSION=2.6.2
|
34
34
|
- os: osx
|
35
35
|
osx_image: xcode8
|
36
|
-
env: FWOOTHEE_RUBY_VERSION=2.
|
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.
|
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.
|
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.
|
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.
|
48
|
+
env: FWOOTHEE_RUBY_VERSION=2.4.6
|
49
49
|
- os: osx
|
50
50
|
osx_image: xcode8
|
51
|
-
env: FWOOTHEE_RUBY_VERSION=2.4.
|
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.
|
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.
|
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.
|
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.
|
63
|
+
env: FWOOTHEE_RUBY_VERSION=2.5.2
|
64
64
|
- os: osx
|
65
65
|
osx_image: xcode8
|
66
|
-
env: FWOOTHEE_RUBY_VERSION=2.5.
|
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.
|
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.
|
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.
|
3
|
+
version = "0.7.3"
|
4
4
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
5
5
|
dependencies = [
|
6
|
-
"memchr
|
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.
|
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.
|
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.
|
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
|
+
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 = "
|
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 = "
|
39
|
+
version = "1.1.5"
|
38
40
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
39
41
|
dependencies = [
|
40
|
-
"aho-corasick 0.
|
41
|
-
"memchr
|
42
|
-
"regex-syntax 0.
|
43
|
-
"thread_local 0.3.
|
44
|
-
"utf8-ranges 1.0.
|
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.
|
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.
|
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.
|
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.
|
76
|
+
version = "0.3.6"
|
72
77
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
73
78
|
dependencies = [
|
74
|
-
"lazy_static
|
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 = "
|
80
|
-
version = "1.
|
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.
|
99
|
-
source = "
|
94
|
+
version = "0.8.0"
|
95
|
+
source = "git+https://github.com/woothee/woothee-rust#4a082422424cfe07fcbbcc7f520ef26ce4c2bb7c"
|
100
96
|
dependencies = [
|
101
|
-
"lazy_static
|
102
|
-
"regex
|
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.
|
107
|
-
"checksum lazy_static 0.2.
|
108
|
-
"checksum
|
109
|
-
"checksum
|
110
|
-
"checksum
|
111
|
-
"checksum regex
|
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.
|
115
|
-
"checksum
|
116
|
-
"checksum utf8-ranges 1.0.
|
117
|
-
"checksum
|
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
|
+
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 = "
|
12
|
+
woothee = { git = "https://github.com/woothee/woothee-rust" }
|
13
13
|
ruru = "^0.9"
|
14
14
|
|
15
15
|
[package.metadata.thermite]
|
data/Gemfile
CHANGED
data/fast_woothee.gemspec
CHANGED
data/lib/fast_woothee.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require 'thermite/fiddle'
|
3
2
|
|
4
|
-
|
3
|
+
require 'fiddle'
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
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.
|
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.
|
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:
|
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
|
-
|
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
|