Skip to content

Commit

Permalink
Merge branch 'release/0.19.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinballard committed Mar 8, 2023
2 parents ac23e56 + ab8b033 commit c62a8c1
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 26 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 7 additions & 0 deletions MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -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.
39 changes: 17 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -96,32 +100,21 @@ 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
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=
Expand All @@ -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.

```
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
4 changes: 4 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.18.6
0.19.0
2 changes: 1 addition & 1 deletion disco_app.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion initialise.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down
2 changes: 1 addition & 1 deletion lib/disco_app/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module DiscoApp

VERSION = '0.18.6'.freeze
VERSION = '0.19.0'.freeze

end

0 comments on commit c62a8c1

Please sign in to comment.