Skip to content

Commit 6bec0a1

Browse files
committed
Merge branch 'canary' into pr/411
Conflicts: app/templates/client/app/admin(auth)/admin(html).html app/templates/client/app/admin(auth)/admin(jade).jade app/templates/client/app/admin(auth)/admin.controller(coffee).coffee app/templates/client/app/admin(auth)/admin.controller(js).js
2 parents 7c14bed + 895a621 commit 6bec0a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1093
-512
lines changed

Diff for: .gitignore

+1-1
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

Diff for: CHANGELOG.md

+30
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
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+
131
<a name="v2.0.8"></a>
232
### v2.0.8 (2014-07-31)
333

Diff for: Gruntfile.js

+133
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,41 @@ 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 %>/node_modules',
67+
'!<%= config.demo %>/.git',
68+
'!<%= config.demo %>/dist'
69+
]
70+
}]
71+
}
3572
}
3673
});
3774

@@ -63,5 +100,101 @@ module.exports = function (grunt) {
63100
}, grunt.task.current.async());
64101
});
65102

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

Diff for: app/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
149149
{
150150
value: 'googleAuth',
151151
name: 'Google',
152-
checked: false
152+
checked: true
153153
},
154154
{
155155
value: 'facebookAuth',
156156
name: 'Facebook',
157-
checked: false
157+
checked: true
158158
},
159159
{
160160
value: 'twitterAuth',
161161
name: 'Twitter',
162-
checked: false
162+
checked: true
163163
}
164164
]
165165
}, {

Diff for: app/templates/Gruntfile.js

+25-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ module.exports = function (grunt) {
1616
ngtemplates: 'grunt-angular-templates',
1717
cdnify: 'grunt-google-cdn',
1818
protractor: 'grunt-protractor-runner',
19-
injector: 'grunt-asset-injector'
19+
injector: 'grunt-asset-injector',
20+
buildcontrol: 'grunt-build-control'
2021
});
2122

2223
// Time how long tasks take. Can help when optimizing build times
@@ -26,6 +27,7 @@ module.exports = function (grunt) {
2627
grunt.initConfig({
2728

2829
// Project settings
30+
pkg: grunt.file.readJSON('package.json'),
2931
yeoman: {
3032
// configurable paths
3133
client: require('./bower.json').appPath || 'client',
@@ -407,6 +409,28 @@ module.exports = function (grunt) {
407409
}
408410
},
409411

412+
buildcontrol: {
413+
options: {
414+
dir: 'dist',
415+
commit: true,
416+
push: true,
417+
connectCommits: false,
418+
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
419+
},
420+
heroku: {
421+
options: {
422+
remote: 'heroku',
423+
branch: 'master'
424+
}
425+
},
426+
openshift: {
427+
options: {
428+
remote: 'openshift',
429+
branch: 'master'
430+
}
431+
}
432+
},
433+
410434
// Run some tasks in parallel to speed up the build process
411435
concurrent: {
412436
server: [<% if(filters.coffee) { %>

Diff for: app/templates/_.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
node_modules
22
public
3-
.tmp
4-
.sass-cache
3+
.tmp<% if(filters.sass) { %>
4+
.sass-cache<% } %>
5+
.idea
56
client/bower_components
67
dist
78
/server/config/local.env.js

Diff for: app/templates/_package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"passport-google-oauth": "latest",<% } %>
2626
"composable-middleware": "^0.3.0",
2727
"connect-mongo": "^0.4.1"<% if(filters.socketio) { %>,
28-
"socket.io": "~1.0.6",
28+
"socket.io": "^1.0.6",
29+
"socket.io-client": "^1.0.6",
2930
"socketio-jwt": "^2.0.2"<% } %>
3031
},
3132
"devDependencies": {
@@ -59,6 +60,7 @@
5960
"grunt-protractor-runner": "^1.1.0",
6061
"grunt-asset-injector": "^0.1.0",
6162
"grunt-karma": "~0.8.2",
63+
"grunt-build-control": "DaftMonk/grunt-build-control",
6264
"grunt-mocha-test": "~0.10.2",<% if(filters.sass) { %>
6365
"grunt-contrib-sass": "^0.7.3",<% } %><% if(filters.stylus) { %>
6466
"grunt-contrib-stylus": "latest",<% } %>

Diff for: app/templates/client/app/account(auth)/settings/settings(html).html

+34-7
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,35 @@
33
<div class="container">
44
<div class="row">
55
<div class="col-sm-12">
6-
<h1>Change Password</h1>
6+
<h1>Email</h1>
77
</div>
88
<div class="col-sm-12">
9-
<form class="form" name="form" ng-submit="changePassword(form)" novalidate>
9+
<form role="form" name="email" ng-submit="changeEmail()" novalidate>
10+
11+
<div class="form-group has-feedback">
12+
<label>Current Email</label>
13+
<input type="email" name="email" class="form-control" ng-model="user.email" placeholder='ex. [email protected]' />
14+
<p class="help-block" ng-show="!email.email.$valid">
15+
| Email not valid
16+
</p>
17+
</div>
18+
19+
<button class="btn btn-lg btn-primary" type="submit">Save changes</button>
20+
</form>
21+
</div>
22+
</div>
23+
<div class="row">
24+
<div class="col-sm-12">
25+
<h1><% if (filters.oauth) { %>{{ user.localEnabled ? 'Change' : 'Set' }}<% } else { %>Change<% } %> Password</h1>
26+
</div>
27+
<div class="col-sm-12">
28+
<form name="pwd" ng-submit="<% if(filters.oauth) { %>!user.localEnabled ? setPassword() : <% } %>changePassword()" novalidate>
1029

1130
<div class="form-group">
1231
<label>Current Password</label>
1332

14-
<input type="password" name="password" class="form-control" ng-model="user.oldPassword"
15-
mongoose-error/>
33+
<input type="password" name="old" placeholder='ex. password123' class="form-control" ng-model="user.oldPassword"
34+
mongoose-error <% if (filters.oauth) { %>ng-disabled='!user.localEnabled' <% } %>/>
1635
<p class="help-block" ng-show="form.password.$error.mongoose">
1736
{{ errors.other }}
1837
</p>
@@ -21,11 +40,11 @@ <h1>Change Password</h1>
2140
<div class="form-group">
2241
<label>New Password</label>
2342

24-
<input type="password" name="newPassword" class="form-control" ng-model="user.newPassword"
43+
<input type="password" name="new" placeholder='ex. GoofyM1ckeyDonald&Pluto' class="form-control" ng-model="user.newPassword"
2544
ng-minlength="3"
26-
required/>
45+
required />
2746
<p class="help-block"
28-
ng-show="(form.newPassword.$error.minlength || form.newPassword.$error.required) && (form.newPassword.$dirty || submitted)">
47+
ng-show="(pwd.new.$error.minlength || pwd.new.$error.required) && (pwd.new.$dirty || pwd.submitted)">
2948
Password must be at least 3 characters.
3049
</p>
3150
</div>
@@ -36,4 +55,12 @@ <h1>Change Password</h1>
3655
</form>
3756
</div>
3857
</div>
58+
<% if (filters.oauth) { %>
59+
<!-- <div class="row">
60+
<div class="col-sm-12">
61+
<h1>Social accounts</h1>
62+
</div>
63+
<div class="col-sm-12"></div>
64+
</div> -->
65+
<% } %>
3966
</div>

0 commit comments

Comments
 (0)