Skip to content

Commit be92a9d

Browse files
committed
Adjust composer to use specific versions as a stable working example (
Aside from a bug xmlsquad/gsheet-to-xml#32).
1 parent de6a732 commit be92a9d

File tree

4 files changed

+91
-58
lines changed

4 files changed

+91
-58
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,38 @@ To update to the latest versions of the tools.
163163
* First ensure all changes to client files are committed and pushed to the repository
164164
* In the command terminal, navigate to the root of the client working directory and run `composer update`
165165
166+
## Known bugs
167+
168+
We use OAuth authentication for the `bin/console inventory:gsheet-to-xml` command to access a Google Sheet.
169+
170+
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.
171+
172+
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.
173+
174+
### Example
175+
176+
Assuming you have a Google OAuth Key and `XmlAuthoringProjectSettings.yaml` defines the OAuth Key (`gApiOAuthSecretFile`) location and the name of the token file (`gApiAccessTokenFile`).
177+
178+
Ensure you have navigated to the project folder:
179+
```
180+
$ pwd
181+
/Users/x/Documents/Projects/XmlAuthoringSuite/xml-authoring-project
182+
```
183+
184+
Run `ping-drive`:
185+
```
186+
$ bin/console ping-drive https://drive.google.com/drive/folders/<someFolderID>
187+
You need to authenticate to your Google account to proceed
188+
Open the following URL in a browser, get an auth code and paste it below:
189+
190+
<UrlToGetTheAuthCode>
191+
192+
Auth code: <AuthCode>
193+
194+
```
195+
196+
Now you can run the `inventory:gsheet-to-xml` using the token.
197+
166198
## Development Notes
167199
168200
### Composer validation notice is OK

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
}],
3737

3838
"require": {
39-
"xmlsquad/xml-authoring-tools": "dev-master",
40-
"xmlsquad/xmlauthor-example-command": "@dev",
41-
"xmlsquad/ping-drive": "@dev",
42-
"xmlsquad/gsheet-to-xml": "@dev",
43-
"xmlsquad/capture-lookups": "@dev",
44-
"xmlsquad/xml-authoring-library": "@dev"
39+
"xmlsquad/xml-authoring-tools": "0.3.3",
40+
"xmlsquad/xmlauthor-example-command": "0.3.3",
41+
"xmlsquad/ping-drive": "0.3.3",
42+
"xmlsquad/gsheet-to-xml": "0.3.3",
43+
"xmlsquad/capture-lookups": "0.3.3",
44+
"xmlsquad/xml-authoring-library": "0.3.3"
4545
},
4646
"config": {
4747
"bin-dir": "bin"

composer.lock

Lines changed: 45 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

delete-me-tokenfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"access_token": "ya29.Gls3Bs_yh0Vg7Yui_9FfwNS8tPQ9QKbwMHe6HX5OTl70RsLvQsDy-hFnZMh7Uv7d4Svl7A_AK1pEqY9_OGZNm2HWLZZ72kLHOCa15AEx1KrKF3ICjyEqP7YSnSP6",
3+
"expires_in": 3600,
4+
"refresh_token": "1\/QYYiwekm1-e8NSlOPuFWGvTT7tZor7_Nx5myPecpy0E",
5+
"scope": "https:\/\/www.googleapis.com\/auth\/spreadsheets.readonly https:\/\/www.googleapis.com\/auth\/drive.readonly",
6+
"token_type": "Bearer",
7+
"created": 1539593006
8+
}

0 commit comments

Comments
 (0)