Skip to content

Commit 21b5628

Browse files
committed
Initial release of Discourse
0 parents  commit 21b5628

File tree

2,932 files changed

+143949
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,932 files changed

+143949
-0
lines changed

.autotest

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Autotest.add_hook :initialize do |autotest|
2+
%w{.git .svn .hg .DS_Store db log tmp vendor ._*}.each do |exception|
3+
autotest.add_exception(exception)
4+
end
5+
end

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
#
3+
# If you find yourself ignoring temporary files generated by your text editor
4+
# or operating system, you probably want to add a global ignore instead:
5+
# git config --global core.excludesfile ~/.gitignore_global
6+
7+
tags
8+
9+
.DS_Store
10+
._.DS_Store
11+
dump.rdb
12+
13+
.sass-cache/*
14+
15+
# Ignore bundler config
16+
/.bundle
17+
/.vagrant
18+
/.vagrantfile
19+
/cache
20+
/coverage/*
21+
22+
# Ignore the default SQLite database and db dumps
23+
/db/*.sqlite3
24+
/dbs/*.sql
25+
/dbs/*.sql.gz
26+
27+
# Ignore all logfiles and tempfiles.
28+
/log/*.log
29+
/tmp
30+
31+
# Ignore Eclipse .project file
32+
/.project
33+
34+
# Ignore Eclipse .buildpath file
35+
/.buildpath
36+
37+
# Ignore RubyMine settings
38+
/.idea
39+
40+
# Ignore gem that is copied in
41+
MiniProfiler/Ruby/rack-mini-profiler-2.0.1a.gem
42+
43+
sublime-project.sublime-workspace
44+
45+
# Vim temp files
46+
*~
47+
*.swp
48+
*.swo
49+
50+
# don't check in multisite config
51+
config/multisite.yml
52+
# don't check in my renamed multisite config as well :)
53+
config/multisite1.yml
54+
config/fog_credentials.yml
55+
56+
/public/uploads
57+
/public/stylesheet-cache/*
58+
59+
# Scripts used for downloading/refshing db
60+
script/download_db
61+
script/refresh_db

.rspec

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--colour

AUTHORS.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# The Discourse Team
2+
3+
* Jeff Atwood - Founder, Principal Overlord, Lead Systems Design
4+
5+
* Robin Ward - Co-Founder, Ruby developer
6+
7+
* Sam Saffron - Co-Founder, Ruby developer
8+
9+
* Neil Lalonde - Ruby Developer
10+
11+
* Ryan Mudryk - UI Implementation, supplemental
12+
13+
### Specials Thanks To
14+
15+
* Nick Sahler - UI Implementation, supplemental
16+
17+
* Don Petersen - Ruby developmer, installation scripts
18+
19+
*For a more detailed list of the many individuals that contributed to the design and development of Discourse outside of GitHub, please refer to the official Discourse website.*

CONTRIBUTING.md

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Contributing to Discourse
2+
3+
## Before You Start
4+
5+
Anyone wishing to contribute to the **[Discourse/Core](https://github.com/discourse/core)** project **MUST read & sign the [Discourse Forums Contribution License Agreement](https://github.com/discourse/core-cla)**. The Discourse team is legally prevented from accepting any pull requests from users who have not signed the CLA first.
6+
7+
## Reporting Bugs
8+
9+
1. Update to the most recent master release; the bug may already be resolved.
10+
11+
2. Search for similar issues on the Discourse development forums; it may already be an identified bug.
12+
13+
3. On GitHub, provide the details of the issue, with any included workflows, screenshots, or links to examples on jsfiddle.net. If possible, submit a Pull Request with a failing test. If you'd rather take matters into your own hands, fix the bug yourself (jump down to the "Contributing (Step-by-step)" section).
14+
15+
4. The Discourse team will work with you until your issue can be verified. Once verified, a team member will flag the issue appropriately, lock it, and create a new topic discussing the bug on the Discourse forums.
16+
17+
5. Continue to monitor the progress/discussion surrounding the bug by reading the topic assigned to your bug on the Discourse forums.
18+
19+
6. When the bug is fixed, the Discourse topic will be frozen, and the bug will be marked as fixed in the repo, with the appropriate commit assigned to the fix for tracking purposes.
20+
21+
## Requesting New Features
22+
23+
1. Do not submit a feature request on GitHub; all feature requests on GitHub will be closed. Instead, visit the Discourse development forums, and search for the "Feature Request" category, which will filter a list of outstanding requests. Review this list for similar feature requests. It's possible somebody has already asked for this feature or provided a pull request that we're still discussing.
24+
25+
2. Provide a clear and detailed explanation of the feature you want and why it's important to add. The feature must apply to a wide array of users of Discourse; for smaller, more targeted "one-off" features, you might consider writing a plugin for Discourse. You may also want to provide us with some advance documentation on the feature, which will help the community to better understand where it will fit.
26+
27+
3. If you're a Rock Star programmer, build the feature yourself (refer to the "Contributing (Step-by-step)" section below).
28+
29+
## Contributing (Step-by-step)
30+
31+
1. Clone the Repo:
32+
33+
```
34+
git clone git://github.com/discourse/core.git
35+
```
36+
37+
2. Create a new Branch:
38+
39+
```
40+
cd core
41+
git checkout -b new_discourse_branch
42+
```
43+
44+
3. Code
45+
46+
Make some magic happen! Remember to:
47+
* Adhere to conventions.
48+
* Update CHANGELOG with a description of your work.
49+
* Include tests, and ensure they pass.
50+
* Remember to check to see if your new functionality has an impact on our Documentation, and include updates as appropriate.
51+
52+
Completing these steps will increase the chances of your code making it into **[Discourse/Core](https://github.com/discourse/core)**.
53+
54+
4. Commit
55+
56+
```
57+
git commit -a
58+
```
59+
60+
**Do not leave the commit message blank!** Provide a detailed description of your commit!
61+
62+
### PRO TIP
63+
64+
Ensure that if you supply a multitude of commits, they are **squashed into a single commit**:
65+
66+
```
67+
git remote add upstream https://github.com/discourse/core.git
68+
git fetch upstream
69+
git checkout new_discourse_branch
70+
git rebase upstream/master
71+
git rebase -i
72+
73+
< Choose 'squash' for all of your commits except the first one. >
74+
< Edit the commit message to make sense, and describe all your changes. >
75+
76+
git push origin new_discourse_branch -f
77+
```
78+
79+
5. Update your branch
80+
81+
```
82+
git checkout master
83+
git pull --rebase
84+
```
85+
86+
6. Fork
87+
88+
```
89+
git remote add mine [email protected]:<your user name>/core.git
90+
```
91+
92+
7. Push to your remote
93+
94+
```
95+
git push mine new_discourse_branch
96+
```
97+
98+
8. Issue a Pull Request
99+
100+
In order to make a pull request,
101+
* Navigate to the Discourse repository you just pushed to (e.g. https://github.com/your-user-name/discourse)
102+
* Click "Pull Request".
103+
* Write your branch name in the branch field (this is filled with "master" by default)
104+
* Click "Update Commit Range".
105+
* Ensure the changesets you introduced are included in the "Commits" tab.
106+
* Ensure that the "Files Changed" incorporate all of your changes.
107+
* Fill in some details about your potential patch including a meaningful title.
108+
* Click "Send pull request".
109+
110+
Once these steps are done, you will soon receive feedback from The Discourse team!
111+
112+
9. Responding to Feedback
113+
114+
The Discourse team may recommend adjustments to your code, and this is perfectly normal. Part of interacting with a healthy open-source community requires you to be open to learning new techniques and strategies; *don't get discouraged!* Remember: if the Discourse team suggest changes to your code, **they care enough about your work that they want to include it**, and hope that you can assist by implementing those revisions on your own.

COPYRIGHT.txt

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
All Discourse code is Copyright 2013 by Civilized Discourse Construction Kit, Inc.
2+
3+
This program is free software; you can redistribute it and/or modify
4+
it under the terms of the GNU General Public License as published by
5+
the Free Software Foundation; either version 2 of the License, or (at
6+
your option) any later version.
7+
8+
This program is distributed in the hope that it will be useful, but
9+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10+
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11+
for more details.
12+
13+
You should have received a copy of the GNU General Public License
14+
along with this program as the file LICENSE.txt; if not, please see
15+
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
16+
17+
Discourse is a registered trademark of FIRSTNAME LASTNAME.
18+
19+
Discourse includes works under other copyright notices and distributed
20+
according to the terms of the GNU General Public License or a compatible
21+
license (where indicated), including:
22+
23+
Javascript
24+
25+
Ember.js - Copyright (c) 2012-2013 Yehuda Katz, Tom Dale, Charles Jolley and Ember.js contributors
26+
27+
jQuery - Copyright (c) 2010-2013 John Resig
28+
29+
Ruby
30+
31+
Rails - Copyright (c) 2005-2013 David Heinemeier Hansson, Rails Core Team contributors (MIT)
32+
33+
Thin - Copyright (c) 2012-2013 Marc-Andre Cournoyer

DEVELOPMENT.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Discourse Developer Install Guide
2+
3+
If you'd like to set up a development environment for Discourse, the easiest way is by using a virtual machine.
4+
5+
### Getting Started
6+
7+
1. Install the Xcode tools: https://developer.apple.com/xcode/
8+
2. Install VirtualBox: https://www.virtualbox.org/wiki/Downloads
9+
3. Install Ruby 1.9.3. We recommend RVM: https://rvm.io/
10+
4. Open a terminal
11+
5. Clone the project: `[email protected]:discourse/core.git`
12+
6. Enter the project directory: `cd core`
13+
7. Install vagrant: `gem install vagrant`
14+
15+
### Using Vagrant
16+
17+
When you're ready to start working, boot the VM:
18+
```
19+
vagrant up
20+
```
21+
22+
It should prompt you for your admin password. This is so it can mount your local files inside the VM for an easy workflow.
23+
24+
(The first time you do this, it will take a while as it downloads the VM image and installs it. Go grab a coffee.)
25+
26+
Once the machine has booted up, you can shell into it by typing:
27+
28+
```
29+
vagrant ssh
30+
```
31+
32+
### Keeping your VM up to date
33+
34+
Now you're in a virtual machine is almost ready to start developing. It's a good idea to perform the following instructions
35+
*every time* you pull from master to ensure your environment is still up to date.
36+
37+
```
38+
bundle install
39+
bundle exec rake db:migrate
40+
bundle exec rake db:seed_fu
41+
```
42+
43+
### Starting Rails
44+
45+
Once your VM is up to date, you can start a rails instance using the following command:
46+
47+
```
48+
bundle exec rails server
49+
```
50+
51+
In a few seconds, rails will start server pages. To access them, open a web browser to http://localhost:4000 - if it all worked you should see discourse! Congratulations, you are ready to start working!
52+
53+
You can now edit files on your local file system, using your favorite text editor or IDE. When you reload your web browser, it should have the latest changed.
54+
55+
### Guard + Rspec
56+
57+
If you're actively working on Discourse, we recommend that you run Guard. It'll automatically run our unit tests over and over, and includes support
58+
for live CSS reloading.
59+
60+
To use it, follow all the above steps. Once rails is running, open a new terminal window or tab, and then do this:
61+
62+
```
63+
vagrant ssh
64+
bundle exec guard -p
65+
```
66+
67+
Wait a minute while it runs all our unit tests. Once it has completed, live reloading should start working. Simply save a file locally, wait a couple of seconds and you'll see it change in your browser. No reloading of pages should be necessary for the most part, although if something doesn't update you should refresh to confirm.
68+
69+
70+
### Shutting down the VM
71+
72+
When you're done working on Discourse, you can shut down Vagrant like so:
73+
74+
```
75+
vagrant halt
76+
```
77+

0 commit comments

Comments
 (0)