fast_woothee 1.5.1 → 1.6.0

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
2
  SHA256:
3
- metadata.gz: bc8ee7c97a34b281d37dbf5371fc6b303e0f503513af7d15911dfa79dcfacfa9
4
- data.tar.gz: 3189b803709eba446b64dc231d87aafe1999da2a46d7387aaf97a6c5f19fe6f3
3
+ metadata.gz: 542f64dd5c449bf8a4dccbac94dca410eeac4b6768abc2defaa3c836c44807f8
4
+ data.tar.gz: 7d240d157f91b12cf7f465832ed8c82047a3ad5cdb5a77918c3eb154ff3129e9
5
5
  SHA512:
6
- metadata.gz: 0b242549157b42c1ba426d829cf9e447cac0723b9f43d6709ca4b7f88daf69eb22bc8d313599dff4a9df7c9fc5c8d001676aefb7e984e5978d09d9d50bce7c44
7
- data.tar.gz: 7fb6f7a742a2c67574b6b96c10555699d5b909a6e0d4cf21d9385aa5249791df75abd272ddf163d7575a37d3be1d4b40c116e9453903aefcd74f4e3a0ab6618c
6
+ metadata.gz: f84758519fe8fe968906dbb3eb1f5841d0fc51f0e55a030b1fff168aaae8af33fa2931915038be611df6b27d04b7378c71cd3eed719b650df557c608f37a069c
7
+ data.tar.gz: 317f3ca8d328b01d8aa0f41c797e2f1cae8051d829798558107156f2cffb776d29f00cf9ee67b2ab6d9bb60b8dee7463b0798b8f9c5d1859d255ea5dead2cda8
@@ -1 +1 @@
1
- 2.6.2
1
+ 2.7.1
@@ -13,12 +13,17 @@ env:
13
13
  matrix:
14
14
  - FWOOTHEE_RUBY_VERSION: 2.4.6
15
15
  - FWOOTHEE_RUBY_VERSION: 2.5.2
16
- - FWOOTHEE_RUBY_VERSION: 2.6.2
16
+ - FWOOTHEE_RUBY_VERSION: 2.6.6
17
+ - FWOOTHEE_RUBY_VERSION: 2.7.1
18
+
17
19
  matrix:
18
20
  include:
19
21
  - os: linux
20
22
  dist: trusty
21
- env: FWOOTHEE_RUBY_VERSION=2.6.2 RUBY_STATIC=1
23
+ env: FWOOTHEE_RUBY_VERSION=2.7.1 RUBY_STATIC=1
24
+ - os: linux
25
+ dist: trusty
26
+ env: FWOOTHEE_RUBY_VERSION=2.6.6 RUBY_STATIC=1
22
27
  - os: linux
23
28
  dist: trusty
24
29
  env: FWOOTHEE_RUBY_VERSION=2.4.6 RUBY_STATIC=1
@@ -27,19 +32,19 @@ matrix:
27
32
  env: FWOOTHEE_RUBY_VERSION=2.5.2 RUBY_STATIC=1
28
33
  - os: osx
29
34
  osx_image: xcode8
30
- env: FWOOTHEE_RUBY_VERSION=2.6.2
35
+ env: FWOOTHEE_RUBY_VERSION=2.6.6
31
36
  - os: osx
32
37
  osx_image: xcode9.3beta
33
- env: FWOOTHEE_RUBY_VERSION=2.6.2
38
+ env: FWOOTHEE_RUBY_VERSION=2.6.6
34
39
  - os: osx
35
40
  osx_image: xcode8
36
- env: FWOOTHEE_RUBY_VERSION=2.6.2 RUBY_STATIC=1
41
+ env: FWOOTHEE_RUBY_VERSION=2.6.6 RUBY_STATIC=1
37
42
  - os: osx
38
43
  osx_image: xcode9.2
39
- env: FWOOTHEE_RUBY_VERSION=2.6.2 RUBY_STATIC=1
44
+ env: FWOOTHEE_RUBY_VERSION=2.6.6 RUBY_STATIC=1
40
45
  - os: osx
41
46
  osx_image: xcode9.3beta
