gitignore_rb 0.2.4 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ext/gitignore_binding/Rakefile +6 -8
- data/lib/gitignore_rb.rb +2 -0
- data/lib/gitignore_rb/rust.rb +5 -1
- metadata +50 -17
- data/ext/gitignore_binding/Cargo.lock +0 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 27a4e61c4aaca8ce5c656852a347448e8e7549d9c9324316d09839aad6451210
|
4
|
+
data.tar.gz: 642382b2f2ae2c798c3bd6f1a6e8ce13c9eebe68c27d29ac7c63fa38f5c48593
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89eeeda5b2ade9ee227d7d12b6f15bdbfa3e0d84e14a78b90f3e5054295359c3e992ec7563e9c25a66fe4f4a77b59ef9d2ad62e2d807aa3edcef4fbba63754b5
|
7
|
+
data.tar.gz: c0190a59b88a7ec139dc8fb64cf32af51e0fa9f0751b382c16eb52cb1b90ca49681d1e280c0e7940345a74cb67f55a5f9bee095431e8b47c18bc6df1884d4f47
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fileutils'
|
2
4
|
|
3
5
|
LIB_PATH = 'target/release/libgitignore_binding.dylib'
|
@@ -5,17 +7,13 @@ LIB_PATH = 'target/release/libgitignore_binding.dylib'
|
|
5
7
|
desc 'Ensure rustc is present and is callable on the current PATH.'
|
6
8
|
task :check_rustc do
|
7
9
|
puts 'Checking for rustc...'
|
8
|
-
unless system 'rustc --version'
|
9
|
-
fail 'Could not find rustc on your path, please check you have it installed.'
|
10
|
-
end
|
10
|
+
raise 'Could not find rustc on your path, please check you have it installed.' unless system 'rustc --version'
|
11
11
|
end
|
12
12
|
|
13
13
|
desc 'Ensure cargo is present and is callable on the current PATH.'
|
14
14
|
task :check_cargo do
|
15
15
|
puts 'Checking for cargo...'
|
16
|
-
unless system 'cargo --version'
|
17
|
-
fail 'Could not find cargo on your path, please check you have it installed.'
|
18
|
-
end
|
16
|
+
raise 'Could not find cargo on your path, please check you have it installed.' unless system 'cargo --version'
|
19
17
|
end
|
20
18
|
|
21
19
|
desc 'Ensure any previous builds are cleaned up properly.'
|
@@ -24,9 +22,9 @@ task :clean do
|
|
24
22
|
end
|
25
23
|
|
26
24
|
desc 'Execute cargo build to construct the dynamic library.'
|
27
|
-
task :
|
25
|
+
task build: :clean do
|
28
26
|
unless system 'cargo build --release'
|
29
|
-
|
27
|
+
raise 'Could not execute cargo build successfully, please check the logs and try again.'
|
30
28
|
end
|
31
29
|
end
|
32
30
|
|
data/lib/gitignore_rb.rb
CHANGED
data/lib/gitignore_rb/rust.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'ffi'
|
2
4
|
|
3
5
|
# Wraps up the FFI bindings to the Rust lib. This exposes the functions we have
|
@@ -5,7 +7,9 @@ require 'ffi'
|
|
5
7
|
module GitIgnoreRust
|
6
8
|
extend FFI::Library
|
7
9
|
|
8
|
-
|
10
|
+
TARGET_DIR = File.expand_path(File.join(__dir__, '../../ext/gitignore_binding/target/release'))
|
11
|
+
|
12
|
+
ffi_lib File.join(TARGET_DIR, FFI.map_library_name('libgitignore_binding'))
|
9
13
|
|
10
14
|
# Struct used to describe a Ruby Array of Strings being passed from Rust.
|
11
15
|
class StringArray < FFI::Struct
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitignore_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Kleyn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.9'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.9.25
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,91 +27,122 @@ dependencies:
|
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.9'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.9.25
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: coveralls
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
39
|
+
version: 0.8.22
|
34
40
|
type: :development
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: 0.8.22
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: filewatcher
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
53
|
+
version: '1.1'
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.1.1
|
48
57
|
type: :development
|
49
58
|
prerelease: false
|
50
59
|
version_requirements: !ruby/object:Gem::Requirement
|
51
60
|
requirements:
|
52
61
|
- - "~>"
|
53
62
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
63
|
+
version: '1.1'
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.1.1
|
55
67
|
- !ruby/object:Gem::Dependency
|
56
68
|
name: pry-byebug
|
57
69
|
requirement: !ruby/object:Gem::Requirement
|
58
70
|
requirements:
|
59
71
|
- - "~>"
|
60
72
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
73
|
+
version: '3.6'
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 3.6.0
|
62
77
|
type: :development
|
63
78
|
prerelease: false
|
64
79
|
version_requirements: !ruby/object:Gem::Requirement
|
65
80
|
requirements:
|
66
81
|
- - "~>"
|
67
82
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
83
|
+
version: '3.6'
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 3.6.0
|
69
87
|
- !ruby/object:Gem::Dependency
|
70
88
|
name: rspec
|
71
89
|
requirement: !ruby/object:Gem::Requirement
|
72
90
|
requirements:
|
73
91
|
- - "~>"
|
74
92
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
93
|
+
version: '3.8'
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.8.0
|
76
97
|
type: :development
|
77
98
|
prerelease: false
|
78
99
|
version_requirements: !ruby/object:Gem::Requirement
|
79
100
|
requirements:
|
80
101
|
- - "~>"
|
81
102
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
103
|
+
version: '3.8'
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 3.8.0
|
83
107
|
- !ruby/object:Gem::Dependency
|
84
108
|
name: rubocop
|
85
109
|
requirement: !ruby/object:Gem::Requirement
|
86
110
|
requirements:
|
87
111
|
- - "~>"
|
88
112
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
113
|
+
version: 0.59.2
|
90
114
|
type: :development
|
91
115
|
prerelease: false
|
92
116
|
version_requirements: !ruby/object:Gem::Requirement
|
93
117
|
requirements:
|
94
118
|
- - "~>"
|
95
119
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
120
|
+
version: 0.59.2
|
97
121
|
- !ruby/object:Gem::Dependency
|
98
122
|
name: rubocop-rspec
|
99
123
|
requirement: !ruby/object:Gem::Requirement
|
100
124
|
requirements:
|
101
125
|
- - "~>"
|
102
126
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
127
|
+
version: '1.29'
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 1.29.1
|
104
131
|
type: :development
|
105
132
|
prerelease: false
|
106
133
|
version_requirements: !ruby/object:Gem::Requirement
|
107
134
|
requirements:
|
108
135
|
- - "~>"
|
109
136
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
111
|
-
|
137
|
+
version: '1.29'
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: 1.29.1
|
141
|
+
description: |
|
142
|
+
A Ruby binding around gitignore.rs, a Rust implementation of .gitignore file
|
143
|
+
parsing and glob testing. This library is designed to allow extremely
|
144
|
+
performant testing of file paths against the rules contained in a
|
145
|
+
.gitignore file.
|
112
146
|
email: nathan@nathankleyn.com
|
113
147
|
executables: []
|
114
148
|
extensions:
|
@@ -116,7 +150,6 @@ extensions:
|
|
116
150
|
extra_rdoc_files: []
|
117
151
|
files:
|
118
152
|
- README.md
|
119
|
-
- ext/gitignore_binding/Cargo.lock
|
120
153
|
- ext/gitignore_binding/Cargo.toml
|
121
154
|
- ext/gitignore_binding/Rakefile
|
122
155
|
- ext/gitignore_binding/src/lib.rs
|
@@ -142,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
175
|
version: '0'
|
143
176
|
requirements: []
|
144
177
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.
|
178
|
+
rubygems_version: 2.7.6
|
146
179
|
signing_key:
|
147
180
|
specification_version: 4
|
148
181
|
summary: A Ruby binding around gitignore.rs, a Rust implementation of .gitignore file
|
@@ -1,64 +0,0 @@
|
|
1
|
-
[root]
|
2
|
-
name = "gitignore_binding"
|
3
|
-
version = "0.1.0"
|
4
|
-
dependencies = [
|
5
|
-
"gitignore 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
6
|
-
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
7
|
-
]
|
8
|
-
|
9
|
-
[[package]]
|
10
|
-
name = "advapi32-sys"
|
11
|
-
version = "0.1.2"
|
12
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
13
|
-
dependencies = [
|
14
|
-
"winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
15
|
-
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
16
|
-
]
|
17
|
-
|
18
|
-
[[package]]
|
19
|
-
name = "gitignore"
|
20
|
-
version = "1.0.2"
|
21
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
22
|
-
dependencies = [
|
23
|
-
"glob 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
24
|
-
"tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
25
|
-
]
|
26
|
-
|
27
|
-
[[package]]
|
28
|
-
name = "glob"
|
29
|
-
version = "0.2.10"
|
30
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
31
|
-
|
32
|
-
[[package]]
|
33
|
-
name = "libc"
|
34
|
-
version = "0.1.10"
|
35
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
36
|
-
|
37
|
-
[[package]]
|
38
|
-
name = "rand"
|
39
|
-
version = "0.3.11"
|
40
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
41
|
-
dependencies = [
|
42
|
-
"advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
43
|
-
"libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
44
|
-
"winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
45
|
-
]
|
46
|
-
|
47
|
-
[[package]]
|
48
|
-
name = "tempdir"
|
49
|
-
version = "0.3.4"
|
50
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
51
|
-
dependencies = [
|
52
|
-
"rand 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
53
|
-
]
|
54
|
-
|
55
|
-
[[package]]
|
56
|
-
name = "winapi"
|
57
|
-
version = "0.2.4"
|
58
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
59
|
-
|
60
|
-
[[package]]
|
61
|
-
name = "winapi-build"
|
62
|
-
version = "0.1.1"
|
63
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
64
|
-
|