You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Visual Studio Code, with the following extensions:
13
+
- Test Adapter Converter
14
+
- Test Explorer UI
15
+
- Pester Tests
16
+
17
+
Development is presently done on Windows 11, though conceptually it should work on Linux
18
+
19
+
### Codespace
20
+
21
+
As an alternative to local development environments, a GitHub Codespace can be used to build and test. Codespace usage has an [associated cost](https://docs.github.com/en/billing/concepts/product-billing/github-codespaces). The free option should be sufficient for most developers.
22
+
23
+
Codespaces are Linux based and require the above tools to be installed.
24
+
25
+
TODO: DevContainer configuration with tools installed is pending.
26
+
27
+
### Google Application
28
+
29
+
The environment uses a Google Application with the following setup. The published module has credentials defined, but if you may want to create an application for local testing purposes.
30
+
31
+
While this is not a fully documented walk-through on how to create a Google Application in the [Developer Console](https://console.cloud.google.com), the application has the following details.
32
+
33
+
- Branding:
34
+
- An app name + support email
35
+
- Audience: Testing
36
+
- Clients:
37
+
- Web Application
38
+
- Authorized redirect URIs:
39
+
-<http://localhost/oauth2callback>
40
+
-<https://localhost:8040/oauth2callback>
41
+
- Data Access: uses the following scopes:
42
+
43
+
-<https://www.googleapis.com/auth/blogger>: manage blogger account and posts
44
+
-<https://www.googleapis.com/auth.drive.file>: upload and manage files into Google Drive that are scoped to the application.
45
+
46
+
For local testing, you'll need the Client ID and Client Secret
47
+
48
+
## Running Locally
49
+
50
+
Within Visual Studio Code, you should be able to run the tests with no additional configuration.
51
+
52
+
To test the module manually, you will need to provide your client-id and client-secret as environment variables.
$buffer= [System.Text.Encoding]::UTF8.GetBytes("<html><body>Good Job! Successfully authorized PSBlogger. You can close this browser window now.</body></html>")
30
-
$response=$HttpContext.Response
31
-
$response.ContentLength64=$buffer.Length
32
-
$output=$response.OutputStream;
33
-
$output.Write($buffer,0,$buffer.Length)
34
-
$output.Close() |Write-Verbose
35
-
}
52
+
# Send "Thanks!"
53
+
$buffer= [System.Text.Encoding]::UTF8.GetBytes("<html><body>Good Job! Successfully authorized PSBlogger. You can close this browser window now.</body></html>")
54
+
$response=$HttpContext.Response
55
+
$response.ContentLength64=$buffer.Length
56
+
$output=$response.OutputStream;
57
+
$output.Write($buffer,0,$buffer.Length)
58
+
$output.Close() |Write-Verbose
59
+
}
60
+
}
36
61
}
37
-
38
62
Write-Verbose"Stopping HttpListener."
39
63
$HttpListener.Stop()
40
64
Write-Verbose"Stopped HttpListener."
41
65
}
42
66
catch {
43
67
# TODO: Catch Permission denied error and warn about running from an elevated prompt
0 commit comments