Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: supitsdu/clipper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.0
Choose a base ref
...
head repository: supitsdu/clipper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.4.0
Choose a head ref
  • 11 commits
  • 7 files changed
  • 3 contributors

Commits on Jun 4, 2024

  1. Configuration menu
    Copy the full SHA
    efcd319 View commit details
    Browse the repository at this point in the history
  2. fix: add way to skip clipboard tests when on CI/CD workflows (#9)

    * fix: add way to skip clipboard tests when on CI/CD workflows
    
    * fix: add -test.short argument on the test target run
    supitsdu authored Jun 4, 2024
    Configuration menu
    Copy the full SHA
    749b686 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. feat: add installation script for Clipper (#10)

    This commit adds a shell script to easily install Clipper on Linux and macOS systems. The script determines the OS and architecture, downloads the appropriate binary from the GitHub releases, makes it executable, and installs it to /usr/local/bin. It also verifies the installation and provides informative logging messages throughout the process.
    
    - Supports installation on Linux (x86_64, arm64) and macOS (x86_64, arm64).
    - Uses mktemp to create a temporary directory for downloading the binary.
    - Ensures the /usr/local/bin directory is available and in the user's PATH before installation.
    - Provides clear error messages and feedback during each step of the installation process.
    supitsdu authored Jun 5, 2024
    Configuration menu
    Copy the full SHA
    ea10862 View commit details
    Browse the repository at this point in the history
  2. docs: update README to include installation via install.sh script (#11)

    - Added installation instructions using the install.sh script for easier setup.
    - Provided a direct command for users to install Clipper using curl and the install script.
    - Ensured clarity in the manual installation and usage sections.
    supitsdu authored Jun 5, 2024
    Configuration menu
    Copy the full SHA
    1e98832 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. docs: Update README.md (#12)

    - Fix some grammar mistakes
    - Rewrite the Features section
    - Update Installation section adding wget and a warning note
    supitsdu authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    b2009fb View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2024

  1. feat: add support for copying multiple files to clipboard (#13)

    - Updated main.go to allow specifying multiple file paths
    - Concatenated content from multiple files before copying to clipboard
    - Updated usage message to reflect new functionality
    supitsdu authored Jun 23, 2024
    Configuration menu
    Copy the full SHA
    9ce81fa View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. refactor: reduce complexity when parsing content (#15)

    Extracted Content Parsing Logic: The parseContent function handles the logic of determining the content string based on the directText flag and file arguments.
    
    Simplified Main Function: The main function is now more concise, focusing on flag parsing, calling parseContent, and handling the result.
    
    Error Handling: The error handling is streamlined, with errors being returned from parseContent and handled in the main function.
    karimalzalek authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    2cec189 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. refactor: improved readability in parsetContent() (#16)

    - Handle each case in parseContent separately for clarity.
    - Integrate the updated parseContent into the main.go.
    - Ensure consistent error handling and function documentation.
    supitsdu authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    0b0c13e View commit details
    Browse the repository at this point in the history
  2. test: add unit tests for content parsing and input reading (#17)

    - Add tests for `copyToClipboard` function to verify clipboard operations.
    - Add tests for `readFromStdin` function to ensure proper stdin reading.
    - Add tests for `readFromFile` function to verify file reading functionality.
    - Add tests for `parseContent` function to check parsing of direct text input, stdin, and file inputs.
    
    These tests enhance the robustness of the application by ensuring all core functionalities are working as expected.
    supitsdu authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    0beb06d View commit details
    Browse the repository at this point in the history
  3. feat: smarter installation script for Clipper (#18)

    - Add check for necessary tools (`curl`, `sudo`) before proceeding.
    - Implement version check to fetch the latest release version from GitHub.
    - Include comparison of installed and latest version to determine if an upgrade is needed.
    - Add user prompts for confirmation to proceed with installation or upgrade.
    - Implement uninstallation functionality.
    - Add command line options: `-y` for auto-confirmation, `-h` for help message, `-r` for uninstallation, `-v` for version check.
    - Ensure /usr/local/bin is in PATH before installing.
    - Enhance error handling and provide consistent and informative error messages.
    - Implement cleanup of temporary files after script execution.
    supitsdu authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    4330ab2 View commit details
    Browse the repository at this point in the history
  4. test: enhance parseContent tests with large file handling and more (#19)

    * test(main_test.go): enhance unit tests with additional comments for better documentation
    
    - Added detailed comments to each unit test function in main_test.go to explain the purpose and steps of the tests.
    - Improved documentation to make it easier for future developers to understand the intent and functionality of the tests.
    - TestParseContent_MultipleFiles: Verifies parseContent correctly concatenates contents of multiple files.
    - TestParseContent_EmptyFiles: Verifies parseContent handles empty files gracefully.
    - TestParseContent_EmptyInput: Ensures parseContent handles empty input gracefully.
    - TestParseContent_InvalidFilePath: Checks how parseContent behaves with an invalid file path.
    - TestParseContent_LargeFile: Verifies parseContent handles large files correctly.
    - TestParseContent_DirectText: Verifies parseContent handles direct text input correctly.
    - TestParseContent_Stdin: Verifies parseContent handles stdin input correctly.
    - TestParseContent_File: Verifies parseContent handles file input correctly.
    - Added utility functions createTempFile and replaceStdin with detailed comments.
    
    Refactor tests to use t.TempDir() for automatic cleanup of temporary files.
    
    * test(deps): add xyproto/randomstring package
    
    Helps handling tests where the creation of random or large data is
    neeeded.
    
    * test(main_test): mark replaceStdin as a test helper
    
    This marks replaceStdin as a helper, so when it fails, the error message will indicate the line in the test function that called it, rather than inside the helper itself. This makes debugging easier.
    
    Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
    
    * test(main_test): mark createTempFile as a test helper
    
    This also marks createTempFile as a helper, so when it fails, the error message will indicate the line in the test function that called it, rather than inside the helper itself. This makes debugging easier.
    
    Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
    
    * test(main_test.go): explicitly declare directText
    
    Make it clearer what is the use of the nil when testing parseContent
    
    ---------
    
    Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
    supitsdu and ccoVeille authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    e4a433a View commit details
    Browse the repository at this point in the history
Loading