Skip to content

Commit

Permalink
Adjust composer to use specific versions as a stable working example (
Browse files Browse the repository at this point in the history
Aside from a bug xmlsquad/gsheet-to-xml#32).
  • Loading branch information
john-arcus committed Oct 17, 2018
1 parent de6a732 commit be92a9d
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 58 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,38 @@ To update to the latest versions of the tools.
* First ensure all changes to client files are committed and pushed to the repository
* In the command terminal, navigate to the root of the client working directory and run `composer update`
## Known bugs
We use OAuth authentication for the `bin/console inventory:gsheet-to-xml` command to access a Google Sheet.
However, when you first run the command, it asks for an Auth code, but does not give any advice on how to get your Auth code.
The workaround is to run a different command, ping-drive, to 'get logged in' and save your authentication token. Once, done, gsheet-to-xml will use that same token to access the Google Sheet.
### Example
Assuming you have a Google OAuth Key and `XmlAuthoringProjectSettings.yaml` defines the OAuth Key (`gApiOAuthSecretFile`) location and the name of the token file (`gApiAccessTokenFile`).
Ensure you have navigated to the project folder:
```
$ pwd
/Users/x/Documents/Projects/XmlAuthoringSuite/xml-authoring-project
```
Run `ping-drive`:
```
$ bin/console ping-drive https://drive.google.com/drive/folders/<someFolderID>
You need to authenticate to your Google account to proceed
Open the following URL in a browser, get an auth code and paste it below:
<UrlToGetTheAuthCode>
Auth code: <AuthCode>
```
Now you can run the `inventory:gsheet-to-xml` using the token.
## Development Notes
### Composer validation notice is OK
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
}],

"require": {
"xmlsquad/xml-authoring-tools": "dev-master",
"xmlsquad/xmlauthor-example-command": "@dev",
"xmlsquad/ping-drive": "@dev",
"xmlsquad/gsheet-to-xml": "@dev",
"xmlsquad/capture-lookups": "@dev",
"xmlsquad/xml-authoring-library": "@dev"
"xmlsquad/xml-authoring-tools": "0.3.3",
"xmlsquad/xmlauthor-example-command": "0.3.3",
"xmlsquad/ping-drive": "0.3.3",
"xmlsquad/gsheet-to-xml": "0.3.3",
"xmlsquad/capture-lookups": "0.3.3",
"xmlsquad/xml-authoring-library": "0.3.3"
},
"config": {
"bin-dir": "bin"
Expand Down
97 changes: 45 additions & 52 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions delete-me-tokenfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"access_token": "ya29.Gls3Bs_yh0Vg7Yui_9FfwNS8tPQ9QKbwMHe6HX5OTl70RsLvQsDy-hFnZMh7Uv7d4Svl7A_AK1pEqY9_OGZNm2HWLZZ72kLHOCa15AEx1KrKF3ICjyEqP7YSnSP6",
"expires_in": 3600,
"refresh_token": "1\/QYYiwekm1-e8NSlOPuFWGvTT7tZor7_Nx5myPecpy0E",
"scope": "https:\/\/www.googleapis.com\/auth\/spreadsheets.readonly https:\/\/www.googleapis.com\/auth\/drive.readonly",
"token_type": "Bearer",
"created": 1539593006
}

0 comments on commit be92a9d

Please sign in to comment.