Skip to content

Commit 7377683

Browse files
committed
Renaming to sourcejs-comments
Translating to EN Adding install instructions
1 parent 5fc8f11 commit 7377683

File tree

6 files changed

+94
-36
lines changed

6 files changed

+94
-36
lines changed

LICENSE

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
The MIT License (MIT)
1+
# The MIT License
22

3-
Copyright (c) 2013 Source
3+
Copyright © 2013-2015 Sourcejs.com
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy of
6-
this software and associated documentation files (the "Software"), to deal in
7-
the Software without restriction, including without limitation the rights to
8-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software is furnished to do so,
10-
subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
116

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
148

15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 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.

README.md

Lines changed: 79 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,84 @@
1-
Bubble
1+
Comments plugin
22
===============
33

4-
[SourceJS](http://sourcejs.com) plugin for spec comments.
4+
Comments plugin for [SourceJS](http://sourcejs.com) for commenting Spec examples.
55

66
![image](http://d.pr/i/kISN+)
77

8-
Compatible with SourceJS v0.4+, for v0.3.* use [previous release](https://github.com/sourcejs/sourcejs-bubble/archive/v0.0.9.zip).
8+
___
9+
10+
To install, run npm in `sourcejs/user` folder:
11+
12+
```
13+
npm install sourcejs-comments --save
14+
```
15+
16+
Then run Grunt update in SourceJS root:
17+
18+
```
19+
cd sourcejs
20+
grunt update
21+
```
22+
23+
After installation, all your Specs pages will have "Add description" tumbler in inner menu, that will active the plugin.
24+
25+
## Dependencies
26+
27+
### MongoDB
28+
29+
As [MongoDB](http://www.mongodb.org/) is not essential dependency for SourceJS, you must install it separately, to work with plugins that expect data storage.
30+
31+
[Install it](http://docs.mongodb.org/manual/installation/), run locally or remotely and configure your SourceJS in `sourcejs/user/options.js`:
32+
33+
```json
34+
core: {
35+
"production": {
36+
"host": "localhost",
37+
"dbName": "sourcejs"
38+
}
39+
}
40+
```
41+
42+
Host could point to remote service. Database name could be custom as well.
43+
44+
#### Connect to DB from app
45+
46+
Then prepare `mongoose` dependency - as it must be common for every plugins, install it in `sourcejs/user`
47+
48+
```
49+
npm install mongoose --save
50+
```
51+
52+
And edit `/sourcejs/user/core/app.js`, that extends main SourceJS application. Just add this code snippet, for connection to database:
53+
54+
```js
55+
/* Connect to DB */
56+
var mongoose = require('mongoose');
57+
58+
var dbAdress = 'mongodb://' + global.opts.core.production.host + '/' + global.opts.core.production.dbName;
59+
60+
mongoose.connection.on("connecting", function() {
61+
return console.log("Started connection on " + (dbAdress).cyan + ", waiting for it to open...".grey);
62+
});
63+
mongoose.connection.on("open", function() {
64+
return console.log("MongoDB connection opened!".green);
65+
});
66+
mongoose.connection.on("error", function(err) {
67+
console.log("Could not connect to mongo server!".red);
68+
return console.log(err.message.red);
69+
});
70+
71+
mongoose.connect(dbAdress);
72+
/* /Connect to DB */
73+
```
74+
75+
## Updates
76+
77+
**0.3.0** release:
78+
- markdown syntax support based on [Pagedown converter](https://code.google.com/p/pagedown/);
79+
- migration from CouchDB to MongoDB;
80+
- some design improvements
81+
82+
___
83+
84+
Compatible with SourceJS v0.4+, for v0.3.* use [previous release](https://github.com/sourcejs/sourcejs-comments/archive/v0.0.9.zip).

assets/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ define([
1010
"sourceModules/module",
1111
"sourceModules/innerNavigation",
1212
"sourceModules/css",
13-
"text!node_modules/sourcejs-bubble/assets/templates/bubble.html"
13+
"text!node_modules/sourcejs-comments/assets/templates/bubble.html"
1414
], function ($, module, innerNavigation, css, template) {
1515

16-
var moduleCss = new css("/node_modules/sourcejs-bubble/assets/css/bubble.css");
16+
var moduleCss = new css("/node_modules/sourcejs-comments/assets/css/bubble.css");
1717

1818
function Bubble() {
1919

assets/templates/bubble.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<div class='source-bbl_w'>
22
<div class='js-bbl'>
33
<div class='source-bbl_form'>
4-
<textarea class='source-bbl_it' placeholder='Ваш комментарий'></textarea>
4+
<textarea class='source-bbl_it' placeholder='Your comment...'></textarea>
55
<div class='source-bbl_sep'></div>
6-
<input class='source-bbl_name' placeholder='Подпишитесь, чтобы вас узнали'/>
6+
<input class='source-bbl_name' placeholder='Signature'/>
77
<div class='source-bbl_actions'>
88
<button class='js-bbl_submit'>Save</button>
99
<a href='#' class='js-bbl_cancel'>Cancel</a>

core/index.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/**
2-
* Created by Alexey Ostrovsky.
3-
* Date: 05.08.13
4-
* Time: 19:12
5-
*/
6-
7-
81
var mongoose = require('mongoose');
92

103
// data model

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"name": "sourcejs-bubble",
3-
"version": "0.1.3",
2+
"name": "sourcejs-comments",
3+
"version": "0.1.4",
44
"description": "SourceJS plugin for spec comments",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/sourcejs/sourcejs-bubble.git"
7+
"url": "https://github.com/sourcejs/sourcejs-comments.git"
88
},
99
"keywords": [
1010
"sourcejs",
1111
"plugin",
1212
"comments"
1313
],
14-
"author": "Gennady Tsarinny",
14+
"author": "Gennady Tsarinny, Alexey Ostrovsky",
1515
"bugs": {
16-
"url": "https://github.com/sourcejs/sourcejs-bubble/issues"
16+
"url": "https://github.com/sourcejs/sourcejs-comments/issues"
1717
},
18-
"homepage": "https://github.com/sourcejs/sourcejs-bubble"
18+
"homepage": "https://github.com/sourcejs/sourcejs-comments"
1919
}

0 commit comments

Comments
 (0)