commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
f7d12960a689d6e58182ea974ab4d89682acbc6f
Craig Hills
2015-07-23T18:59:52
feat: Improve error handling
diff --git a/src/lib.rs b/src/lib.rs index a7237f8..c71e7ce 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,16 +12,31 @@ use std::io::{BufReader, BufRead}; use std::env; use std::result::Result; use std::path::Path; -use regex::Regex; +use regex::{Regex, Error}; #[derive(Debug, Clone)] -pub struct ParseError { - ...
1
31
16
02a7e4bdb26224d874d78040702fb1d2c586d3c5
Craig Hills
2015-07-23T01:24:00
doc: Provide documentation
diff --git a/src/lib.rs b/src/lib.rs index 07c0548..a7237f8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,10 @@ +/*! +This crate provides a configuration loader in the style of the [ruby dotenv gem](https://github.com/bkeepers/dotenv). +This library is meant to be used on development or testing environments in wh...
1
11
0
18e196cb5b5863fb46802a4084ef0fe47c1f4f28
Craig Hills
2015-07-22T12:45:16
Update to work with 1.1 stable
diff --git a/Cargo.toml b/Cargo.toml index 458c290..5de2deb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,6 @@ license = "MIT" homepage = "https://github.com/slapresta/rust-dotenv" repository = "https://github.com/slapresta/rust-dotenv" description = "A `dotenv` implementation for Rust" + +[dependencies] +rege...
3
105
150
4ecea0c5936656a73ec0e369a8345b3a41761836
Santiago Lapresta
2015-01-03T14:17:34
Bump version number
diff --git a/Cargo.toml b/Cargo.toml index bc314bd..458c290 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dotenv" -version = "0.2.1" +version = "0.2.2" authors = ["Santiago Lapresta <santiago.lapresta@gmail.com>"] readme = "README.md" keywords = ["environment", "env", "dotenv", "sett...
1
1
1
d7bb5be49e8f1a49c12d3933486901f7c81b01d2
Santiago Lapresta
2015-01-03T14:15:18
Fix warnings on latest nightly
diff --git a/src/lib.rs b/src/lib.rs index a3e59ba..0199a59 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,12 +6,12 @@ extern crate regex; use std::io::{BufferedReader, File, IoError, OtherIoError}; use std::os::{getenv, setenv, self_exe_path}; -#[deriving(Show, Clone)] +#[derive(Show, Clone)] pub struct ParseErro...
1
2
2
3ab62f6c2693a5c19869cf24fd8a27411d258a0e
Santiago Lapresta
2014-12-21T17:53:53
Bump version number
diff --git a/Cargo.toml b/Cargo.toml index f196ca1..bc314bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dotenv" -version = "0.2.0" +version = "0.2.1" authors = ["Santiago Lapresta <santiago.lapresta@gmail.com>"] readme = "README.md" keywords = ["environment", "env", "dotenv", "sett...
1
1
1
f91c238efd122ee4aacabb9750d3cf34f7aaeada
Santiago Lapresta
2014-12-21T17:53:27
Made it compile on latest nightly
diff --git a/src/lib.rs b/src/lib.rs index 7d57140..a3e59ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,13 +37,13 @@ fn parse_line(line: String) -> ParsedLine { let key = captures.name("key"); let value = captures.name("value"); - if key == "" || value == "" { + if key.is_some() && value.is_some() { +...
1
7
7
41f2034f770230da1605c03c5068f45460c502e8
Santiago Lapresta
2014-12-10T22:19:10
Add examples folder
diff --git a/examples/simple.rs b/examples/simple.rs new file mode 100644 index 0000000..05a7ea0 --- /dev/null +++ b/examples/simple.rs @@ -0,0 +1,12 @@ +extern crate dotenv; + +use dotenv::dotenv; +use std::os::env; + +fn main() { + dotenv().ok(); + + for (key, value) in env().into_iter() { + println!("key: {}, v...
1
12
0
9da94b72c907a586a741e7628fa969502662e1c8
Santiago Lapresta
2014-11-21T10:01:09
Remove awkward line break
diff --git a/src/lib.rs b/src/lib.rs index 8f6daf0..7d57140 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,8 +50,7 @@ fn parse_line(line: String) -> ParsedLine { } fn parse_line_iter<T: Iterator<String>>(lines: T) -> ParsedLines { - let parsed_lines: Vec<ParsedLine> = - lines.map(parse_line).collect(); + let par...
1
1
2
875f3880aa701e0956e4e708ff95f3e3fbb8b217
Santiago Lapresta
2014-10-30T08:57:53
Bump version number
diff --git a/Cargo.toml b/Cargo.toml index b5282a0..ecdbcce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] name = "dotenv" -version = "0.1.0" +version = "0.2.0" authors = ["Santiago Lapresta <santiago.lapresta@gmail.com>"]
1
1
1
90c4611c7cf3262f7b6b48ee368afe66e1fc31da
Santiago Lapresta
2014-11-20T22:21:57
Assert that empty strings don't trip the line iterator
diff --git a/src/lib.rs b/src/lib.rs index cd73c52..8f6daf0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -160,6 +160,7 @@ fn test_from_line_iter_valid() { let input = vec![ "test_env_one=1", "# a comment", + "", "\n", "test_env_two=2" ].into_iter().map(|line| line.to_string()); let actual = parse_line_it...
1
1
0
454828f790917ee3fe1fb9b98fef7e25e8c10ede
Santiago Lapresta
2014-11-20T22:15:14
Added type aliases (readability counts!)
diff --git a/src/lib.rs b/src/lib.rs index 76e0c14..cd73c52 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,7 +17,11 @@ pub enum DotenvError { Io(IoError) } -fn parse_line(line: String) -> Result<Option<(String, String)>, ParseError> { +// for readability's sake +type ParsedLine = Result<Option<(String, String)>, ...
1
8
3
55e72b265ec5895e05751e9a32396467f7db6977
Santiago Lapresta
2014-11-20T22:03:15
Fix awful bug on already exhausted iterators
diff --git a/src/lib.rs b/src/lib.rs index 66400d7..76e0c14 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,14 +46,14 @@ fn parse_line(line: String) -> Result<Option<(String, String)>, ParseError> { } fn parse_line_iter<T: Iterator<String>>(lines: T) -> Result<Vec<(String, String)>, ParseError> { - let mut parsed_l...
1
4
4
a3727da2db3fdb0a6aca545c46120361f3d3e75a
Santiago Lapresta
2014-11-20T22:02:14
Don't fail horribly on empty strings and newlines
diff --git a/src/lib.rs b/src/lib.rs index aacf1dc..66400d7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,11 +20,12 @@ pub enum DotenvError { fn parse_line(line: String) -> Result<Option<(String, String)>, ParseError> { let line_regex = regex!(concat!(r"^(\s*(", r"#.*|", // A comment, or... + r"\s*|", // ...an...
1
4
2
67bb820aa8085d148d2bac525277a9a4152dc058
Santiago Lapresta
2014-11-20T21:02:06
Qualify enum names
diff --git a/src/lib.rs b/src/lib.rs index c5fcf34..aacf1dc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -71,14 +71,14 @@ fn from_file(file: File) -> Result<(), DotenvError> { parse_line_iter(lines.filter_map(|result| { result.ok() })).map(lines_to_env).map_err(|err| { - Parse(err) + DotenvError::Parse(err) }...
1
3
3
85b8030b4842bcac2fa110b23f35412923f2fd4d
Santiago Lapresta
2014-11-06T21:35:55
Don't override existing environment variables!
diff --git a/src/lib.rs b/src/lib.rs index 2ea4caa..c5fcf34 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ extern crate regex; #[phase(plugin)] extern crate regex_macros; use std::io::{BufferedReader, File, IoError, OtherIoError}; -use std::os::{setenv, self_exe_path}; +use std::os::{getenv, setenv, self_...
1
4
2
08cabf48d6f7c650aba4f677235900c74370900b
Santiago Lapresta
2014-11-06T21:21:21
Separated environment side effects from iterating function
diff --git a/src/lib.rs b/src/lib.rs index fb82ba6..2ea4caa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,7 +43,7 @@ fn parse_line(line: String) -> Result<Option<(String, String)>, ParseError> { ) } -fn from_line_iter<T: Iterator<String>>(lines: T) -> Result<(), ParseError> { +fn parse_line_iter<T: Iterator<Stri...
1
11
9
7a1c0a83197bd587fc22216c6d7949231e29b1d7
Santiago Lapresta
2014-11-20T20:51:01
Add project metadata to Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index 34185e0..e83ad09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,3 +3,9 @@ name = "dotenv" version = "0.1.1" authors = ["Santiago Lapresta <santiago.lapresta@gmail.com>"] +readme = "README.md" +keywords = ["environment", "env", "dotenv", "settings", "config"] +license = "MIT...
1
6
0
0f5f081c1ada00617f78938a3172eae601bdf72d
Santiago Lapresta
2014-11-20T20:43:32
Bump patch version
diff --git a/Cargo.toml b/Cargo.toml index b5282a0..34185e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] name = "dotenv" -version = "0.1.0" +version = "0.1.1" authors = ["Santiago Lapresta <santiago.lapresta@gmail.com>"]
1
1
1
6dc721d5b3e4eb0eef9a70471985352a1230c1dc
Santiago Lapresta
2014-11-20T20:42:58
Change `find` to `get`, avoid deprecation warning
diff --git a/src/lib.rs b/src/lib.rs index a816ec4..50edf83 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,14 +88,14 @@ impl Dotenv { pub fn getenv(&self, n: &str) -> Option<String> { let n_bytes = &String::from_str(n).into_bytes(); - self.env.find(n_bytes).and_then(|bytes| { + self.env.get(n_bytes).and_then(...
1
2
2
33c2cfb59c193e9bc5c6fc89f6dd4388fa23ec13
Santiago Lapresta
2014-10-28T00:57:40
Big rewrite: simpler API, more testable
diff --git a/src/lib.rs b/src/lib.rs index a816ec4..fb82ba6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,207 +3,167 @@ extern crate regex; #[phase(plugin)] extern crate regex_macros; -use std::io::{File, IoResult, IoError, OtherIoError}; -use std::collections::HashMap; -use std::default::Default; -use std::os; +u...
1
125
165
0aa72c2c55285d12fa0d56e6c832cb54770808a3
Santiago Lapresta
2014-10-25T11:38:36
Move tests to the end of the file and rearrange methods
diff --git a/src/lib.rs b/src/lib.rs index 581595f..02a8899 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,6 +21,96 @@ fn merge_env_hashes( result } +fn parse_env(data: Vec<u8>) -> HashMap<Vec<u8>, Vec<u8>> { + let line_splitter = regex!(r"[\r\n]+"); + let env_format = regex!( + r"^(?P<key>[A-Za-z_][A-Za-z0-9_]*...
1
90
90
5691934a65026dc4c75b991e6c4c1d58484260fd
Amod Malviya
2026-03-09T05:17:28
fix tests after rand upgrade
diff --git a/tests/common.rs b/tests/common.rs index 07a5af0..bba3542 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -1,7 +1,6 @@ use actix_files as fs; use actix_web::{web, App, HttpRequest, HttpResponse, HttpServer, Responder}; use crossbeam_channel as cbc; -use rand::RngCore; use std::{io::Write, path::Pa...
1
1
2
e3bd4c588ea90934221da4c588d035d627a5f9d5
Amod Malviya
2026-03-09T05:13:34
update dev dependencies
diff --git a/Cargo.toml b/Cargo.toml index 616b32d..8e90504 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,9 +45,9 @@ objc2-foundation = { version = "0.3", default-features = false, features = [ actix-web = "4" actix-files = "0.6" crossbeam-channel = "0.5" -env_logger = "0.9.0" -rand = "0.8" -serial_test = "0.10" +...
1
3
3
9085404078586609b6c9b3bd01e6bd00e4be3192
Amod Malviya
2026-03-09T04:32:15
fix lints
diff --git a/src/common.rs b/src/common.rs index de6388d..162911d 100644 --- a/src/common.rs +++ b/src/common.rs @@ -1,4 +1,4 @@ -use super::{BrowserOptions, Error, ErrorKind, Result}; +use super::{BrowserOptions, Error, Result}; use log::debug; use std::process::{Command, Stdio}; @@ -80,10 +80,7 @@ pub(crate) fn r...
6
20
34
b5fc8c7ed0aec136f792e65c21ea76ea1b9b43c2
Robert Bragg
2026-03-05T18:51:46
android: jni 0.22 update, exception checks, support any 'Context' This addresses some exception-handling hygiene issues in the Android backend, and adds support for non-`Activity` `Context` references (considering that `ndk-context` does not guarantee that it provides an `Activity` reference). With the previous imple...
diff --git a/Cargo.toml b/Cargo.toml index 8c717c4..616b32d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" keywords = ["webbrowser", "browser"] license = "MIT OR Apache-2.0" edition = "2021" -rust-version = "1.60" +rust-version = "1.85" [dependencies] log = { version = "0.4", def...
5
159
79
beffdd6c9cbf6da34b30c691cb38d22f03de0554
John Nunley
2026-01-03T19:08:07
feat: Remove default features This commit removes the default features of the `log` and `url` dependencies, which reduces the dependency count from 37 to 34. Signed-off-by: John Nunley <dev@notgull.net>
diff --git a/Cargo.toml b/Cargo.toml index e0a267d..b711d90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,8 +13,8 @@ edition = "2021" rust-version = "1.60" [dependencies] -log = "0.4" -url = "2" +log = { version = "0.4", default-features = false } +url = { version = "2", default-features = false, features = ["std...
1
2
2
44908ca5f33984b1a7d12408e799e3721b246d36
Amod Malviya
2025-10-16T04:21:01
ios: fix lint for objc2 invocation #build-ios
diff --git a/src/ios.rs b/src/ios.rs index a91c885..44f4ea7 100644 --- a/src/ios.rs +++ b/src/ios.rs @@ -63,6 +63,7 @@ pub(super) fn open_browser_internal( // Create ns string class from our string let url_string = NSString::from_str(url); // Create NSURL object with given string + #[allow(unused_unsa...
1
1
0
ee2b1cdf2ebe4d2ed135728d0be9c03def0686a2
Łukasz Fudro
2025-10-15T08:27:05
fix opening a browser that is located in a path that contains unicode characters
diff --git a/src/common.rs b/src/common.rs index c7540b8..de6388d 100644 --- a/src/common.rs +++ b/src/common.rs @@ -12,7 +12,7 @@ where let mut in_quotes = false; let mut idx = 0; for ch in line.chars() { - idx += 1; + idx += ch.len_utf8(); match ch { '"' => { ...
1
1
1
8a82bcf1c9ef7827c8c9160d4dfae510f724ff19
Amod Malviya
2025-07-06T16:42:05
macos: add dont_switch flag
diff --git a/src/lib.rs b/src/lib.rs index ab8317a..a578885 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -185,6 +185,8 @@ pub struct BrowserOptions { suppress_output: bool, target_hint: String, dry_run: bool, + #[cfg(target_os = "macos")] + dont_switch: bool, } impl fmt::Display for BrowserOptio...
2
17
1
061e65e6b8139701f3783c1a68e9528e7d940fb8
Amod Malviya
2025-07-01T03:44:27
ios: fix lints
diff --git a/tests/test_ios.rs b/tests/test_ios.rs index d1fb8e7..8a3f35c 100644 --- a/tests/test_ios.rs +++ b/tests/test_ios.rs @@ -18,7 +18,7 @@ mod tests { #[ignore] #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn test_ios() { - let uri = format!("/{}", TEST_PLATFORM); + ...
1
2
2
85dd4a37fcfb30dc34ad8bcdea0d7cd3efd15f68
Amod Malviya
2025-07-01T03:44:19
macos: fix lints
diff --git a/src/macos.rs b/src/macos.rs index dc4cd66..341b500 100644 --- a/src/macos.rs +++ b/src/macos.rs @@ -85,7 +85,7 @@ pub(super) fn open_browser_internal( log::trace!("about to start browser: {} for {}", &browser, &target); let mut launched_app: CFURLRef = std::ptr::null_mut(); let status = unsa...
1
2
2
e467175d0428922481e1e3e6a245693b3e6c4cd6
Amod Malviya
2025-06-13T13:30:05
use std::env::home_dir on unix
diff --git a/src/unix.rs b/src/unix.rs index 1262b6e..aa0b114 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -387,11 +387,12 @@ fn open_using_xdg_config(config_path: &PathBuf, options: &BrowserOptions, url: & fn get_xdg_dirs() -> Vec<PathBuf> { let mut xdg_dirs: Vec<PathBuf> = Vec::new(); + #[allow(deprecated...
1
2
1
0f3101aff4e520cc59b9faf332905b46e50367d8
Amod Malviya
2025-06-13T13:16:34
Do away with home crate
diff --git a/Cargo.toml b/Cargo.toml index 842d0a0..2f772b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,9 +25,6 @@ hardened = [] disable-wsl = [] wasm-console = ["web-sys/console"] -[target.'cfg(any(target_os = "aix", target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", targe...
2
1
4
3bd7eaf7305224da24ef9a437843132efdef3a6a
Mads Marquart
2025-06-06T16:44:38
Fix packed alignment of LSLaunchURLSpec
diff --git a/src/macos.rs b/src/macos.rs index 01cfee7..dc4cd66 100644 --- a/src/macos.rs +++ b/src/macos.rs @@ -170,7 +170,7 @@ const LSROLE_VIEWER: LSRolesMask = 0x00000002; const LS_LAUNCH_FLAG_DEFAULTS: u32 = 0x00000001; const LS_LAUNCH_FLAG_ASYNC: u32 = 0x00010000; -#[repr(C)] +#[repr(C, packed(2))] // Header ...
1
1
1
eff4ccbfd373e88df5dbfd6337eabd69b60b08be
Amod Malviya
2025-05-11T08:42:40
android: fix lint check for beta
diff --git a/tests/test_android.rs b/tests/test_android.rs index 5f314c8..091f0ac 100644 --- a/tests/test_android.rs +++ b/tests/test_android.rs @@ -40,7 +40,7 @@ mod tests { .collect::<Vec<String>>() .join("\n"); fs::write(&lib_rs, new_code).expect("failed to modify src/l...
1
2
2
33b8fc07610c2662c18ed2112d36c19ef1650813
Amod Malviya
2025-05-11T07:48:23
linux: fix lint check for beta
diff --git a/src/unix.rs b/src/unix.rs index d32080a..4a682fb 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -287,7 +287,7 @@ fn try_xdg(options: &BrowserOptions, url: &str) -> Result<()> { let app_suffix = "applications"; for xdg_dir in get_xdg_dirs().iter_mut() { let mut config_path = xdg_dir.join(a...
1
1
1
0f4d8850188f787442263f720dc6b86c512ed349
Mads Marquart
2025-03-09T19:14:48
ios: Re-add nullability check for `sharedApplication`
diff --git a/src/ios.rs b/src/ios.rs index 7d33ea6..a91c885 100644 --- a/src/ios.rs +++ b/src/ios.rs @@ -7,7 +7,15 @@ use crate::{Browser, BrowserOptions, Error, ErrorKind, Result, TargetType}; /// Returns `UIApplication` #[allow(non_snake_case)] -fn sharedApplication(_mtm: MainThreadMarker) -> Retained<NSObject> {...
1
14
2
f287749043ad8a98b20362a77251b1c4543bbbe0
Marijn Suijten
2025-02-28T23:49:06
ios: Upgrade to `objc2 0.6` and drop dependency on `block2` Even though there's a new `objc2-ui-kit` dependency available that represents the `UIApplication` type and its methods faithfully, there was a strong preference to cut down on the number of dependencies instead so its improved signature has been incorporated ...
diff --git a/Cargo.toml b/Cargo.toml index 9912e44..0386164 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,9 +36,8 @@ jni = "0.21" ndk-context = "0.1" [target.'cfg(any(target_os = "ios", target_os = "tvos", target_os = "visionos"))'.dependencies] -block2 = "0.5.0" -objc2 = "0.5.1" -objc2-foundation = { version = "...
2
28
20
0638fdb877245ed6ca8e7ceb24f3123c78aa5b47
Mads Marquart
2025-01-21T20:27:31
ios: prepare for objc2 frameworks v0.3 These will have a bunch of default features enabled, so let's pre-emptively disable them.
diff --git a/Cargo.toml b/Cargo.toml index a8ef15b..9912e44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,8 @@ ndk-context = "0.1" [target.'cfg(any(target_os = "ios", target_os = "tvos", target_os = "visionos"))'.dependencies] block2 = "0.5.0" objc2 = "0.5.1" -objc2-foundation = { version = "0.2.0", features...
1
2
1
592fe803967fef427dcd6ea19ceabf787a200ed5
Jakub Kulík
2024-11-28T10:05:42
Add Solaris support
diff --git a/Cargo.toml b/Cargo.toml index 2ba7b44..2095e42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ hardened = [] disable-wsl = [] wasm-console = ["web-sys/console"] -[target.'cfg(any(target_os = "aix", target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", targe...
1
1
1
f1bf12a127d0b241128376152e478cb7df684a36
Hamir Mahal
2024-11-09T19:13:27
style: simplify statements for readability
diff --git a/src/unix.rs b/src/unix.rs index f921500..d32080a 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -466,7 +466,7 @@ mod tests_xdg { fn get_temp_path(name: &str, suffix: &str) -> String { let pid = std::process::id(); std::env::temp_dir() - .join(format!("{}.{}.{}", name, pid, ...
4
13
16
c0c97a3f9f7241c601dfd6c4569db3ce99880721
Amod Malviya
2024-10-13T03:33:12
android: fix test build #build-android
diff --git a/tests/test-android-app/Cargo.toml b/tests/test-android-app/Cargo.toml index 3bce8fb..680423d 100644 --- a/tests/test-android-app/Cargo.toml +++ b/tests/test-android-app/Cargo.toml @@ -13,4 +13,4 @@ ndk-glue = "0.7" webbrowser = { path = "../.." } [package.metadata.android.sdk] -target_sdk_version = 33 ...
1
1
1
6a1e7c8a2217dcaee3177d8d57554dbe33dd9512
TÖRÖK Attila
2024-09-16T08:48:56
Bump `core-foundation` dependency to 0.10
diff --git a/Cargo.toml b/Cargo.toml index c7a079e..ed0ef42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ wasm-console = ["web-sys/console"] home = "0.5" [target.'cfg(target_os = "macos")'.dependencies] -core-foundation = "0.9" +core-foundation = "0.10" [target.'cfg(target_os = "android")'.dependenc...
1
1
1
1d1a94f29eb7ef8f802a25bb3877e327e3bfa923
Amod Malviya
2024-06-16T04:13:06
lints: fix doc indentation for beta
diff --git a/src/lib.rs b/src/lib.rs index f7d4088..ab8317a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,11 +27,11 @@ //! ## Consistent Behaviour //! `webbrowser` defines consistent behaviour on all platforms as follows: //! * **Browser guarantee** - This library guarantees that the browser is opened, even for lo...
1
3
3
a632c960bac303dcec5f8ada8d18d5b7733d0873
Amod Malviya
2024-05-06T07:11:27
macos: fix lint #build-macos
diff --git a/tests/test_ios.rs b/tests/test_ios.rs index be0273d..d1fb8e7 100644 --- a/tests/test_ios.rs +++ b/tests/test_ios.rs @@ -72,7 +72,7 @@ mod tests { }) .collect::<Vec<String>>() .join("\n"); - fs::write(&swift_src, &new_code).expect("failed to modi...
1
1
1
b4e4184083ce4a7d86b2c17b652da7d1da2b5a1d
Amod Malviya
2024-05-06T06:49:48
fix lint
diff --git a/src/lib.rs b/src/lib.rs index 046a35d..f7d4088 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,10 +86,11 @@ use std::ops::Deref; use std::str::FromStr; use std::{error, fmt}; -#[derive(Debug, Eq, PartialEq, Copy, Clone, Hash)] +#[derive(Debug, Default, Eq, PartialEq, Copy, Clone, Hash)] /// Browser ty...
1
2
7
c1538c0fc7270dcc0e72cc7e441cb214eda4f2a9
Amod Malviya
2024-05-06T06:49:22
ios: remove unnecessary print from test
diff --git a/tests/test_ios.rs b/tests/test_ios.rs index 552e455..be0273d 100644 --- a/tests/test_ios.rs +++ b/tests/test_ios.rs @@ -74,7 +74,6 @@ mod tests { .join("\n"); fs::write(&swift_src, &new_code).expect("failed to modify ContentView.swift"); let revert_code = || fs::w...
1
0
1
45f73d3390000571f79615c46e72e49b5ee20fab
Amod Malviya
2024-05-04T13:17:19
ios: use a higher timeout in tests
diff --git a/tests/common.rs b/tests/common.rs index ea1998a..b88ab39 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -81,7 +81,7 @@ where op(&format!("http://{}:{}{}", host, port, &uri), port); // wait for the url to be hit - let timeout = 90; + let timeout = if cfg!(target_os = "ios") { 360 } ...
2
3
2
a63f1aecb41a163fa0daf1971b9c4bf8d3d2485a
Amod Malviya
2024-05-04T11:56:06
ios: tests - have a compilation warm up to reduce the risk of overshooting wait time
diff --git a/tests/test_ios.rs b/tests/test_ios.rs index 62c16cd..d1fb8e7 100644 --- a/tests/test_ios.rs +++ b/tests/test_ios.rs @@ -29,6 +29,31 @@ mod tests { glue_dir.push("testglue"); run_cmd(&glue_dir, &["./build"]).expect("glue code build failed"); + let compile_app = || { + r...
1
26
21
5dfb6ce2932a0cd5c54e6c3cdf85f798847834c0
Amod Malviya
2024-05-04T08:53:13
macos: fix github test as macos-latest-arm64 does not include firefox
diff --git a/tests/test_macos.rs b/tests/test_macos.rs index 81972fe..d288fc3 100644 --- a/tests/test_macos.rs +++ b/tests/test_macos.rs @@ -18,11 +18,11 @@ mod tests { check_browser(Browser::Safari, TEST_PLATFORM).await; } - #[tokio::test(flavor = "multi_thread", worker_threads = 2)] - #[ignore] ...
1
5
5
25787f2b97369bacff0c832b10a03193325cd3a3
Mads Marquart
2024-04-24T00:48:18
iOS: Use `objc2` Concrete benefits to `webbrowser`: - Less error prone `msg_send!` macro invocations (I've refactored the rest into a separate function as recommended by the docs). - Prevents a leak of the `options` dictionary. - Catches errors when passing an invalid URL to `NSURL`. - Makes it easier to do somethin...
diff --git a/Cargo.toml b/Cargo.toml index 84a94eb..bcdfb64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,8 +36,13 @@ jni = "0.21" ndk-context = "0.1" [target.'cfg(any(target_os = "ios", target_os = "tvos", target_os = "visionos"))'.dependencies] -raw-window-handle = "0.5.0" -objc = "0.2.7" +block2 = "0.5.0" +obj...
2
41
25
e9bfcac36deef7cc73a18b6dbc77c85d1c1bafe6
Mads Marquart
2024-04-23T12:46:54
Add support for visionOS
diff --git a/Cargo.toml b/Cargo.toml index 472148b..84a94eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ core-foundation = "0.9" jni = "0.21" ndk-context = "0.1" -[target.'cfg(target_os = "ios")'.dependencies] +[target.'cfg(any(target_os = "ios", target_os = "tvos", target_os = "visionos"))'.dependenc...
3
28
12
fec67c3f355c34567908e83048ebb65ce3a4b918
Amod Malviya
2024-04-20T15:54:11
wasm: fix lint #build-wasm
diff --git a/src/wasm.rs b/src/wasm.rs index db68921..383320f 100644 --- a/src/wasm.rs +++ b/src/wasm.rs @@ -12,7 +12,7 @@ pub(super) fn open_browser_internal( // always return true for a dry run if options.dry_run { - if let Some(_) = web_sys::window() { + if web_sys::window().is_some() { ...
1
1
1
0558cd8c1e32a09f66bb840f2dbe0420c1be8394
Amod Malviya
2024-04-20T12:34:27
ios: during testing, crash out early if build fails
diff --git a/tests/test_ios.rs b/tests/test_ios.rs index 01ac6d5..62c16cd 100644 --- a/tests/test_ios.rs +++ b/tests/test_ios.rs @@ -8,7 +8,7 @@ mod tests { use super::common::check_request_received_using; use std::fs; use std::path::PathBuf; - use std::process::{Command, Stdio}; + use std::process...
1
33
17
483e473857ff35c437529c3f72c539e62378747b
Amod Malviya
2024-04-20T06:15:54
wasm: return error for dry_run if we do not have window
diff --git a/src/wasm.rs b/src/wasm.rs index fd76ab9..db68921 100644 --- a/src/wasm.rs +++ b/src/wasm.rs @@ -12,7 +12,11 @@ pub(super) fn open_browser_internal( // always return true for a dry run if options.dry_run { - return Ok(()); + if let Some(_) = web_sys::window() { + return ...
1
6
5
0a55fdff848c0127979c3594d178535040ac3e39
Amod Malviya
2024-04-20T06:15:12
wasm: use target_family instead of target_arch to determine wasm implementation
diff --git a/src/lib.rs b/src/lib.rs index ea6bcbb..a1304f6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,7 +44,7 @@ #[cfg_attr(any(target_os = "ios", target_os = "tvos"), path = "ios.rs")] #[cfg_attr(target_os = "macos", path = "macos.rs")] #[cfg_attr(target_os = "android", path = "android.rs")] -#[cfg_attr(targe...
1
1
1
2f1f0e6deba0af59ea94a440b6be3cfc30c73fb9
Amod Malviya
2024-04-14T17:01:55
include tvos as the api is the same as ios
diff --git a/src/lib.rs b/src/lib.rs index 24ee96e..ea6bcbb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -41,7 +41,7 @@ //! * `disable-wsl` - this disables WSL `file` implementation (`http` still works) //! * `wasm-console` - this enables logging to wasm console (valid only on wasm platform) -#[cfg_attr(target_os = ...
1
1
1
3bb4dadc3a2af94046ef941a98707f79461f2eba
extrawurst
2024-04-10T12:59:07
fix ios impl crashing
diff --git a/src/ios.rs b/src/ios.rs index 70fb08c..1767b14 100644 --- a/src/ios.rs +++ b/src/ios.rs @@ -23,15 +23,20 @@ pub(super) fn open_browser_internal( "UIApplication is null, can't open url", )); } - let url_cstr = std::ffi::CString::new(url).unwrap(); + + let...
1
8
3
046794d1b091f6bbbd4c3908745e8701e6c14b28
Amod Malviya
2024-04-06T07:41:22
satisfy +beta clippy
diff --git a/src/lib.rs b/src/lib.rs index 23341d3..24ee96e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,8 +90,6 @@ compile_error!( ))] pub(crate) mod common; -use std::convert::TryFrom; -use std::default::Default; use std::fmt::Display; use std::io::{Error, ErrorKind, Result}; use std::ops::Deref; @@ -156,7 ...
2
6
5
ffaf6747c41ac944e1dfdb3c592807198b11e085
Dominik Hassler
2024-04-05T16:54:54
initial illumos support
diff --git a/Cargo.toml b/Cargo.toml index 6228b60..09f4117 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ hardened = [] disable-wsl = [] wasm-console = ["web-sys/console"] -[target.'cfg(any(target_os = "aix", target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", targe...
2
7
3
c53c4d791a00c88b4c87ce7d92f782f5d3e9438d
Amod Malviya
2024-03-05T12:13:02
unix: fix lint #build-linux
diff --git a/src/unix.rs b/src/unix.rs index 609abba..f921500 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -331,7 +331,7 @@ fn open_using_xdg_config(config_path: &PathBuf, options: &BrowserOptions, url: & // we capture important keys under the [Desktop Entry] section, as defined under: // https://specifica...
1
1
1
2007762aef784e34e99e16b4e63ac40c38188f10
Qiu Chaofan
2024-03-05T09:50:53
Initial AIX enablement
diff --git a/Cargo.toml b/Cargo.toml index 9aef592..bcb8e6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ hardened = [] disable-wsl = [] wasm-console = ["web-sys/console"] -[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", target_os = "haiku"))'.d...
2
6
2
4508bee9f480e6a7faaa50e8e2b2d1c42c24a5e3
aviac
2023-09-19T19:51:31
chore: fix error message to be less misleading
diff --git a/src/unix.rs b/src/unix.rs index 2e40674..609abba 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -82,7 +82,7 @@ fn open_browser_default(target: &TargetType, options: &BrowserOptions) -> Result .map_err(|_| { Error::new( ErrorKind::NotFound, - "No valid br...
1
1
1
bdc640e7698472a5abd91834c553f5f4f8a38420
Amod Malviya
2023-08-16T16:39:22
fix lints #build-linux
diff --git a/src/unix.rs b/src/unix.rs index 1778661..2e40674 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -200,14 +200,14 @@ fn try_wsl(options: &BrowserOptions, target: &TargetType) -> Result<()> { "cmd.exe", "/c", "start", - url.replace("^", "^^").re...
1
2
2
3da3e74aa2a4001e84899dd12544b7554e8b95b6
Amod Malviya
2023-08-16T16:29:11
handle ampersand correctly in WSL env
diff --git a/src/unix.rs b/src/unix.rs index 50162ec..1778661 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -195,9 +195,22 @@ fn try_wsl(options: &BrowserOptions, target: &TargetType) -> Result<()> { match target.0.scheme() { "http" | "https" => { let url: &str = target; - try_brow...
1
16
3
5a0b5b0c8aab7440a2071d6343169deded35908e
Utkarsh Gupta
2023-05-02T22:49:19
Move to the smaller, cargo-team maintained `home` crate
diff --git a/Cargo.toml b/Cargo.toml index e90f269..2090b0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ disable-wsl = [] wasm-console = ["web-sys/console"] [target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", target_os = "haiku"))'.dependencies] -d...
2
9
3
6cff074fad3f9a508d5601b104d51b9acb4d18cd
Aaron Hill
2023-04-25T00:15:13
Bump 'dirs' dependency to 5.0
diff --git a/Cargo.toml b/Cargo.toml index 84dc03e..e90f269 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ disable-wsl = [] wasm-console = ["web-sys/console"] [target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", target_os = "haiku"))'.dependencies] -d...
1
1
1
694a69529c100e1acbab4b240ce87387aab47235
Amod Malviya
2023-04-11T18:56:55
Provide support for flatpak. Fixes #67. #build-linux
diff --git a/src/unix.rs b/src/unix.rs index 7a5452f..9f66797 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -72,6 +72,8 @@ fn open_browser_default(target: &TargetType, options: &BrowserOptions) -> Result "wsl" => try_wsl(options, target), + "flatpak" => try_flatpak(options, target), + ...
1
29
1
ddc1de789f9b493f58e2978eedd06442bfe4b567
Amod Malviya
2023-04-11T18:13:39
fix windows build #build-windows
diff --git a/src/windows.rs b/src/windows.rs index 066a7ea..d38c077 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -1,6 +1,7 @@ use crate::common::{for_each_token, run_command}; use crate::{Browser, BrowserOptions, Error, ErrorKind, Result, TargetType}; use log::trace; +use std::path::Path; use std::process::C...
1
1
0
a96adb285343273cbe00fc617d946741932027f3
Amod Malviya
2023-04-11T18:08:47
fix scenario where windows browser command may not be quoted correctly #build-windows
diff --git a/src/windows.rs b/src/windows.rs index e698fad..066a7ea 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -67,6 +67,7 @@ pub(super) fn open_browser_internal( })? }; trace!("default browser command: {}", &cmdline); + let cmdline = ensure_cmd_quotes(...
1
27
0
416fc2df45957a57c14caf2f275c3432288a80e6
Marijn Suijten
2023-02-28T09:54:29
android: Upgrade `jni` to `0.21`
diff --git a/Cargo.toml b/Cargo.toml index b73b469..2cd24b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ dirs = "4.0" core-foundation = "0.9" [target.'cfg(target_os = "android")'.dependencies] -jni = "0.20" +jni = "0.21" ndk-context = "0.1" [target.'cfg(target_os = "ios")'.dependencies] diff --git...
2
22
24
756a609c0047fea36cc5825e4e031c7d03ad3536
Marijn Suijten
2023-03-02T10:09:49
tests/android: Use `adb reverse` to access host webserver, allow running on !macos Instead of chaining a bunch of Unix commands to pry out the IP address of a random adapter, that may not be available on every distro, use the standard `adb reverse` command to forward a specific port from the Android phone (or emulator...
diff --git a/tests/common.rs b/tests/common.rs index c3be976..ea1998a 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -44,7 +44,7 @@ async fn delayed_response(req: HttpRequest) -> impl Responder { pub async fn check_request_received_using<F>(uri: String, host: &str, op: F) where - F: FnOnce(&str), + F: ...
5
23
28
d4e98eca9fe4978aeece3b608ef3afbe92f00713
Amod Malviya
2023-01-30T05:34:28
tests: satisfy fmt and clippy for test code
diff --git a/tests/common.rs b/tests/common.rs index 4858c80..c3be976 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -1,5 +1,5 @@ use actix_files as fs; -use actix_web::{web::{self, to}, App, HttpRequest, HttpResponse, HttpServer, Responder}; +use actix_web::{web, App, HttpRequest, HttpResponse, HttpServer, Res...
1
10
4
0a8ba993dfb92306c78d08a555f569bba19037e6
Krishna Ravishankar
2023-01-30T00:33:50
Bail from `try_xdg` if browser name is empty
diff --git a/src/unix.rs b/src/unix.rs index e7c993e..7a5452f 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -236,6 +236,9 @@ fn try_xdg(options: &BrowserOptions, url: &str) -> Result<()> { .map_err(|_| Error::new(ErrorKind::NotFound, "invalid default browser name"))? .trim() .to_owned(); + ...
1
3
0
ab57993c5864ba5afa0117172b2d084eedb1282d
Amod Malviya
2023-01-25T19:26:08
tests: increase uri received check timeout to 90s given runner situation at github
diff --git a/tests/common.rs b/tests/common.rs index dbfd031..6f4f16d 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -65,10 +65,7 @@ where op(&format!("http://{}:{}{}", host, port, &uri)); // wait for the url to be hit - #[cfg(windows)] - let timeout = 60; - #[cfg(not(windows))] - let tim...
1
1
4
2f8874907a9d0b022077f3a01bc3174c6a471f24
alula
2023-01-25T18:31:05
Use correct call convention for AssocQueryStringW()
diff --git a/src/windows.rs b/src/windows.rs index 03823f0..e698fad 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -7,7 +7,7 @@ const ASSOCF_IS_PROTOCOL: u32 = 0x00001000; const ASSOCSTR_COMMAND: i32 = 1; #[link(name = "shlwapi")] -extern "C" { +extern "system" { fn AssocQueryStringW( flags: u32,...
1
1
1
ddd6772b8ac632387983e5e0c4e4a0d9108000e2
Amod Malviya
2023-01-24T04:29:16
android: uninstall previous version of test app before testing #build-android
diff --git a/tests/test_android.rs b/tests/test_android.rs index a3e25ca..10d57b7 100644 --- a/tests/test_android.rs +++ b/tests/test_android.rs @@ -45,6 +45,19 @@ mod tests { fs::write(&lib_rs, new_code).expect("failed to modify src/lib.rs"); log::debug!("modified src/lib.rs to use {}", url);...
1
13
0
bbac60ea220faa9eff6a856eb1378d9795578fbe
Jake Shadle
2023-01-23T18:07:57
Remove windows dependency
diff --git a/Cargo.toml b/Cargo.toml index 71ff1c9..35a0489 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,7 @@ url = "2" [target.'cfg(target_arch = "wasm32")'.dependencies.web-sys] version = "0.3" -features = [ - 'Window' -] +features = ['Window'] [features] hardened = [] @@ -32,9 +30,6 @@ dirs = "4.0"...
2
41
28
1044226b4e8f01e58473407ebb05a98f0367ae5c
Marijn Suijten
2023-01-16T11:18:45
Upgrade windows-rs to 0.44
diff --git a/Cargo.toml b/Cargo.toml index c3f0096..71ff1c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ dirs = "4.0" core-foundation = "0.9" [target.'cfg(windows)'.dependencies] -windows = { version = "0.43.0", features = ["Win32_UI_Shell"] } +windows = { version = "0.44.0", features = ["Win32_UI_She...
2
2
2
b91013557e8a0e9b4c846d6f4e96a3d7e4bbd90d
Amod Malviya
2022-12-30T21:02:34
Release v0.8.3
diff --git a/Cargo.toml b/Cargo.toml index 96e2ace..079c5e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "webbrowser" description = "Open URLs in web browsers available on a platform" -version = "0.8.2" +version = "0.8.3" authors = ["Amod Malviya @amodm"] documentation = "https://docs....
1
1
1
3f5eb2cb5ef380c5a9892c82f9f32cb091d7ef46
Amod Malviya
2022-12-30T19:54:08
wsl: make WSL implementation compliant with the Consistent Behaviour for files #build-linux
diff --git a/src/lib.rs b/src/lib.rs index e7e06a6..d61ce43 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -319,7 +319,6 @@ impl TargetType { #[cfg(any( feature = "hardened", target_os = "android", - target_os = "linux", target_os = "ios", target_family = "wasm" ))] @@ ...
2
356
11
30486a96ae3fab5bcd31e75c48b15440efaec9c1
Amod Malviya
2022-12-26T15:44:24
better implementation for is_http
diff --git a/src/lib.rs b/src/lib.rs index b90f442..d61ce43 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -323,10 +323,7 @@ impl TargetType { target_family = "wasm" ))] fn is_http(&self) -> bool { - match self.0.scheme() { - "http" | "https" => true, - _ => false, - ...
1
1
4
d70099060efda23e9735171c78b97eb13ab59066
Amod Malviya
2022-12-23T14:01:29
create the right url targettype for wasm #build-wasm
diff --git a/src/lib.rs b/src/lib.rs index 5c3df81..3086873 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -335,8 +335,10 @@ impl TryFrom<&str> for TargetType { type Error = Error; #[cfg(target_family = "wasm")] - fn try_from(_: &str) -> Result<Self> { - Err(Error::new(ErrorKind::InvalidInput, "inval...
1
4
2
0d426c3652410099f93aee6bdf863bd920829161
Amod Malviya
2022-12-23T13:40:01
fix wasm build (again) #build-wasm
diff --git a/src/lib.rs b/src/lib.rs index 4ab9927..5c3df81 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -71,7 +71,6 @@ use std::default::Default; use std::fmt::Display; use std::io::{Error, ErrorKind, Result}; use std::ops::Deref; -use std::path::PathBuf; use std::str::FromStr; use std::{error, fmt}; @@ -335,26 ...
1
17
16
68161a5c3ef7dc9fa3314b1f291d65c05ef46db4
Amod Malviya
2022-12-23T13:26:35
fix wasm build #build-wasm
diff --git a/src/lib.rs b/src/lib.rs index 338f09f..4ab9927 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -339,18 +339,22 @@ impl TryFrom<&str> for TargetType { match url::Url::parse(value) { Ok(u) => Ok(Self(u)), Err(_) => { - // assume it to be a path if url parsing fai...
1
15
11
a3afcbbac1eaa86dd2976853444ec5ad44b04cb8
Amod Malviya
2022-12-23T13:13:08
tests for local html file opening in browser
diff --git a/Cargo.toml b/Cargo.toml index be5b3c8..d740aaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,7 @@ actix-web = "4" actix-files = "0.6" crossbeam-channel = "0.5" env_logger = "0.9.0" +rand = "0.8" tokio = { version = "1", features = ["full"] } urlencoding = "2.1" diff --git a/src/unix.rs b/src...
6
149
8
05cec736f89235c2e8085cac4f54107f57b1cf1a
Amod Malviya
2022-12-22T14:37:40
move macos implementation to use CoreFoundation instead of open #build-macos
diff --git a/Cargo.toml b/Cargo.toml index 6fcd74d..be5b3c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,9 @@ wasm-console = ["web-sys/console"] [target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", target_os = "haiku"))'.dependencies] dirs = "4.0" +[targ...
4
224
79
7e881f823e55ef70e8cd6d9ea08c938897aac682
Amod Malviya
2022-12-21T06:13:16
refactor TargetType
diff --git a/src/android.rs b/src/android.rs index 3b68c38..f82a7c8 100644 --- a/src/android.rs +++ b/src/android.rs @@ -10,7 +10,7 @@ pub(super) fn open_browser_internal( options: &BrowserOptions, ) -> Result<()> { // ensure we're opening only http/https urls, failing otherwise - let url = crate::get_htt...
7
38
32
31203d25780935d2a49eae31ca70af444deb2e25
Amod Malviya
2022-12-20T17:08:08
change internal signature to better handle url and local paths separately
diff --git a/src/android.rs b/src/android.rs index d001502..3b68c38 100644 --- a/src/android.rs +++ b/src/android.rs @@ -1,11 +1,17 @@ -use crate::{Browser, BrowserOptions, Error, ErrorKind, Result}; +use crate::{Browser, BrowserOptions, Error, ErrorKind, Result, TargetType}; use jni::objects::JValue; use std::proces...
8
89
44
a5ccec4bd3040377130ff57d315a903976967e5a
Amod Malviya
2022-12-19T19:21:56
tests: increase wait timeout on windows as github windows runner seems a bit slow #build-windows
diff --git a/tests/common.rs b/tests/common.rs index 4c1b560..541c9f5 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -57,7 +57,11 @@ where op(&format!("http://{}:{}{}", host, port, &uri)); // wait for the url to be hit - match rx.recv_timeout(std::time::Duration::from_secs(30)) { + #[cfg(window...
1
5
1
246042a1ed2b034b4ddc0fed396d938f6d7b4b01
Amod Malviya
2022-12-19T18:54:33
test for xdg open [skip-ci]
diff --git a/src/unix.rs b/src/unix.rs index cedce14..a89138b 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -407,6 +407,108 @@ static TEXT_BROWSERS: [&str; 9] = [ ]; #[cfg(test)] -pub mod tests_xdg { - pub use super::*; +mod tests_xdg { + use super::*; + use std::fs::File; + use std::io::Write; + + f...
1
104
2
7e36777a6f684d08e3b47c9aaac164fbe2d43007
Amod Malviya
2022-12-19T17:14:05
do not do the compilers job
diff --git a/src/unix.rs b/src/unix.rs index e18184e..cedce14 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -24,7 +24,6 @@ macro_rules! try_browser { /// 2. Attempt to use xdg-open /// 3. Attempt to use window manager specific commands, like gnome-open, kde-open etc. incl. WSL /// 4. Fallback to x-www-browser -#[inl...
1
0
9
7f7eeae2e84861589536eea446046534ed5024f7
Amod Malviya
2022-12-19T16:34:02
tests: ensure wasm pkg dir #build-wasm
diff --git a/tests/common.rs b/tests/common.rs index 73a6c81..4c1b560 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -33,8 +33,10 @@ where tx: Arc::new(tx.clone()), }; let http_server = HttpServer::new(move || { + let wasm_pkg_dir = "tests/test-wasm-app/pkg"; + let _ = std::fs::c...
1
3
1
e489f3a3f6f3ae5d2806fe4d02327dcc9062edce
Amod Malviya
2022-12-11T17:16:51
fix lint for windows code
diff --git a/src/windows.rs b/src/windows.rs index ee7ca95..05a9991 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -36,13 +36,15 @@ pub fn open_browser_internal(browser: Browser, url: &str, options: &BrowserOptio ptr::null_mut(), COINIT_APARTMENTTHREADED | COINIT_DISABLE_O...
1
9
7
0313b7771be7a0a04b1cfe7e30911e2244e31f84
Amod Malviya
2022-12-11T16:58:09
force opening of browser on windows, instead of local file association
diff --git a/Cargo.toml b/Cargo.toml index a5d2132..eeff9f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ features = [ wasm-console = ["web-sys/console"] [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = ["combaseapi", "objbase", "shellapi", "winerror"] } +winapi = { version ...
2
16
11
9c2515ebc1f4f9c5f54cea89fa4b599509938241
Amod Malviya
2022-12-23T13:13:08
tests for local html file opening in browser
diff --git a/Cargo.toml b/Cargo.toml index be5b3c8..d740aaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,7 @@ actix-web = "4" actix-files = "0.6" crossbeam-channel = "0.5" env_logger = "0.9.0" +rand = "0.8" tokio = { version = "1", features = ["full"] } urlencoding = "2.1" diff --git a/src/unix.rs b/src...
6
149
8
31dddf1d4096373da4242c5336de6ee042e70d8a
Amod Malviya
2022-12-21T06:13:16
refactor TargetType
diff --git a/src/android.rs b/src/android.rs index 3b68c38..f82a7c8 100644 --- a/src/android.rs +++ b/src/android.rs @@ -10,7 +10,7 @@ pub(super) fn open_browser_internal( options: &BrowserOptions, ) -> Result<()> { // ensure we're opening only http/https urls, failing otherwise - let url = crate::get_htt...
7
38
32
9be80c37d36becdb2f0857d5c42eb6afd7b39c1e
Amod Malviya
2022-12-20T17:08:08
change internal signature to better handle url and local paths separately
diff --git a/src/android.rs b/src/android.rs index d001502..3b68c38 100644 --- a/src/android.rs +++ b/src/android.rs @@ -1,11 +1,17 @@ -use crate::{Browser, BrowserOptions, Error, ErrorKind, Result}; +use crate::{Browser, BrowserOptions, Error, ErrorKind, Result, TargetType}; use jni::objects::JValue; use std::proces...
8
89
44
d3eca2f7aa3f972e2d6a4427bd203144bc6f69ed
Amod Malviya
2022-12-19T18:54:33
test for xdg open [skip-ci]
diff --git a/src/unix.rs b/src/unix.rs index 7146861..fbf7261 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -388,6 +388,108 @@ static TEXT_BROWSERS: [&str; 9] = [ ]; #[cfg(test)] -pub mod tests_xdg { - pub use super::*; +mod tests_xdg { + use super::*; + use std::fs::File; + use std::io::Write; + + f...
1
104
2