├── .gitignore ├── .travis.yml ├── Cargo.lock ├── Cargo.toml ├── LICENSE.txt ├── README.md ├── ci └── build-release.sh └── src ├── errors.rs ├── git_operations.rs ├── main.rs ├── options.rs ├── repository.rs └── tests ├── mod.rs └── repository.rs /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | cache: cargo 3 | rust: 4 | - stable 5 | - beta 6 | - nightly 7 | os: 8 | - linux 9 | - osx 10 | services: 11 | - docker 12 | matrix: 13 | allow_failures: 14 | - rust: nightly 15 | dist: trusty 16 | 17 | before_deploy: 18 | - ci/build-release.sh ghcl "${TRAVIS_TAG}-${TRAVIS_OS_NAME}" 19 | 20 | deploy: 21 | provider: releases 22 | api_key: 23 | secure: Il1lEsWK/KxjB1VrtrZqKy3ecrl/kP9JVYIVPbvvERzxrhX5kcgB8eOjH7/JYeIiDH5Djd1ySsE31qIIhnBSJ4xzEhMH0IzTPs6s6Nmslgy/vQ/ug+AKWNb2mF+Et7qppAL0lT6xrdswJwcg43JZyVVMKVfhalVwzM+bRWqEUWMackHNf9GpaaUyn3WCo/bb4L+djG+qToG7h2VBTEB0aYcvDkV+WbdjKYnGiENKQ1EfdgI46pFLyTkjK1+JRE1pVzByfbip0tAhty3cPC5U3cpp49Iy1Ufe9bx/OXFxB+58EHQNhBvr0o74UdZUdwsltWZoDF6ReWmAW+3vmaEgYFFJ/X9q/XdTlMao4W87xRrBid6LeDG4CEwU6JuWrStWxGa9LmF9uo7Z3BsjtoYy3d/X6FC/QC9Ly12aYPEBDdSBNU8TfizYM6gEf8cLCjWM/B+/dLj5qHHn51MGG+8v8YKysbhOqtNQQsSUMhAraqpCgDsW9ToRsQukClYFPMFIOfoBU3pl7upnN94Q6Wh6Mp+Md1N5PJEjdF37z1E2Ucx3hCMbJ0MHTiqWMVcIzZEO5oqN06CdMvUyeDeEYsvenkCWx++vP7UaJXLJJE20MFIUFqTyzQjD3N6EZAT2hwyjcDMXLAH0q3CZP+c4ynNmNeObWp+JQe3zroJ800z5DBE= 24 | file_glob: true 25 | file: target/gh-release/* 26 | skip_cleanup: true 27 | on: 28 | repo: PlasmaPower/ghcl 29 | rust: stable 30 | tags: true 31 | 32 | branches: 33 | only: 34 | - master 35 | - /^\d+\.\d+\.\d+.*$/ 36 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "adler32" 5 | version = "1.0.4" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | 8 | [[package]] 9 | name = "aho-corasick" 10 | version = "0.6.10" 11 | source = "registry+https://github.com/rust-lang/crates.io-index" 12 | dependencies = [ 13 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 14 | ] 15 | 16 | [[package]] 17 | name = "ansi_term" 18 | version = "0.11.0" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | dependencies = [ 21 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 22 | ] 23 | 24 | [[package]] 25 | name = "app_dirs2" 26 | version = "2.0.4" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | dependencies = [ 29 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 30 | "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 31 | ] 32 | 33 | [[package]] 34 | name = "atty" 35 | version = "0.2.13" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | dependencies = [ 38 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 39 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 40 | ] 41 | 42 | [[package]] 43 | name = "autocfg" 44 | version = "0.1.7" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | 47 | [[package]] 48 | name = "backtrace" 49 | version = "0.3.40" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | dependencies = [ 52 | "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", 53 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 54 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 55 | "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 56 | ] 57 | 58 | [[package]] 59 | name = "backtrace-sys" 60 | version = "0.1.32" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | dependencies = [ 63 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 64 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 65 | ] 66 | 67 | [[package]] 68 | name = "base64" 69 | version = "0.10.1" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | dependencies = [ 72 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 73 | ] 74 | 75 | [[package]] 76 | name = "bitflags" 77 | version = "0.9.1" 78 | source = "registry+https://github.com/rust-lang/crates.io-index" 79 | 80 | [[package]] 81 | name = "bitflags" 82 | version = "1.2.1" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | 85 | [[package]] 86 | name = "byteorder" 87 | version = "1.3.2" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | 90 | [[package]] 91 | name = "bytes" 92 | version = "0.4.12" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | dependencies = [ 95 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 96 | "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 97 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 98 | ] 99 | 100 | [[package]] 101 | name = "c2-chacha" 102 | version = "0.2.3" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | dependencies = [ 105 | "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 106 | ] 107 | 108 | [[package]] 109 | name = "cc" 110 | version = "1.0.47" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | 113 | [[package]] 114 | name = "cfg-if" 115 | version = "0.1.10" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | 118 | [[package]] 119 | name = "clap" 120 | version = "2.33.0" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | dependencies = [ 123 | "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 124 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 125 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 126 | "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 127 | "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 128 | "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 129 | "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 130 | ] 131 | 132 | [[package]] 133 | name = "cloudabi" 134 | version = "0.0.3" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | dependencies = [ 137 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 138 | ] 139 | 140 | [[package]] 141 | name = "cmake" 142 | version = "0.1.42" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | dependencies = [ 145 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 146 | ] 147 | 148 | [[package]] 149 | name = "cookie" 150 | version = "0.12.0" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | dependencies = [ 153 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 154 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 155 | ] 156 | 157 | [[package]] 158 | name = "cookie_store" 159 | version = "0.7.0" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | dependencies = [ 162 | "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 163 | "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 164 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 165 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 166 | "publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)", 167 | "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 168 | "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 169 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 170 | "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 171 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 172 | ] 173 | 174 | [[package]] 175 | name = "core-foundation" 176 | version = "0.6.4" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | dependencies = [ 179 | "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 180 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 181 | ] 182 | 183 | [[package]] 184 | name = "core-foundation-sys" 185 | version = "0.6.2" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | 188 | [[package]] 189 | name = "crc32fast" 190 | version = "1.2.0" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | dependencies = [ 193 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 194 | ] 195 | 196 | [[package]] 197 | name = "crossbeam-deque" 198 | version = "0.7.2" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | dependencies = [ 201 | "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 202 | "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 203 | ] 204 | 205 | [[package]] 206 | name = "crossbeam-epoch" 207 | version = "0.8.0" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | dependencies = [ 210 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 211 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 212 | "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 213 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 214 | "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 215 | "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 216 | ] 217 | 218 | [[package]] 219 | name = "crossbeam-queue" 220 | version = "0.1.2" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | dependencies = [ 223 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 224 | ] 225 | 226 | [[package]] 227 | name = "crossbeam-utils" 228 | version = "0.6.6" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | dependencies = [ 231 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 232 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 233 | ] 234 | 235 | [[package]] 236 | name = "crossbeam-utils" 237 | version = "0.7.0" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | dependencies = [ 240 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 241 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 242 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 243 | ] 244 | 245 | [[package]] 246 | name = "curl-sys" 247 | version = "0.4.24" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | dependencies = [ 250 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 251 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 252 | "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", 253 | "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", 254 | "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", 255 | "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 256 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 257 | ] 258 | 259 | [[package]] 260 | name = "dtoa" 261 | version = "0.4.4" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | 264 | [[package]] 265 | name = "either" 266 | version = "1.5.3" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | 269 | [[package]] 270 | name = "encoding_rs" 271 | version = "0.8.20" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | dependencies = [ 274 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 275 | ] 276 | 277 | [[package]] 278 | name = "error-chain" 279 | version = "0.12.1" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | dependencies = [ 282 | "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", 283 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 284 | ] 285 | 286 | [[package]] 287 | name = "failure" 288 | version = "0.1.6" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | dependencies = [ 291 | "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", 292 | "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 293 | ] 294 | 295 | [[package]] 296 | name = "failure_derive" 297 | version = "0.1.6" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | dependencies = [ 300 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 301 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 302 | "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", 303 | "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", 304 | ] 305 | 306 | [[package]] 307 | name = "flate2" 308 | version = "1.0.13" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | dependencies = [ 311 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 312 | "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 313 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 314 | "miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 315 | ] 316 | 317 | [[package]] 318 | name = "fnv" 319 | version = "1.0.6" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | 322 | [[package]] 323 | name = "foreign-types" 324 | version = "0.3.2" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | dependencies = [ 327 | "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 328 | ] 329 | 330 | [[package]] 331 | name = "foreign-types-shared" 332 | version = "0.1.1" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | 335 | [[package]] 336 | name = "fuchsia-cprng" 337 | version = "0.1.1" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | 340 | [[package]] 341 | name = "fuchsia-zircon" 342 | version = "0.3.3" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | dependencies = [ 345 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 346 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 347 | ] 348 | 349 | [[package]] 350 | name = "fuchsia-zircon-sys" 351 | version = "0.3.3" 352 | source = "registry+https://github.com/rust-lang/crates.io-index" 353 | 354 | [[package]] 355 | name = "futures" 356 | version = "0.1.29" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | 359 | [[package]] 360 | name = "futures-cpupool" 361 | version = "0.1.8" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | dependencies = [ 364 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 365 | "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 366 | ] 367 | 368 | [[package]] 369 | name = "getrandom" 370 | version = "0.1.13" 371 | source = "registry+https://github.com/rust-lang/crates.io-index" 372 | dependencies = [ 373 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 374 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 375 | "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 376 | ] 377 | 378 | [[package]] 379 | name = "ghcl" 380 | version = "0.1.2" 381 | dependencies = [ 382 | "app_dirs2 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 383 | "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", 384 | "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", 385 | "git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 386 | "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 387 | "reqwest 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)", 388 | "rpassword 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 389 | "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 390 | "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 391 | "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 392 | "serde_yaml 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", 393 | ] 394 | 395 | [[package]] 396 | name = "git2" 397 | version = "0.6.11" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | dependencies = [ 400 | "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 401 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 402 | "libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 403 | "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 404 | "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", 405 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 406 | ] 407 | 408 | [[package]] 409 | name = "h2" 410 | version = "0.1.26" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | dependencies = [ 413 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 414 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 415 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 416 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 417 | "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", 418 | "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 419 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 420 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 421 | "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 422 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 423 | ] 424 | 425 | [[package]] 426 | name = "hermit-abi" 427 | version = "0.1.3" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | dependencies = [ 430 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 431 | ] 432 | 433 | [[package]] 434 | name = "http" 435 | version = "0.1.20" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | dependencies = [ 438 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 439 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 440 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 441 | ] 442 | 443 | [[package]] 444 | name = "http-body" 445 | version = "0.1.0" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | dependencies = [ 448 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 449 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 450 | "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", 451 | "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 452 | ] 453 | 454 | [[package]] 455 | name = "httparse" 456 | version = "1.3.4" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | 459 | [[package]] 460 | name = "hyper" 461 | version = "0.12.35" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | dependencies = [ 464 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 465 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 466 | "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 467 | "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", 468 | "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", 469 | "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 470 | "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 471 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 472 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 473 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 474 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 475 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 476 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 477 | "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", 478 | "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 479 | "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 480 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 481 | "tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 482 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 483 | "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 484 | "tokio-timer 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", 485 | "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 486 | ] 487 | 488 | [[package]] 489 | name = "hyper-tls" 490 | version = "0.3.2" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | dependencies = [ 493 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 494 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 495 | "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", 496 | "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 497 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 498 | ] 499 | 500 | [[package]] 501 | name = "idna" 502 | version = "0.1.5" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | dependencies = [ 505 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 506 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 507 | "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 508 | ] 509 | 510 | [[package]] 511 | name = "idna" 512 | version = "0.2.0" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | dependencies = [ 515 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 516 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 517 | "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 518 | ] 519 | 520 | [[package]] 521 | name = "indexmap" 522 | version = "1.3.0" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | dependencies = [ 525 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 526 | ] 527 | 528 | [[package]] 529 | name = "iovec" 530 | version = "0.1.4" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | dependencies = [ 533 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 534 | ] 535 | 536 | [[package]] 537 | name = "itoa" 538 | version = "0.4.4" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | 541 | [[package]] 542 | name = "kernel32-sys" 543 | version = "0.2.2" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | dependencies = [ 546 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 547 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 548 | ] 549 | 550 | [[package]] 551 | name = "lazy_static" 552 | version = "1.4.0" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | 555 | [[package]] 556 | name = "libc" 557 | version = "0.2.66" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | 560 | [[package]] 561 | name = "libgit2-sys" 562 | version = "0.6.19" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | dependencies = [ 565 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 566 | "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 567 | "curl-sys 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", 568 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 569 | "libssh2-sys 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 570 | "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", 571 | "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", 572 | "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", 573 | ] 574 | 575 | [[package]] 576 | name = "libssh2-sys" 577 | version = "0.2.13" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | dependencies = [ 580 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 581 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 582 | "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", 583 | "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", 584 | "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", 585 | "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 586 | ] 587 | 588 | [[package]] 589 | name = "libz-sys" 590 | version = "1.0.25" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | dependencies = [ 593 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 594 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 595 | "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", 596 | "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 597 | ] 598 | 599 | [[package]] 600 | name = "linked-hash-map" 601 | version = "0.5.2" 602 | source = "registry+https://github.com/rust-lang/crates.io-index" 603 | 604 | [[package]] 605 | name = "lock_api" 606 | version = "0.3.2" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | dependencies = [ 609 | "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 610 | ] 611 | 612 | [[package]] 613 | name = "log" 614 | version = "0.4.8" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | dependencies = [ 617 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 618 | ] 619 | 620 | [[package]] 621 | name = "matches" 622 | version = "0.1.8" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | 625 | [[package]] 626 | name = "maybe-uninit" 627 | version = "2.0.0" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | 630 | [[package]] 631 | name = "memchr" 632 | version = "2.2.1" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | 635 | [[package]] 636 | name = "memoffset" 637 | version = "0.5.3" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | dependencies = [ 640 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 641 | ] 642 | 643 | [[package]] 644 | name = "mime" 645 | version = "0.3.14" 646 | source = "registry+https://github.com/rust-lang/crates.io-index" 647 | 648 | [[package]] 649 | name = "mime_guess" 650 | version = "2.0.1" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | dependencies = [ 653 | "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 654 | "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 655 | ] 656 | 657 | [[package]] 658 | name = "miniz_oxide" 659 | version = "0.3.5" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | dependencies = [ 662 | "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 663 | ] 664 | 665 | [[package]] 666 | name = "mio" 667 | version = "0.6.21" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | dependencies = [ 670 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 671 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 672 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 673 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 674 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 675 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 676 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 677 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 678 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 679 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 680 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 681 | ] 682 | 683 | [[package]] 684 | name = "miow" 685 | version = "0.2.1" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | dependencies = [ 688 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 689 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 690 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 691 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 692 | ] 693 | 694 | [[package]] 695 | name = "native-tls" 696 | version = "0.2.3" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | dependencies = [ 699 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 700 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 701 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 702 | "openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)", 703 | "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 704 | "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", 705 | "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 706 | "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 707 | "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 708 | "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 709 | ] 710 | 711 | [[package]] 712 | name = "net2" 713 | version = "0.2.33" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | dependencies = [ 716 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 717 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 718 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 719 | ] 720 | 721 | [[package]] 722 | name = "num_cpus" 723 | version = "1.11.1" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | dependencies = [ 726 | "hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 727 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 728 | ] 729 | 730 | [[package]] 731 | name = "openssl" 732 | version = "0.10.26" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | dependencies = [ 735 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 736 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 737 | "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 738 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 739 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 740 | "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", 741 | ] 742 | 743 | [[package]] 744 | name = "openssl-probe" 745 | version = "0.1.2" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | 748 | [[package]] 749 | name = "openssl-sys" 750 | version = "0.9.53" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | dependencies = [ 753 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 754 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 755 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 756 | "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", 757 | "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 758 | ] 759 | 760 | [[package]] 761 | name = "parking_lot" 762 | version = "0.9.0" 763 | source = "registry+https://github.com/rust-lang/crates.io-index" 764 | dependencies = [ 765 | "lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 766 | "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 767 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 768 | ] 769 | 770 | [[package]] 771 | name = "parking_lot_core" 772 | version = "0.6.2" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | dependencies = [ 775 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 776 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 777 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 778 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 779 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 780 | "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 781 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 782 | ] 783 | 784 | [[package]] 785 | name = "percent-encoding" 786 | version = "1.0.1" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | 789 | [[package]] 790 | name = "percent-encoding" 791 | version = "2.1.0" 792 | source = "registry+https://github.com/rust-lang/crates.io-index" 793 | 794 | [[package]] 795 | name = "pkg-config" 796 | version = "0.3.17" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | 799 | [[package]] 800 | name = "ppv-lite86" 801 | version = "0.2.6" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | 804 | [[package]] 805 | name = "proc-macro2" 806 | version = "1.0.6" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | dependencies = [ 809 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 810 | ] 811 | 812 | [[package]] 813 | name = "publicsuffix" 814 | version = "1.5.4" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | dependencies = [ 817 | "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", 818 | "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 819 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 820 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 821 | "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 822 | ] 823 | 824 | [[package]] 825 | name = "quote" 826 | version = "1.0.2" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | dependencies = [ 829 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 830 | ] 831 | 832 | [[package]] 833 | name = "rand" 834 | version = "0.6.5" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | dependencies = [ 837 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 838 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 839 | "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 840 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 841 | "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 842 | "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 843 | "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 844 | "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 845 | "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 846 | "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 847 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 848 | ] 849 | 850 | [[package]] 851 | name = "rand" 852 | version = "0.7.2" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | dependencies = [ 855 | "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 856 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 857 | "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 858 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 859 | "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 860 | ] 861 | 862 | [[package]] 863 | name = "rand_chacha" 864 | version = "0.1.1" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | dependencies = [ 867 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 868 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 869 | ] 870 | 871 | [[package]] 872 | name = "rand_chacha" 873 | version = "0.2.1" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | dependencies = [ 876 | "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 877 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 878 | ] 879 | 880 | [[package]] 881 | name = "rand_core" 882 | version = "0.3.1" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | dependencies = [ 885 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 886 | ] 887 | 888 | [[package]] 889 | name = "rand_core" 890 | version = "0.4.2" 891 | source = "registry+https://github.com/rust-lang/crates.io-index" 892 | 893 | [[package]] 894 | name = "rand_core" 895 | version = "0.5.1" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | dependencies = [ 898 | "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 899 | ] 900 | 901 | [[package]] 902 | name = "rand_hc" 903 | version = "0.1.0" 904 | source = "registry+https://github.com/rust-lang/crates.io-index" 905 | dependencies = [ 906 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 907 | ] 908 | 909 | [[package]] 910 | name = "rand_hc" 911 | version = "0.2.0" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | dependencies = [ 914 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 915 | ] 916 | 917 | [[package]] 918 | name = "rand_isaac" 919 | version = "0.1.1" 920 | source = "registry+https://github.com/rust-lang/crates.io-index" 921 | dependencies = [ 922 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 923 | ] 924 | 925 | [[package]] 926 | name = "rand_jitter" 927 | version = "0.1.4" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | dependencies = [ 930 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 931 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 932 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 933 | ] 934 | 935 | [[package]] 936 | name = "rand_os" 937 | version = "0.1.3" 938 | source = "registry+https://github.com/rust-lang/crates.io-index" 939 | dependencies = [ 940 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 941 | "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 942 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 943 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 944 | "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 945 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 946 | ] 947 | 948 | [[package]] 949 | name = "rand_pcg" 950 | version = "0.1.2" 951 | source = "registry+https://github.com/rust-lang/crates.io-index" 952 | dependencies = [ 953 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 954 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 955 | ] 956 | 957 | [[package]] 958 | name = "rand_xorshift" 959 | version = "0.1.1" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | dependencies = [ 962 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 963 | ] 964 | 965 | [[package]] 966 | name = "rdrand" 967 | version = "0.4.0" 968 | source = "registry+https://github.com/rust-lang/crates.io-index" 969 | dependencies = [ 970 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 971 | ] 972 | 973 | [[package]] 974 | name = "redox_syscall" 975 | version = "0.1.56" 976 | source = "registry+https://github.com/rust-lang/crates.io-index" 977 | 978 | [[package]] 979 | name = "regex" 980 | version = "0.2.11" 981 | source = "registry+https://github.com/rust-lang/crates.io-index" 982 | dependencies = [ 983 | "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 984 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 985 | "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", 986 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 987 | "utf8-ranges 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 988 | ] 989 | 990 | [[package]] 991 | name = "regex" 992 | version = "1.3.1" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | dependencies = [ 995 | "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 996 | ] 997 | 998 | [[package]] 999 | name = "regex-syntax" 1000 | version = "0.5.6" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | dependencies = [ 1003 | "ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1004 | ] 1005 | 1006 | [[package]] 1007 | name = "regex-syntax" 1008 | version = "0.6.12" 1009 | source = "registry+https://github.com/rust-lang/crates.io-index" 1010 | 1011 | [[package]] 1012 | name = "remove_dir_all" 1013 | version = "0.5.2" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | dependencies = [ 1016 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1017 | ] 1018 | 1019 | [[package]] 1020 | name = "reqwest" 1021 | version = "0.9.22" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | dependencies = [ 1024 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 1025 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1026 | "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 1027 | "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1028 | "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", 1029 | "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", 1030 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1031 | "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", 1032 | "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", 1033 | "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 1034 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1035 | "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 1036 | "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1037 | "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 1038 | "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1039 | "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", 1040 | "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", 1041 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 1042 | "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", 1043 | "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1044 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 1045 | "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 1046 | "tokio-timer 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", 1047 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1048 | "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", 1049 | "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "rpassword" 1054 | version = "0.4.2" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | dependencies = [ 1057 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1058 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 1059 | "termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1060 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 1061 | ] 1062 | 1063 | [[package]] 1064 | name = "rustc-demangle" 1065 | version = "0.1.16" 1066 | source = "registry+https://github.com/rust-lang/crates.io-index" 1067 | 1068 | [[package]] 1069 | name = "rustc_version" 1070 | version = "0.2.3" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | dependencies = [ 1073 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "ryu" 1078 | version = "1.0.2" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | 1081 | [[package]] 1082 | name = "schannel" 1083 | version = "0.1.16" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | dependencies = [ 1086 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1087 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1088 | ] 1089 | 1090 | [[package]] 1091 | name = "scopeguard" 1092 | version = "1.0.0" 1093 | source = "registry+https://github.com/rust-lang/crates.io-index" 1094 | 1095 | [[package]] 1096 | name = "security-framework" 1097 | version = "0.3.4" 1098 | source = "registry+https://github.com/rust-lang/crates.io-index" 1099 | dependencies = [ 1100 | "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", 1101 | "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 1102 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 1103 | "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 1104 | ] 1105 | 1106 | [[package]] 1107 | name = "security-framework-sys" 1108 | version = "0.3.3" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | dependencies = [ 1111 | "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 1112 | ] 1113 | 1114 | [[package]] 1115 | name = "semver" 1116 | version = "0.9.0" 1117 | source = "registry+https://github.com/rust-lang/crates.io-index" 1118 | dependencies = [ 1119 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1120 | ] 1121 | 1122 | [[package]] 1123 | name = "semver-parser" 1124 | version = "0.7.0" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | 1127 | [[package]] 1128 | name = "serde" 1129 | version = "1.0.103" 1130 | source = "registry+https://github.com/rust-lang/crates.io-index" 1131 | dependencies = [ 1132 | "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1133 | ] 1134 | 1135 | [[package]] 1136 | name = "serde_derive" 1137 | version = "1.0.103" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | dependencies = [ 1140 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1141 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1142 | "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", 1143 | ] 1144 | 1145 | [[package]] 1146 | name = "serde_json" 1147 | version = "1.0.42" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | dependencies = [ 1150 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1151 | "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1152 | "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "serde_urlencoded" 1157 | version = "0.5.5" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | dependencies = [ 1160 | "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1161 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1162 | "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1163 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1164 | ] 1165 | 1166 | [[package]] 1167 | name = "serde_yaml" 1168 | version = "0.7.5" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | dependencies = [ 1171 | "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1172 | "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 1173 | "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", 1174 | "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1175 | ] 1176 | 1177 | [[package]] 1178 | name = "slab" 1179 | version = "0.4.2" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | 1182 | [[package]] 1183 | name = "smallvec" 1184 | version = "0.6.13" 1185 | source = "registry+https://github.com/rust-lang/crates.io-index" 1186 | dependencies = [ 1187 | "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1188 | ] 1189 | 1190 | [[package]] 1191 | name = "smallvec" 1192 | version = "1.0.0" 1193 | source = "registry+https://github.com/rust-lang/crates.io-index" 1194 | 1195 | [[package]] 1196 | name = "string" 1197 | version = "0.2.1" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | dependencies = [ 1200 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1201 | ] 1202 | 1203 | [[package]] 1204 | name = "strsim" 1205 | version = "0.8.0" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | 1208 | [[package]] 1209 | name = "syn" 1210 | version = "1.0.11" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | dependencies = [ 1213 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1214 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1215 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1216 | ] 1217 | 1218 | [[package]] 1219 | name = "synstructure" 1220 | version = "0.12.3" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | dependencies = [ 1223 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1224 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1225 | "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", 1226 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1227 | ] 1228 | 1229 | [[package]] 1230 | name = "tempfile" 1231 | version = "3.1.0" 1232 | source = "registry+https://github.com/rust-lang/crates.io-index" 1233 | dependencies = [ 1234 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 1235 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 1236 | "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1237 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 1238 | "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 1239 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1240 | ] 1241 | 1242 | [[package]] 1243 | name = "termios" 1244 | version = "0.2.2" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | dependencies = [ 1247 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 1248 | ] 1249 | 1250 | [[package]] 1251 | name = "textwrap" 1252 | version = "0.11.0" 1253 | source = "registry+https://github.com/rust-lang/crates.io-index" 1254 | dependencies = [ 1255 | "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1256 | ] 1257 | 1258 | [[package]] 1259 | name = "thread_local" 1260 | version = "0.3.6" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | dependencies = [ 1263 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1264 | ] 1265 | 1266 | [[package]] 1267 | name = "time" 1268 | version = "0.1.42" 1269 | source = "registry+https://github.com/rust-lang/crates.io-index" 1270 | dependencies = [ 1271 | "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 1272 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 1273 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1274 | ] 1275 | 1276 | [[package]] 1277 | name = "tokio" 1278 | version = "0.1.22" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | dependencies = [ 1281 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1282 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1283 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", 1284 | "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 1285 | "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1286 | "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1287 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 1288 | "tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1289 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1290 | "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 1291 | "tokio-timer 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "tokio-buf" 1296 | version = "0.1.1" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | dependencies = [ 1299 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1300 | "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 1301 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1302 | ] 1303 | 1304 | [[package]] 1305 | name = "tokio-current-thread" 1306 | version = "0.1.6" 1307 | source = "registry+https://github.com/rust-lang/crates.io-index" 1308 | dependencies = [ 1309 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1310 | "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1311 | ] 1312 | 1313 | [[package]] 1314 | name = "tokio-executor" 1315 | version = "0.1.9" 1316 | source = "registry+https://github.com/rust-lang/crates.io-index" 1317 | dependencies = [ 1318 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 1319 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1320 | ] 1321 | 1322 | [[package]] 1323 | name = "tokio-io" 1324 | version = "0.1.12" 1325 | source = "registry+https://github.com/rust-lang/crates.io-index" 1326 | dependencies = [ 1327 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1328 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1329 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1330 | ] 1331 | 1332 | [[package]] 1333 | name = "tokio-reactor" 1334 | version = "0.1.11" 1335 | source = "registry+https://github.com/rust-lang/crates.io-index" 1336 | dependencies = [ 1337 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 1338 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1339 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1340 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1341 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", 1342 | "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 1343 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1344 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1345 | "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1346 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 1347 | "tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 1348 | ] 1349 | 1350 | [[package]] 1351 | name = "tokio-sync" 1352 | version = "0.1.7" 1353 | source = "registry+https://github.com/rust-lang/crates.io-index" 1354 | dependencies = [ 1355 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1356 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1357 | ] 1358 | 1359 | [[package]] 1360 | name = "tokio-tcp" 1361 | version = "0.1.3" 1362 | source = "registry+https://github.com/rust-lang/crates.io-index" 1363 | dependencies = [ 1364 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1365 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1366 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 1367 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", 1368 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 1369 | "tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1370 | ] 1371 | 1372 | [[package]] 1373 | name = "tokio-threadpool" 1374 | version = "0.1.16" 1375 | source = "registry+https://github.com/rust-lang/crates.io-index" 1376 | dependencies = [ 1377 | "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1378 | "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1379 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 1380 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1381 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1382 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1383 | "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 1384 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1385 | "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1386 | ] 1387 | 1388 | [[package]] 1389 | name = "tokio-timer" 1390 | version = "0.2.12" 1391 | source = "registry+https://github.com/rust-lang/crates.io-index" 1392 | dependencies = [ 1393 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 1394 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1395 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1396 | "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1397 | ] 1398 | 1399 | [[package]] 1400 | name = "try-lock" 1401 | version = "0.2.2" 1402 | source = "registry+https://github.com/rust-lang/crates.io-index" 1403 | 1404 | [[package]] 1405 | name = "try_from" 1406 | version = "0.3.2" 1407 | source = "registry+https://github.com/rust-lang/crates.io-index" 1408 | dependencies = [ 1409 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 1410 | ] 1411 | 1412 | [[package]] 1413 | name = "ucd-util" 1414 | version = "0.1.5" 1415 | source = "registry+https://github.com/rust-lang/crates.io-index" 1416 | 1417 | [[package]] 1418 | name = "unicase" 1419 | version = "2.6.0" 1420 | source = "registry+https://github.com/rust-lang/crates.io-index" 1421 | dependencies = [ 1422 | "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 1423 | ] 1424 | 1425 | [[package]] 1426 | name = "unicode-bidi" 1427 | version = "0.3.4" 1428 | source = "registry+https://github.com/rust-lang/crates.io-index" 1429 | dependencies = [ 1430 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1431 | ] 1432 | 1433 | [[package]] 1434 | name = "unicode-normalization" 1435 | version = "0.1.11" 1436 | source = "registry+https://github.com/rust-lang/crates.io-index" 1437 | dependencies = [ 1438 | "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1439 | ] 1440 | 1441 | [[package]] 1442 | name = "unicode-width" 1443 | version = "0.1.6" 1444 | source = "registry+https://github.com/rust-lang/crates.io-index" 1445 | 1446 | [[package]] 1447 | name = "unicode-xid" 1448 | version = "0.2.0" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | 1451 | [[package]] 1452 | name = "url" 1453 | version = "1.7.2" 1454 | source = "registry+https://github.com/rust-lang/crates.io-index" 1455 | dependencies = [ 1456 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1457 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1458 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1459 | ] 1460 | 1461 | [[package]] 1462 | name = "url" 1463 | version = "2.1.0" 1464 | source = "registry+https://github.com/rust-lang/crates.io-index" 1465 | dependencies = [ 1466 | "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1467 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1468 | "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1469 | ] 1470 | 1471 | [[package]] 1472 | name = "utf8-ranges" 1473 | version = "1.0.4" 1474 | source = "registry+https://github.com/rust-lang/crates.io-index" 1475 | 1476 | [[package]] 1477 | name = "uuid" 1478 | version = "0.7.4" 1479 | source = "registry+https://github.com/rust-lang/crates.io-index" 1480 | dependencies = [ 1481 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1482 | ] 1483 | 1484 | [[package]] 1485 | name = "vcpkg" 1486 | version = "0.2.7" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | 1489 | [[package]] 1490 | name = "vec_map" 1491 | version = "0.8.1" 1492 | source = "registry+https://github.com/rust-lang/crates.io-index" 1493 | 1494 | [[package]] 1495 | name = "version_check" 1496 | version = "0.1.5" 1497 | source = "registry+https://github.com/rust-lang/crates.io-index" 1498 | 1499 | [[package]] 1500 | name = "version_check" 1501 | version = "0.9.1" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | 1504 | [[package]] 1505 | name = "want" 1506 | version = "0.2.0" 1507 | source = "registry+https://github.com/rust-lang/crates.io-index" 1508 | dependencies = [ 1509 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1510 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1511 | "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1512 | ] 1513 | 1514 | [[package]] 1515 | name = "wasi" 1516 | version = "0.7.0" 1517 | source = "registry+https://github.com/rust-lang/crates.io-index" 1518 | 1519 | [[package]] 1520 | name = "winapi" 1521 | version = "0.2.8" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | 1524 | [[package]] 1525 | name = "winapi" 1526 | version = "0.3.8" 1527 | source = "registry+https://github.com/rust-lang/crates.io-index" 1528 | dependencies = [ 1529 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1530 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1531 | ] 1532 | 1533 | [[package]] 1534 | name = "winapi-build" 1535 | version = "0.1.1" 1536 | source = "registry+https://github.com/rust-lang/crates.io-index" 1537 | 1538 | [[package]] 1539 | name = "winapi-i686-pc-windows-gnu" 1540 | version = "0.4.0" 1541 | source = "registry+https://github.com/rust-lang/crates.io-index" 1542 | 1543 | [[package]] 1544 | name = "winapi-x86_64-pc-windows-gnu" 1545 | version = "0.4.0" 1546 | source = "registry+https://github.com/rust-lang/crates.io-index" 1547 | 1548 | [[package]] 1549 | name = "winreg" 1550 | version = "0.6.2" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | dependencies = [ 1553 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1554 | ] 1555 | 1556 | [[package]] 1557 | name = "ws2_32-sys" 1558 | version = "0.2.1" 1559 | source = "registry+https://github.com/rust-lang/crates.io-index" 1560 | dependencies = [ 1561 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 1562 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1563 | ] 1564 | 1565 | [[package]] 1566 | name = "xdg" 1567 | version = "2.2.0" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | 1570 | [[package]] 1571 | name = "yaml-rust" 1572 | version = "0.4.3" 1573 | source = "registry+https://github.com/rust-lang/crates.io-index" 1574 | dependencies = [ 1575 | "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 1576 | ] 1577 | 1578 | [metadata] 1579 | "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" 1580 | "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" 1581 | "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 1582 | "checksum app_dirs2 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "61b1fa4b1eeb18470c454bbed5406f02463aad37fd20f3a16c65bed88d4e115a" 1583 | "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" 1584 | "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 1585 | "checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" 1586 | "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" 1587 | "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 1588 | "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" 1589 | "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 1590 | "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" 1591 | "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" 1592 | "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" 1593 | "checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" 1594 | "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 1595 | "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" 1596 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 1597 | "checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" 1598 | "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" 1599 | "checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" 1600 | "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" 1601 | "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" 1602 | "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" 1603 | "checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" 1604 | "checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" 1605 | "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" 1606 | "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" 1607 | "checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" 1608 | "checksum curl-sys 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "f659f3ffac9582d6177bb86d1d2aa649f4eb9d0d4de9d03ccc08b402832ea340" 1609 | "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" 1610 | "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" 1611 | "checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" 1612 | "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" 1613 | "checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" 1614 | "checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" 1615 | "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" 1616 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 1617 | "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 1618 | "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 1619 | "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 1620 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 1621 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 1622 | "checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" 1623 | "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" 1624 | "checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" 1625 | "checksum git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5b4bb7cd2a44e6e5ee3a26ba6a9ca10d4ce2771cdc3839bbc54b47b7d1be84" 1626 | "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" 1627 | "checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" 1628 | "checksum http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "2790658cddc82e82b08e25176c431d7015a0adeb1718498715cbd20138a0bf68" 1629 | "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" 1630 | "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" 1631 | "checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" 1632 | "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" 1633 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 1634 | "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" 1635 | "checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" 1636 | "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 1637 | "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 1638 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1639 | "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1640 | "checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" 1641 | "checksum libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6eeae66e7b1c995de45cb4e65c5ab438a96a7b4077e448645d4048dc753ad357" 1642 | "checksum libssh2-sys 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "5fcd5a428a31cbbfe059812d74f4b6cd3b9b7426c2bdaec56993c5365da1c328" 1643 | "checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" 1644 | "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" 1645 | "checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586" 1646 | "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 1647 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1648 | "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" 1649 | "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" 1650 | "checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" 1651 | "checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" 1652 | "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" 1653 | "checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" 1654 | "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" 1655 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1656 | "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" 1657 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 1658 | "checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" 1659 | "checksum openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)" = "3a3cc5799d98e1088141b8e01ff760112bbd9f19d850c124500566ca6901a585" 1660 | "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 1661 | "checksum openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)" = "465d16ae7fc0e313318f7de5cecf57b2fbe7511fd213978b457e1c96ff46736f" 1662 | "checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" 1663 | "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" 1664 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 1665 | "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1666 | "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" 1667 | "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" 1668 | "checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" 1669 | "checksum publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" 1670 | "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 1671 | "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 1672 | "checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" 1673 | "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 1674 | "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" 1675 | "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 1676 | "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" 1677 | "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1678 | "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" 1679 | "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1680 | "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" 1681 | "checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" 1682 | "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" 1683 | "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" 1684 | "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" 1685 | "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 1686 | "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" 1687 | "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" 1688 | "checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" 1689 | "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" 1690 | "checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" 1691 | "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" 1692 | "checksum reqwest 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)" = "2c2064233e442ce85c77231ebd67d9eca395207dec2127fe0bbedde4bd29a650" 1693 | "checksum rpassword 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "177b45ffb3ad20daed91c936e4670f008a8bc4af771aa9103d73e784da733879" 1694 | "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1695 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1696 | "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" 1697 | "checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" 1698 | "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" 1699 | "checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" 1700 | "checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" 1701 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1702 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1703 | "checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" 1704 | "checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" 1705 | "checksum serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "1a3351dcbc1f067e2c92ab7c3c1f288ad1a4cffc470b5aaddb4c2e0a3ae80043" 1706 | "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" 1707 | "checksum serde_yaml 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8099d3df28273c99a1728190c7a9f19d444c941044f64adf986bee7ec53051" 1708 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1709 | "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" 1710 | "checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86" 1711 | "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" 1712 | "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1713 | "checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238" 1714 | "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" 1715 | "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" 1716 | "checksum termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d9cf598a6d7ce700a4e6a9199da127e6819a61e64b68609683cc9a01b5683a" 1717 | "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1718 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1719 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 1720 | "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" 1721 | "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" 1722 | "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" 1723 | "checksum tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ca6df436c42b0c3330a82d855d2ef017cd793090ad550a6bc2184f4b933532ab" 1724 | "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" 1725 | "checksum tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6732fe6b53c8d11178dcb77ac6d9682af27fc6d4cb87789449152e5377377146" 1726 | "checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" 1727 | "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" 1728 | "checksum tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c" 1729 | "checksum tokio-timer 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1739638e364e558128461fc1ad84d997702c8e31c2e6b18fb99842268199e827" 1730 | "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" 1731 | "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" 1732 | "checksum ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa9b3b49edd3468c0e6565d85783f51af95212b6fa3986a5500954f00b460874" 1733 | "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1734 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1735 | "checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf" 1736 | "checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20" 1737 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 1738 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 1739 | "checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" 1740 | "checksum utf8-ranges 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" 1741 | "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" 1742 | "checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" 1743 | "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 1744 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 1745 | "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" 1746 | "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" 1747 | "checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" 1748 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1749 | "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" 1750 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1751 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1752 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1753 | "checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" 1754 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1755 | "checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" 1756 | "checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" 1757 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = ["Lee Bousfield "] 3 | name = "ghcl" 4 | version = "0.1.2" 5 | description = "GitHub Clone" 6 | repository = "https://github.com/PlasmaPower/ghcl" 7 | readme = "README.md" 8 | keywords = ["git", "github"] 9 | categories = ["command-line-utilities", "command-line-interface"] 10 | license = "MIT" 11 | 12 | [dependencies] 13 | clap = "2" 14 | git2 = "0.6" 15 | error-chain = "0.12" 16 | app_dirs2 = "2" 17 | serde = "1" 18 | serde_derive = "1" 19 | serde_yaml = "0.7" 20 | regex = "0.2" 21 | reqwest = "0.9" 22 | rpassword = "0.4" 23 | serde_json = "1" 24 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Lee Bousfield 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ghcl: GitHub CLone 2 | 3 | Automatically fork, clone, and setup an upstream remote for a GitHub repository. By default, the master branch will track the upstream remote. 4 | 5 | Intended as a "quick-start" for contributing to a GitHub repository. 6 | More services such as GitLab and BitBucket are coming soon™. The code is ready for multiple services, but the APIs for them haven't been implemented. 7 | 8 | This project is licensed under the terms of the MIT license. See `LICENSE.txt` for more details 9 | 10 | ## Installation 11 | 12 | This project requires a `libgit2`, and `cmake` for building. 13 | 14 | Currently, all methods of installation require building from source, and a working Rust installation. 15 | To quickly setup Rust (and Cargo), use [rustup](https://rustup.rs). 16 | 17 | - Through crates.io: `cargo install ghcl` 18 | - Through GitHub: 19 | ```sh 20 | git clone https://github.com/PlasmaPower/ghcl.git 21 | cd ghcl 22 | cargo build --release 23 | sudo cp target/release/ghcl /usr/bin # or just cargo install, to install for just your user 24 | ``` 25 | 26 | ## Arguments 27 | 28 | ``` 29 | ghcl 0.1.0 30 | Lee Bousfield 31 | Automatically forks and clones a GitHub repository 32 | 33 | USAGE: 34 | ghcl [FLAGS] [OPTIONS] [CLONE_PATH] 35 | 36 | FLAGS: 37 | -h, --help Prints help information 38 | --no-quiet Don't be quiet (output status messages) 39 | --no-track-upstream Don't setup master to track upstream 40 | --no-upstream Don't setup an upstream remote (implies no_track_upstream) 41 | -q, --quiet Don't output status messages 42 | --setup-upstream Setup an upstream remote (default) 43 | --track-upstream Setup master to track upstream (default, imples setup-upstream) 44 | -V, --version Prints version information 45 | 46 | OPTIONS: 47 | -c, --config Sets a custom config file 48 | -s, --default-service The service to be used if the repository is in the form user/repo [values: github, GitHub, Github] 49 | --fork-timeout The maximum timeout for the fork creation (default: 30) 50 | -o, --organization Fork into an organization 51 | --origin-protocol The git protocol to use for the origin (default: SSH) [values: ssh, https, SSH, HTTPS] 52 | -p, --password Your password (insecure - use a personal access token and put it in your config, or input your password when prompted) 53 | --remote-name The name of the upstream remote to create (default: "upstream") 54 | --upstream-protocol The git protocol to use for the upstream (default: HTTPS) [values: ssh, https, SSH, HTTPS] 55 | -u, --username Your username 56 | 57 | ARGS: 58 | Repository to fork and clone 59 | Where to clone the repository (defaults to the name of the repo) 60 | ``` 61 | 62 | ## Config 63 | 64 | The config is located in: 65 | 66 | - Linux: `~/.config/ghcl/config.yml` (or `$XDG_CONFIG_HOME/ghcl/config.yml`) 67 | - MacOS: `~/Library/Application Support/ghcl/config.yml` 68 | - Windows: `%APPDATA%\PlasmaPower\ghcl` 69 | 70 | Contents (all of which are optional, and can be overriden by arguments): 71 | 72 | | Key | Type/valid values | Description | 73 | |-------------------|---------------------|------------------------------------------------------------------------------------------------| 74 | | organization | String | the organization to clone repositories to | 75 | | track_upstream | bool | should the master branch be setup to track upstream? (if true, setup_upstream cannot be false) | 76 | | setup_upstream | bool | should the upstream remote be created? | 77 | | remote_name | String | the name of the upstream remote to create (only used if setup_upstream is true) | 78 | | origin_protocol | HTTPS or SSH | the protocol to use for the origin remote | 79 | | upstream_protocol | HTTPS or SSH | the protocol to use for the upstream remote (only used if setup_upstream is true) | 80 | | default_service | only github for now | the service to use if the repository is in the form of "user/repository" | 81 | | quiet | bool | should status messages be outputed? | 82 | | fork_timeout | integer | the maximum total timeout for attempting to clone after a fork | 83 | | authentication | map - see below | authentication (usually username + password) for each service | 84 | 85 | Authentication is a map of service (currently only "github") to a username and password. 86 | With GitHub, you can (and it's recommended to) use a personal access token with the "repo" permission instead of an actual password. 87 | That way, it has limited permissions, and can be easily revoked. 88 | 89 | Example config: 90 | 91 | ```yaml 92 | organization: myOrg 93 | track_upstream: false 94 | setup_upstream: true 95 | remote_name: my-upstream 96 | origin_protocol: SSH 97 | upstream_protocol: HTTPS 98 | default_service: github 99 | quiet: true 100 | fork_timeout: 30 101 | authentication: 102 | github: 103 | username: ExampleUser 104 | password: efbfd4e43d8e77c1dc24... # personal access token 105 | ``` 106 | 107 | ## FAQ 108 | 109 | ### When I use ghcl, it freezes after "Cloning repository..." 110 | That probably means your SSH agent is misconfigured. 111 | I'm not sure why it causes a freeze, but to fix it, run `ssh-add ~/.ssh/id_rsa`, or whatever your GitHub SSH key is. 112 | You should also put that in your `.profile`, or wherever you start `ssh-agent`. 113 | 114 | ### This program doesn't fit my workflow! 115 | This program is opinionated, and not intended to fit every workflow. 116 | However, if it's just a small option that's missing, feel free to create an issue or pull request. 117 | -------------------------------------------------------------------------------- /ci/build-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # See also: 4 | # https://github.com/emk/rust-musl-builder/blob/master/examples/build-release 5 | 6 | set -eux 7 | 8 | mkdir target/gh-release 9 | if [[ "$(uname -s)" == "Linux" ]]; then 10 | if [[ "$UID" != "1000" ]]; then 11 | chmod -R a+w target 12 | fi 13 | docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder cargo build --release 14 | zip -j target/gh-release/"$1"-"$2".zip target/x86_64-unknown-linux-musl/release/"$1" 15 | else 16 | cargo build --release 17 | zip -j target/gh-release/"$1"-"$2".zip target/release/"$1" 18 | fi 19 | -------------------------------------------------------------------------------- /src/errors.rs: -------------------------------------------------------------------------------- 1 | use std::io; 2 | use std::num; 3 | 4 | use git2; 5 | use app_dirs2; 6 | use serde_json; 7 | use serde_yaml; 8 | use regex; 9 | use reqwest; 10 | 11 | error_chain! { 12 | errors { 13 | ConfigTrackNoSetup { 14 | description("config specifies track: true but setup: false, which is not possible") 15 | } 16 | BranchNotNamed { 17 | description("default branch does not have a name (or was not valid UTF-8)") 18 | } 19 | RemoteNotNamed { 20 | description("upstream remote does not have a name (or was not valid UTF-8)") 21 | } 22 | FailedToParseRepository { 23 | description("failed to parse the repository name") 24 | } 25 | ForkTimedOut(wait: u64) { 26 | description("fork timed out (new forked repository not cloneable)") 27 | display("fork timed out (new forked repository not cloneable in {} seconds)", wait) 28 | } 29 | MissingKey(key: &'static str) { 30 | description("received JSON missing key") 31 | display("received JSON missing key: {}", key) 32 | } 33 | MalformedKey(key: &'static str) { 34 | description("received JSON with malformed key (expected string)") 35 | display("received JSON malformed key (expected string): {}", key) 36 | } 37 | APIError(message: String) { 38 | description("API error") 39 | display("API error: {}", message) 40 | } 41 | RawAPIError(json: serde_json::Value) { 42 | description("unparsable API error") 43 | display("unparsable API error: {:?}", json) 44 | } 45 | } 46 | foreign_links { 47 | AppDirs(app_dirs2::AppDirsError); 48 | Io(io::Error); 49 | Yaml(serde_yaml::Error); 50 | Git(git2::Error); 51 | Regex(regex::Error); 52 | Reqwest(reqwest::Error); 53 | ParseInt(num::ParseIntError); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/git_operations.rs: -------------------------------------------------------------------------------- 1 | use io::{self, Write}; 2 | use std::path::Path; 3 | use std::sync::atomic::{self, AtomicBool}; 4 | 5 | use git2::{self, Repository, Remote, Branch, ResetType, FetchOptions, RemoteCallbacks}; 6 | use git2::build::RepoBuilder; 7 | 8 | use options::Authentication; 9 | use errors::*; 10 | 11 | fn get_fetchoptions<'a>(quiet: bool, auth: &'a Authentication, progressed: &'a AtomicBool) -> FetchOptions<'a> { 12 | let mut options = FetchOptions::new(); 13 | let mut callbacks = RemoteCallbacks::new(); 14 | callbacks.credentials(move |url, username, allowed| { 15 | progressed.store(true, atomic::Ordering::Relaxed); 16 | let config = git2::Config::open_default()?; 17 | let mut cred_helper = git2::CredentialHelper::new(url); 18 | cred_helper.config(&config); 19 | if allowed.contains(git2::SSH_KEY) { 20 | let user = username.map(|s| s.to_string()) 21 | .or_else(|| cred_helper.username.clone()) 22 | .unwrap_or("git".to_string()); 23 | git2::Cred::ssh_key_from_agent(&user) 24 | } else if allowed.contains(git2::USER_PASS_PLAINTEXT) { 25 | git2::Cred::userpass_plaintext(&auth.username, &auth.password) 26 | } else if allowed.contains(git2::DEFAULT) { 27 | git2::Cred::default() 28 | } else { 29 | Err(git2::Error::from_str("no authentication available")) 30 | } 31 | }); 32 | if !quiet { 33 | let mut stage = 0; 34 | callbacks.transfer_progress(move |progress| { 35 | progressed.store(true, atomic::Ordering::Relaxed); 36 | let mut stderr = io::stderr(); 37 | let objects = (progress.received_objects(), progress.total_objects()); 38 | let deltas = (progress.indexed_deltas(), progress.total_deltas()); 39 | if objects.0 != objects.1 { 40 | if stage == 0 { 41 | stage = 1; 42 | } else { 43 | write!(stderr, "\r").ok(); 44 | } 45 | let percent = if objects.1 == 0 { 0 } else { 100*objects.0/objects.1 }; 46 | write!(stderr, "Receiving objects: {}% ({}/{})", percent, objects.0, objects.1).ok(); 47 | return true; 48 | } 49 | if stage == 1 { 50 | writeln!(stderr, "").ok(); 51 | stage = 2; 52 | } else { 53 | write!(stderr, "\r").ok(); 54 | } 55 | let percent = if deltas.1 == 0 { 0 } else { 100*deltas.0/deltas.1 }; 56 | write!(stderr, "Receiving deltas: {}% ({}/{})", percent, deltas.0, deltas.1).ok(); 57 | true 58 | }); 59 | callbacks.sideband_progress(move |message| { 60 | progressed.store(true, atomic::Ordering::Relaxed); 61 | let mut stderr = io::stderr(); 62 | write!(stderr, "\rremote: ").ok(); 63 | stderr.write_all(message).ok(); 64 | true 65 | }); 66 | } 67 | options.remote_callbacks(callbacks); 68 | options 69 | } 70 | 71 | pub fn clone_repo>(url: &str, location: P, auth: &Authentication, quiet: bool, progressed: &mut bool) -> Result { 72 | let mut progressed_atomic = AtomicBool::new(*progressed); 73 | let repo = RepoBuilder::new().fetch_options(get_fetchoptions(quiet, auth, &mut progressed_atomic)).clone(url, location.as_ref())?; 74 | *progressed = progressed_atomic.into_inner(); 75 | if !quiet { 76 | writeln!(io::stderr(), "").ok(); 77 | } 78 | Ok(repo) 79 | } 80 | 81 | pub fn setup_upstream<'a>(repository: &'a Repository, name: &str, orig_url: &str) -> Result> { 82 | Ok(repository.remote(name, orig_url)?) 83 | } 84 | 85 | pub fn get_head_branch<'a>(repository: &'a Repository) -> Result> { 86 | Ok(Branch::wrap(repository.head()?)) 87 | } 88 | 89 | pub fn fetch_remote(remote: &mut Remote, branch: &Branch, auth: &Authentication, quiet: bool) -> Result<()> { 90 | let mut progressed = AtomicBool::new(false); 91 | remote.fetch(&[branch.name()?.ok_or(ErrorKind::BranchNotNamed)?], Some(&mut get_fetchoptions(quiet, auth, &mut progressed)), None)?; 92 | if !quiet { 93 | writeln!(io::stderr(), "").ok(); 94 | } 95 | Ok(()) 96 | } 97 | 98 | pub fn track_upstream(branch: &mut Branch, remote: &Remote) -> Result<()> { 99 | let upstream_name = remote.name().ok_or(ErrorKind::RemoteNotNamed)?.to_string() + "/" + branch.name()?.ok_or(ErrorKind::BranchNotNamed)?; 100 | Ok(branch.set_upstream(Some(&upstream_name))?) 101 | } 102 | 103 | pub fn hard_reset_fetch_head(repo: &Repository) -> Result<()> { 104 | let fetch_head = repo.revparse_single("FETCH_HEAD")?; 105 | Ok(repo.reset(&fetch_head, ResetType::Hard, None)?) 106 | } 107 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![recursion_limit="128"] // for error-chain 2 | use std::io; 3 | use std::thread; 4 | use std::process; 5 | use std::io::prelude::*; 6 | use std::borrow::Borrow; 7 | use std::time::Duration; 8 | 9 | extern crate clap; 10 | extern crate git2; 11 | #[macro_use] extern crate error_chain; 12 | #[macro_use] extern crate serde_derive; 13 | extern crate serde_yaml; 14 | extern crate app_dirs2; 15 | extern crate regex; 16 | extern crate reqwest; 17 | extern crate rpassword; 18 | extern crate serde; 19 | extern crate serde_json; 20 | 21 | mod repository; 22 | 23 | mod errors; 24 | use errors::*; 25 | 26 | mod options; 27 | use options::{get_options, Options}; 28 | 29 | mod git_operations; 30 | use git_operations::*; 31 | 32 | #[cfg(test)] 33 | mod tests; 34 | 35 | fn handle_retry Result>(options: &Options, mut f: F) -> Result { 36 | let mut stderr = io::stderr(); 37 | let mut total_wait = 0; 38 | let mut timeout = Duration::from_secs(2); 39 | loop { 40 | let mut progressed = false; 41 | let res = f(options, &mut progressed); 42 | let should_retry = !progressed && if let &Err(Error(ErrorKind::Git(ref err), _)) = &res { 43 | err.class() == git2::ErrorClass::Net 44 | } else { 45 | false 46 | }; 47 | if should_retry && total_wait > options.fork_timeout { 48 | return res.chain_err(|| ErrorKind::ForkTimedOut(total_wait)); 49 | } 50 | if should_retry { 51 | if !options.quiet { 52 | writeln!(stderr, "Fork not yet created, waiting {} seconds", timeout.as_secs()).ok(); 53 | } 54 | thread::sleep(timeout); 55 | total_wait += timeout.as_secs(); 56 | timeout *= 2; 57 | continue; 58 | } else { 59 | return res; 60 | } 61 | } 62 | } 63 | 64 | fn main_inner() -> Result<()> { 65 | let mut stderr = io::stderr(); 66 | let options = get_options().chain_err(|| "Failed to get options")?; 67 | if !options.quiet { 68 | writeln!(stderr, "Forking repository...").ok(); 69 | } 70 | let fork_git_url = options.repository.fork(options.authentication.clone(), options.organization.as_ref().map(Borrow::borrow), options.origin_protocol.clone()) 71 | .chain_err(|| "Failed to fork repository")?; 72 | if !options.quiet { 73 | writeln!(stderr, "Cloning repository...").ok(); 74 | } 75 | let repo = handle_retry(&options, |options, progressed| clone_repo(&fork_git_url, &options.clone_path, &options.authentication, options.quiet, progressed)).chain_err(|| "Failed to clone repository")?; 76 | if options.setup_upstream { 77 | let mut remote = setup_upstream(&repo, &options.remote_name, &options.repository.get_git_url(options.upstream_protocol).chain_err(|| "Failed to get upstream git URL")?) 78 | .chain_err(|| "Failed to setup upstream")?; 79 | if options.track_upstream { 80 | if !options.quiet { 81 | writeln!(stderr, "Fetching and tracking upstream...").ok(); 82 | } 83 | let mut master = get_head_branch(&repo)?; 84 | fetch_remote(&mut remote, &master, &options.authentication, true).chain_err(|| "Failed to fetch upstream")?; 85 | track_upstream(&mut master, &remote).chain_err(|| "Failed to set master to track upstream")?; 86 | hard_reset_fetch_head(&repo).chain_err(|| "Failed to hard reset to upstream")?; 87 | } 88 | } 89 | if !options.quiet { 90 | writeln!(stderr, "Done!").ok(); 91 | } 92 | Ok(()) 93 | } 94 | 95 | fn main() { 96 | if let Err(e) = main_inner() { 97 | let mut stderr = io::stderr(); 98 | writeln!(stderr, "Error: {}", e).expect("Failed to write to stderr"); 99 | for e in e.iter().skip(1) { 100 | writeln!(stderr, "caused by: {}", e).expect("Failed to write to stderr"); 101 | } 102 | if let Some(backtrace) = e.backtrace() { 103 | writeln!(stderr, "backtrace: {:?}", backtrace).expect("Failed to write to stderr"); 104 | } 105 | process::exit(2); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/options.rs: -------------------------------------------------------------------------------- 1 | use std::io; 2 | use std::fs::File; 3 | use std::path::PathBuf; 4 | use std::collections::HashMap; 5 | 6 | use clap; 7 | use serde_yaml; 8 | use rpassword; 9 | use errors::*; 10 | use app_dirs2::{AppInfo, get_app_root, AppDataType}; 11 | 12 | use repository::{Repository, Service, GitProtocol}; 13 | 14 | const APP_INFO: AppInfo = AppInfo { 15 | name: "ghcl", 16 | author: "PlasmaPower", 17 | }; 18 | 19 | #[derive(Debug, Clone)] 20 | pub struct Authentication { 21 | pub username: String, 22 | pub password: String, 23 | } 24 | 25 | #[derive(Debug)] 26 | pub struct Options { 27 | pub repository: Repository, 28 | pub organization: Option, 29 | pub track_upstream: bool, 30 | pub setup_upstream: bool, 31 | pub remote_name: String, 32 | pub origin_protocol: GitProtocol, 33 | pub upstream_protocol: GitProtocol, 34 | pub authentication: Authentication, 35 | pub clone_path: String, 36 | pub quiet: bool, 37 | pub fork_timeout: u64, 38 | } 39 | 40 | #[derive(Debug, Deserialize)] 41 | struct PartialAuthentication { 42 | username: Option, 43 | password: Option, 44 | } 45 | 46 | #[derive(Debug, Default, Deserialize)] 47 | struct Config { 48 | organization: Option, 49 | track_upstream: Option, 50 | setup_upstream: Option, 51 | remote_name: Option, 52 | origin_protocol: Option, 53 | upstream_protocol: Option, 54 | default_service: Option, 55 | quiet: Option, 56 | fork_timeout: Option, 57 | #[serde(default)] 58 | authentication: HashMap, 59 | } 60 | 61 | fn ask_for(prompt: &'static str, secure: bool) -> io::Result { 62 | if secure { 63 | rpassword::prompt_password_stderr(prompt) 64 | } else { 65 | rpassword::prompt_response_stderr(prompt) 66 | } 67 | } 68 | 69 | pub fn get_options() -> Result { 70 | let matches = clap::App::new("ghcl") 71 | .version("0.1.0") 72 | .author("Lee Bousfield ") 73 | .about("Automatically forks and clones a GitHub repository") 74 | .arg(clap::Arg::with_name("repository") 75 | .value_name("REPOSITORY") 76 | .required(true) 77 | .help("Repository to fork and clone")) 78 | .arg(clap::Arg::with_name("clone_path") 79 | .value_name("CLONE_PATH") 80 | .help("Where to clone the repository (defaults to the name of the repo)")) 81 | .arg(clap::Arg::with_name("config") 82 | .short("c") 83 | .long("config") 84 | .value_name("FILE") 85 | .help("Sets a custom config file")) 86 | .arg(clap::Arg::with_name("organization") 87 | .short("o") 88 | .long("organization") 89 | .value_name("ORGANIZATION") 90 | .help("Fork into an organization")) 91 | .arg(clap::Arg::with_name("username") 92 | .short("u") 93 | .long("username") 94 | .value_name("USERNAME") 95 | .help("Your username")) 96 | .arg(clap::Arg::with_name("password") 97 | .short("p") 98 | .long("password") 99 | .value_name("PASSWORD") 100 | .help("Your password (insecure - use a personal access token and put it in your config, or input your password when prompted)")) 101 | .arg(clap::Arg::with_name("fork_timeout") 102 | .long("fork-timeout") 103 | .value_name("TIMEOUT") 104 | .help("The maximum timeout for the fork creation (default: 30)")) 105 | .arg(clap::Arg::with_name("track_upstream") 106 | .long("track-upstream") 107 | .help("Setup master to track upstream (default, imples setup-upstream)")) 108 | .arg(clap::Arg::with_name("setup_upstream") 109 | .long("setup-upstream") 110 | .help("Setup an upstream remote (default)")) 111 | .arg(clap::Arg::with_name("remote_name") 112 | .long("remote-name") 113 | .value_name("REMOTE_NAME") 114 | .help("The name of the upstream remote to create (default: \"upstream\")")) 115 | .arg(clap::Arg::with_name("origin_protocol") 116 | .long("origin-protocol") 117 | .value_name("GIT_PROTOCOL") 118 | .possible_values(&["ssh", "https", "SSH", "HTTPS"]) 119 | .help("The git protocol to use for the origin (default: SSH)")) 120 | .arg(clap::Arg::with_name("upstream_protocol") 121 | .long("upstream-protocol") 122 | .value_name("GIT_PROTOCOL") 123 | .possible_values(&["ssh", "https", "SSH", "HTTPS"]) 124 | .help("The git protocol to use for the upstream (default: HTTPS)")) 125 | .arg(clap::Arg::with_name("default_service") 126 | .short("s") 127 | .long("default-service") 128 | .value_name("SERVICE") 129 | .possible_values(&["github", "GitHub", "Github"]) 130 | .help("The service to be used if the repository is in the form user/repo")) 131 | .arg(clap::Arg::with_name("no_track_upstream") 132 | .long("no-track-upstream") 133 | .conflicts_with("track_upstream") 134 | .help("Don't setup master to track upstream")) 135 | .arg(clap::Arg::with_name("no_upstream") 136 | .long("no-upstream") 137 | .conflicts_with_all(&["upstream", "track_upstream", "remote_name"]) 138 | .help("Don't setup an upstream remote (implies no_track_upstream)")) 139 | .arg(clap::Arg::with_name("quiet") 140 | .short("q") 141 | .long("quiet") 142 | .help("Don't output status messages")) 143 | .arg(clap::Arg::with_name("no_quiet") 144 | .long("no-quiet") 145 | .conflicts_with_all(&["quiet"]) 146 | .help("Don't be quiet (output status messages)")) 147 | .get_matches(); 148 | let config_path: Result = matches.value_of("config").map(PathBuf::from).map(Ok).unwrap_or_else(|| { 149 | let mut app_dir = get_app_root(AppDataType::UserConfig, &APP_INFO)?; 150 | app_dir.push("config.yml"); 151 | Ok(app_dir) 152 | }); 153 | let config_path = config_path?; 154 | let mut config = match File::open(config_path) { 155 | Ok(file) => serde_yaml::from_reader(file)?, 156 | Err(ref err) if err.kind() == io::ErrorKind::NotFound => Config::default(), 157 | Err(err) => Err(err)?, 158 | }; 159 | let matches_track_upstream = if matches.is_present("track_upstream") { 160 | Some(true) 161 | } else if matches.is_present("no_track_upstream") || matches.is_present("no_upstream") { 162 | Some(false) 163 | } else { 164 | None 165 | }; 166 | let matches_setup_upstream = if matches.is_present("setup_upstream") || matches.is_present("track_upstream") || matches.is_present("remote_name") { 167 | Some(true) 168 | } else if matches.is_present("no_upstream") { 169 | Some(false) 170 | } else { 171 | None 172 | }; 173 | let matches_quiet = if matches.is_present("quiet") { 174 | Some(true) 175 | } else if matches.is_present("no_quiet") { 176 | Some(false) 177 | } else { 178 | None 179 | }; 180 | if matches_track_upstream != Some(false) && config.track_upstream == Some(true) && config.setup_upstream == Some(false) { 181 | Err(ErrorKind::ConfigTrackNoSetup)? 182 | } 183 | let matches_origin_protocol = match matches.value_of("origin_protocol") { 184 | Some("https") | Some("HTTPS") => Some(GitProtocol::HTTPS), 185 | Some("ssh") | Some("SSH") => Some(GitProtocol::SSH), 186 | _ => None, 187 | }; 188 | let matches_upstream_protocol = match matches.value_of("upstream_protocol") { 189 | Some("https") | Some("HTTPS") => Some(GitProtocol::HTTPS), 190 | Some("ssh") | Some("SSH") => Some(GitProtocol::SSH), 191 | _ => None, 192 | }; 193 | let track_upstream = matches_track_upstream.or(config.track_upstream).or(config.setup_upstream).unwrap_or(true); 194 | let matches_default_service = match matches.value_of("default_service") { 195 | Some("github") | Some("GitHub") | Some("Github") => Some(Service::GitHub), 196 | _ => None, 197 | }; 198 | let repository = Repository::from_arg_string(matches.value_of("repository").unwrap(), matches_default_service.or(config.default_service).unwrap_or(Service::GitHub))?; 199 | let service = repository.service; 200 | let mut config_auth = config.authentication.remove(&service); 201 | let username = matches.value_of("username").map(String::from).or(config_auth.as_mut().and_then(|auth| auth.username.take())).map(Ok).unwrap_or_else(|| ask_for("Username: ", false))?; 202 | let password = matches.value_of("password").map(String::from).or(config_auth.as_mut().and_then(|auth| auth.password.take())).map(Ok).unwrap_or_else(|| ask_for("Password: ", true))?; 203 | let clone_path = matches.value_of("clone_path").unwrap_or(&repository.name).into(); 204 | Ok(Options { 205 | repository: repository, 206 | organization: matches.value_of("organization").map(String::from).or(config.organization), 207 | track_upstream: track_upstream, 208 | setup_upstream: track_upstream || matches_setup_upstream.or(config.setup_upstream).unwrap_or(true), 209 | remote_name: matches.value_of("remote_name").map(String::from).or(config.remote_name).unwrap_or_else(|| "upstream".into()), 210 | origin_protocol: matches_origin_protocol.or(config.origin_protocol).unwrap_or(GitProtocol::SSH), 211 | upstream_protocol: matches_upstream_protocol.or(config.upstream_protocol).unwrap_or(GitProtocol::HTTPS), 212 | authentication: Authentication { username: username, password: password }, 213 | clone_path: clone_path, 214 | quiet: matches_quiet.or(config.quiet).unwrap_or(false), 215 | fork_timeout: matches.value_of("fork_timeout").map(|s| s.parse()).or(config.fork_timeout.map(Ok)).unwrap_or(Ok(30))?, 216 | }) 217 | } 218 | -------------------------------------------------------------------------------- /src/repository.rs: -------------------------------------------------------------------------------- 1 | use serde_json; 2 | use regex::Regex; 3 | use reqwest::{self, Client, StatusCode, Response}; 4 | use serde::de::DeserializeOwned; 5 | 6 | use options::Authentication; 7 | use errors::*; 8 | 9 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone, Copy, Hash)] 10 | #[serde(rename_all = "lowercase")] 11 | pub enum Service { 12 | GitHub, 13 | } 14 | 15 | #[derive(Debug, PartialEq, Eq)] 16 | pub struct Repository { 17 | pub service: Service, 18 | pub user: String, 19 | pub name: String, 20 | } 21 | 22 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 23 | pub enum GitProtocol { 24 | SSH, 25 | HTTPS, 26 | } 27 | 28 | fn github_repo_json_git_url(json: serde_json::Value, git_protocol: GitProtocol) -> Result { 29 | Ok(match git_protocol { 30 | GitProtocol::SSH => json.get("ssh_url").ok_or(ErrorKind::MissingKey("ssh_url"))?.as_str().ok_or(ErrorKind::MalformedKey("ssh_url"))?.into(), 31 | GitProtocol::HTTPS => json.get("clone_url").ok_or(ErrorKind::MissingKey("clone_url"))?.as_str().ok_or(ErrorKind::MalformedKey("clone_url"))?.into(), 32 | }) 33 | } 34 | 35 | fn github_res(mut res: Response) -> Result { 36 | match res.status() { 37 | StatusCode::OK | StatusCode::CREATED | StatusCode::ACCEPTED | StatusCode::NO_CONTENT => { 38 | Ok(res.json()?) 39 | } 40 | _ => { 41 | let json: serde_json::Value = res.json()?; 42 | if let Some(message) = json.get("message").and_then(|v| v.as_str()) { 43 | return Err(ErrorKind::APIError(message.into()).into()); 44 | } 45 | Err(ErrorKind::RawAPIError(json).into()) 46 | } 47 | } 48 | } 49 | 50 | impl Repository { 51 | pub fn from_arg_string(string: &str, default_service: Service) -> Result { 52 | if let Some(captures) = Regex::new(r#"(?:(?:https?:)?//)?(?:www\.)?github\.com/([a-zA-Z-2-9\-_]+)/([a-zA-Z0-9\-_]+)(?:/tree/[a-zA-Z0-9\-_]+)?(?:[?#].*)?"#)?.captures(string) { 53 | if let (Some(user), Some(name)) = (captures.get(1), captures.get(2)) { 54 | return Ok(Repository { 55 | service: Service::GitHub, 56 | user: user.as_str().to_string(), 57 | name: name.as_str().to_string(), 58 | }); 59 | } 60 | } 61 | let mut slash_found = false; 62 | let mut user = String::new(); 63 | let mut name = String::new(); 64 | for c in string.chars() { 65 | if c == '/' { 66 | if slash_found { 67 | Err(ErrorKind::FailedToParseRepository)? 68 | } 69 | slash_found = true; 70 | continue; 71 | } 72 | if !c.is_alphanumeric() && c != '-' && c != '_' { 73 | Err(ErrorKind::FailedToParseRepository)? 74 | } 75 | if slash_found { 76 | name.push(c); 77 | } else { 78 | user.push(c); 79 | } 80 | } 81 | if user.is_empty() || name.is_empty() { 82 | Err(ErrorKind::FailedToParseRepository)? 83 | } 84 | Ok(Repository { 85 | service: default_service, 86 | user: user, 87 | name: name, 88 | }) 89 | } 90 | 91 | pub fn get_git_url(&self, git_protocol: GitProtocol) -> Result { 92 | match self.service { 93 | Service::GitHub => { 94 | let res = reqwest::get(&format!("https://api.github.com/repos/{}/{}", self.user, self.name))?; 95 | let json = github_res(res)?; 96 | Ok(github_repo_json_git_url(json, git_protocol).chain_err(|| "failed to get git URL from JSON")?) 97 | } 98 | } 99 | } 100 | 101 | pub fn fork(&self, authentication: Authentication, organization: Option<&str>, git_protocol: GitProtocol) -> Result { 102 | let http_client = Client::new(); 103 | match self.service { 104 | Service::GitHub => { 105 | let mut params_map = serde_json::Map::new(); 106 | if let Some(org) = organization { 107 | params_map.insert("organization".into(), serde_json::Value::String(org.into())); 108 | } 109 | let res = http_client.post(&format!("https://api.github.com/repos/{}/{}/forks", self.user, self.name)) 110 | .json(&serde_json::Value::Object(params_map)) 111 | .basic_auth(authentication.username, Some(authentication.password)) 112 | .send()?; 113 | let json = github_res(res)?; 114 | Ok(github_repo_json_git_url(json, git_protocol).chain_err(|| "failed to get git URL from JSON")?) 115 | } 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /src/tests/mod.rs: -------------------------------------------------------------------------------- 1 | mod repository; 2 | -------------------------------------------------------------------------------- /src/tests/repository.rs: -------------------------------------------------------------------------------- 1 | use repository::{Repository, Service}; 2 | 3 | #[test] 4 | fn from_arg_string() { 5 | assert_eq!(Repository::from_arg_string("foo/bar", Service::GitHub).expect("Failed to parse arg string"), Repository { 6 | service: Service::GitHub, 7 | user: "foo".into(), 8 | name: "bar".into(), 9 | }, "Failed to parse user/repo format arg string"); 10 | 11 | assert_eq!(Repository::from_arg_string("https://github.com/foo/bar", Service::GitHub).expect("Failed to parse arg string"), Repository { 12 | service: Service::GitHub, 13 | user: "foo".into(), 14 | name: "bar".into(), 15 | }, "Failed to parse GitHub URL arg string"); 16 | 17 | assert_eq!(Repository::from_arg_string("https://github.com/foo/bar/tree/branch?x=y#example", Service::GitHub).expect("Failed to parse arg string"), Repository { 18 | service: Service::GitHub, 19 | user: "foo".into(), 20 | name: "bar".into(), 21 | }, "Failed to parse detailed GitHub URL arg string"); 22 | } 23 | --------------------------------------------------------------------------------