42
- env: FWOOTHEE_RUBY_VERSION=2.6.2 RUBY_STATIC=1
47
+ env: FWOOTHEE_RUBY_VERSION=2.6.6 RUBY_STATIC=1
43
48
  - os: osx
44
49
  osx_image: xcode8
45
50
  env: FWOOTHEE_RUBY_VERSION=2.4.6
@@ -70,6 +75,21 @@ matrix:
70
75
  - os: osx
71
76
  osx_image: xcode9.3beta
72
77
  env: FWOOTHEE_RUBY_VERSION=2.5.2 RUBY_STATIC=1
78
+ - os: osx
79
+ osx_image: xcode8
80
+ env: FWOOTHEE_RUBY_VERSION=2.7.1
81
+ - os: osx
82
+ osx_image: xcode9.3beta
83
+ env: FWOOTHEE_RUBY_VERSION=2.7.1
84
+ - os: osx
85
+ osx_image: xcode8
86
+ env: FWOOTHEE_RUBY_VERSION=2.7.1 RUBY_STATIC=1
87
+ - os: osx
88
+ osx_image: xcode9.2
89
+ env: FWOOTHEE_RUBY_VERSION=2.7.1 RUBY_STATIC=1
90
+ - os: osx
91
+ osx_image: xcode9.3beta
92
+ env: FWOOTHEE_RUBY_VERSION=2.7.1 RUBY_STATIC=1
73
93
 
74
94
  cache:
75
95
  cargo: true
data/Cargo.lock CHANGED
@@ -1,114 +1,85 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
1
3
  [[package]]
2
4
  name = "aho-corasick"
3
- version = "0.7.3"
5
+ version = "0.7.10"
4
6
  source = "registry+https://github.com/rust-lang/crates.io-index"
5
7
  dependencies = [
6
- "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
8
+ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
7
9
  ]
8
10
 
9
11
  [[package]]
10
12
  name = "fast_woothee"
11
- version = "1.5.1"
13
+ version = "1.6.0"
12
14
  dependencies = [
13
- "ruru 0.9.3 (git+https://github.com/d-unseductable/ruru)",
14
- "woothee 0.9.0 (git+https://github.com/woothee/woothee-rust)",
15
+ "rutie 0.7.0 (git+https://github.com/danielpclark/rutie)",
16
+ "woothee 0.11.0 (git+https://github.com/woothee/woothee-rust)",
15
17
  ]
16
18
 
17
19
  [[package]]
18
20
  name = "lazy_static"
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"
21
+ version = "1.4.0"
25
22
  source = "registry+https://github.com/rust-lang/crates.io-index"
26
23
 
27
24
  [[package]]
28
25
  name = "libc"
29
- version = "0.2.51"
26
+ version = "0.2.68"
30
27
  source = "registry+https://github.com/rust-lang/crates.io-index"
31
28
 
32
29
  [[package]]
33
30
  name = "memchr"
34
- version = "2.2.0"
31
+ version = "2.3.3"
35
32
  source = "registry+https://github.com/rust-lang/crates.io-index"
36
33
 
37
34
  [[package]]
38
35
  name = "regex"
39
- version = "1.1.5"
36
+ version = "1.3.6"
40
37
  source = "registry+https://github.com/rust-lang/crates.io-index"
41
38
  dependencies = [
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)",
39
+ "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
40
+ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
41
+ "regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)",
42
+ "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
47
43
  ]
48
44
 
49
45
  [[package]]
50
46
  name = "regex-syntax"
51
- version = "0.6.6"
47
+ version = "0.6.17"
52
48
  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
- ]
56
-
57
- [[package]]
58
- name = "ruby-sys"
59
- version = "0.3.0"
60
- source = "git+http://github.com/steveklabnik/ruby-sys#1b4c1412e22a9a6dac97508f6b6c4a4035e21ed2"
61
- dependencies = [
62
- "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
63
- ]
64
49
 
65
50
  [[package]]
