Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Update version to 2.0.0
  • Loading branch information
mweibel committed Jul 10, 2015
2 parents a9dcafe + 7e43947 commit cd048fd
Show file tree
Hide file tree
Showing 72 changed files with 7,751 additions and 14,889 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EditorConfig is awesome: http://EditorConfig.org

root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
res/notify.m4a binary
res/notify.ogg binary
res/notify.mp3 binary
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ example/.htaccess
.idea
.ndproj/Data
.ndproj/Menu.txt
node_modules
node_modules
bower_components
candy.bundle.*
candy.min.*
libs.bundle.*
libs.min.*
.vagrant
*.log
lcov.info
12 changes: 0 additions & 12 deletions .gitmodules

This file was deleted.

6 changes: 4 additions & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
"undef": true,
"unused": true,
"trailing": true,
"maxdepth": 4
}
"maxdepth": 5,
"laxcomma": true,
"browser": true
}
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: node_js
node_js:
- '0.10'
env:
global:
- SAUCE_USERNAME: candy-chat-ci
- SAUCE_ACCESS_KEY: 6c3e7f58-b230-4b91-8bcb-290cf28c1457
- CANDY_VAGRANT: false
before_script:
- sudo apt-get update
- sudo apt-get install -y nginx
- sudo mkdir -p /usr/share/nginx/html
- sudo cp ${TRAVIS_BUILD_DIR}/devbox/nginx-default.conf /etc/nginx/sites-available/default
- sudo /etc/init.d/nginx restart
- sudo ln -fs ${TRAVIS_BUILD_DIR} /usr/share/nginx/html/candy
- sudo ln -fs ${TRAVIS_BUILD_DIR}/devbox/index.html /usr/share/nginx/html/index.html
- sudo apt-get install -y naturaldocs
- npm install -g grunt-cli bower
- npm install
- bower install
script:
- grunt ci
30 changes: 20 additions & 10 deletions CONTRIBUTING.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

## Learn & listen

