mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 09:32:48 +08:00
Merge branch 'master' of https://github.com/discourse/discourse
This commit is contained in:
commit
7aad3bb3de
80
README.md
80
README.md
|
@ -1,54 +1,58 @@
|
|||
<a href="http://www.discourse.org/">![Logo](https://raw.github.com/discourse/discourse/master/images/discourse.png)</a>
|
||||
|
||||
Discourse is the 100% open source, next-generation discussion platform built for the next 10 years of the Internet.
|
||||
Discourse is the 100% open source, next-generation discussion platform built for the next decade of the Internet.
|
||||
|
||||
Whenever you need ...
|
||||
|
||||
* a mailing list
|
||||
* a forum to discuss something
|
||||
* a chat room where you can type paragraphs
|
||||
- a mailing list
|
||||
- a forum to discuss something
|
||||
- a chat room where you can type paragraphs
|
||||
|
||||
... consider Discourse.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
If you're interested in helping us develop Discourse, please start with our **[Discourse Vagrant Developer Guide](https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md)**, which includes instructions to get up and running in a development environment using a virtual machine. It's the easiest way to hack on Discourse.
|
||||
If you're interested in helping us develop Discourse, please start with our **[Discourse Vagrant Developer Guide](https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md)**, which includes instructions to get up and running in a development environment using a virtual machine. It's the easiest way to hack on Discourse!
|
||||
|
||||
If you're familiar with how Rails works and are comfortable setting up your own environment, you can use our **[Discourse Advanced Developer Guide](https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md)**
|
||||
If you're familiar with how Rails works and are comfortable setting up your own environment, use our **[Discourse Advanced Developer Guide](https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md)**.
|
||||
|
||||
### Requirements
|
||||
|
||||
* PostgreSQL 9.1+
|
||||
* Redis 2+
|
||||
- Ruby 1.9.3+
|
||||
- PostgreSQL 9.1+
|
||||
- Redis 2.6+
|
||||
|
||||
## Vision
|
||||
|
||||
This is the **Civilized Discourse Construction Kit**, a fully open-source package of forum software that is free to use and contribute to. Discourse embraces the changes that are necessary to evolve forum software, namely:
|
||||
Discourse is a **Civilized Discourse Construction Kit**, an 100% open-source discussion platform that is free for everyone to use and contribute to -- forever.
|
||||
|
||||
* A **flattened discussion**, which avoids the pains of threaded forums, and delivers a more robust, intuitive interface to join a conversation at any point.
|
||||
* A **self-learning system**, capable of examining the behavior of the community, and adapting to budding moderators and forum trolls alike.
|
||||
* A **seamless web-only** interface that delivers usability on both the desktop and the tablet, without the need for a native app.
|
||||
* A **contemporary, robust technology stack**, so that both users and administrators alike have another choice BESIDES php.
|
||||
Key Discourse mission goals:
|
||||
|
||||
The Discourse team wishes to **foster an active community of contributors**, all of whom commit to delivering this continued vision, and ensure that online discussions can grow and thrive in an Internet age dominated by micro-blogging and diminishing attention spans.
|
||||
- A **flattened, endlessly scrolling discussion**, avoiding the akwardness of traditionally threaded and paginated discussion, while allowing replies to be expanded in place for additional context.
|
||||
|
||||
- A **user trust system** that grants users additional rights to assist in moderating the forum as they participate in good faith over time. The goal is for the forum to be nearly self-moderating in the absence of any formal moderators, although excellent moderators accelerate the process greatly.
|
||||
|
||||
- An **advanced JavaScript app** which runs in modern browsers and works identically on desktop and tablet, without the need for a native app.
|
||||
|
||||
- A **contemporary, robust technology stack**, free of legacy PHP and MySQL constraints limiting developers and administrators.
|
||||
|
||||
The Discourse team wishes to **foster an active community of contributors**, all of whom commit to delivering this continued vision, ensuring that free, unfettered online discussion can grow and thrive in an Internet age dominated by micro-blogging, and diminishing attention spans. Online discussion belongs to all of us, not just huge corporate websites.
|
||||
|
||||
This vision translates to the following functional commitments:
|
||||
|
||||
1. Support all contemporary browsers on the desktop:
|
||||
* Internet Explorer 9.0, 10.0+
|
||||
* Firefox 16+
|
||||
* Google Chrome *infinite*
|
||||
|
||||
2. Supporting the latest generation of tablets:
|
||||
* iPad 2+
|
||||
* Android 4.1+ on 7" and 10"
|
||||
* Windows 8
|
||||
|
||||
3. Deliver support for mobile/smartphones *as soon as possible*:
|
||||
* Windows Phone 8
|
||||
* iPhone 4+
|
||||
* Android 4.0+
|
||||
1. Support only modern browsers on the desktop:
|
||||
- Internet Explorer 9.0, 10.0+
|
||||
- Firefox 16+
|
||||
- Google Chrome 23+
|
||||
- Safari 5+
|
||||
2. Support the latest generation of tablets, 7" or larger
|
||||
- iPad 2+
|
||||
- Android 4.1+
|
||||
- Windows 8
|
||||
3. Deliver support for the latest generation of small screen mobile/smartphones *as soon as possible*:
|
||||
- Windows Phone 8
|
||||
- iOS 5+
|
||||
- Android 4.0+
|
||||
|
||||
## Contributing
|
||||
|
||||
|
@ -58,20 +62,20 @@ This vision translates to the following functional commitments:
|
|||
Discourse is **100% free** and **open-source**. We encourage and support an active, healthy community that
|
||||
accepts contributions from the public, and we'd like you to be a part of that community.
|
||||
|
||||
In order to be prepared for contributing to Discourse, please:
|
||||
Before contributing to Discourse, please:
|
||||
|
||||
1. Review the **VISION** section above, which will help you understand the needs of the team, and the focus of the project,
|
||||
2. Read & sign the **[Electronic Discourse Forums Contribution License Agreement](https://docs.google.com/a/discourse.org/spreadsheet/viewform?formkey=dGUwejFfbDhDYXR4bVFMRG1TUENqLWc6MQ)**, to confirm you've read and acknowledged the legal aspects of your contributions, and
|
||||
2. Read and sign the **[Electronic Discourse Forums Contribution License Agreement](https://docs.google.com/a/discourse.org/spreadsheet/viewform?formkey=dGUwejFfbDhDYXR4bVFMRG1TUENqLWc6MQ)**, to confirm you've read and acknowledged the legal aspects of your contributions, and
|
||||
3. Dig into **[CONTRIBUTING.MD](https://github.com/discourse/discourse/blob/master/docs/CONTRIBUTING.md)**, which houses all of the necessary info to:
|
||||
* submit bugs,
|
||||
* request new features, and
|
||||
* step you through the entire process of preparing your code for a Pull Request.
|
||||
- submit bugs,
|
||||
- request new features, and
|
||||
- step you through the entire process of preparing your code for a Pull Request.
|
||||
|
||||
**We look forward to seeing your cool stuff!**
|
||||
|
||||
## Expertise
|
||||
|
||||
Discourse implements a variety of open source tech. You may wish to familiarize yourself with the various components that Discourse is built on, in order to be an effective contributor:
|
||||
In order to be an effective contributor, familiarize yourself with the various open source omponents that Discourse is built on:
|
||||
|
||||
### Languages/Frameworks
|
||||
|
||||
|
@ -97,9 +101,9 @@ Releases will be numbered with the following format:
|
|||
|
||||
And constructed with the following guidelines:
|
||||
|
||||
* Breaking backward compatibility bumps the major (and resets the minor and patch)
|
||||
* New additions without breaking backward compatibility bumps the minor (and resets the patch)
|
||||
* Bug fixes and misc changes bumps the patch
|
||||
- Breaking backward compatibility bumps the major (and resets the minor and patch)
|
||||
- New additions without breaking backward compatibility bumps the minor (and resets the patch)
|
||||
- Bug fixes and misc changes bumps the patch
|
||||
|
||||
For more information on SemVer, please visit http://semver.org/.
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ window.Discourse.LoginView = window.Discourse.ModalBodyView.extend Discourse.Pre
|
|||
accountEmail: options['email']
|
||||
accountUsername: options['username']
|
||||
accountName: options['name']
|
||||
authOptions: options
|
||||
authOptions: Em.Object.create(options)
|
||||
|
||||
mouseMove: (e) ->
|
||||
@set('lastX', e.screenX)
|
||||
|
|
|
@ -200,6 +200,7 @@
|
|||
section.post-menu-area {
|
||||
.discourse-no-touch & {
|
||||
opacity: 0.2;
|
||||
@include fade-soft(1s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -160,6 +160,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
@mixin fade-soft($time: 1s) {
|
||||
transition: opacity $time ease-in-out;
|
||||
-moz-transition: opacity $time ease-in-out;
|
||||
-webkit-transition: opacity $time ease-in-out;
|
||||
-ms-transition: opacity $time ease-in-out;
|
||||
-o-transition: opacity $time ease-in-out;
|
||||
}
|
||||
|
||||
@mixin visible {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
|
|
|
@ -27,7 +27,7 @@ class User < ActiveRecord::Base
|
|||
validates_presence_of :email
|
||||
validates_uniqueness_of :email
|
||||
validate :username_validator
|
||||
validate :email_validator
|
||||
validate :email_validator, :if => :email_changed?
|
||||
validate :password_validator
|
||||
|
||||
before_save :cook
|
||||
|
@ -506,7 +506,7 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def email_validator
|
||||
if new_record? and (setting = SiteSetting.email_domains_blacklist).present?
|
||||
if (setting = SiteSetting.email_domains_blacklist).present?
|
||||
domains = setting.gsub('.', '\.')
|
||||
regexp = Regexp.new("@(#{domains})", true)
|
||||
if self.email =~ regexp
|
||||
|
|
|
@ -2,7 +2,7 @@ module Discourse
|
|||
module VERSION #:nodoc:
|
||||
MAJOR = 0
|
||||
MINOR = 8
|
||||
TINY = 0
|
||||
TINY = 1
|
||||
PRE = nil
|
||||
|
||||
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
||||
|
|
|
@ -484,6 +484,13 @@ describe User do
|
|||
SiteSetting.stubs(:email_domains_blacklist).returns('fakemail.com')
|
||||
u.should be_valid
|
||||
end
|
||||
|
||||
it 'should be used when email is being changed' do
|
||||
SiteSetting.stubs(:email_domains_blacklist).returns('mailinator.com')
|
||||
u = Fabricate(:user, email: 'good@gmail.com')
|
||||
u.email = 'nope@mailinator.com'
|
||||
u.should_not be_valid
|
||||
end
|
||||
end
|
||||
|
||||
describe 'passwords' do
|
||||
|
|
Loading…
Reference in New Issue
Block a user