Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #39

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fa94ecb
Updated to latest NPM packages. Added simple mocha for testing purposes
getdave Sep 24, 2013
9e87994
Integrate Chai expect style assertions. Add x2 dummy tests
getdave Sep 25, 2013
361d2bb
Experiment with adding and interacting with Grunt via tests
getdave Sep 25, 2013
6b1a79a
Merge tag 'v0.2.0' into develop
getdave Nov 12, 2013
5fe4e4f
Add support for custom MySQL ports
dbisso Nov 25, 2013
aebffa4
Update README.md with new database port option
dbisso Nov 25, 2013
41e764b
Added 'ignoreTables' option (ref #24)
Dec 9, 2013
144f7ed
Merge pull request #27 from dbisso/master
getdave Jan 2, 2014
6ec50d0
Merged ignoreTables and MYSQL port options
getdave Jan 2, 2014
450e6de
Merge branch 'develop' into feature/add-basic-tests
getdave Jan 2, 2014
66e80ac
Update dependencies. Add vows for tests. Fix JSHint warnings.
getdave Jan 2, 2014
3286b48
Create initial test files. Port dbReplace task to library directory.
getdave Jan 2, 2014
07b689c
Create master tpls file to facilitate sharing of global template vars…
getdave Jan 2, 2014
669e3ef
Ported all library functions to individual files within lib dir.
getdave Jan 2, 2014
fb290bb
Implemented basic tests for Search and Replace command
getdave Jan 2, 2014
7c5f3f1
Added basic DB Dump tests. Ensured backups dir is cleaned on every te…
getdave Jan 2, 2014
c92bdc9
Add test to check that DUMP creates a file
getdave Jan 2, 2014
04575bd
Add conditions for output messages
getdave Jan 2, 2014
7f19ea3
Added branching and contribution instructions
getdave Jan 2, 2014
b57a47b
Added rtn object for test purposes
getdave Jan 2, 2014
981ba8e
Merge pull request #31 from getdave/feature/add-basic-tests
getdave Jan 2, 2014
7176e48
Added support for custom SSH ports
Jan 2, 2014
ac5882c
Updates to add Default Port of 22
Jan 2, 2014
07561a3
Update default Grunt task to watch. Update testing section in README
getdave Jan 3, 2014
889bdef
Modify pull task to accept (and require) src and dest.
getdave Jan 3, 2014
e3dd1e8
Update import and dump functions to provide more accurate log messages
getdave Jan 3, 2014
6d49e93
Modify error messages and conditionals to ensure valid src and dest (…
getdave Jan 3, 2014
9561514
Make ssh user and host separate config options
getdave Jan 3, 2014
8d348ab
Update dbReplace to work on temporary file rather than actual backup.
getdave Jan 3, 2014
0d36303
Major updates to the README. Minor code comment updates
getdave Jan 3, 2014
62693a2
Add a section on Security to README. Explain how to keep creds out of…
getdave Jan 3, 2014
b7ba97c
Minor amends to correct doc examples
getdave Jan 3, 2014
5b4dfe4
Fix merge conflicts. Integrate ssh port update whilst preserving rece…
getdave Jan 3, 2014
7600b37
Fix JSHint error
getdave Jan 3, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
"undef": true,
"boss": true,
"eqnull": true,
"node": true,
"es5": true
"node": true
}
88 changes: 65 additions & 23 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,106 @@
* grunt-deployments
* https://github.com/getdave/grunt-deployments
*
* Copyright (c) 2013 David Smith
* Copyright (c) 2014 David Smith
* Licensed under the MIT license.
*/

'use strict';

module.exports = function(grunt) {

// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

// Project configuration.
grunt.initConfig({
db_fixture: grunt.file.readJSON('test/fixtures/test_db.json'),

db_fixture: grunt.file.readJSON('test/fixtures/basic_config.json'),
vows: {
all: {
options: {
// String {spec|json|dot-matrix|xunit|tap}
// defaults to "dot-matrix"
reporter: "spec",
// String or RegExp which is
// matched against title to
// restrict which tests to run
// onlyRun: /helper/,
// Boolean, defaults to false
verbose: false,
// Boolean, defaults to false
silent: false,
// Colorize reporter output,
// boolean, defaults to true
colors: true,
// Run each test in its own
// vows process, defaults to
// false
isolate: false,
// String {plain|html|json|xml}
// defaults to none
coverage: "json"
},
// String or array of strings
// determining which files to include.
// This option is grunt's "full" file format.
src: ["test/**/*_test.js"]
}
},
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
'<%= nodeunit.tests %>',
],
gruntfile: {
src: 'Gruntfile.js'
},
lib: {
src: ['tasks/*.js']
},
test: {
src: ['test/**/*.js']
},
options: {
jshintrc: '.jshintrc',
},
},

watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib: {
files: '<%= jshint.lib.src %>',
tasks: ['jshint:lib', 'vows']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'vows']
}
},

// Before generating any new files, remove any previously-created files.
clean: {
tests: ['tmp'],
backups: ['./backups'],
},

deployments: {
options: {
backups_dir: ''
},
local: '<%= db_fixture.local %>',
develop: '<%= db_fixture.develop %>'
},

// Unit tests.
nodeunit: {
tests: ['test/*_test.js'],
local: '<%= db_fixture.local %>', // make sure you've created valid fixture DB creds
develop: '<%= db_fixture.develop %>' // make sure you've created valid fixture DB creds
},

});


// Actually load this plugin's task(s).
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-nodeunit');

// Whenever the "test" task is run, first clean the "tmp" dir, then run this
// plugin's task(s), then test the result.
grunt.registerTask('test', ['clean', 'deployments', 'nodeunit']);
grunt.registerTask('test', ['clean', 'vows']);

// By default, lint and run all tests.
grunt.registerTask('default', ['jshint', 'test']);
grunt.registerTask('default', ['clean', 'watch']);

};
Loading