[![Gitter chat](https://badges.gitter.im/candy-chat.png)](https://gitter.im/candy-chat)

* [Mailing list](http://groups.google.com/group/candy-chat)
* yes, non-gmail users can signup as well
* [FAQ](https://github.com/candy-chat/candy/wiki/Frequently-Asked-Questions)
Expand All @@ -21,8 +23,7 @@ A few hopefully helpful hints to contributing to Candy
#### Using vagrant
1. [Fork](https://help.github.com/articles/fork-a-repo) Candy
2. [Install Vagrant](http://vagrantup.com/)
3. Follow instructions [for Candy Vagrant](https://github.com/candy-chat/vagrant)
4. Change the remote in the `candy` and `candy-plugins` repos: `git remote set-url origin git://github.com/YOURNAME/candy` (or candy-plugins)
3. Run `vagrant up`.
5. Create a branch based on the `dev` branch (`git checkout -B my-awesome-feature`)
6. Run `grunt watch` to automatically run jshint (syntax checker) and the build of `candy.bundle.js` and `candy.min.js` while developing.
7. Make your changes, fix eventual *jshint* errors & push them back to your fork
Expand All @@ -34,13 +35,22 @@ Please note that you should have a working XMPP server to test your changes (the

1. [Fork](https://help.github.com/articles/fork-a-repo) Candy
2. Clone your fork
2. Checkout out `dev` branch (`git checkout dev`) & Update git submodules `git submodule update --init`
3. Install [Node.js](http://nodejs.org/)
4. Install [Grunt](http://gruntjs.com/) (`npm install -g grunt-cli`)
5. Install npm dependencies (`npm install` in candy root directory)
6. Create a branch based on the `dev` branch (`git checkout -B my-awesome-feature`)
7. Run `grunt watch` to automatically run jshint (syntax checker) and the build of `candy.bundle.js` and `candy.min.js` while developing.
8. Make your changes, fix eventual *jshint* errors & push them back to your fork
9. Create a [pull request](https://help.github.com/articles/using-pull-requests)
3. Checkout out `dev` branch (`git checkout dev`)
4. Install [Node.js](http://nodejs.org/)
5. Install [Grunt](http://gruntjs.com/) (`npm install -g grunt-cli`)
6. Install [Bower](http://bower.io/) (`npm install -g bower`)
7. Install npm dependencies (`npm install` in candy root directory)
8. Install bower dependencies (`bower install` in candy root directory)
9. Create a branch based on the `dev` branch (`git checkout -B my-awesome-feature`)
10. Run `grunt watch` to automatically run jshint (syntax checker) and the build of `candy.bundle.js` and `candy.min.js` while developing.
11. Make your changes, fix eventual *jshint* errors & push them back to your fork
12. Create a [pull request](https://help.github.com/articles/using-pull-requests)

In case you have any questions, don't hesitate to ask on the [Mailing list](http://groups.google.com/group/candy-chat).

### Running tests

* Tests are run using [Intern](http://theintern.io).
* `grunt` and `grunt watch` will each run unit tests in Chrome on Linux (for fast feedback).
* `grunt test` will run both unit and integration tests in a variety of environments. Tests are run using Selenium Standalone and Phantom.JS while developing, and on Sauce Labs in CI or using `grunt test`.
* If you don't want to use the Vagrant box to run Selenium/PhantomJS, set `CANDY_VAGRANT='false'` to run tests.
103 changes: 82 additions & 21 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
'use strict';

var localInternConfig = process.env.CANDY_VAGRANT === 'false' ? 'tests/intern.local' : 'tests/intern.vagrant';

module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

jshint: {
all: ['Gruntfile.js', './src/**/*.js'],
all: ['Gruntfile.js', './src/**/*.js', './tests/**/*.js'],
options: {
jshintrc: "./.jshintrc",
reporter: require('jshint-stylish')
Expand All @@ -30,8 +31,11 @@ module.exports = function(grunt) {
'src/candy.js', 'src/core.js', 'src/view.js',
'src/util.js', 'src/core/action.js',
'src/core/chatRoom.js', 'src/core/chatRoster.js',
'src/core/chatUser.js', 'src/core/event.js',
'src/view/observer.js', 'src/view/pane.js',
'src/core/chatUser.js', 'src/core/contact.js',
'src/core/event.js', 'src/view/observer.js',
'src/view/pane/chat.js', 'src/view/pane/message.js',
'src/view/pane/privateRoom.js', 'src/view/pane/room.js',
'src/view/pane/roster.js', 'src/view/pane/window.js',
'src/view/template.js', 'src/view/translation.js'
]
},
Expand All @@ -53,14 +57,15 @@ module.exports = function(grunt) {
},
libs: {
files: {
'libs/libs.bundle.js': [
'libs/strophejs/strophe.js',
'libs/strophejs-plugins/muc/strophe.muc.js',
'libs/strophejs-plugins/disco/strophe.disco.js',
'libs/strophejs-plugins/caps/strophe.caps.jsonly.js',
'libs/mustache.js/mustache.js',
'libs/jquery-i18n/jquery.i18n.js',
'libs/dateformat/dateFormat.js'
'libs.bundle.js': [
'bower_components/strophe/strophe.js',
'bower_components/strophejs-plugins/muc/strophe.muc.js',
'bower_components/strophejs-plugins/roster/strophe.roster.js',
'bower_components/strophejs-plugins/disco/strophe.disco.js',
'bower_components/strophejs-plugins/caps/strophe.caps.jsonly.js',
'bower_components/mustache/mustache.js',
'bower_components/jquery-i18n/jquery.i18n.js',
'vendor_libs/dateformat/dateFormat.js'
]
},
options: {
Expand All @@ -73,23 +78,38 @@ module.exports = function(grunt) {
},
'libs-min': {
files: {
'libs/libs.min.js': ['libs/libs.bundle.js']
'libs.min.js': ['libs.bundle.js']
}
}
},
watch: {
clear: {
files: ['src/*.js', 'src/**/*.js', 'tests/**/*.js'],
tasks: ['clear']
},
grunt: {
files: ['Gruntfile.js']
},
bundle: {
files: ['src/*.js', 'src/**/*.js'],
tasks: ['jshint', 'uglify:bundle', 'uglify:min', 'notify:bundle']
files: ['src/**/*.js'],
tasks: ['todo:src', 'jshint', 'uglify:bundle', 'uglify:min', 'notify:bundle', 'intern:unit']
},
libs: {
files: ['libs/*/**/*.js'],
files: ['bower_components/*/**/*.js', 'vendor_libs/*/**/*.js'],
tasks: ['uglify:libs', 'uglify:libs-min', 'notify:libs']
},
tests: {
files: ['tests/candy/unit/**/*.js'],
tasks: ['todo:tests', 'jshint', 'intern:unit']
},
functional_tests: {
files: ['tests/candy/functional/**/*.js'],
tasks: ['todo:tests', 'jshint', 'intern:functional']
}
},
natural_docs: {
all: {
bin: process.env.NATURALDOCS_DIR + '/NaturalDocs',
bin: process.env.NATURALDOCS_DIR ? process.env.NATURALDOCS_DIR + '/NaturalDocs' : 'naturaldocs',
flags: ['-r'],
inputs: ['./src'],
output: './docs',
Expand All @@ -98,7 +118,7 @@ module.exports = function(grunt) {
},
clean: {
bundle: ['./candy.bundle.js', './candy.bundle.map', './candy.min.js'],
libs: ['./libs/libs.bundle.js', './libs/libs.bundle.map', './libs/libs.min.js'],
libs: ['./libs.bundle.js', './libs.bundle.map', './libs.min.js'],
docs: ['./docs']
},
mkdir: {
Expand Down Expand Up @@ -129,6 +149,41 @@ module.exports = function(grunt) {
message: 'JsHint & bundling done'
}
}
},
intern: {
all: {
options: {
runType: 'runner',
config: 'tests/intern'
}
},
unit: {
options: {
runType: 'runner',
config: localInternConfig,
functionalSuites: []
}
},
functional: {
options: {
runType: 'runner',
config: localInternConfig,
suites: []
}
}
},
coveralls: {
options: {
force: true // prevent from failing CI build if coveralls is down etc.
},
all: {
src: 'lcov.info',
}
},
todo: {
options: {},
src: ['src/**/*.js'],
tests: ['tests/**/*.js']
}
});

Expand All @@ -140,10 +195,16 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-mkdir');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-sync-pkg');
grunt.loadNpmTasks('intern');
grunt.loadNpmTasks('grunt-clear');
grunt.loadNpmTasks('grunt-coveralls');
grunt.loadNpmTasks('grunt-todo');

grunt.registerTask('test', ['intern:all']);
grunt.registerTask('ci', ['todo', 'jshint', 'build', 'intern:all', 'coveralls:all', 'docs']);
grunt.registerTask('build', ['uglify:libs', 'uglify:libs-min', 'uglify:bundle', 'uglify:min']);
grunt.registerTask('default', [
'jshint', 'uglify:libs', 'uglify:libs-min',
'uglify:bundle', 'uglify:min', 'notify:default'
'jshint', 'build', 'notify:default', 'intern:unit'
]);
grunt.registerTask('docs', ['mkdir:docs', 'natural_docs', 'notify:docs']);
};
};
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Candy — a JavaScript-based multi-user chat client
==================================================

[![Build Status](https://travis-ci.org/candy-chat/candy.png?branch=dev)](https://travis-ci.org/candy-chat/candy)
[![Coverage Status](https://coveralls.io/repos/candy-chat/candy/badge.png?branch=dev)](https://coveralls.io/r/candy-chat/candy)

Visit the official project page: http://candy-chat.github.io/candy

Features
Expand All @@ -11,7 +14,7 @@ Features
- 100% well-documented JavaScript source code
- Built for Jabber (XMPP), using famous technologies
- Used and approved in a productive environment with up to 400 concurrent users
- Works with all major web browsers including IE7
- Works with all major web browsers including IE9

Plugins
-------
Expand All @@ -20,6 +23,6 @@ If you wish to add new functionality (to your candy installation) or contribute
Support & Community
-------------------
Take a look at our [FAQ](https://github.com/candy-chat/candy/wiki/Frequently-Asked-Questions). If it doesn't solve your questions, you're welcome to join our [Mailinglist on Google Groups](http://groups.google.com/group/candy-chat).
You don't need to have a Gmail account for it.
You don't need to have a Gmail account for it.

[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/a41a8075608abeaf99db685d7ef29cf6 "githalytics.com")](http://githalytics.com/candy-chat/candy)
20 changes: 20 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.network :forwarded_port, guest: 5280, host: 5280
config.vm.network :forwarded_port, guest: 4444, host: 4444
config.vm.network :private_network, ip: '192.168.88.4'

config.vm.provision :shell, :path => "devbox/provisioning.sh"

config.vm.provider "virtualbox" do |v|
v.name = "candy"
v.customize ["modifyvm", :id, "--memory", 768]
end
end
11 changes: 9 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,12 @@
"bower_components",
"test",
"tests"
]
}
],
"dependencies": {
"jquery": "~1.10.2",
"strophe": "1.1.3",
"strophejs-plugins": "benlangfeld/strophejs-plugins#30fb089457addc37e01d69c3536dee868a90a9ad",
"mustache": "0.3.0",
"jquery-i18n": "1.1.1"
}
}
Loading

2 comments on commit cd048fd

@lkraav
Copy link
Contributor

@lkraav lkraav commented on cd048fd Jul 10, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mweibel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;-)

Finally, yep. Please have a look at the newest issue and give your opinion.

Please sign in to comment.