Skip to content

Commit

Permalink
Merge pull request #93 from Jstillerman/unused-questions
Browse files Browse the repository at this point in the history
Removed unused questions
  • Loading branch information
gavD authored Jun 23, 2016
2 parents f3880be + 3aea886 commit 326a665
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 20 deletions.
5 changes: 4 additions & 1 deletion lib/Generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
module.exports = {
generate: function(answers) {

answers.tag_old_app = 'old' + answers.appName.charAt(0).toUpperCase() + answers.appName.slice(1);
answers.converted_environment = answers.environment.replace(/-/g, "_");


// create promise versions of chmod and mkdirp
var chmod = Q.denodeify(fs.chmod);
var mkdir = Q.denodeify(mkdirp);
Expand Down Expand Up @@ -85,4 +89,3 @@
}

}());

15 changes: 0 additions & 15 deletions lib/questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,21 +245,6 @@
default: function(answers) {
return answers.appName;
}
}, {
type: 'input',
name: 'className',
message: 'What is your class instance tag?',
default: function(answers) {
return answers.appName;
}
}, {
type: 'input',
name: 'tag_old_app',
message: 'What tag name would you like for your old app?',
default: function(answers) {
var appName = answers.appName;
return 'old' + appName.charAt(0).toUpperCase() + appName.slice(1);
}
}, {
type: 'input',
name: 'security_group',
Expand Down
1 change: 0 additions & 1 deletion lib/templates/immutable.yaml.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
keypair: '{{{ keypair }}}'
instance_tags:
Environment": "{{{ environment }}}"
Class: "{{{ className }}}-immutable"
Name: "{{{ appName }}} (immutable)"
region: '{{=<% %>=}}{{ region }}<%={{ }}=%>'
aws_zone: '{{=<% %>=}}{{ region }}<%={{ }}=%>{{=<% %>=}}{{ aws_zone }}<%={{ }}=%>'
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/provision.sh.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ssh-add {{{ appPem }}}
inventory/ec2.py --refresh-cache

# Tag any existing {{ app }} instances as being old
ansible-playbook tag-old-nodes.yaml --limit tag_Environment_{{{ environment }}} || true
ansible-playbook tag-old-nodes.yaml --limit tag_Environment_{{{ converted_environment }}} || true

# Start a new instance
ansible-playbook immutable.yaml -vv
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/questionsSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ var questions = require('../../lib/questions.js');

describe('questions.js', function() {
describe('format', function() {
it('should be an array of 25 questions', function() {
expect(questions.length).toEqual(25);
it('should be an array of 23 questions', function() {
expect(questions.length).toEqual(23);
});
});
});

0 comments on commit 326a665

Please sign in to comment.