Skip to content

Commit 86f56ab

Browse files
committed
use wrapAsync and bump version
1 parent 7db8cf5 commit 86f56ab

File tree

6 files changed

+80
-104
lines changed

6 files changed

+80
-104
lines changed

.editorconfig

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
# .editorconfig
2-
# Meteor adapted EditorConfig, http://EditorConfig.org
3-
# By RaiX 2013
4-
51
root = true
62

7-
[*.js]
3+
[*]
84
end_of_line = lf
95
insert_final_newline = true
106
indent_style = space
117
indent_size = 2
128
trim_trailing_whitespace = true
139
charset = utf-8
10+
11+
[*.js]
1412
max_line_length = 80
1513
indent_brace_style = 1TBS
1614
spaces_around_operators = true
17-
quote_type = auto
18-
# curly_bracket_next_line = true
15+
quote_type = auto

.jshintrc

+66-92
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,76 @@
1-
//.jshintrc
21
{
3-
// JSHint Meteor Configuration File
4-
// Match the Meteor Style Guide
5-
//
6-
// By @raix with contributions from @aldeed and @awatson1978
7-
// Source https://github.com/raix/Meteor-jshintrc
8-
//
9-
// See http://jshint.com/docs/ for more details
10-
11-
"maxerr" : 50, // {int} Maximum error before stopping
12-
13-
// Enforcing
14-
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
15-
"camelcase" : true, // true: Identifiers must be in camelCase
16-
"curly" : true, // true: Require {} for every new block or scope
17-
"eqeqeq" : true, // true: Require triple equals (===) for comparison
18-
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
19-
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
20-
"indent" : 2, // {int} Number of spaces to use for indentation
21-
"latedef" : false, // true: Require variables/functions to be defined before being used
22-
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
23-
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
24-
"noempty" : true, // true: Prohibit use of empty blocks
25-
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
26-
"plusplus" : false, // true: Prohibit use of `++` & `--`
27-
"quotmark" : false, // Quotation mark consistency:
28-
// false : do nothing (default)
29-
// true : ensure whatever is used is consistent
30-
// "single" : require single quotes
31-
// "double" : require double quotes
32-
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
33-
"unused" : true, // true: Require all defined variables be used
34-
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
35-
"trailing" : true, // true: Prohibit trailing whitespaces
36-
"maxparams" : false, // {int} Max number of formal params allowed per function
37-
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
38-
"maxstatements" : false, // {int} Max number statements per function
39-
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
40-
"maxlen" : 80, // {int} Max number of characters per line
41-
42-
// Relaxing
43-
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
44-
"boss" : false, // true: Tolerate assignments where comparisons would be expected
45-
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
46-
"eqnull" : false, // true: Tolerate use of `== null`
47-
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
48-
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
49-
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
50-
// (ex: `for each`, multiple try/catch, function expression…)
51-
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
52-
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
53-
"funcscope" : false, // true: Tolerate defining variables inside control statements"
54-
"globalstrict" : true, // true: Allow global "use strict" (also enables 'strict')
55-
"iterator" : false, // true: Tolerate using the `__iterator__` property
56-
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
57-
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
58-
"laxcomma" : false, // true: Tolerate comma-first style coding
59-
"loopfunc" : false, // true: Tolerate functions being defined in loops
60-
"multistr" : false, // true: Tolerate multi-line strings
61-
"proto" : false, // true: Tolerate using the `__proto__` property
62-
"scripturl" : false, // true: Tolerate script-targeted URLs
63-
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
64-
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
65-
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
66-
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
67-
"validthis" : false, // true: Tolerate using this in a non-constructor function
68-
69-
// Environments
70-
"browser" : true, // Web Browser (window, document, etc)
71-
"couch" : false, // CouchDB
72-
"devel" : true, // Development/debugging (alert, confirm, etc)
73-
"dojo" : false, // Dojo Toolkit
74-
"jquery" : false, // jQuery
75-
"mootools" : false, // MooTools
76-
"node" : false, // Node.js
77-
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
78-
"prototypejs" : false, // Prototype and Scriptaculous
79-
"rhino" : false, // Rhino
80-
"worker" : false, // Web Workers
81-
"wsh" : false, // Windows Scripting Host
82-
"yui" : false, // Yahoo User Interface
83-
//"meteor" : false, // Meteor.js
84-
85-
// Legacy
86-
"nomen" : false, // true: Prohibit dangling `_` in variables
87-
"onevar" : false, // true: Allow only one `var` statement per function
88-
"passfail" : false, // true: Stop on first error
89-
"white" : false, // true: Check against strict whitespace and indentation rules
90-
91-
// Custom Globals
2+
"maxerr" : 50,
3+
"bitwise" : true,
4+
"camelcase" : true,
5+
"curly" : true,
6+
"eqeqeq" : true,
7+
"forin" : true,
8+
"immed" : false,
9+
"indent" : 2,
10+
"latedef" : false,
11+
"newcap" : false,
12+
"noarg" : true,
13+
"noempty" : true,
14+
"nonew" : false,
15+
"plusplus" : false,
16+
"quotmark" : false,
17+
"undef" : false,
18+
"unused" : true,
19+
"strict" : false,
20+
"trailing" : true,
21+
"maxparams" : false,
22+
"maxdepth" : false,
23+
"maxstatements" : false,
24+
"maxcomplexity" : false,
25+
"asi" : false,
26+
"boss" : false,
27+
"debug" : false,
28+
"eqnull" : false,
29+
"es5" : false,
30+
"esnext" : false,
31+
"moz" : false,
32+
"evil" : false,
33+
"expr" : false,
34+
"funcscope" : false,
35+
"globalstrict" : true,
36+
"iterator" : false,
37+
"lastsemic" : false,
38+
"laxbreak" : false,
39+
"laxcomma" : false,
40+
"loopfunc" : false,
41+
"multistr" : false,
42+
"proto" : false,
43+
"scripturl" : false,
44+
"smarttabs" : false,
45+
"shadow" : false,
46+
"sub" : false,
47+
"supernew" : false,
48+
"validthis" : false,
49+
"browser" : true,
50+
"couch" : false,
51+
"devel" : true,
52+
"dojo" : false,
53+
"jquery" : false,
54+
"mootools" : false,
55+
"node" : false,
56+
"nonstandard" : false,
57+
"prototypejs" : false,
58+
"rhino" : false,
59+
"worker" : false,
60+
"wsh" : false,
61+
"yui" : false,
62+
"nomen" : false,
63+
"onevar" : false,
64+
"passfail" : false,
65+
"white" : false,
9266
"predef" : [
9367
"Meteor",
9468
"Accounts",
9569
"Session",
9670
"Template",
9771
"check",
9872
"Match",
99-
"Deps",
73+
"Tracker",
10074
"EJSON",
10175
"Email",
10276
"Package",
@@ -109,5 +83,5 @@
10983
"_",
11084
"Random",
11185
"HTTP"
112-
] // additional predefined global variables
86+
]
11387
}