66
- name = "ruru"
67
- version = "0.9.3"
68
- source = "git+https://github.com/d-unseductable/ruru#587f1c40b741c5e62bf9bf8736c0158f8cd5210e"
51
+ name = "rutie"
52
+ version = "0.7.0"
53
+ source = "git+https://github.com/danielpclark/rutie#1c951b59e00944d305ca425267c54115c8c1bb86"
69
54
  dependencies = [
70
- "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
71
- "ruby-sys 0.3.0 (git+http://github.com/steveklabnik/ruby-sys)",
55
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
56
+ "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
72
57
  ]
73
58
 
74
59
  [[package]]
75
60
  name = "thread_local"
76
- version = "0.3.6"
61
+ version = "1.0.1"
77
62
  source = "registry+https://github.com/rust-lang/crates.io-index"
78
63
  dependencies = [
79
- "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
64
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
80
65
  ]
81
66
 
82
- [[package]]
83
- name = "ucd-util"
84
- version = "0.1.3"
85
- source = "registry+https://github.com/rust-lang/crates.io-index"
86
-
87
- [[package]]
88
- name = "utf8-ranges"
89
- version = "1.0.2"
90
- source = "registry+https://github.com/rust-lang/crates.io-index"
91
-
92
67
  [[package]]
93
68
  name = "woothee"
94
- version = "0.9.0"
95
- source = "git+https://github.com/woothee/woothee-rust#f98a1c36365f733d7815eb28a3f5e175b30601bb"
69
+ version = "0.11.0"
70
+ source = "git+https://github.com/woothee/woothee-rust#8ac0a7b1b3320ca37748850a17b00b8065701524"
96
71
  dependencies = [
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)",
72
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
73
+ "regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
99
74
  ]
100
75
 
101
76
  [metadata]
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"
109
- "checksum ruby-sys 0.3.0 (git+http://github.com/steveklabnik/ruby-sys)" = "<none>"
110
- "checksum ruru 0.9.3 (git+https://github.com/d-unseductable/ruru)" = "<none>"
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.9.0 (git+https://github.com/woothee/woothee-rust)" = "<none>"
77
+ "checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada"
78
+ "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
79
+ "checksum libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0"
80
+ "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
81
+ "checksum regex 1.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3"
82
+ "checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae"
83
+ "checksum rutie 0.7.0 (git+https://github.com/danielpclark/rutie)" = "<none>"
84
+ "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
85
+ "checksum woothee 0.11.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.5.1"
3
+ version = "1.6.0"
4
4
  authors = ["Ian Ker-Seymer <i.kerseymer@gmail.com>"]
5
5
  repository = "https://github.com/ianks/fast_woothee"
6
6
  publish = false
@@ -10,11 +10,10 @@ crate-type = ["dylib"]
10
10
 
11
11
  [dependencies]
12
12
  woothee = { git = "https://github.com/woothee/woothee-rust" }
13
- ruru = "^0.9"
13
+ rutie = { version = "0.7.0", features = ["no-link"] }
14
14
 
15
15
  [patch.crates-io]
16
- ruru = { git = "https://github.com/d-unseductable/ruru", branch = "master" }
17
- ruby-sys = { git = "http://github.com/steveklabnik/ruby-sys", branch = "master" }
16
+ rutie = { git = "https://github.com/danielpclark/rutie", branch = "master" }
18
17
 
19
18
  [package.metadata.thermite]
20
19
  github_releases = true
@@ -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.5.1'
8
+ spec.version = '1.6.0'
9
9
  spec.authors = ['Ian Ker-Seymer']
10
10
  spec.email = ['i.kerseymer@gmail.com']
11
11
 
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'ffi', '~> 1.9'
29
29
  spec.add_development_dependency 'pry'
30
30
  spec.add_development_dependency 'pry-doc'
31
- spec.add_development_dependency 'rake', '~> 10.0'
31
+ spec.add_development_dependency 'rake', '~> 13.0'
32
32
  spec.add_development_dependency 'rake-compiler'
33
33
  spec.add_development_dependency 'rspec', '~> 3.0'
34
34
  end
data/src/lib.rs CHANGED
@@ -1,8 +1,8 @@
1
1
  #[macro_use]
2
- extern crate ruru;
2
+ extern crate rutie;
3
3
  extern crate woothee;
4
4
 
5
- use ruru::{Symbol, Boolean, RString, Class, Hash, Object};
5
+ use rutie::{Symbol, Boolean, RString, Class, Hash, Object};
6
6
 
7
7
  use woothee::parser::Parser;
8
8
 
@@ -15,16 +15,16 @@ methods!(
15
15
  let mut hash = Hash::new();
16
16
 
17
17
  let parser = Parser::new();
18
- match parser.parse(ua_string.unwrap_or(RString::new("")).to_str()) {
18
+ match parser.parse(ua_string.unwrap_or(RString::new_usascii_unchecked("")).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));
24
- hash.store(Symbol::new("os_version"), RString::new(&*result.os_version));
25
- hash.store(Symbol::new("browser_type"), RString::new(&result.browser_type));
26
- hash.store(Symbol::new("version"), RString::new(&*result.version));
27
- hash.store(Symbol::new("vendor"), RString::new(&result.vendor));
21
+ hash.store(Symbol::new("name"), RString::new_usascii_unchecked(&result.name));
22
+ hash.store(Symbol::new("category"), RString::new_usascii_unchecked(&result.category));
23
+ hash.store(Symbol::new("os"), RString::new_usascii_unchecked(&result.os));
24
+ hash.store(Symbol::new("os_version"), RString::new_usascii_unchecked(&*result.os_version));
25
+ hash.store(Symbol::new("browser_type"), RString::new_usascii_unchecked(&result.browser_type));
26
+ hash.store(Symbol::new("version"), RString::new_usascii_unchecked(&*result.version));
27
+ hash.store(Symbol::new("vendor"), RString::new_usascii_unchecked(&result.vendor));
28
28
  hash
29
29
  }
30
30
  }
