List of commits:
Subject Hash Author Date (UTC)
Add shell fallthrough. 02078135791fb3889152c11defaa2df21d0ae597 Jan Allersma 2018-12-22 19:47:36
Show dependencies when using `delete` command. cfa9779714d5e6d46ab5b4eeb84a915a15f23f54 Jan Allersma 2018-12-20 15:46:05
Resolve dep-tree by building project recursively. f53e38d790ec67d99ec8204af97273a53b73a9dc Jan Allersma 2018-12-19 14:54:07
Improve `dep-tree` command. 90bfa0340b7b874d65c08dc05c3d711abda1c469 Jan Allersma 2018-12-17 20:10:14
Implement experimental `dep-tree` command. 45d9dfdbfc99c59174e7c587621276b78ab7a4e9 Jan Allersma 2018-12-14 16:11:53
Implement `add` command. bbb2544bd06f29866465d651c32ca4d6e017f5e9 Jan Allersma 2018-12-11 15:43:10
Implement `exe` command. 1eaa36242201cf7ade5f23a14340e630c267db07 Jan Allersma 2018-12-11 13:23:32
Implement `run` and `build` commands. 14e9e25b6a06f587c1a50829e72c829ae59a87c2 Jan Allersma 2018-12-10 20:57:08
Implement non-recursive dependency check. 5ffd40604755d1c2dde9353c74f06a006deea33c Jan Allersma 2018-12-07 20:50:42
Restructure project. c2d98caf7897e87284fb2891e1d4b92d14cf37e1 Jan Allersma 2018-12-06 16:20:46
Initial commit. 4c152d55edc20ac55fd749a2b32b204134a664e3 Jan Allersma 2018-12-05 17:03:08
Commit 02078135791fb3889152c11defaa2df21d0ae597 - Add shell fallthrough.
* Updated serde.
Author: Jan Allersma
Author date (UTC): 2018-12-22 19:47
Committer name: Jan Allersma
Committer date (UTC): 2018-12-22 20:37
Parent(s): cfa9779714d5e6d46ab5b4eeb84a915a15f23f54
Signing key:
Tree: 8f25ee6bb2b4cc5697f6b0dedf8da03082bbad93
File Lines added Lines deleted
Cargo.lock 338 3
Cargo.toml 1 0
src/backend/add.rs 1 2
src/backend/project.rs 6 6
src/main.rs 3 56
src/parser.rs 71 0
src/shell.rs 48 0
File Cargo.lock changed (mode: 100644) (index fdbf543..0766c6a)
1 [[package]]
2 name = "argon2rs"
3 version = "0.2.5"
4 source = "registry+https://github.com/rust-lang/crates.io-index"
5 dependencies = [
6 "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
7 "scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
8 ]
9
10 [[package]]
11 name = "arrayvec"
12 version = "0.4.10"
13 source = "registry+https://github.com/rust-lang/crates.io-index"
14 dependencies = [
15 "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
16 ]
17
18 [[package]]
19 name = "autocfg"
20 version = "0.1.1"
21 source = "registry+https://github.com/rust-lang/crates.io-index"
22
23 [[package]]
24 name = "backtrace"
25 version = "0.3.13"
26 source = "registry+https://github.com/rust-lang/crates.io-index"
27 dependencies = [
28 "autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
29 "backtrace-sys 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
30 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
31 "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
32 "rustc-demangle 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
33 "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
34 ]
35
36 [[package]]
37 name = "backtrace-sys"
38 version = "0.1.26"
39 source = "registry+https://github.com/rust-lang/crates.io-index"
40 dependencies = [
41 "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
42 "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
43 ]
44
1 45 [[package]] [[package]]
2 46 name = "beheer" name = "beheer"
3 47 version = "0.1.0" version = "0.1.0"
4 48 dependencies = [ dependencies = [
49 "rustyline 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
5 50 "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
6 51 ] ]
7 52
53 [[package]]
54 name = "bitflags"
55 version = "1.0.4"
56 source = "registry+https://github.com/rust-lang/crates.io-index"
57
58 [[package]]
59 name = "blake2-rfc"
60 version = "0.2.18"
61 source = "registry+https://github.com/rust-lang/crates.io-index"
62 dependencies = [
63 "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
64 "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
65 ]
66
67 [[package]]
68 name = "cc"
69 version = "1.0.28"
70 source = "registry+https://github.com/rust-lang/crates.io-index"
71
72 [[package]]
73 name = "cfg-if"
74 version = "0.1.6"
75 source = "registry+https://github.com/rust-lang/crates.io-index"
76
77 [[package]]
78 name = "constant_time_eq"
79 version = "0.1.3"
80 source = "registry+https://github.com/rust-lang/crates.io-index"
81
82 [[package]]
83 name = "dirs"
84 version = "1.0.4"
85 source = "registry+https://github.com/rust-lang/crates.io-index"
86 dependencies = [
87 "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
88 "redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
89 "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
90 ]
91
92 [[package]]
93 name = "failure"
94 version = "0.1.3"
95 source = "registry+https://github.com/rust-lang/crates.io-index"
96 dependencies = [
97 "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
98 "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
99 ]
100
101 [[package]]
102 name = "failure_derive"
103 version = "0.1.3"
104 source = "registry+https://github.com/rust-lang/crates.io-index"
105 dependencies = [
106 "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
107 "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
108 "syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
109 "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
110 ]
111
112 [[package]]
113 name = "fuchsia-zircon"
114 version = "0.3.3"
115 source = "registry+https://github.com/rust-lang/crates.io-index"
116 dependencies = [
117 "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
118 "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
119 ]
120
121 [[package]]
122 name = "fuchsia-zircon-sys"
123 version = "0.3.3"
124 source = "registry+https://github.com/rust-lang/crates.io-index"
125
8 126 [[package]] [[package]]
9 127 name = "itoa" name = "itoa"
10 128 version = "0.4.3" version = "0.4.3"
11 129 source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
12 130
131 [[package]]
132 name = "libc"
133 version = "0.2.45"
134 source = "registry+https://github.com/rust-lang/crates.io-index"
135
136 [[package]]
137 name = "log"
138 version = "0.4.6"
139 source = "registry+https://github.com/rust-lang/crates.io-index"
140 dependencies = [
141 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
142 ]
143
144 [[package]]
145 name = "memchr"
146 version = "2.1.2"
147 source = "registry+https://github.com/rust-lang/crates.io-index"
148 dependencies = [
149 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
150 "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
151 "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
152 ]
153
154 [[package]]
155 name = "nix"
156 version = "0.11.0"
157 source = "registry+https://github.com/rust-lang/crates.io-index"
158 dependencies = [
159 "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
160 "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
161 "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
162 "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
163 "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
164 ]
165
166 [[package]]
167 name = "nodrop"
168 version = "0.1.13"
169 source = "registry+https://github.com/rust-lang/crates.io-index"
170
171 [[package]]
172 name = "proc-macro2"
173 version = "0.4.24"
174 source = "registry+https://github.com/rust-lang/crates.io-index"
175 dependencies = [
176 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
177 ]
178
179 [[package]]
180 name = "quote"
181 version = "0.6.10"
182 source = "registry+https://github.com/rust-lang/crates.io-index"
183 dependencies = [
184 "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
185 ]
186
187 [[package]]
188 name = "rand"
189 version = "0.4.3"
190 source = "registry+https://github.com/rust-lang/crates.io-index"
191 dependencies = [
192 "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
193 "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
194 "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
195 ]
196
197 [[package]]
198 name = "redox_syscall"
199 version = "0.1.44"
200 source = "registry+https://github.com/rust-lang/crates.io-index"
201
202 [[package]]
203 name = "redox_users"
204 version = "0.2.0"
205 source = "registry+https://github.com/rust-lang/crates.io-index"
206 dependencies = [
207 "argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
208 "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
209 "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
210 "redox_syscall 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)",
211 ]
212
213 [[package]]
214 name = "rustc-demangle"
215 version = "0.1.11"
216 source = "registry+https://github.com/rust-lang/crates.io-index"
217
218 [[package]]
219 name = "rustyline"
220 version = "2.1.0"
221 source = "registry+https://github.com/rust-lang/crates.io-index"
222 dependencies = [
223 "dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
224 "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
225 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
226 "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
227 "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
228 "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
229 "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
230 "utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
231 "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
232 ]
233
13 234 [[package]] [[package]]
14 235 name = "ryu" name = "ryu"
15 236 version = "0.2.7" version = "0.2.7"
16 237 source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
17 238
239 [[package]]
240 name = "scoped_threadpool"
241 version = "0.1.9"
242 source = "registry+https://github.com/rust-lang/crates.io-index"
243
18 244 [[package]] [[package]]
19 245 name = "serde" name = "serde"
20 version = "1.0.80"
246 version = "1.0.82"
21 247 source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
22 248
23 249 [[package]] [[package]]
 
