diff --git a/CHANGELOG.md b/CHANGELOG.md index a95318d8..4105e50d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. +## 0.19.0 - 2023-03-08 +### Changed +- Deprecate gem. + ## 0.18.6 - 2022-04-23 ### Changed - Fix version issue with release diff --git a/MIT-LICENSE b/MIT-LICENSE new file mode 100644 index 00000000..9d4045b1 --- /dev/null +++ b/MIT-LICENSE @@ -0,0 +1,7 @@ +Copyright 2015-2022 Disco Labs + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 0ed4e8bf..9c1bcaad 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +> :warning: _After a long, fruitful career, Disco Labs has deprecated the use of this gem internally. Over time, much of the functionality developed in DiscoApp has been replicated or merged into the [official ShopifyApp gem](https://github.com/Shopify/shopify_app), which has also better kept up to date with substantial changes in the way Shopify Apps are built such as session token authentication._ +> +> _Third party developers who have been relying on this gem are welcome to fork and use it as needed, and if there's a pressing need, pull requests and new releases can be actioned, but no active development will take place in this repository._ + # DiscoApp Rails Engine A Rails Engine encapsulating common functionality for Disco's Shopify applications. @@ -52,7 +56,7 @@ curl -H "Authorization: token $GITHUB_PERSONAL_ACCESS_TOKEN" \ | bash -s example_app ``` -Be sure to change `example_app` to the desired name of your actual application. +Be sure to change `example_app` to the desired name of your actual application. Also, if you are stuck at any point in the initialise process, hit ctrl-c and do `spring stop` in the folder and run `bundle exec rails generate disco_app:install --force` to continue the process. By default, the `initialise.sh` script uses the latest version of Ruby, Rails, Node and the DiscoApp framework. If for any reason you need to specify which @@ -96,24 +100,9 @@ for example `https://example-app.ngrok.io`) and for `SHOPIFY_APP_NAME` (the name of the application). #### Creating and configuring your app -With the above set up, you can now run the following from the command line to -create a new app: - -``` -rails generate:partner_app -``` - -The `.env.local` will be automatically populated with values for -`SHOPIFY_APP_API_KEY` and `SHOPIFY_APP_SECRET`. - -While the `.env.local` file is open, add in values for`SHOPIFY_APP_PROXY_PREFIX` -and `SHOPIFY_APP_SCOPE` (view a [list of scopes][]). - -The `SHOPIFY_CHARGES_REAL`, `SECRET_KEY_BASE` and `REDIS_PROVIDER` values can be -left blank in development. - -When you're done, your `.env.local` file should look something like this: +With the above set up, should head to [Create an app](https://partners.shopify.com/124804/apps/new) to create your app. +As you are creating your app, please take note of the details and fill the following in the `.env.local` file: ``` DEFAULT_HOST=https://example.ngrok.io @@ -121,7 +110,11 @@ SHOPIFY_APP_NAME=Example App SHOPIFY_APP_API_KEY=ebef81bcfe2174ff2c6e65f5c0a0ba50 SHOPIFY_APP_SECRET=d5e1347de6352cb778413654e1296dde SHOPIFY_APP_REDIRECT_URI=https://example.ngrok.io/auth/shopify/callback -SHOPIFY_APP_SCOPE=read_products,write_script_tags +``` + +The `.env.local` file would also require the following: +``` +SHOPIFY_APP_SCOPE=read_products,read_orders,write_orders,write_script_tags SHOPIFY_APP_PROXY_PREFIX=/a/example SHOPIFY_CHARGES_REAL= @@ -130,13 +123,12 @@ SECRET_KEY_BASE= REDIS_PROVIDER= ``` +If you need help filling in the scope, here is a [list of scope](https://shopify.dev/api/admin/access-scopes) Notice that `.env.local` should not be added to Git, and is therefore added to `.gitignore`. On the other side, `.env` is added to Git and should keep all the environment variables that are kept equal across the different environments. -[list of scopes]: https://docs.shopify.com/api/authentication/oauth#scopes - Finally, you'll want to add a subscription. Subscriptions are covered in more detail in the [Plans, Subscriptions, and Charges](#plans-subscriptions-and-charges) section. For now, we just want our stores to subscribe to a free plan. To do this, we need to add something like the following snippet to the `db/seeds.rb` file. ``` @@ -341,7 +333,6 @@ There's a number of useful Rake tasks that are baked into the app. They are: the database has been imported or migrated. - `rake shops:sync`: Synchronises shop data across all installed shops. - `rake users:sync`: Synchronises user data across all installed shops. -- `rake generate:partner_app`: Generates an app on the Disco Partner Dashboard ### Background Tasks The `DiscoApp::ShopJob` class inherits from `ActiveJob::Base`, and can be used @@ -1146,3 +1137,7 @@ To create a new release of the application: 3. Ensure the `UPGRADING` file contains all necessary instructions for upgrading an application to the latest version of the gem; 4. Update `initialise.sh` to point to the latest version number of the gem. 3. Once the git flow release steps have been completed, ensure you have the latest version of the `master` branch and push to Gemfury. See [uploading packages to Gemfury](https://gemfury.com/help/upload-packages) for instructions on this step if you haven't done it before. + + +## License +DiscoApp is released under the [MIT License](./MIT-LICENSE). diff --git a/UPGRADING.md b/UPGRADING.md index f2d8e536..1e4cc22a 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -3,6 +3,10 @@ This file contains more detailed instructions on what's required when updating an application between one release version of the gem to the next. It's intended as more in-depth accompaniment to the notes in `CHANGELOG.md` for each version. + +## Upgrading from 0.18.6 to 0.19.0 +No changes required. + ## Upgrading from 0.18.4 to 0.18.6 No changes required. diff --git a/VERSION b/VERSION index a1b6a99c..1cf0537c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.18.6 +0.19.0 diff --git a/disco_app.gemspec b/disco_app.gemspec index eb449058..fe38c26f 100644 --- a/disco_app.gemspec +++ b/disco_app.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.homepage = 'https://github.com/discolabs/disco_app/' s.summary = 'Rails engine for Shopify applications.' s.description = 'Rails engine for Shopify applications.' - s.license = 'None' + s.license = 'MIT' # To build up the list of files, we need to deviate from the standard .gemspec approach to ensure that # a number of "dotfiles"/"dotfolders" that we use as templates files are included in our gem package. diff --git a/initialise.sh b/initialise.sh index 4d3d7af8..83f68f40 100755 --- a/initialise.sh +++ b/initialise.sh @@ -24,7 +24,7 @@ fi APP_NAME="$1" RAILS_VERSION="${RAILS_VERSION:-6.0.2}" NODE_VERSION="${NODE_VERSION:-13.7.0}" -DISCO_APP_VERSION="${DISCO_APP_VERSION:-0.18.6}" +DISCO_APP_VERSION="${DISCO_APP_VERSION:-0.19.0}" if [ -z $APP_NAME ]; then echo '' diff --git a/lib/disco_app/version.rb b/lib/disco_app/version.rb index 564b625c..e240fa04 100644 --- a/lib/disco_app/version.rb +++ b/lib/disco_app/version.rb @@ -1,5 +1,5 @@ module DiscoApp - VERSION = '0.18.6'.freeze + VERSION = '0.19.0'.freeze end