Skip to content

Commit bdcac1a

Browse files
author
Justin Ridgewell
committed
Initial Commit.
0 parents  commit bdcac1a

File tree

18 files changed

+486
-0
lines changed

18 files changed

+486
-0
lines changed

.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "test/support"
3+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
test/support/
3+
reports/

.jshintrc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"node": true,
3+
"browser": true,
4+
"esnext": true,
5+
"bitwise": true,
6+
"camelcase": false,
7+
"curly": true,
8+
"eqeqeq": true,
9+
"eqnull": true,
10+
"expr": true,
11+
"immed": true,
12+
"indent": 4,
13+
"latedef": true,
14+
"newcap": true,
15+
"noarg": true,
16+
"regexp": true,
17+
"undef": true,
18+
"unused": true,
19+
"strict": false,
20+
"trailing": true,
21+
"smarttabs": true,
22+
"white": false,
23+
"globals": {
24+
"after": false,
25+
"afterEach": false,
26+
"angular": false,
27+
"before": false,
28+
"beforeEach": false,
29+
"browser": false,
30+
"describe": false,
31+
"expect": false,
32+
"inject": false,
33+
"it": false,
34+
"spyOn": false,
35+
"devise": true
36+
}
37+
}

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"
4+
before_script:
5+
- npm install
6+
- npm install -g grunt-cli bower
7+
- bower install

Gruntfile.js

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/*global module:false*/
2+
module.exports = function(grunt) {
3+
4+
// Project configuration.
5+
grunt.initConfig({
6+
pkg: grunt.file.readJSON('package.json'),
7+
meta: {
8+
version: '<%= pkg.version %>',
9+
banner:
10+
'// AngularDevise\n' +
11+
'// -------------------\n' +
12+
'// v<%= pkg.version %>\n' +
13+
'//\n' +
14+
'// Copyright (c)<%= grunt.template.today("yyyy") %> Justin Ridgewell\n' +
15+
'// Distributed under MIT license\n' +
16+
'//\n' +
17+
'// https://github.com/cloudspace/angular_devise\n' +
18+
'\n'
19+
},
20+
21+
preprocess: {
22+
build: {
23+
files: {
24+
'lib/devise.js' : 'src/build/devise.js'
25+
}
26+
}
27+
},
28+
29+
uglify : {
30+
options: {
31+
banner: "<%= meta.banner %>"
32+
},
33+
core : {
34+
src : 'lib/devise.js',
35+
dest : 'lib/devise-min.js',
36+
}
37+
},
38+
39+
jshint: {
40+
options: {
41+
jshintrc : '.jshintrc'
42+
},
43+
devise : [ 'src/*.js' ],
44+
test : [ 'test/*.js', 'test/specs/*.js' ],
45+
},
46+
47+
plato: {
48+
devise : {
49+
src : 'src/*.js',
50+
dest : 'reports',
51+
options : {
52+
jshint : false
53+
}
54+
}
55+
},
56+
57+
ngmin: {
58+
dist: {
59+
src: 'lib/devise.js',
60+
dest: 'lib/devise.js'
61+
}
62+
},
63+
64+
karma: {
65+
options: {
66+
configFile: 'karma.conf.js',
67+
},
68+
unit: {
69+
},
70+
continuous: {
71+
singleRun: false,
72+
browsers: ['PhantomJS']
73+
}
74+
}
75+
});
76+
77+
require('load-grunt-tasks')(grunt);
78+
require('time-grunt')(grunt);
79+
80+
// Default task.
81+
grunt.registerTask('lint-test', 'jshint:test');
82+
grunt.registerTask('test', 'karma:unit');
83+
grunt.registerTask('travis', ['jshint:devise', 'karma']);
84+
grunt.registerTask('default', ['jshint:devise', 'test', 'preprocess', 'ngmin', 'uglify']);
85+
86+
};

LICENSE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2013 Justin Ridgewell
2+
===================================
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
THE SOFTWARE.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
AngularDevise
2+
=============
3+
4+
A small AngularJS Service to interact with Devise Authentication.
5+
6+
7+
Requirements
8+
------------
9+
10+
This service requires Devise to respond to JSON. To do that, simply add
11+
12+
```ruby
13+
# app/controllers/application_controller.rb
14+
class ApplicationController < ActionController::Base
15+
respond_to :html, :json
16+
# ...
17+
end
18+
```

bower.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "AngularDevise",
3+
"version": "0.0.1",
4+
"main": "lib/devise.js",
5+
"ignore": [
6+
"**/.*",
7+
"node_modules",
8+
"components",
9+
"bower_components",
10+
"spec",
11+
"reports"
12+
],
13+
"author": {
14+
"name": "Justin Ridgewell"
15+
},
16+
"dependencies": {
17+
"angular": "~1.2.0"
18+
},
19+
"devDependencies": {
20+
"angular-mocks": "~1.2.0",
21+
"angular-scenario": "~1.2.0"
22+
}
23+
}

karma.conf.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = function(config) {
2+
config.set({
3+
// base path, that will be used to resolve files and exclude
4+
basePath: '',
5+
6+
// testing framework to use (jasmine/mocha/qunit/...)
7+
frameworks: ['jasmine'],
8+
9+
// list of files / patterns to load in the browser
10+
files: [
11+
'test/support/angular/angular.js',
12+
'test/support/angular-mocks/angular-mocks.js',
13+
'test/devise.js',
14+
'src/*.js',
15+
'test/mock/**/*.js',
16+
'test/spec/**/*.js'
17+
],
18+
19+
// list of files / patterns to exclude
20+
exclude: [],
21+
22+
// web server port
23+
port: 8080,
24+
25+
// level of logging
26+
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
27+
logLevel: config.LOG_INFO,
28+
29+
30+
// enable / disable watching file and executing tests whenever any file changes
31+
autoWatch: true,
32+
33+
34+
browsers: ['Chrome'],
35+
36+
singleRun: true
37+
});
38+
};

lib/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)