geocoder.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
var geocoder = Npm.require('node-geocoder');
22

3+
// backwards compatibility
4+
if (typeof Meteor.wrapAsync === "undefined") {
5+
Meteor.wrapAsync = Meteor._wrapAsync;
6+
}
7+
38
GeoCoder = function geoCoderConstructor(options) {
49
var self = this;
510
self.options = _.extend({
@@ -18,7 +23,7 @@ GeoCoder.prototype.geocode = function geoCoderGeocode(address, callback) {
1823
callback = Meteor.bindEnvironment(callback, function (error) { if (error) throw error; });
1924
gc(address, this.options, callback);
2025
} else {
21-
return Meteor._wrapAsync(gc)(address, this.options);
26+
return Meteor.wrapAsync(gc)(address, this.options);
2227
}
2328
};
2429

@@ -32,6 +37,6 @@ GeoCoder.prototype.reverse = function geoCoderReverse(lat, lng, callback) {
3237
callback = Meteor.bindEnvironment(callback, function (error) { if (error) throw error; });
3338
rv(lat, lng, this.options, callback);
3439
} else {
35-
return Meteor._wrapAsync(rv)(lat, lng, this.options);
40+
return Meteor.wrapAsync(rv)(lat, lng, this.options);
3641
}
3742
};

package.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package.describe({
22
name: "aldeed:geocoder",
33
summary: "Easy geocoding by way of the node-geocoder package",
4-
version: "0.3.2",
4+
version: "0.3.3",
55
git: "https://github.com/aldeed/meteor-geocoder.git"
66
});
77

smart.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Easy geocoding by way of the node-geocoder package",
44
"homepage": "https://github.com/aldeed/meteor-geocoder",
55
"author": "Eric Dobbertin (http://dairystatedesigns.com)",
6-
"version": "0.3.2",
6+
"version": "0.3.3",
77
"git": "https://github.com/aldeed/meteor-geocoder.git",
88
"packages": {}
99
}

versions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
]
1111
],
1212
"pluginDependencies": [],
13-
"toolVersion": "[email protected].32",
13+
"toolVersion": "[email protected].35",
1414
"format": "1.0"
1515
}

0 commit comments

Comments
 (0)