Skip to content

Commit cd4219a

Browse files
author
Jimmy McCarthy
committed
Update the README for the new release; failsafe in case people try to use a bool in the project settings
1 parent adfa225 commit cd4219a

File tree

2 files changed

+40
-14
lines changed

2 files changed

+40
-14
lines changed

README.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ SummitEditor also offers a [SummitLinter](https://github.com/corvisa/SummitLinte
2929

3030
###Application Structure
3131
When you clone your application, the application directory should be as follows:
32-
\<application\>/
33-
├── assets
34-
├── spec
35-
└── src
32+
```
33+
<application>
34+
├── assets/
35+
├── spec/
36+
├── src/
37+
└── REPOCONF
38+
39+
```
3640
The simulator will run the `main.lua` file inside the application's `src` directory.
3741

3842
##Running The Simulator
@@ -44,21 +48,43 @@ Now that you have a project created, we need to add some simulator settings to i
4448
```json
4549
"build_path": "/folder/that/contains/your/application/source"
4650
```
47-
build_path should point to the `src` directory's parent directory and *not* the `src` directory itself. You can also optionally add the application id, which can be useful for simulation involving data in datastores:
51+
build_path should point to the `src` directory's parent directory and *not* the `src` directory itself. There are also a few other optional parameters, which will allow you to connect to your live datastore from the simulator. You need to include all of the following:
52+
```json
53+
"application_id": "12345678-1234-5678-1234-567812345678",
54+
"api_key": "bl53y1g3l5AS",
55+
"api_secret": "bkas34n23=2",
56+
"use_live_datastore": "true"
57+
```
58+
You can generate an API Key and Secret in your Summit Account under `Access -> API Keys`. Your Application ID is available in the Applications grid. Hover over a column header and click the arrow that appears. You will see a menu with additional columns, including "Application ID". Alternatively, your Application ID is available as the UUID at the end of your git remote.
59+
60+
Your final Project settings file should look something like this (if your app was in `/home/myuser/code/DemoApp/`:
4861
```json
49-
"application_id": "12345678-1234-5678-1234-567812345678"
62+
{
63+
"folders":
64+
[
65+
{
66+
"follow_symlinks": true,
67+
"path": "/home/myuser/code/DemoApp"
68+
}
69+
],
70+
"build_path": "/home/myuser/code/DemoApp",
71+
"application_id": "12345678-1234-5678-1234-567812345678",
72+
"api_key": "bl53y1g3l5AS",
73+
"api_secret": "bkas34n23=2",
74+
"use_live_datastore": "true"
75+
}
5076
```
77+
5178
With these settings configured, you can start the simulation in one of two ways. First you must have the syntax settings of your file set to `Lua (Summit)` or you can manually select your build script from `Tools -> Build System`. If you need to do a simple simulation (one that does not require any special flags), you can now simply press `ctrl+b` on Windows or Linux machines and `cmd-b` on Mac computers. This should cause a terminal window to open on your screen allowing you to interact with your simulated application.
5279

5380
If your application requires additional flags to be set before being run you can start your build with `ctrl+shift+b` on Windows and Linux or `cmd+shift+b` on Mac computers. This will open an options panel on the bottom of the screen. This options panel accepts arguments prefixed with dashes and separated by spaces, ex - `--DNIS 5558675309 --ANI 5554441212`. A complete list of options is as follows:
5481

55-
| Option | Detail |
56-
| ---------:| ----------------- |
57-
| DNIS | Sets the DNIS or "number dialed", useful for testing number based routing. |
58-
| ANI | Sets the ANI or "number app called from", useful for doing things like looking up existing customers by phone number |
59-
| appid | Attempt to set the running application's ID. This will give your datastores the proper context but all requests to this flag hit SSH key authentication. If an invalid appid is specified, the simulator will raise an error. This flag is passed automatically via project setting `application_id` |
60-
| debug | In the case of an error being raised inside of your application, drop into an interactive shell for further debugging. |
61-
82+
| Option | Detail | Example |
83+
| ---------:| :---------------- | :--------------------- |
84+
| DNIS | Sets the DNIS or "number dialed", useful for testing number based routing. | `--DNIS 15558675309` |
85+
| ANI | Sets the ANI or "number app called from", useful for doing things like looking up existing customers by phone number. | `--ANI 15551234567` |
86+
| test | Runs your unit tests instead of opening the simulator. | `--test` |
87+
| verbose | Should only be used in conjunction with `test`; This will output the full coverage report for your application (line by line), allowing you to see where you are missing test coverage. | `--test --verbose` |
6288

6389
##License
6490
The MIT License (MIT)

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def build(self, opts=[]):
7171
try:
7272
val = self.window.project_data()[key]
7373
opts.append('--%s' % key)
74-
opts.append(val)
74+
opts.append(str(val).lower())
7575
except KeyError:
7676
pass
7777

0 commit comments

Comments
 (0)