@@ -35,7 +35,7 @@ methods!(
35
35
  FastWoothee,
36
36
  _itself,
37
37
  fn is_crawler(ua_string: RString) -> Boolean {
38
- Boolean::new(woothee::is_crawler(ua_string.unwrap_or(RString::new("")).to_str()))
38
+ Boolean::new(woothee::is_crawler(ua_string.unwrap_or(RString::new_usascii_unchecked("")).to_str()))
39
39
  }
40
40
  );
41
41
 
@@ -45,7 +45,7 @@ methods!(
45
45
  fn is_ios(ua_string: RString) -> Boolean {
46
46
  let parser = Parser::new();
47
47
 
48
- match parser.parse(ua_string.unwrap_or(RString::new("")).to_str()) {
48
+ match parser.parse(ua_string.unwrap_or(RString::new_usascii_unchecked("")).to_str()) {
49
49
  None => Boolean::new(false),
50
50
  Some(result) => {
51
51
  match result.os {
@@ -66,7 +66,7 @@ methods!(
66
66
  fn is_android(ua_string: RString) -> Boolean {
67
67
  let parser = Parser::new();
68
68
 
69
- match parser.parse(ua_string.unwrap_or(RString::new("")).to_str()) {
69
+ match parser.parse(ua_string.unwrap_or(RString::new_usascii_unchecked("")).to_str()) {
70
70
  None => Boolean::new(false),
71
71
  Some(result) => {
72
72
  match result.os {
@@ -81,7 +81,7 @@ methods!(
81
81
  #[no_mangle]
82
82
  pub extern fn initialize_fast_woothee() {
83
83
  Class::new("FastWoothee", None).define(|itself| {
84
- itself.const_set("VERSION", &RString::new("1.5.1").freeze());
84
+ itself.const_set("VERSION", &RString::new_usascii_unchecked("1.6.0").freeze());
85
85
  itself.def_self("parse", parse);
86
86
  itself.def_self("crawler?", is_crawler);
87
87
  itself.def_self("ios?", is_ios);
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.5.1
4
+ version: 1.6.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: 2019-04-09 00:00:00.000000000 Z
11
+ date: 2020-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thermite
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '10.0'
89
+ version: '13.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '10.0'
96
+ version: '13.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake-compiler
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0'
165
165
  requirements: []
166
- rubygems_version: 3.0.3
166
+ rubygems_version: 3.1.2
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: Ruby bindings for woothee-rust