From c473c49012b7e33fa0c05f52202caf60a2727cc2 Mon Sep 17 00:00:00 2001 From: Veselin Todorov Date: Mon, 25 Jun 2012 20:48:38 +0300 Subject: [PATCH 1/3] node 0.8 --- .travis.yml | 3 ++- Makefile | 3 +-- package.json | 10 +++++----- test/bot.test.js | 21 +++++++++++++-------- test/db.test.js | 21 ++++++++++++++------- test/text.test.js | 15 ++++++++++----- 6 files changed, 45 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index b8e1f17..895dbd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ language: node_js node_js: - - 0.6 \ No newline at end of file + - 0.6 + - 0.8 diff --git a/Makefile b/Makefile index d2bec20..57a822e 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,7 @@ TESTS = test/*.test.js test: @NODE_ENV=test ./node_modules/.bin/mocha \ - --require should \ --reporter spec \ $(TESTS) -.PHONY: test \ No newline at end of file +.PHONY: test diff --git a/package.json b/package.json index 8381011..92a8016 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "colors": "0.6.0-1" } , "devDependencies": { - "mocha": "0.3.3" - , "should": "0.3.2" + "mocha": "*" + , "chai": "*" } , "repository" : { "type" : "git" @@ -24,7 +24,7 @@ "bot": "./bin/bot" } , "main": "./lib/index" - , "engines": { - "node": ">= 0.6.0 < 0.7.0" + , "engines": { + "node": ">= 0.6.0" } -} \ No newline at end of file +} diff --git a/test/bot.test.js b/test/bot.test.js index 8f5c1b4..bbe4a2f 100644 --- a/test/bot.test.js +++ b/test/bot.test.js @@ -1,13 +1,18 @@ /*! * Bot - Feeling lonely? You personal bot is here. - * + * * Veselin Todorov * MIT License. */ /** - * The tested class. - * + * Support. + */ +var should = require('chai').should(); + +/** + * Subject. + * * @type {Function} */ var Bot = require('../lib/bot'); @@ -24,26 +29,26 @@ describe('Bot', function() { Bot.version.should.be.ok; }); }); - + describe('constructor', function() { - it('should load db and defaults', function() { + it('should load db and defaults', function() { var bot = new Bot({foo: 'bar'}, ['foo', 'bar']); bot._db.should.eql({foo: 'bar'}); bot._defaults.should.eql(['foo', 'bar']); }); }); - + describe('.answer()', function() { it('should answer questions', function() { var db = new Db; var bot = new Bot(db); bot.answer('Hello.').should.eql('"Hello," he lied.'); }); - + it('should answer even if he does not know what to say', function() { var db = new Db; var bot = new Bot(db, ['foo']); bot.answer('dasjdisahdia').should.eql('foo'); }); }); -}); \ No newline at end of file +}); diff --git a/test/db.test.js b/test/db.test.js index 7931c70..4ab1d2f 100644 --- a/test/db.test.js +++ b/test/db.test.js @@ -1,13 +1,18 @@ /*! * Bot - Feeling lonely? You personal bot is here. - * + * * Veselin Todorov * MIT License. */ /** - * The tested class. - * + * Support. + */ +var should = require('chai').should(); + +/** + * Subject. + * * @type {Function} */ var Db = require('../lib/db'); @@ -23,14 +28,14 @@ describe('Db', function() { var db = new Db; (!!db._content).should.be.ok; }); - + it('should use the supplied content', function() { var content = {foo: 'bar'}; var db = new Db(content); db._content.should.eql(content); }); }); - + describe('.findOne()', function() { it('should find the most accurate answer for text', function() { var text = new Text('People are crazy.'); @@ -38,14 +43,16 @@ describe('Db', function() { db.findOne(text).should.eql('During these times, when crazy people are running the government, all you can do is laugh.'); }); }); - + describe('.findAll()', function() { it('should find all matches for text', function() { var text = new Text('Bears are crazy.'); var db = new Db; var result = db.findAll(text); + result.should.be.an.array; + (result.length > 0).should.be.true; }); }); -}); \ No newline at end of file +}); diff --git a/test/text.test.js b/test/text.test.js index 04432ae..21095c5 100644 --- a/test/text.test.js +++ b/test/text.test.js @@ -1,13 +1,18 @@ /*! * Bot - Feeling lonely? You personal bot is here. - * + * * Veselin Todorov * MIT License. */ /** - * The tested class. - * + * Support. + */ +var should = require('chai').should(); + +/** + * Subject. + * * @type {Function} */ var Text = require('../lib/text'); @@ -19,11 +24,11 @@ describe('Text', function() { text._text.should.eql('Hello!'); }); }); - + describe('.words()', function() { it('should remove stop words', function() { var text = new Text('I love her. Am I an idiot?'); text.words().should.eql(['i', 'love', 'i', 'idiot']); }); }); -}); \ No newline at end of file +}); From 14ecc8c9034cbd1c16da65ac31f007662d7626de Mon Sep 17 00:00:00 2001 From: Veselin Todorov Date: Mon, 25 Jun 2012 20:53:11 +0300 Subject: [PATCH 2/3] 0.0.3 --- History.md | 7 ++++++- package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 4ef217b..f15d5dc 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,10 @@ -0.0.2 / 2012-01-21 +0.0.3 / 2012-06-25 +================== + + * node 0.8 + +0.0.2 / 2012-01-21 ================== * Initial version. diff --git a/package.json b/package.json index 92a8016..7da8ae3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bot" , "preferGlobal": "true" - , "version": "0.0.2" + , "version": "0.0.3" , "description": "Feeling lonely? You personal bot is here." , "keywords": ["bot", "chat bot"] , "author": "Veselin Todorov " From 4b3b42e6e3684fa3bf5949b1e1f0fb7238a1c226 Mon Sep 17 00:00:00 2001 From: Veselin Todorov Date: Sat, 11 Jun 2016 13:13:41 +0300 Subject: [PATCH 3/3] Update Readme.md --- Readme.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 955f1a8..e18329a 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,20 @@ [![Build Status](https://secure.travis-ci.org/vesln/bot.png)](http://travis-ci.org/vesln/bot) +# Important Notice + +I'm no longer actively maintaining this project. If you are interested supporting it - [ping me on twitter](https://twitter.com/vesln). +The only thing that I will ask you is to not change the API drastically. If you are planning on doing that - better start a brand new project. + +If you want me to transfer you only the name on npm, I'd be happy to only if the project **does not have any downloads on npm lately**. In case it's being +downloaded, there are people that depend on it and might step up and start maintaining, so I will not transfer it to you, regardless if you want to release +a new major version etc. + +If you have any other questions, let me know. + +Thanks! + +Veselin + # Bot ![screenshot](http://img850.imageshack.us/img850/79/screenshot20120121at637.png) @@ -64,4 +79,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE.