Browse Source

New neo-url dep

default_compile_flags
vector-of-bool 4 years ago
parent
commit
fe0cac022c
6 changed files with 28 additions and 5 deletions
  1. +8
    -0
      catalog.json
  2. +11
    -0
      catalog.old.json
  3. +1
    -1
      package.jsonc
  4. +4
    -1
      src/dds/catalog/catalog.hpp
  5. +2
    -2
      src/dds/catalog/remote/http.cpp
  6. +2
    -1
      tools/gen-catalog-json.py

+ 8
- 0
catalog.json View File

"description": "URL parsing and handling library.", "description": "URL parsing and handling library.",
"transform": [], "transform": [],
"url": "git+https://github.com/vector-of-bool/neo-url.git#0.2.1" "url": "git+https://github.com/vector-of-bool/neo-url.git#0.2.1"
},
"0.2.2": {
"depends": [
"neo-fun^0.5.5"
],
"description": "URL parsing and handling library.",
"transform": [],
"url": "git+https://github.com/vector-of-bool/neo-url.git#0.2.2"
} }
}, },
"nlohmann-json": { "nlohmann-json": {

+ 11
- 0
catalog.old.json View File

"transform": [], "transform": [],
"url": "https://github.com/vector-of-bool/neo-url.git" "url": "https://github.com/vector-of-bool/neo-url.git"
} }
},
"0.2.2": {
"depends": [
"neo-fun^0.5.5"
],
"description": "URL parsing and handling library.",
"git": {
"ref": "0.2.2",
"transform": [],
"url": "https://github.com/vector-of-bool/neo-url.git"
}
} }
}, },
"nlohmann-json": { "nlohmann-json": {

+ 1
- 1
package.jsonc View File

"neo-sqlite3@0.4.1", "neo-sqlite3@0.4.1",
"neo-fun~0.5.4", "neo-fun~0.5.4",
"neo-compress~0.1.1", "neo-compress~0.1.1",
"neo-url~0.2.1",
"neo-url~0.2.2",
"semver@0.2.2", "semver@0.2.2",
"pubgrub@0.2.1", "pubgrub@0.2.1",
"vob-json5@0.1.5", "vob-json5@0.1.5",

+ 4
- 1
src/dds/catalog/catalog.hpp View File

auto content = dds::slurp_file(json_path); auto content = dds::slurp_file(json_path);
import_json_str(content); import_json_str(content);
} }

auto& database() noexcept { return _db; }
auto& database() const noexcept { return _db; }
}; };


} // namespace dds
} // namespace dds

+ 2
- 2
src/dds/catalog/remote/http.cpp View File

? http_session::connect_ssl(*url.host, url.port_or_default_port_or(443)) ? http_session::connect_ssl(*url.host, url.port_or_default_port_or(443))
: http_session::connect(*url.host, url.port_or_default_port_or(80)); : http_session::connect(*url.host, url.port_or_default_port_or(80));


sess.send_head({.method = "GET", .path = url.path_string()});
sess.send_head({.method = "GET", .path = url.path});


auto res_head = sess.recv_head(); auto res_head = sess.recv_head();
if (res_head.is_error()) { if (res_head.is_error()) {
this->url); this->url);


auto tdir = dds::temporary_dir::create(); auto tdir = dds::temporary_dir::create();
auto url_path = fs::path(url.path_string());
auto url_path = fs::path(url.path);
auto fname = url_path.filename(); auto fname = url_path.filename();
if (fname.empty()) { if (fname.empty()) {
fname = "dds-download.tmp"; fname = "dds-download.tmp";

+ 2
- 1
tools/gen-catalog-json.py View File

github_package('neo-buffer', 'vector-of-bool/neo-buffer', github_package('neo-buffer', 'vector-of-bool/neo-buffer',
['0.2.1', '0.3.0', '0.4.0', '0.4.1', '0.4.2']), ['0.2.1', '0.3.0', '0.4.0', '0.4.1', '0.4.2']),
github_package('neo-compress', 'vector-of-bool/neo-compress', ['0.1.0', '0.1.1']), github_package('neo-compress', 'vector-of-bool/neo-compress', ['0.1.0', '0.1.1']),
github_package('neo-url', 'vector-of-bool/neo-url', ['0.1.0', '0.1.1', '0.1.2', '0.2.0', '0.2.1']),
github_package('neo-url', 'vector-of-bool/neo-url',
['0.1.0', '0.1.1', '0.1.2', '0.2.0', '0.2.1', '0.2.2']),
github_package('neo-sqlite3', 'vector-of-bool/neo-sqlite3', github_package('neo-sqlite3', 'vector-of-bool/neo-sqlite3',
['0.2.3', '0.3.0', '0.4.0', '0.4.1']), ['0.2.3', '0.3.0', '0.4.0', '0.4.1']),
github_package('neo-fun', 'vector-of-bool/neo-fun', [ github_package('neo-fun', 'vector-of-bool/neo-fun', [

Loading…
Cancel
Save