... ... source = "registry+https://github.com/rust-lang/crates.io-index"
27 253 dependencies = [ dependencies = [
28 254 "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
29 255 "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
30 "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
256 "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
31 257 ] ]
32 258
259 [[package]]
260 name = "syn"
261 version = "0.15.23"
262 source = "registry+https://github.com/rust-lang/crates.io-index"
263 dependencies = [
264 "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
265 "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
266 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
267 ]
268
269 [[package]]
270 name = "synstructure"
271 version = "0.10.1"
272 source = "registry+https://github.com/rust-lang/crates.io-index"
273 dependencies = [
274 "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
275 "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
276 "syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
277 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
278 ]
279
280 [[package]]
281 name = "unicode-segmentation"
282 version = "1.2.1"
283 source = "registry+https://github.com/rust-lang/crates.io-index"
284
285 [[package]]
286 name = "unicode-width"
287 version = "0.1.5"
288 source = "registry+https://github.com/rust-lang/crates.io-index"
289
290 [[package]]
291 name = "unicode-xid"
292 version = "0.1.0"
293 source = "registry+https://github.com/rust-lang/crates.io-index"
294
295 [[package]]
296 name = "utf8parse"
297 version = "0.1.1"
298 source = "registry+https://github.com/rust-lang/crates.io-index"
299
300 [[package]]
301 name = "version_check"
302 version = "0.1.5"
303 source = "registry+https://github.com/rust-lang/crates.io-index"
304
305 [[package]]
306 name = "void"
307 version = "1.0.2"
308 source = "registry+https://github.com/rust-lang/crates.io-index"
309
310 [[package]]
311 name = "winapi"
312 version = "0.3.6"
313 source = "registry+https://github.com/rust-lang/crates.io-index"
314 dependencies = [
315 "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
316 "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
317 ]
318
319 [[package]]
320 name = "winapi-i686-pc-windows-gnu"
321 version = "0.4.0"
322 source = "registry+https://github.com/rust-lang/crates.io-index"
323
324 [[package]]
325 name = "winapi-x86_64-pc-windows-gnu"
326 version = "0.4.0"
327 source = "registry+https://github.com/rust-lang/crates.io-index"
328
33 329 [metadata] [metadata]
330 "checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392"
331 "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71"
332 "checksum autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e5f34df7a019573fb8bdc7e24a2bfebe51a2a1d6bfdbaeccedb3c41fc574727"
333 "checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5"
334 "checksum backtrace-sys 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "3fcce89e5ad5c8949caa9434501f7b55415b3e7ad5270cb88c75a8d35e8f1279"
335 "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
336 "checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
337 "checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749"
338 "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
339 "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e"
340 "checksum dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "88972de891f6118092b643d85a0b28e0678e0f948d7f879aa32f2d5aafe97d2a"
341 "checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7"
342 "checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596"
343 "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
344 "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
34 345 "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
346 "checksum libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2857ec59fadc0773853c664d2d18e7198e83883e7060b63c924cb077bd5c74"
347 "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
348 "checksum memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db4c41318937f6e76648f42826b1d9ade5c09cafb5aef7e351240a70f39206e9"
349 "checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17"
350 "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
351 "checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09"
352 "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
353 "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
354 "checksum redox_syscall 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "a84bcd297b87a545980a2d25a0beb72a1f490c31f0a9fde52fca35bfbb1ceb70"
355 "checksum redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "214a97e49be64fd2c86f568dd0cb2c757d2cc53de95b273b6ad0a1c908482f26"
356 "checksum rustc-demangle 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "01b90379b8664dd83460d59bdc5dd1fd3172b8913788db483ed1325171eab2f7"
357 "checksum rustyline 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6010155119d53aac4f5b987cb8f6ea913d0d64d9b237da36f8f96a90cb3f5385"
35 358 "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7"
36 "checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef"
359 "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
360 "checksum serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)" = "6fa52f19aee12441d5ad11c9a00459122bd8f98707cadf9778c540674f1935b6"
37 361 "checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" "checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811"
362 "checksum syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9545a6a093a3f0bd59adb472700acc08cad3776f860f16a897dfce8c88721cbc"
363 "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
364 "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1"
365 "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
366 "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
367 "checksum utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d"
368 "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
369 "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
370 "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
371 "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
372 "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
File Cargo.toml changed (mode: 100644) (index 56011b3..e696031)
... ... authors = ["Jan Allersma <jan@allersma.be>"]
5 5
6 6 [dependencies] [dependencies]
7 7 serde_json = "1.0" serde_json = "1.0"
8 rustyline = "2.1.0"
File src/backend/add.rs changed (mode: 100644) (index 075d23c..9fe9717)
1 1 extern crate serde_json; extern crate serde_json;
2 2
3 use std::env;
4 3 use std::result::Result; use std::result::Result;
5 4 use std::path::PathBuf; use std::path::PathBuf;
6 5
7 pub fn add(args: &mut env::Args) -> Result<String, String> {
6 pub fn add<I>(args: &mut I) -> Result<String, String> where I: Iterator<Item=String> {
8 7 let dep_dir: PathBuf; let dep_dir: PathBuf;
9 8
10 9 let dep_name = match args.next() { let dep_name = match args.next() {
File src/backend/project.rs changed (mode: 100644) (index f86a134..c13406c)
... ... use std::result::Result;
3 3 use std::process::{Command, Stdio}; use std::process::{Command, Stdio};
4 4 use super::deptree; use super::deptree;
5 5
6 pub fn init(args: &mut env::Args) {
6 pub fn init<I>(args: &mut I) where I: Iterator<Item=String> {
7 7 let mut directory = env::current_dir().unwrap(); let mut directory = env::current_dir().unwrap();
8 8
9 9 if let Some(projectname) = args.next() { if let Some(projectname) = args.next() {
 
... ... pub fn init(args: &mut env::Args) {
16 16 } }
17 17 } }
18 18
19 pub fn build(args: &mut env::Args) -> Result<String, String> {
19 pub fn build<I>(args: &mut I) -> Result<String, String> where I: Iterator<Item=String> {
20 20 match args.next() { match args.next() {
21 21 Some(ref module) if module.as_str() == "--module" => { Some(ref module) if module.as_str() == "--module" => {
22 22 match super::filesystem::get_current_module_root() { match super::filesystem::get_current_module_root() {
 
... ... pub fn build(args: &mut env::Args) -> Result<String, String> {
33 33 } }
34 34 } }
35 35
36 pub fn exe(args: &mut env::Args) -> Result<String, String> {
36 pub fn exe<I>(args: &mut I) -> Result<String, String> where I: Iterator<Item=String> {
37 37 let output_dir; let output_dir;
38 38 let mut args = String::new(); let mut args = String::new();
39 39
 
... ... pub fn exe(args: &mut env::Args) -> Result<String, String> {
83 83 } }
84 84 } }
85 85
86 pub fn run(args: &mut env::Args) -> Result<String, String> {
86 pub fn run<I>(args: &mut I) -> Result<String, String> where I: Iterator<Item=String> {
87 87 println!("Building project.."); println!("Building project..");
88 88
89 89 match build(args) { match build(args) {
 
... ... pub fn run(args: &mut env::Args) -> Result<String, String> {
94 94 exe(args) exe(args)
95 95 } }
96 96
97 pub fn delete(path: &mut env::Args) -> Result<String, String> {
97 pub fn delete<I>(path: &mut I) -> Result<String, String> where I: Iterator<Item=String> {
98 98 let path = match path.next() { let path = match path.next() {
99 99 Some(arg) => arg, Some(arg) => arg,
100 100 None => return Err(String::from("Missing path as argument.")) None => return Err(String::from("Missing path as argument."))
 
... ... pub fn delete(path: &mut env::Args) -> Result<String, String> {
109 109 } }
110 110 } }
111 111
112 pub fn dep_tree(args: &mut env::Args) -> Result<deptree::Node, String> {
112 pub fn dep_tree<I>(args: &mut I) -> Result<deptree::Node, String> where I: Iterator<Item=String> {
113 113 let path = match super::filesystem::get_current_module_root() { let path = match super::filesystem::get_current_module_root() {
114 114 Some(p) => p, Some(p) => p,
115 115 None => return Err(String::from("Not in a project/dependency directory.")) None => return Err(String::from("Not in a project/dependency directory."))
File src/main.rs changed (mode: 100644) (index 41d8985..038c3be)
2 2 extern crate serde_json; extern crate serde_json;
3 3
4 4 mod backend; mod backend;
5 use std::env;
5 mod shell;
6 mod parser;
6 7
7 8 fn main() { fn main() {
8 9 match backend::filesystem::get_current_project_root() { match backend::filesystem::get_current_project_root() {
 
... ... fn main() {
10 11 None => println!("You are not in a project.") None => println!("You are not in a project.")
11 12 } }
12 13
13 parse();
14 }
15
16 fn parse() {
17 let mut argv = env::args();
18 let _ = argv.next();
19 let arg = argv.next();
20
21 match arg {
22 Some(argument) => {
23 if &argument == "--help" || &argument == "-h" {
24 backend::project::help();
25 }
26 else if &argument == "init" {
27 backend::project::init(&mut argv);
28 }
29 else if &argument == "build" {
30 match backend::project::build(&mut argv) {
31 Ok(result) => println!("{}", result),
32 Err(e) => println!("Build failed: {}", e)
33 }
34 }
35 else if &argument == "run" {
36 match backend::project::run(&mut argv) {
37 Ok(_) => {},
38 Err(e) => println!("Running project failed: {}", e)
39 }
40 }
41 else if &argument == "exe" {
42 match backend::project::exe(&mut argv) {
43 Ok(_) => {},
44 Err(e) => println!("Running project failed: {}", e)
45 }
46 }
47 else if &argument == "add" {
48 match backend::add::add(&mut argv) {
49 Ok(msg) => println!("{}", msg),
50 Err(e) => println!("Could not add dependency: {}", e)
51 }
52 }
53 else if &argument == "delete" {
54 match backend::project::delete(&mut argv) {
55 Ok(module) => println!("Module '{}' deleted.", module),
56 Err(e) => println!("Deleting module failed: {}", e)
57 }
58 }
59 else if &argument == "dep-tree" {
60 match backend::project::dep_tree(&mut argv) {
61 Ok(tree) => println!("{}", tree),
62 Err(e) => println!("Could not deduce dependency tree: {}", e)
63 }
64 }
65 },
66 None => backend::project::help()
67 }
14 parser::parse_argv();
68 15 } }
File src/parser.rs added (mode: 100644) (index 0000000..1944511)
1 use backend;
2 use shell;
3 use std::env;
4
5 pub fn parse_argv() {
6 let mut argv = env::args();
7 let _ = argv.next();
8
9 if !parse(&mut argv, true) {
10 backend::project::help();
11 }
12 }
13
14 pub fn parse_command<'a, I>(args: &mut I) -> bool where I: Iterator<Item=&'a str> {
15 parse(&mut args.map(|arg| String::from(arg)), false)
16 }
17
18 fn parse<I>(args: &mut I, open_shell: bool) -> bool where I: Iterator<Item=String> {
19 match args.next() {
20 Some(argument) => {
21 if argument == "--help" || argument == "-h" {
22 backend::project::help();
23 }
24 else if argument == "init" {
25 backend::project::init(args);
26 }
27 else if argument == "build" {
28 match backend::project::build(args) {
29 Ok(result) => println!("{}", result),
30 Err(e) => println!("Build failed: {}", e)
31 }
32 }
33 else if argument == "run" {
34 match backend::project::run(args) {
35 Ok(_) => {},
36 Err(e) => println!("Running project failed: {}", e)
37 }
38 }
39 else if argument == "exe" {
40 match backend::project::exe(args) {
41 Ok(_) => {},
42 Err(e) => println!("Running project failed: {}", e)
43 }
44 }
45 else if argument == "add" {
46 match backend::add::add(args) {
47 Ok(msg) => println!("{}", msg),
48 Err(e) => println!("Could not add dependency: {}", e)
49 }
50 }
51 else if argument == "delete" {
52 match backend::project::delete(args) {
53 Ok(module) => println!("Module '{}' deleted.", module),
54 Err(e) => println!("Deleting module failed: {}", e)
55 }
56 }
57 else if argument == "dep-tree" {
58 match backend::project::dep_tree(args) {
59 Ok(tree) => println!("{}", tree),
60 Err(e) => println!("Could not deduce dependency tree: {}", e)
61 }
62 }
63 else {
64 return false;
65 }
66 },
67 None if open_shell => shell::shell(),
68 None => return false
69 }
70 true
71 }
File src/shell.rs added (mode: 100644) (index 0000000..6b690a1)
1 extern crate rustyline;
2
3 use shell::rustyline::error::ReadlineError as Error;
4 use std::process::{Command, Stdio};
5 use std::env;
6 use parser;
7
8 pub fn shell() {
9 let mut dir = env::current_dir().unwrap();
10 let mut editor = rustyline::Editor::<()>::new();
11
12 loop {
13 let input = match editor.readline("ambassade> ") {
14 Ok(line) => line,
15 Err(Error::Interrupted) => break,
16 Err(_) => continue
17 };
18
19 let mut input = input.split_whitespace();
20
21 if parser::parse_command(&mut input.clone()) {
22 continue;
23 }
24
25 match input.next() {
26 Some("cd") => match input.next() {
27 Some(subdir) => dir.push(subdir),
28 None => println!("Missing subdirectory.")
29 },
30 Some("exit") | Some("quit") => break,
31 Some(cmd) => {
32 let input: Vec<&str> = input.collect();
33
34 let outp = Command::new(cmd)
35 .args(input)
36 .current_dir(&dir)
37 .stdin(Stdio::inherit())
38 .stdout(Stdio::inherit())
39 .output();
40
41 if outp.is_err() {
42 println!("Could not execute command.");
43 }
44 },
45 None => continue
46 }
47 }
48 }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/kapstok/NHL-Beheer

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/kapstok/NHL-Beheer

Clone this repository using git:
git clone git://git.rocketgit.com/user/kapstok/NHL-Beheer

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main