Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:softlayer/sl-ember-model into fi…
Browse files Browse the repository at this point in the history
…x-generator-test
  • Loading branch information
Matthew Marcum committed Dec 8, 2014
2 parents 43abfb8 + 75df2e8 commit dd0cd8f
Show file tree
Hide file tree
Showing 13 changed files with 241 additions and 82 deletions.
1 change: 1 addition & 0 deletions Brocfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* jshint node: true */
/* global require, module */

var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'),
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# sl-ember-store Changelog

### 0.2.0

* [#45](https://github.com/softlayer/sl-ember-store/pull/45) [DOCUMENTATION] Update installation instructions
* [INTERNAL] Modify package.json properties
* [#53](https://github.com/softlayer/sl-ember-store/pull/53) [BREAKING ENHANCEMENT] Upgrade to Ember CLI 0.1.4

[View complete changeset](https://github.com/softlayer/sl-ember-store/compare/v0.1.0...v0.2.0)

### 0.1.0

* Initial release
11 changes: 1 addition & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,6 @@ functionality or fixing a bug, we need a test!

6. Push to your fork and submit a pull request againt the `develop` branch (due to our use of the [git-flow branching model](https://github.com/nvie/gitflow)). Please provide us with some explanation of why you made the changes you made. For new features make sure to explain a standard use case to us.

7. Update the Changelog. Please prefix your change with one of the following tags inside brackets: BUGFIX,
FEATURE/ENHANCEMENT, INTERNAL. If a change requires a user to change their configuration, `bower.json`, `package.json`,
or `Brocfile.js` also add a BREAKING tag within the brackets before any other tags (example [BREAKING BUGFIX]).

- FEATURE and ENHANCEMENT tags are for things that users are interested in. Avoid super technical talk. Craft a
concise description of the change.
- BUGFIX tag is a link to a bug + a link to a patch.
- INTERNAL tag is an internal log of changes.

We try to be quick about responding to tickets but sometimes we get a bit backlogged. If the response is slow, try to
find someone on IRC(#softlayer) to give the ticket a review.

Expand Down Expand Up @@ -117,7 +108,7 @@ new documentation:
8. Don't include blank lines after `@param` definitions.


#### Code Words ####
#### Style Conventions ####

* `thisPropertyName`
* `Global.Class.attribute`
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Ember CLI version: **0.1.3**
Ember CLI version: **0.1.4**

NPM package name: **sl-ember-store**

Expand All @@ -22,15 +22,21 @@ What this library **DOES** do is allow you to work with models that do not have

---

# Working Demo
# Demo

## Installation
## Live

[http://softlayer.github.io/sl-ember-store/dist](http://softlayer.github.io/sl-ember-store/dist)

## Development Environment

### Installation

* `git clone` this repository
* `npm install`
* `bower install`

## Running
### Running

* `ember server`
* View the demo at http://localhost:4200
Expand Down
51 changes: 51 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Repository Release Instructions

This document captures the steps a project maintainer should follow when releasing a new version of this Addon.

* Merge all desired pull requests into `develop` branch
* Merge `develop` branch into `master` branch
* If change is due to upgrading Ember CLI version
* Update Ember CLI version text in README.md file
* Update CHANGELOG.md
* Prefix the entries with one of the following tags inside brackets:
* BUGFIX
* A link to a bug and a link to a patch.
* FEATURE or ENHANCEMENT
* Are for things that users are interested in. Avoid super technical talk. Craft a concise description of the change.
* INTERNAL
* An internal log of changes.
* If a change requires a user to change their configuration, *bower.json*, *package.json*, or *Brocfile.js* also add a BREAKING tag within the brackets before any other tags (example [BREAKING BUGFIX])
* Following the pattern of the existing entries for guidance
* Add appropriately linked "View complete changeset" link at bottom of entries
* After changes have been committed:
* `npm version x.x.x`, where *x.x.x* is the Semantic Version of the changeset
* `git push origin master`
* `git push origin --tags`
* `npm publish --registry http://registry.npmjs.org/`
* Note: `--registry` flag is workaround for occasional issues with default SSL url
* Merge `master` branch into `develop`

If any of these conditions are true:

* There have been modifications to the *tests/dummy/app* demo application
* There have been changes to the *bower.json*, *package.json*, or *Brocfile.js* files
* Ember CLI has been upgraded

Then follow these steps:

* Run `ember build`
* Copy the following files from */dist* folder outside of the working directory so they can be retained between switching branches:
* */dist/index.html*
* */dist/assets/dummy.css*
* */dist/assets/dummy.js*
* */dist/assets/vendor.css*
* */dist/assets/vendor.js*
* Switch to the `gh-pages` branch
* Replace the same files listed above with their copies
* Within the */dist/index.html* file, replace the following href values:
* `assets/vendor.css` with `sl-ember-store/dist/assets/vendor.css`
* `assets/dummy.css` with `sl-ember-store/dist/assets/dummy.css`
* `assets/vendor.js` with `sl-ember-store/dist/assets/vendor.js`
* `assets/dummy.js` with `sl-ember-store/dist/assets/dummy.js`
* Also within the */dist/index.html* file, in the `<meta name="dummy/config/environment"...` tag, replace the `locationType` value from `auto` to `hash`
* Commit and push the changes
12 changes: 0 additions & 12 deletions UPGRADE-NOTES.md

This file was deleted.

15 changes: 8 additions & 7 deletions package.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "sl-ember-store",
"version": "0.1.0",
"version": "0.2.0",
"description": "Ember CLI Addon - Data Model",
"homepage": "http://softlayer.github.io/sl-ember-store",
"scripts": {
"start": "ember server",
"build": "ember build",
Expand All @@ -20,20 +21,20 @@
"sl-ember-modelize": "~1.0.0"
},
"devDependencies": {
"body-parser": "~1.9.3",
"broccoli-asset-rev": "^1.0.0",
"broccoli-ember-hbs-template-compiler": "^1.6.1",
"ember-cli": "0.1.3",
"broccoli-static-compiler": "~0.2.1",
"connect-restreamer": "~1.0.1",
"ember-cli": "0.1.4",
"ember-cli-dependency-checker": "0.0.6",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.1.2",
"ember-cli-pretender": "^0.3.1",
"ember-cli-qunit": "0.1.2",
"ember-export-application-global": "^1.0.0",
"express": "^4.8.5",
"glob": "^4.0.5",
"broccoli-static-compiler": "~0.2.1",
"body-parser": "~1.9.3",
"connect-restreamer": "~1.0.1"
"glob": "^4.0.5"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down
16 changes: 13 additions & 3 deletions tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,29 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Dummy</title>
<meta name="description" content="">
<title>sl-ember-store</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="{{content-for 'keywords'}}">
<meta name="description" content="{{content-for 'description'}}">
<meta name="author" content="SoftLayer, an IBM Company">

{{content-for 'head'}}

<link rel="icon" href="../images/favicon.png" type="image/png">
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/dummy.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css">

{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}

<script src="assets/vendor.js"></script>
<script src="assets/dummy.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>

{{content-for 'body-footer'}}
</body>
</html>
</html>
50 changes: 48 additions & 2 deletions tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
<h1 id='title'>Welcome to {{#link-to "index"}}sl-ember-store{{/link-to}}!</h1>
<br>
<div class="container">

{{outlet}}
<div class="row">
<div class="col-md-12">
<div class="btn-group pull-right">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-reorder"></i> <span class="caret"></span>
</button>

<ul class="dropdown-menu" role="menu">
<li><a href="/sl-ember-store"><i class="fa fa-home"></i> Home</a></li>
<li><a href="https://github.com/softlayer/sl-ember-store/blob/master/README.md"><i class="fa fa-wrench"></i> Get Started</a></li>
<li><a href="https://github.com/softlayer/sl-ember-store/blob/master/CONTRIBUTING.md"><i class="fa fa-cog"></i> Contribution Guide</a></li>
<li><a href="https://github.com/softlayer/sl-ember-store/stargazers"><i class="fa fa-star"></i> Star Our Repo</a></li>
<li><a href="https://github.com/softlayer/sl-ember-store/fork"><i class="fa fa-code-fork"></i> Fork Our Repo</a></li>
</ul>
</div>
</div>
</div>

<div class="row">
<div class="col-md-12 text-center">
<h1>{{#link-to "index"}}Demo Application{{/link-to}}</h1>
<p class="lead">View the source code of the dummy application for syntax employed in this demo</p>
</div>
</div>

<div class="row">
<div class="col-md-12 text-center">
{{#link-to "singleModel" 1}}Single model example{{/link-to}}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{{#link-to "arrayOfModels"}}Array of models example{{/link-to}}
</div>
</div>

{{outlet}}

<br><br>
<div class="row">
<div class="col-md-12 text-center">
<p>npm install sl-ember-store</p>
<p><a href="https://github.com/softlayer/sl-ember-store/blob/master/LICENSE.md">MIT Licensed</a></p>
</div>
</div>
</div>

</body>
</html>
83 changes: 63 additions & 20 deletions tests/dummy/app/templates/array-of-models.hbs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,20 +1,63 @@
<h2>Array of Models</h2>
<p>These records are loaded in our route's model hook with the following code:</p>
<code>this.store.find('foo');</code>
<p>These records are loaded by the store via the ajax adapter. The `/foo`
resource contains foo records with embedded `bar` records. These records are automatically
created as an instance of the `Bar` model.</p>

{{#each model in controller}}
<h3>Foo Model</h3>
<ul>
<li>ID: {{#link-to 'singleModel' model.id }}{{model.id}}{{/link-to}}</li>
<li>Text: {{model.text}}</li>
<ul>
<h3>Bar Model</h3>
<li>ID: {{model.bar.id}}</li>
<li>Text: {{model.bar.text}}</li>
</ul>
</ul>

{{/each}}
<div class="row">
<div class="col-md-12">

<h2>Array of Models</h2>

<p>These records are loaded in our route's model hook with the following code:</p>

<code>this.store.find('foo');</code>

<br><br>
<p>These records are loaded by the store via the ajax adapter. The "/foo" resource contains foo records with embedded "bar" records. These records are automatically created as an instance of the "Bar" model.</p>

<br>
{{#each model in controller}}
<h4>Foo Model</h4>

<ul>
<li>ID: {{#link-to 'singleModel' model.id }}{{model.id}}{{/link-to}}</li>
<li>Text: {{model.text}}</li>
<ul>
<h4>Bar Model</h4>
<li>ID: {{model.bar.id}}</li>
<li>Text: {{model.bar.text}}</li>
</ul>
</ul>
{{/each}}


<br>
<p>The original JSON for this resource:</p>

<pre>
{
id: 1,
text: 'This is foo record with id: 1',
bar: {
id: 1,
text: 'This is a bar record with id: 1'
}
},
{
id: 2,
text: 'This is foo record #2',
bar: {
id: 2,
text: 'This is a bar record with id: 2'
}

},
{
id: 3,
text: 'This is foo record #3',
bar: {
id: 3,
text: 'This is a bar record with id: 3'
}

}
</pre>


</div>
</div>
5 changes: 0 additions & 5 deletions tests/dummy/app/templates/index.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
<p>sl-ember-store is a Simple, Low level, Model layer for <a href="http://emberjs.com">Ember.js</a>. </p>
<p>It's easy to install via <a href="http://ember-cli.com">ember-cli</a>.</p>

<p>Example of a single model {{#link-to "singleModel" 1}}route{{/link-to}}</p>
<p>Example of an array of models {{#link-to "arrayOfModels"}}route{{/link-to}}</p>
Loading

0 comments on commit dd0cd8f

Please sign in to comment.