Skip to content

Commit 2e8ef6b

Browse files
committed
Merge branch 'canary' into pr/392
Conflicts: app/templates/server/api/user(auth)/user.controller.js app/templates/server/config/environment/index.js
2 parents ef06272 + eb2d362 commit 2e8ef6b

31 files changed

+512
-233
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
node_modules
22
bower_components
33
test/temp
4-
test/UpperCaseBug
4+
demo
55
.idea
66
.DS_Store
77
release.txt

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
<a name="v2.0.10"></a>
2+
### v2.0.10 (2014-08-16)
3+
4+
5+
#### Bug Fixes
6+
7+
* **server:** undefined domain env variable causing issues ([cb683dde](http://github.com/DaftMonk/generator-angular-fullstack/commit/cb683dde6814959328a58267215ce477aa723e35))
8+
9+
<a name="v2.0.9"></a>
10+
### v2.0.9 (2014-08-15)
11+
12+
13+
#### Bug Fixes
14+
15+
* **app:**
16+
* add .idea folder to gitignore ([2e1f1182](http://github.com/DaftMonk/generator-angular-fullstack/commit/2e1f1182684594300ac5ca85ffab175bfcafd3ec))
17+
* Missing user response code ([c1766604](http://github.com/DaftMonk/generator-angular-fullstack/commit/c1766604d7ae7ab1eb8713f37285d13341dc8ae1))
18+
* use `''` instead `null` as URL to open ioSocket ([0f0d0fdc](http://github.com/DaftMonk/generator-angular-fullstack/commit/0f0d0fdce38d42f04f71d9e1174400adfb699061))
19+
* save the version of the generator that was used ([2b76b17b](http://github.com/DaftMonk/generator-angular-fullstack/commit/2b76b17bb5fa1980b449498beec87ab58ceee012))
20+
* **gruntfile:** incorrect path to index.html for cdnify ([0ad646cb](http://github.com/DaftMonk/generator-angular-fullstack/commit/0ad646cbd48dbb2f65fc00b930a9f243174611be))
21+
* **openshift:** fix issues with openshift deployment ([ace07238](http://github.com/DaftMonk/generator-angular-fullstack/commit/ace07238e3299d6002337ba12f7862ce84beafd8))
22+
23+
24+
#### Features
25+
26+
* **gen:** add automatic demo releases with grunt task ([44852233](http://github.com/DaftMonk/generator-angular-fullstack/commit/44852233fcf28d5ff8681fcabc3bfb4130778a22))
27+
* **gruntfile:** add grunt buildcontrol tasks to app, for easier deployment ([036478df](http://github.com/DaftMonk/generator-angular-fullstack/commit/036478dfd7067d38ab19ca86c0c5196678412799))
28+
* **heroku:** provide prompt to set the deployment region ([13cd5e7d](http://github.com/DaftMonk/generator-angular-fullstack/commit/13cd5e7d42f2845268f38ba19e0d253ae675c594))
29+
* **server:** add sample env config file that can be tracked by git ([c9f80bcd](http://github.com/DaftMonk/generator-angular-fullstack/commit/c9f80bcd67d6e3eef2c78ccbceff78f763ae88d1))
30+
31+
<a name="v2.0.8"></a>
32+
### v2.0.8 (2014-07-31)
33+
34+
35+
#### Bug Fixes
36+
37+
* **coffee:** update socket service to match javascript version ([c27cefe2](http://github.com/DaftMonk/generator-angular-fullstack/commit/c27cefe24d8ec64d905f908c66a56bf602303dce))
38+
* **gen:** Fixed missing `oauth` property in `.yo-rc.json` after 2.0.5 update ([11d324b9](http://github.com/DaftMonk/generator-angular-fullstack/commit/11d324b95992b68bd19f402401e98f5936cdb343))
39+
* **travis:** install sass gem if sass is enabled ([ceeac27b](http://github.com/DaftMonk/generator-angular-fullstack/commit/ceeac27b8f912aa6dec2caf3bf20dd7551f2d754))
40+
* **twitter:** revert mongoose connection change ([8675a002](http://github.com/DaftMonk/generator-angular-fullstack/commit/8675a002e301957569374fdcad87aab0bff6b3b4))
41+
42+
43+
#### Features
44+
45+
* **user-management:** use the User $resource to populate users for the admin page ([708f0729](http://github.com/DaftMonk/generator-angular-fullstack/commit/708f07290d98d6bd73723f9db49cce7758c3d12b))
46+
47+
<a name="v2.0.7"></a>
48+
### v2.0.7 (2014-07-27)
49+
50+
51+
#### Bug Fixes
52+
53+
* **gruntfile:** grunt tasks should run if no local config exists ([422d6bca](http://github.com/DaftMonk/generator-angular-fullstack/commit/422d6bca07283057b0fa275dba0de447c9f4f167))
54+
* **server:** fix setting TTL index on collection : sessions error ([0581ed09](http://github.com/DaftMonk/generator-angular-fullstack/commit/0581ed094b2c6141ab9e0c016eda22aa49e1d075))
55+
56+
<a name="v2.0.6"></a>
57+
### v2.0.6 (2014-07-27)
58+
59+
60+
#### Bug Fixes
61+
62+
* **app:**
63+
* `things` made a little bit more responsive ([58aa7a48](http://github.com/DaftMonk/generator-angular-fullstack/commit/58aa7a489ae28c22be59b3a61db027ccf2f1ae46))
64+
* **dependencies:** change ngmin to ng-annotate ([dd023fa5](http://github.com/DaftMonk/generator-angular-fullstack/commit/dd023fa5fd90b8b541b8cc60c87186ee619e4844))
65+
* **bootstrap:** removed styles breaking responsiveness for high-res screens ([053fedb8](http://github.com/DaftMonk/generator-angular-fullstack/commit/053fedb89f64294a55538ad9b806b2d7de4d1c7f))
66+
* **socketio:** fallback for servers where `socket.handshake.address` is not provided ([f6a19348](http://github.com/DaftMonk/generator-angular-fullstack/commit/f6a19348ad404aa72c31eef8dc84aac8db0e904a))
67+
* **stylus:** remove bootstrap css import in stylus when bootstrap is not selected ([f7c3d0ad](http://github.com/DaftMonk/generator-angular-fullstack/commit/f7c3d0ad41da5f0072c2cf64ff5c9a894052d194), closes [#368](http://github.com/DaftMonk/generator-angular-fullstack/issues/368))
68+
69+
70+
#### Features
71+
72+
* **oauth:** remove code according to user prompts ([316bd9dd](http://github.com/DaftMonk/generator-angular-fullstack/commit/316bd9dd3632622b0fb434cacfc4150f01d18e4c))
73+
174
<a name="v2.0.5"></a>
275
### v2.0.5 (2014-07-17)
376

Gruntfile.js

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
'use strict';
22
var markdown = require('marked');
33
var semver = require('semver');
4+
var _s = require('underscore.string');
5+
var shell = require('shelljs');
6+
var process = require('child_process');
7+
var Q = require('q');
8+
var helpers = require('yeoman-generator').test;
49

510
module.exports = function (grunt) {
611
require('load-grunt-tasks')(grunt);
712

813
grunt.initConfig({
14+
config: {
15+
demo: 'demo'
16+
},
917
pkg: grunt.file.readJSON('package.json'),
1018
changelog: {
1119
options: {
@@ -26,12 +34,40 @@ module.exports = function (grunt) {
2634
files: ['CHANGELOG.md']
2735
}
2836
},
37+
buildcontrol: {
38+
options: {
39+
dir: 'demo',
40+
commit: true,
41+
push: true,
42+
connectCommits: false,
43+
message: 'Built using Angular Fullstack v<%= pkg.version %> from commit %sourceCommit%'
44+
},
45+
release: {
46+
options: {
47+
remote: 'origin',
48+
branch: 'master'
49+
}
50+
}
51+
},
2952
jshint: {
3053
options: {
3154
curly: false,
3255
node: true
3356
},
3457
all: ['Gruntfile.js', '*/index.js']
58+
},
59+
clean: {
60+
demo: {
61+
files: [{
62+
dot: true,
63+
src: [
64+
'<%= config.demo %>/*',
65+
'!<%= config.demo %>/readme.md',
66+
'!<%= config.demo %>/.git',
67+
'!<%= config.demo %>/dist'
68+
]
69+
}]
70+
}
3571
}
3672
});
3773

@@ -63,5 +99,81 @@ module.exports = function (grunt) {
6399
}, grunt.task.current.async());
64100
});
65101

102+
grunt.registerTask('generate', 'generate demo', function () {
103+
var done = this.async();
104+
105+
shell.cd(grunt.config('config').demo);
106+
107+
Q()
108+
.then(generateDemo)
109+
.then(gruntBuild)
110+
.then(gruntRelease)
111+
.then(function() {
112+
shell.cd('../');
113+
})
114+
.catch(function(msg){
115+
grunt.fail.warn(msg || 'failed to generate demo')
116+
})
117+
.finally(done);
118+
119+
function generateDemo() {
120+
var deferred = Q.defer();
121+
var options = {
122+
script: 'js',
123+
markup: 'html',
124+
stylesheet: 'sass',
125+
router: 'uirouter',
126+
mongoose: true,
127+
auth: true,
128+
oauth: ['googleAuth', 'twitterAuth'],
129+
socketio: true
130+
};
131+
132+
var deps = [
133+
'../app',
134+
[
135+
helpers.createDummyGenerator(),
136+
'ng-component:app'
137+
]
138+
];
139+
140+
var gen = helpers.createGenerator('angular-fullstack:app', deps);
141+
142+
helpers.mockPrompt(gen, options);
143+
gen.run({}, function () {
144+
deferred.resolve();
145+
});
146+
147+
return deferred.promise;
148+
}
149+
150+
function run(cmd) {
151+
var deferred = Q.defer();
152+
var generator = shell.exec(cmd, {async:true});
153+
generator.stdout.on('data', function (data) {
154+
grunt.verbose.writeln(data);
155+
});
156+
generator.on('exit', function (code) {
157+
deferred.resolve();
158+
});
159+
160+
return deferred.promise;
161+
}
162+
163+
function gruntBuild() {
164+
return run('grunt');
165+
}
166+
167+
function gruntRelease() {
168+
return run('grunt buildcontrol:heroku');
169+
}
170+
});
171+
172+
grunt.registerTask('demo', [
173+
'clean:demo',
174+
'generate',
175+
'buildcontrol:release'
176+
]);
177+
66178
//grunt.registerTask('default', ['bump', 'changelog', 'stage', 'release']);
67179
};

app/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
4242
default: true,
4343
}], function (answers) {
4444
this.skipConfig = answers.skipConfig;
45+
46+
// NOTE: temp(?) fix for #403
47+
if(typeof this.oauth==='undefined') {
48+
var strategies = Object.keys(this.filters).filter(function(key) {
49+
return key.match(/Auth$/) && key;
50+
});
51+
52+
if(strategies.length) this.config.set('oauth', true);
53+
}
54+
4555
cb();
4656
}.bind(this));
4757
} else {

app/templates/.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: node_js
22
node_js:
3-
- '0.8'
43
- '0.10'
4+
- '0.11'
55
before_script:
6-
- 'npm install -g bower grunt-cli'
7-
- 'bower install'
6+
- npm install -g bower grunt-cli<% if (filters.sass) { %>
7+
- gem install sass<% } %>
8+
- bower install
89
services: mongodb

0 commit comments

Comments
 (0)