Skip to content

Commit

Permalink
cleanup and initial ember-utils commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tchak committed Sep 17, 2013
1 parent efddc3a commit 4205869
Show file tree
Hide file tree
Showing 73 changed files with 140 additions and 37,801 deletions.
3 changes: 1 addition & 2 deletions .gitignore
@@ -1,4 +1,3 @@
dist
tests/source
tmp
tests/ember-addons-tests.js
node_modules/
25 changes: 16 additions & 9 deletions .jshintrc
@@ -1,20 +1,24 @@
{
"predef": [
"QUnit",
"define",
"console",
"Ember",
"DS",
"Handlebars",
"Metamorph",
"ember_assert",
"ember_warn",
"ember_deprecate",
"ember_deprecateFunc",
"RSVP",
"require",
"requireModule",
"equal",
"notEqual",
"notStrictEqual",
"test",
"asyncTest",
"testBoth",
"testWithDefault",
"raises",
"throws",
"deepEqual",
"start",
"stop",
Expand All @@ -23,13 +27,15 @@
"module",
"expect",
"minispade",
"URI",
"History"
"expectAssertion",

// A safe subset of "browser:true":
"window", "location", "document", "XMLSerializer",
"setTimeout", "clearTimeout", "setInterval", "clearInterval"
],

"node" : false,
"es5" : true,
"browser" : true,
"browser" : false,

"boss" : true,
"curly": false,
Expand All @@ -51,5 +57,6 @@
"undef": true,
"sub": true,
"strict": false,
"white": false
"white": false,
"eqnull": true
}
121 changes: 0 additions & 121 deletions Assetfile

This file was deleted.

13 changes: 0 additions & 13 deletions Gemfile

This file was deleted.

68 changes: 0 additions & 68 deletions Gemfile.lock

This file was deleted.

27 changes: 27 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,27 @@
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

clean: {
build: ['tmp', 'dist']
},

concat: {
options: {
process: function(src) {
return "(function() {\n" + src + "\n})();\n";
}
},
lib: {
src: ['packages/ember-utils/lib/*.js'],
dest: 'dist/ember-utils.js'
}
}
});

grunt.registerTask('default', "Build & test your module.", ['build', 'test']);
grunt.registerTask('build', ['clean', 'concat']);
grunt.registerTask('test');
};
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (C) 2011 by Capitainetrain
Copyright (C) 2011-2013 by Capitainetrain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
69 changes: 12 additions & 57 deletions README.md
@@ -1,62 +1,17 @@
## Ember Addons

A collection of addons for Ember.js framework. Some of them are just snippets of useful code.

### Ember Data Amplify

Simple wrapper for amplify.js `request`.

### Ember DateTime

A class representation of a date and time. It's basically a wrapper around
the Date javascript object, KVO-friendly and with common date/time
manipulation methods.

This object differs from the standard JS Date object, however, in that it
supports time zones other than UTC and that local to the machine on which
it is running. Any time zone can be specified when creating an
`Ember.DateTime` object, e.g.

```javascript
// Creates a DateTime representing 5am in Washington, DC and 10am in
// London
var d = Ember.DateTime.create({ hour: 5, timezone: 300 }); // -5 hours from UTC
var e = Ember.DateTime.create({ hour: 10, timezone: 0 }); // same time, specified in UTC
```

and it is true that `d.isEqual(e)`.

The time zone specified upon creation is permanent, and any calls to
`get()` on that instance will return values expressed in that time zone. So,

d.hour returns 5.
e.hour returns 10.

but

d.milliseconds === e.milliseconds

is true, since they are technically the same position in time.

### Ember GeoLocation

A class representation of Browsers HTML5 geolocation API.

### Ember Module

Modules loader. WARNING: Work In Progress.

### Ember ObjectProxy

Same as Ember.ArrayProxy but for objects :)

### Ember Routing

Hash / pushHistory (HTML5) router.

### Ember Utils

This addon provide some extentions to `Ember.Enumerable` interface :

* isEqual
* uniqCompare

* flatten
* sortProperty
* sortBy
* groupBy

* max
* min
* sum
* maxProperty
* minProperty
* sumProperty

0 comments on commit 4205869

Please sign in to comment.