Skip to content
Browse files

Implement coverage

  • Loading branch information...
1 parent 2e3fa0e commit 4cff6e672f64935877018c2906ce0f236eb7cc6c @wdavidw committed Nov 15, 2012
View
14 index.js
@@ -1,14 +1,2 @@
-require('coffee-script');
-
-var Client = require('./lib/Client');
-
-module.exports = function(options){
- return new Client(options);
-};
-
-module.exports.Client = Client;
-
-module.exports.Records = require('./lib/Records');
-
-module.exports.Schema = require('./lib/Schema');
+module.exports = require('./lib/ron');
View
4 lib/doc.js
@@ -34,7 +34,7 @@ convert_code = function(text) {
each(['Client', 'Schema', 'Records']).parallel(true).on('item', function(next, file) {
var destination, source;
source = "" + __dirname + "/" + file + ".coffee";
- destination = "" + __dirname + "/../docs/" + (file.toLowerCase()) + ".md";
+ destination = "" + __dirname + "/../doc/" + (file.toLowerCase()) + ".md";
return fs.readFile(source, 'ascii', function(err, content) {
var docs, match, re, re_title;
if (err) {
@@ -66,7 +66,7 @@ each(['Client', 'Schema', 'Records']).parallel(true).on('item', function(next, f
}
return each(['index', 'client', 'schema', 'records']).on('item', function(next, file) {
return mecano.copy({
- source: "" + __dirname + "/../docs/" + file + ".md",
+ source: "" + __dirname + "/../doc/" + file + ".md",
destination: destination,
force: true
}, next);
View
14 lib/ron.js
@@ -0,0 +1,14 @@
+// Generated by CoffeeScript 1.4.0
+var Client;
+
+Client = require('./Client');
+
+module.exports = function(options) {
+ return new Client(options);
+};
+
+module.exports.Client = Client;
+
+module.exports.Records = require('./Records');
+
+module.exports.Schema = require('./Schema');
View
4 src/doc.coffee
@@ -21,7 +21,7 @@ each( ['Client', 'Schema', 'Records'] )
.parallel( true )
.on 'item', (next, file) ->
source = "#{__dirname}/#{file}.coffee"
- destination = "#{__dirname}/../docs/#{file.toLowerCase()}.md"
+ destination = "#{__dirname}/../doc/#{file.toLowerCase()}.md"
fs.readFile source, 'ascii', (err, content) ->
return console.error err if err
re = /###\n([\s\S]*?)\n( *)###/g
@@ -57,7 +57,7 @@ each( ['Client', 'Schema', 'Records'] )
each( ['index', 'client', 'schema', 'records'] )
.on 'item', (next, file) ->
mecano.copy
- source: "#{__dirname}/../docs/#{file}.md"
+ source: "#{__dirname}/../doc/#{file}.md"
destination: destination
force: true
, next
View
11 src/ron.coffee
@@ -0,0 +1,11 @@
+
+Client = require './Client'
+
+module.exports = (options) ->
+ new Client options
+
+module.exports.Client = Client
+
+module.exports.Records = require './Records'
+
+module.exports.Schema = require './Schema'
View
2 test/all.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'all', ->
View
2 test/clear.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'all', ->
View
2 test/client_get.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '..'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'client get', ->
View
2 test/count.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'count', ->
View
2 test/create.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'create', ->
View
2 test/exists.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'exists', ->
View
2 test/get.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'get', ->
View
2 test/id.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'id', ->
View
2 test/identify.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'id', ->
View
2 test/list.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'list', ->
View
2 test/remove.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'remove', ->
View
2 test/schema_hash.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'client', ->
View
2 test/schema_temporal.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'type', ->
View
2 test/type.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'type', ->
View
2 test/type_date.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'type date', ->
View
2 test/type_email.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'create_validation', ->
View
2 test/update.coffee
@@ -2,7 +2,7 @@
should = require 'should'
try config = require '../conf/test' catch e
-ron = require '../index'
+ron = if process.env.RON_COV then require '../lib-cov/ron' else require '../lib/ron'
describe 'update', ->

0 comments on commit 4cff6e6

Please sign in to comment.
Something went wrong with that request. Please try again.