Skip to content

Commit

Permalink
Merging in new addon version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Daniel committed Aug 4, 2015
2 parents 35d7f89 + 04f7e77 commit 5c32bef
Show file tree
Hide file tree
Showing 77 changed files with 2,131 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"directory": "bower_components",
"analytics": false
}
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

[*.js]
indent_style = space
indent_size = 4

[*.hbs]
insert_final_newline = false
indent_style = space
indent_size = 4

[*.css]
indent_style = space
indent_size = 4

[*.html]
indent_style = space
indent_size = 4

[*.{diff,md}]
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
}
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp

# dependencies
/node_modules
/bower_components

# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log
51 changes: 51 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"disallowFunctionDeclarations": true,
"disallowEmptyBlocks": true,
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
"disallowKeywordsOnNewLine": ["else", "catch", "while", "until"],
"disallowKeywords": ["const", "let", "super", "with", "yield"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowOperatorBeforeLineBreak": ["+", "."],
"disallowPaddingNewlinesInBlocks": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowSpacesInsideParentheses": true,
"disallowYodaConditions": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"esnext": true,
"requireBlocksOnNewline": true,
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
"requireCommaBeforeLineBreak": true,
"requireDotNotation": true,
"requireLineBreakAfterVariableAssignment": true,
"requireMultipleVarDecl": "onevar",
"requireOperatorBeforeLineBreak": true,
"requirePaddingNewLinesInObjects": true,
"requireParenthesesAroundIIFE": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": true,
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInFunction": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpaceBeforeKeywords": ["else", "while", "until", "catch"],
"requireSpaceBeforeObjectValues": true,
"requireSpaceBetweenArguments": true,
"validateIndentation": 4,
"validateQuoteMarks": {
"mark": "\"",
"escape": true
}
}
61 changes: 61 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"bitwise": true,
"curly": true,
"eqeqeq": true,
"es3": false,
"es5": false,
"forin": true,
"freeze": true,
"funcscope": true,
"futurehostile": true,
"globals": {
"$": false,
"visit": false,
"click": false,
"andThen": false,
"currentURL": false,
"test": false,
"find": false,
"fillIn": false,
"module": false
},
"globalstrict": false,
"iterator": false,
"latedef": true,
"maxcomplexity": 8,
"maxdepth": 6,
"maxerr": 5,
"maxparams": 5,
"maxstatements": 100,
"noarg": true,
"nocomma": true,
"nonbsp": true,
"nonew": true,
"notypeof": false,
"plusplus": false,
"shadow": false,
"singleGroups": true,
"undef": true,

"asi": false,
"boss": false,
"debug": false,
"elision": false,
"eqnull": false,
"esnext": true,
"evil": false,
"expr": false,
"lastsemic": false,
"loopfunc": false,
"moz": false,
"noyield": false,
"phantom": [],
"proto": false,
"scripturl": false,
"supernew": false,
"validthis": false,
"withstmt": false,
"browser": true,
"jquery": true,
"unused": "params"
}
14 changes: 14 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
bower_components/
tests/
tmp/
dist/

.bowerrc
.editorconfig
.ember-cli
.travis.yml
.npmignore
**/.gitkeep
bower.json
Brocfile.js
testem.json
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
language: node_js
node_js:
- "0.12"

sudo: false

cache:
directories:
- node_modules

env:
- EMBER_TRY_SCENARIO=default
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary

matrix:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"

install:
- npm install -g bower
- npm install
- bower install

script:
- ember try $EMBER_TRY_SCENARIO test
3 changes: 3 additions & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp"]
}
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2015

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[![Build Status](https://travis-ci.org/ValidUSA/ember-couch.svg?branch=2.0.0-alpha)](https://travis-ci.org/ValidUSA/ember-couch)[![License](https://img.shields.io/badge/license-MIT-blue.svg)](MIT-LICENSE)

# Ember Couch

An `ember-data` kit for Apache CouchDB. A collection of adapters to work with CouchDB documents, attachments, revisions, and the changes feed. Based off of [ember-couchdb-kit by Aleksey Zatvobor](https://github.com/Zatvobor/ember-couchdb-kit).

## Version
Version 0.0.1 of this addon is tested to work with Ember 1.13.6 and Ember Data 1.13.7.

## Installation and Setup
ember install ember-couch

In your adapters and serializers you must import then extend the adapter and serializer you wish to use from ember-couch. There are 3 adapters you can extend and 3 serializers you can extend. They are:
### Adapters
* DocumentAdapter
* AttachmentAdapter
* RevAdapter (experimental)

### Serializers
* DocumentSerializer
* AttachmentSerializer
* RevSerializer (experimental)

Example adapter:
```js
import { DocumentAdapter } from 'ember-couch';

export default DocumentAdapter.extend({
host: 'localhost:5984',
db: 'boards'
});
```
Example serializer:
```js
import { DocumentSerializer } from 'ember-couch';

export default DocumentSerializer.extend();
```

If you would like to work with the changes feed, just add this statement to the top of your route:
```js
import { ChangesFeed } from "ember-couch";
```

## Features
Some notable features:
* natural `findRecord/createRecord/deleteRecord` functions;
* document's attachments designed as `hasMany` relationship;
* document's revisions designed as `belongsTo` and `hasMany` relationships;
* ability to work with `/_changes` feeds;

For other features have a look at our example app located in
`tests/dummy/app`

#### Contribution

See [CONTRIBUTING.md](CONTRIBUTING.md)


#### License

`ember-couch` source code is released under MIT-License. Check [LICENSE.md](LICENSE.md) for more details.
Empty file added addon/.gitkeep
Empty file.
Loading

0 comments on commit 5c32bef

Please sign in to comment.