This project was intended to be a UI to generate Ruby code to paste into the Shopify Script Editor application, no extra coding needed.
- CI is set up on CircleCI
- CI will run Rspec tests to test ruby code within the ruby_scripts directory
- CI will check to ensure that no changes were made to the
ruby_scriptsthat have not been transferred to the respective.jsfiles.
Clone this project and install all the project dependencies.
yarn install
Run the local webpack development server.
yarn start
Open http://localhost:8080 in your browser and you should see the application running.
-
All scripts are cotained in the
ruby_scriptsdirectory and orgained by type of script (or common if they are applicable to all types of scripts) -
Tests for scripts are contained within the
specdirectory, then (similar to the script itself) another directory based on the type of script -
If you make changes to any scripts within the
ruby_scriptsdirectory, you will need to ensure these changes are added to thesrc/scripts.jsfile as well. The command for this is:yarn build:scripts
-
Ruby is tested using Rspec
-
Factorybot is used for building the required objects for tests
-
The
modelsdirectory contains classes to simulate the environment that scripts are executed in. -
Tests can be run with
yarn test:ruby
- There are currently no tests written for this 🙁
- Update the version in
src/versions.jsandpackage.jsonprior to deploying - Ensure any significant changes to the
components/ChangeLogContent.jsfile (you can convert markdown to html). - Deployment scripts are preconfigured in
package.jsonto run with one easy command:This generates ayarn deploydocsdirectory containingindex.htmlandbundle.js. The index loads all Polaris styles via the Polaris CDN and the application scripts viabundle.js - Finally, add a release on GitHub for the new version with the same changes that were listed in the
ChangeLogContent.jsfile.