MCPcopy Index your code

hub / github.com/MordechaiHadad/bob / functions

Functions104 in github.com/MordechaiHadad/bob

↓ 16 callersFunctionget_downloads_directory
Asynchronously returns the 'downloads' directory path based on the application configuration. This function takes a reference to a `Config` as an arg
src/helpers/directories.rs:151
↓ 12 callersMethodfile_name
(&self, name: &str)
src/cli.rs:210
↓ 9 callersFunctionparse_version_type
Parses the version type from a version string. This function takes a version string and determines the type of the version. It supports the following
src/helpers/version/mod.rs:49
↓ 7 callersFunctionis_version_used
Checks if a specific version is currently being used. This function retrieves the current version from the configuration and checks if it matches the
src/helpers/version/mod.rs:259
↓ 6 callersFunctionhandle_subprocess
Handles the execution of a subprocess. This function takes a mutable reference to a `Command` struct, which represents the subprocess to be executed.
src/helpers/processes.rs:43
↓ 5 callersFunctiondeserialize_response
Deserializes a JSON response from the GitHub API. This function takes a JSON response as a string and attempts to deserialize it into a specified typ
src/github_requests.rs:320
↓ 5 callersMethodget
Does what it says on the tin, get's the config file # Returns `ConfigFile` - A struct containing the path to the config file, the format of the confi
src/config.rs:47
↓ 5 callersFunctionget_installation_directory
Asynchronously returns the installation directory path based on the application configuration. This function takes a reference to a `Config` as an ar
src/helpers/directories.rs:195
↓ 4 callersFunctionget_rc_files_from_shell
( shell: &what_the_path::shell::Shell, )
src/handlers/use_handler.rs:519
↓ 4 callersFunctionhash_binary
Computes the SHA-256 checksum of the file at `path`. # Arguments `path` - A reference to a `&Path` representing the file whose checksum will be compu
src/helpers/checksum.rs:45
↓ 4 callersFunctionis_version_installed
Checks if a specific version of Neovim is installed. This function reads the downloads directory and checks if there is a directory with the name mat
src/helpers/version/mod.rs:192
↓ 4 callersFunctionmake_github_request
Asynchronously makes a GitHub API request. This function takes a reference to a `Client` and a URL as arguments. It sets the "user-agent" header to "
src/github_requests.rs:169
↓ 4 callersMethodset_position
(&self, position: u64)
src/handlers/install_handler.rs:456
↓ 3 callersFunctioncopy_env_files_if_not_exist
( config: &Config, installation_dir: &str, )
src/handlers/use_handler.rs:603
↓ 3 callersFunctiondownload_version
Asynchronously downloads a specified version of Neovim. This function sends a request to download the specified version of Neovim based on the versio
src/handlers/install_handler.rs:346
↓ 3 callersFunctionget_platform_name
Returns the platform-specific name for the Neovim version. This function takes an `Option<Version>` as an argument, which represents the version of N
src/helpers/mod.rs:31
↓ 3 callersFunctionhandle_building_from_source
(version: &ParsedVersion, config: &Config)
src/handlers/install_handler.rs:514
↓ 3 callersFunctionproduce_nightly_vec
Produces a vector of `LocalNightly` structs from the downloads directory. This function reads the downloads directory and creates a `LocalNightly` st
src/helpers/version/nightly.rs:75
↓ 2 callersFunctionget_current_version
Retrieves the current version of Neovim being used. This function reads the "used" file from the downloads directory, which contains the current vers
src/helpers/version/mod.rs:231
↓ 2 callersFunctionget_home_dir
Returns the home directory path for the current user. This function checks the target operating system using the `cfg!` macro and constructs the home
src/helpers/directories.rs:25
↓ 2 callersFunctionget_upstream_stable
Asynchronously searches for the stable version of Neovim. This function takes a reference to a `Client` as an argument and makes a GitHub API request
src/github_requests.rs:243
↓ 2 callersFunctionget_version_sync_file_location
Retrieves the location of the version sync file. This function checks the `version_sync_file_location` field of the provided configuration. If the fi
src/helpers/version/mod.rs:148
↓ 2 callersFunctionmodify_path
(installation_dir: &str)
src/handlers/use_handler.rs:412
↓ 2 callersFunctionprint_commits
Asynchronously prints the commits between two versions of Neovim. This function fetches the commits between the published dates of the local and upst
src/handlers/install_handler.rs:291
↓ 2 callersFunctionremove_base_parent
(path: &Path)
src/helpers/unarchive.rs:313
↓ 2 callersFunctionremove_dir
Asynchronously removes a directory and all its contents. This function takes a string reference as an argument, which represents the directory to be
src/helpers/filesystem.rs:31
↓ 2 callersMethodsave_to_file
(&self)
src/config.rs:19
↓ 2 callersFunctionswitch
Switches to a specified version. This function changes the current directory to the downloads directory, writes the version to a file named "used", a
src/handlers/use_handler.rs:124
↓ 1 callersFunctionadd_to_path
Adds the installation directory to the system's PATH. This function checks if the installation directory is already in the PATH. If not, it adds the
src/handlers/use_handler.rs:345
↓ 1 callersFunctioncompare_binaries
Checks whether the SHA-256 checksum of `origin` matches the checksum of `proxy`. # Arguments `origin` - A reference to a `&Path` for the original bin
src/helpers/checksum.rs:66
↓ 1 callersFunctioncopy_dir_async
( from: impl AsRef<Path> + 'static, to: impl AsRef<Path> + 'static, )
src/helpers/filesystem.rs:92
↓ 1 callersFunctioncopy_file_with_error_handling
(old_path: &Path, new_path: &Path)
src/handlers/use_handler.rs:279
↓ 1 callersFunctioncopy_nvim_proxy
(config: &ConfigFile)
src/handlers/use_handler.rs:200
↓ 1 callersFunctioncreate_if_not_exist
(file_path: P, env_path: &str)
src/handlers/use_handler.rs:531
↓ 1 callersFunctioncreate_reqwest_client
Creates a new `reqwest::Client` with default headers. This function fetches the `GITHUB_TOKEN` environment variable and uses it to set the `Authoriza
src/cli.rs:44
↓ 1 callersMethoddefault
()
src/config.rs:161
↓ 1 callersFunctionexpand
(downloaded_file: &LocalVersion)
src/helpers/unarchive.rs:101
↓ 1 callersFunctionfile_type_ext
(version: &ParsedVersion, get_sha256sum: bool)
src/handlers/install_handler.rs:461
↓ 1 callersMethodfinish
(&self, root: P, file_type: S)
src/handlers/install_handler.rs:442
↓ 1 callersFunctionget_commits_for_nightly
Fetches the commits for the nightly version from the GitHub API. This function sends a GET request to the GitHub API to fetch the commits for the nig
src/github_requests.rs:283
↓ 1 callersFunctionget_config_file
Returns the local data directory path for the current user. This function first gets the home directory path by calling the `get_home_dir` function.
src/helpers/directories.rs:104
↓ 1 callersFunctionget_latest_commit
Fetches the latest commit from the Neovim repository on GitHub. This function sends a GET request to the GitHub API to fetch the latest commit from t
src/helpers/version/mod.rs:292
↓ 1 callersFunctionget_local_data_dir
Returns the local data directory path for the current user. This function first gets the home directory path by calling the `get_home_dir` function.
src/helpers/directories.rs:76
↓ 1 callersFunctionget_local_nightly
Retrieves the local nightly version. This function reads the `bob.json` file in the `nightly` directory of the downloads directory and parses it into
src/helpers/version/nightly.rs:34
↓ 1 callersFunctionget_upstream_nightly
Fetches the upstream nightly version from the GitHub API. # Parameters `Client` - A reference to a `reqwest::Client` used to make the request. # Re
src/github_requests.rs:208
↓ 1 callersFunctionhandle_envars
Handles environment variables in the configuration. This function takes a mutable reference to a `Config` object. It uses a `Regex` to match environm
src/config.rs:245
↓ 1 callersFunctionhandle_nvim_process
Handles the execution of the Neovim process. This function takes a reference to a `Config` struct and a slice of `String` arguments. It retrieves the
src/helpers/processes.rs:89
↓ 1 callersFunctionhandle_rollback
Asynchronously handles the rollback for the nightly version(s) of Neovim. This function checks if the nightly version is used and if the rollback lim
src/handlers/install_handler.rs:225
↓ 1 callersFunctionhas_rollbacks
Checks if there are any rollbacks available. This function produces a vector of nightly versions and checks if it is empty. # Arguments `config` -
src/handlers/list_handler.rs:128
↓ 1 callersFunctionhumanize_duration
Converts a `Duration` into a human-readable string. This function takes a `Duration` and converts it into a string that represents the duration in we
src/handlers/rollback_handler.rs:120
↓ 1 callersFunctioninit_tracing
Installs the global tracing subscriber with a reload-capable filter layer. The subscriber starts at **INFO** level. Call [`setup_tracing`] later to h
src/cli.rs:253
↓ 1 callersFunctionis_neovim_running
()
src/helpers/processes.rs:151
↓ 1 callersFunctionis_version
Checks if a given string is a valid version. This function checks if the given string is "stable", contains "nightly", or matches the version or hash
src/handlers/list_handler.rs:153
↓ 1 callersMethodneeds_running_check
Utility method to determine if the current command needs a running neovim check. Only used at the start of the program.
src/cli.rs:157
↓ 1 callersMethodprocess
`process` method for `Option<String>`. This is a method for structs that implement the `EnvVarProcessor` trait. It's deigned to process the `Option<S
src/config.rs:197
↓ 1 callersFunctionrun
()
src/main.rs:29
↓ 1 callersFunctionsend_request
Sends a GET request to the specified URL to download a specific version of Neovim. # Arguments `client: &Client` - A reference to the `Client` used
src/handlers/install_handler.rs:701
↓ 1 callersFunctionsetup_tracing
Reconfigures the global tracing filter based on CLI verbosity and `RUST_LOG`. Precedence: 1. If `verbose > 0`: 1 → DEBUG, 2+ → TRACE. 2. Else if `RUS
src/cli.rs:280
↓ 1 callersFunctionsha256cmp
Checks whether the checksum of the file at path 'a' matches the checksum saved in the file at path 'b'. # Arguments `a` - A reference to a `&Path` ob
src/helpers/checksum.rs:17
↓ 1 callersFunctionstart
Starts the CLI application. This function takes a `Config` object as input and returns a `Result`. It creates a Reqwest client, parses the CLI argume
src/cli.rs:324
↓ 1 callersMethodtry_generate
( &self, cmd: &clap::Command, buf: &mut dyn std::io::Write, )
src/cli.rs:226
↓ 1 callersFunctionuninstall_selections
Uninstalls selected versions. This function reads the versions from the downloads directory, presents a list of installed versions to the user, allow
src/handlers/uninstall_handler.rs:100
Functioncompare_binaries_different
()
src/helpers/checksum.rs:102
Functioncopy_env_files_test
()
src/handlers/use_handler.rs:650
Methodderef
(&self)
src/handlers/use_handler.rs:568
Functionfish_get_rc_files_test
()
src/handlers/use_handler.rs:666
Methodfrom
(paths: (F, S))
src/handlers/use_handler.rs:591
Methodgenerate
(&self, cmd: &clap::Command, buf: &mut dyn std::io::Write)
src/cli.rs:221
Functionget_platform_name_higher
()
src/helpers/mod.rs:86
Functionget_platform_name_lower
()
src/helpers/mod.rs:74
Functionget_platform_name_none
()
src/helpers/mod.rs:59
Functionhash_binary_and_compare_binaries_same
()
src/helpers/checksum.rs:83
Functionis_hash
(version: &str)
src/helpers/version/mod.rs:310
Functionmain
()
src/main.rs:19
Methodnew
(total_size: u64, tag_name: &'a S, get_sha256sum: bool)
src/handlers/install_handler.rs:429
Functionsh_get_rc_files_test
()
src/handlers/use_handler.rs:697
Functionsh_get_rc_with_env_test
()
src/handlers/use_handler.rs:717
Functionsha256cmp_with_checksum_file
()
src/helpers/checksum.rs:114
Functionstart
Starts the process of expanding a downloaded file. This function is asynchronous and uses `tokio::task::spawn_blocking` to run the `expand` function
src/helpers/unarchive.rs:45
Functionstart
Starts the process of using a specified version. This function checks if the specified version is already used, copies the Neovim proxy to the instal
src/handlers/use_handler.rs:48
Functionstart
Starts the update process based on the provided `Update` data, `Client`, and `Config`. # Arguments `data: Update` - Contains the version information
src/handlers/update_handler.rs:52
Functionstart
Starts the synchronization process. This function reads the version from a sync file and starts the use handler with the read version. # Arguments
src/handlers/sync_handler.rs:38
Functionstart
(config: Config)
src/handlers/erase_handler.rs:46
Functionstart
Starts the rollback process. This function presents a list of available versions to the user, allows them to select a version to rollback to, and the
src/handlers/rollback_handler.rs:32
Functionstart
( version: &ParsedVersion, client: &Client, config: &ConfigFile, )
src/handlers/install_handler.rs:66
Functionstart
Starts the uninstall process. This function creates a new HTTP client, determines the version to uninstall, checks if the version is currently in use
src/handlers/uninstall_handler.rs:43
Functionstart
Starts the list handler. This function reads the downloads directory and lists all the installed versions in a formatted table. It also checks if a v
src/handlers/list_handler.rs:30
Functionstart
Starts the process of running a specific version of Neovim with the provided arguments. This function parses the specified version, checks if it's in
src/handlers/run_handler.rs:23
Functionstart
Asynchronously starts the process of listing remote versions of Neovim. This function takes a `Config` and a `Client` as arguments. It first gets the
src/handlers/list_remote_handler.rs:46
Functiontest_as_stable
()
src/handlers/list_handler.rs:203
Functiontest_is_hash
()
src/helpers/version/mod.rs:315
Functiontest_is_hash_with_empty_string
()
src/helpers/version/mod.rs:351
Functiontest_is_hash_with_invalid_hash
()
src/helpers/version/mod.rs:345
Functiontest_is_hash_with_long_hash
()
src/helpers/version/mod.rs:369
Functiontest_is_hash_with_non_hexadecimal_characters
()
src/helpers/version/mod.rs:357
Functiontest_is_hash_with_short_hash
()
src/helpers/version/mod.rs:363
Functiontest_is_hash_with_valid_hash
()
src/helpers/version/mod.rs:339
Functiontest_is_version
()
src/handlers/list_handler.rs:171
Functiontest_with_empty_string
()
src/handlers/list_handler.rs:245
Functiontest_with_invalid_version
()
src/handlers/list_handler.rs:223
next →1–100 of 104, ranked by callers