-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix gem to support latest solidus version #116
Open
JustShah
wants to merge
13
commits into
solidusio-contrib:master
Choose a base branch
from
TriodecSolutions:fix-gem-to-support-latest-solidus-version
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix gem to support latest solidus version #116
JustShah
wants to merge
13
commits into
solidusio-contrib:master
from
TriodecSolutions:fix-gem-to-support-latest-solidus-version
+4,507
−1,253
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
620d57a
to
e42e9e2
Compare
The extension will work with latest solidus version and would be conditionally using the solidus_frontend based on the branch. Older versions of Rails, and thus older versions of Solidus, are incompatible with the `sqlite3` gem 1.x. This makes sure we use the right version for each Rails version.
After this change [solidusio/solidus@16fcb10](solidusio/solidus@16fcb10) The command `bundle exec rake` started failing with the following error: ``` An error occurred in a `before(:suite)` hook. Failure/Error: //= link_directory ../javascripts .js Sprockets::ArgumentError: link_directory argument must be a directory ``` - Ensure that the correct directory is specified in the manifest file to avoid the `Sprockets::ArgumentError`.
Enhances the security and maintainability of the SolidusEasypost API key handling and configuration. By removing the hardcoded API key assignment from the initializer, we significantly improve security. The API key management is now centralized within the Configuration class, which streamlines the process and makes it easier to maintain. Moreover, this change also fixes issue with the api_key for EasyPost mentioned in [Issues solidusio-contrib#108](solidusio-contrib#108). Additionally, this change allows for runtime updates to the API key without the need to modify the initializer, providing greater flexibility. To ensure consistency across tests, the SolidusEasypost configuration is now set up uniformly and uses factories effectively from the core gems, which helps maintain reliable and predictable test outcomes.
Updated the integration with EasyPost API to use the SolidusEasypost client for all Tracker API calls. Additionally, adjusted tests to reflect the new EasyPost Tracker API structure and ensure proper functionality.
Use SolidusEasypost Client for Shipment and Rate API calls. Adjusted test cases for shipment and shipping_rates to reflect new structure and restore EasyPost::Shipment and Easypost::Rate API functionality. Additionally, stub_easypost_shipment and stub_easypost_rate from api_stubs helper holds no relevance due to updates in the API structure. So the file is removed.
Use SolidusEasypost Client to purchase a Shipment in order to populate the tracking_code and postage_label attributes for a specific shipment. The static postage_label_url in the test is adjusted to match the s3 url for the uploaded postage_label png file. The uploaded easypost_postage_label_url includes the datestamp on which the file is uploaded and filename. This adjusted test ensures the dynamic behaviour of easypost_postage_label_url generation.
Use SolidusEasypost Client for EasyPost::Address create API.
e42e9e2
to
434b13c
Compare
Use SolidusEasypost Client for EasyPost::Parcel APIs. The test for parcel_dimension is adjusted to reflect new changes. Additionally total_weight of the Parcel is computed dynamically in the test.
This change adds newly introduced shipping method 'USPS GroundAdvantage'. EasyPost ShippingRate with 'USPS First' and 'USPS ParcelSelect' services are no longer being added with the newest version of EasyPost. Additionally, estimated rates for 'USPS Express' and 'USPS Priority' have increased to 28.0 and 7.12 respectively.
Updated the .rubocop_todo.yml file to reflect the latest RuboCop version and adjusted exclusions for various cops. Added files with lint changes.
The VCR cassettes are being updated on running the test cases irrespective of the files being modified. The changes in cassettes are relate to the RubyClient version, api_key, and timestamp in the API request
434b13c
to
e6f2d36
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview:
This PR addresses various updates and fixes to ensure compatibility with the latest Solidus version and to improve the overall functionality and stability of the project.
These updates were necessary to ensure compatibility with Solidus 4, improve testing infrastructure, and fix known issues related to easypost API, assets, CI/CD, and the gem's interaction with Rails and Solidus.