{ "id": "134978", "key": "ALOY-1115", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "16692", "name": "Alloy 1.7.0", "archived": false, "released": true, "releaseDate": "2015-07-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-22T04:53:26.000+0000", "created": "2014-08-19T21:18:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "41418", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "136938", "key": "TIDOC-1886", "fields": { "summary": "Document new --testapp Alloy CLI option", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "48026", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "148590", "key": "CLI-687", "fields": { "summary": "appc new should handle the Alloy --testapp option", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "40051", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "134977", "key": "TIDOC-1849", "fields": { "summary": "Better expose Alloy github sample/test apps in documentation ", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "43008", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "130637", "key": "ALOY-1024", "fields": { "summary": "Make existing and new Alloy samples & demos more prominent and available", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } } ], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2015-06-08T21:39:26.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12600", "name": "Samples & Templates" }, { "id": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "In a recent email thread, [~skypanther] had an idea to add an {{alloy}} CLI to create a new Alloy project from a given sample, e.g. {{alloy create_sample basics/simple}}. Moar:\r\n\r\nbq. ...The samples are actually installed to the developer’s computer...as is a shell/template app. Such a command could merge the two, putting the resulting files in the developer’s workspace directory. \r\n \r\nThere is also a [doc ticket|TIDOC-1849] to better expose the samples, but this type of tool enhancement would be nice, too.\r\n", "attachment": [], "flagged": false, "summary": "CLI command to create a project from an Alloy test case ", "creator": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 217, "state": "closed", "name": "2014 Sprint 19 Alloy", "startDate": "2014-09-15T12:45:43.956Z", "endDate": "2014-09-29T12:45:00.000Z", "completeDate": "2014-09-29T13:30:39.342Z", "originBoardId": 124 }, { "id": 206, "state": "closed", "name": "2014 Sprint 18 Alloy", "startDate": "2014-09-02T13:23:09.065Z", "endDate": "2014-09-16T13:23:00.000Z", "completeDate": "2014-09-15T12:25:31.379Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "324025", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR https://github.com/appcelerator/alloy/pull/565\r\n\r\nFunctional test:\r\n\r\n1. Create a new Titanium Classic project {{ti create --name foo}}\r\n2. Change to the project's directory {{cd foo}}\r\n3. \"Alloy-ize\" the project, specifying the test app to import by adding the {{--testapp}} parameter followed by the directory and name of the test app to import. E.g. {{alloy new . --testapp ui/tableview}}\r\n4. Build the project for fun & profit {{ti build -p ios}}\r\n\r\nWhen testing, be sure to test on OS X and Windows (should work on Linux too). Make sure to do test builds for iOS, Android, and MobileWeb. On Windows, you should use the \\ slash {{alloy new . --testapp ui\\tableview}} though in theory the / should work too.\r\n\r\nNotes: \r\n\r\n* None of the samples that require files outside of the app folder will work without additional steps. For example, you would need to create an i18n folder for the advanced/localization app. Or, you would need to install the native modules used by the advanced/native_modules app.\r\n* The \"testing\" apps (those used internally by Alloy developers) are not installed with the rest of Alloy. So, you cannot create a test app based on any of them.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-16T19:22:29.000+0000", "updated": "2014-09-19T15:18:15.000+0000" }, { "id": "324574", "author": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is awesome, Tim. My comments:\r\n\r\n* The workaround for this is [already documented|http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Samples-section-37535160_AlloySamples-TestCaseExamples], but if the test app contains a specs folder you usually get runtime errors. Maybe the tool could alert the user to this if the target sample has a specs folder...maybe mention the same workaround? Might be asking too much, I realize.\r\n\r\n* This is purely a personal preference (so take with grain of salt) but I'd prefer a command line option to the {{testapp:}} prefix, e.g. {{alloy new --testapp ui/tableview}}. But I'm fine with the current approach.", "updateAuthor": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-18T19:55:45.000+0000", "updated": "2014-09-18T19:55:45.000+0000" }, { "id": "324580", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Thanks for the feedback. I should be able to filter out copying the specs folder so that it wouldn't be a problem for users. I initially tried with a {{--testapp}} arg but it wasn't working and the prefix was easier for a proof of concept. But I'll see about reworking it to use the argument.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-18T20:34:31.000+0000", "updated": "2014-09-18T20:34:31.000+0000" }, { "id": "324717", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR updated to implement {{--testapp}} arg rather than prefix method originally used. Also copying excludes the specs folder. Added a test to the {{jake test:spec\\[new.js\\]}} test script.\r\n\r\nFunctional test -- see my comment above.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-19T15:19:14.000+0000", "updated": "2014-09-19T15:26:49.000+0000" }, { "id": "324725", "author": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Perhaps this is expected, but filtering out the specs/ folder doesn't fix the runtime errors, since apps require in the specs/index.js file, e.g.\r\n\r\n{code}\r\nif (!ENV_PROD) {\r\n\trequire('specs/index')($);\r\n}\r\n{code}\r\n\r\nAgain, we can/do document this issue for users, but I wasn't sure if the expectation was that the filtering would fix the runtime error, which it doesn't.", "updateAuthor": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T16:17:37.000+0000", "updated": "2014-09-19T16:17:37.000+0000" }, { "id": "324733", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Ah, good catch. It was not my expectation that this change would catch runtime errors. There are a couple of other ways to handle this besides documenting the issue:\r\n\r\n* I could add an output message after you create an app with --testapp that reminds developers to remove the require() statement\r\n* Or, I could modify the scripts to also copy the testrunner harness files so that the specs would actually run\r\n\r\nThoughts?", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-19T16:30:32.000+0000", "updated": "2014-09-19T16:30:32.000+0000" }, { "id": "324739", "author": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I vote for copying the harness files, so it works out of the box.", "updateAuthor": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T16:45:33.000+0000", "updated": "2014-09-19T16:45:33.000+0000" }, { "id": "324758", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "I updated the PR to copy both the specs and the necessary testing framework files. This new PR also excludes the _generated folder from the set of files copied. Functional test is the same as above, though if you test with the advanced/form_factor you can test that the specs work -- after using {{alloy new}} build and run the app. It should run without errors and the app's unit tests should run.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-19T17:44:47.000+0000", "updated": "2014-09-19T17:44:47.000+0000" }, { "id": "324863", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR merged.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-09-22T04:53:26.000+0000", "updated": "2014-09-22T04:53:26.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }