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

Grunt 0.4 and Node 0.10 compatibility #29

Merged
merged 7 commits into from
Apr 20, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"node": true,
"strict": true,
"es5": true
}
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
language: "node_js"
node_js:
- 0.6
- 0.8
- 0.10
notifications:
email:
on_success: change
on_failure: change
before_install:
- npm install -g grunt-cli --production
before_script:
- npm install -g grunt@"0.3.x" --production
- npm run-script build
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.2.0

* removed `node 0.6` compat
* added `node 0.10` compat
* switched to `grunt 0.4`

## 1.1.2

Subtle fixes and new non-breaking methods.
Expand Down
28 changes: 28 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"use strict";

module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: ['grunt.js', 'lib/**/*.js', 'test/**/*.js'],
options: {
jshintrc: '.jshintrc'
}
},
watch: {
files: '<config:lint.files>',
tasks: 'lint'
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.registerTask('default', 'jshint');

// Custom Task to build files
grunt.registerTask('update',
'Update ruleset from publicsuffix.org dataset.',
require(__dirname + '/lib/grunt/update.js')(grunt)
);
};
44 changes: 0 additions & 44 deletions grunt.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/exports/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use strict";

/*jshint node:true strict: true */

/*
* Default list of exporters
*/
Expand Down
2 changes: 0 additions & 2 deletions lib/exports/legacy-json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use strict";

/*jshint node:true strict: true */

var Rule = require(__dirname + '/../rule.js');

function legacyJSONExport(xlds){
Expand Down
2 changes: 0 additions & 2 deletions lib/exports/standard-json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use strict";

/*jshint node:true strict: true */

var Rule = require(__dirname + '/../rule.js');

function standardJSONExport(xlds){
Expand Down
7 changes: 3 additions & 4 deletions lib/grunt/update.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"use strict";

/*jshint node:true strict: true */

var request = require('request');
var parser = require(__dirname + '/../parsers/publicsuffix-org.js');

module.exports = function(grunt){
var _ = grunt.utils._;
var _ = grunt.util._;
var async = grunt.util.async;

/**
*
Expand Down Expand Up @@ -50,7 +49,7 @@ module.exports = function(grunt){
}

tlds = parser.parse(body);
queue = grunt.utils.async.queue(function(exportTask, callback){
queue = async.queue(function(exportTask, callback){
var task_result = exportTask(tlds);
var filename = task_result[0];
var data = task_result[1];
Expand Down
2 changes: 0 additions & 2 deletions lib/parsers/publicsuffix-org.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use strict";

/*jshint node:true strict: true */

function PublicSuffixOrgParser(){

}
Expand Down
2 changes: 0 additions & 2 deletions lib/rule.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use strict";

/*jshint node:true strict: true */

function Rule (data){
data = data || {};

Expand Down
4 changes: 1 addition & 3 deletions lib/tld.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use strict";

/*jshint node:true strict: true */

var Rule = require(__dirname + '/rule.js');

/**
Expand All @@ -11,7 +9,7 @@ var Rule = require(__dirname + '/rule.js');
* See README.md for more explainations on how to use this stuff.
*/
function tld () {
/*jshint validthis: true */
/* jshint validthis: true */
this.rules = [];
}

Expand Down
23 changes: 16 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Oncle Tom <thomas@oncle-tom.net> (http://case.oncle-tom.net)",
"name": "tldjs",
"description": "Handful API to do stuff with domain names and URIs: validity, public etc.",
"version": "1.1.2",
"version": "1.2.0",
"homepage": "https://github.com/oncletom/tld.js",
"repository": {
"type": "git",
Expand All @@ -18,17 +18,26 @@
"prepublish": "grunt update"
},
"engines": {
"node": "0.6.x || 0.8.x"
},
"dependencies": {
"node": "0.8.x || 0.10.x"
},
"dependencies": {},
"devDependencies": {
"request": "~2.12.0",
"grunt": "~0.4.1",
"mocha": "~1.7.4",
"expect.js": "~0.2.0"
"expect.js": "~0.2.0",
"grunt-contrib-watch": "~0.3.1",
"grunt-contrib-jshint": "~0.4.3"
},
"keywords": [
"tld", "sld", "domain", "travis", "uri", "url", "domain name",
"subdomain", "public suffix"
"tld",
"sld",
"domain",
"travis",
"uri",
"url",
"domain name",
"subdomain",
"public suffix"
]
}
3 changes: 1 addition & 2 deletions test/publicsuffix.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use strict";

/*jshint node:true strict: true */
/*global suite:true test:true setup:true */
/* global suite, test, setup */

var tld = require('../index.js');
var expect = require('expect.js');
Expand Down
3 changes: 1 addition & 2 deletions test/rule.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use strict";

/*jshint node:true strict: true */
/*global suite:true test:true suiteSetup:true */
/* global suite, test, suiteSetup */

var Rule = require(__dirname + '/../lib/rule.js');
var expect = require('expect.js');
Expand Down
3 changes: 1 addition & 2 deletions test/tld.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use strict";

/*jshint node:true strict: true */
/*global suite:true test:true */
/* global suite, test */

var tld = require('../index.js');
var expect = require('expect.js');
Expand Down