From 7ff7fe3d3c8c97e4805e2f6fd023a4953f988bb7 Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Wed, 20 Feb 2013 12:36:07 -0800 Subject: [PATCH 1/7] add css3 fade in/out transition to post menus --- app/assets/stylesheets/application/topic-post.css.scss | 1 + app/assets/stylesheets/foundation/mixins.scss | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/app/assets/stylesheets/application/topic-post.css.scss b/app/assets/stylesheets/application/topic-post.css.scss index a0914220636..9b95434e143 100644 --- a/app/assets/stylesheets/application/topic-post.css.scss +++ b/app/assets/stylesheets/application/topic-post.css.scss @@ -200,6 +200,7 @@ section.post-menu-area { .discourse-no-touch & { opacity: 0.2; + @include fade-soft(1s); } } diff --git a/app/assets/stylesheets/foundation/mixins.scss b/app/assets/stylesheets/foundation/mixins.scss index b4c4193f9b8..149a459c3e4 100644 --- a/app/assets/stylesheets/foundation/mixins.scss +++ b/app/assets/stylesheets/foundation/mixins.scss @@ -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; From 6885e6cfa97fc0f3a46b12ad99a3c0c35b0946ff Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 20 Feb 2013 15:40:38 -0500 Subject: [PATCH 2/7] Fix login with google in IE9 --- .../javascripts/discourse/views/modal/login_view.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/views/modal/login_view.js.coffee b/app/assets/javascripts/discourse/views/modal/login_view.js.coffee index 014b03d3caf..2dee73f957f 100644 --- a/app/assets/javascripts/discourse/views/modal/login_view.js.coffee +++ b/app/assets/javascripts/discourse/views/modal/login_view.js.coffee @@ -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) From 2668be690fecb60190698271f2d5f90082099d3f Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 20 Feb 2013 16:00:52 -0500 Subject: [PATCH 3/7] version bump --- lib/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/version.rb b/lib/version.rb index 9019d804cb0..c1b5062db68 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -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('.') From 451412ef2ec3299a42b980517255f047eccec10b Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Wed, 20 Feb 2013 13:07:38 -0800 Subject: [PATCH 4/7] copyedits on readme --- README.md | 68 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index f39a22a906a..ff1328754f7 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ ![Logo](https://raw.github.com/discourse/discourse/master/images/discourse.png) -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. @@ -19,36 +18,43 @@ If you're familiar with how Rails works and are comfortable setting up your own ### Requirements -* PostgreSQL 9.1+ -* Redis 2+ +- PostgreSQL 9.1+ +- Redis 2.6+ +- Ruby 1.9.3+ ## 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: +This is a **Civilized Discourse Construction Kit**, an 100% open-source discussion platform that is free 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: + +- **Flattened discussion**, to avoid the akwardness of threaded discussion, while attaching replies which can 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, but delivers usability on both the desktop and the 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, and ensure that online discussions can grow and thrive in an Internet age dominated by micro-blogging and diminishing attention spans. 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 +1. Support only modern browsers on the desktop: -3. Deliver support for mobile/smartphones *as soon as possible*: - * Windows Phone 8 - * iPhone 4+ - * Android 4.0+ + - Internet Explorer 9.0, 10.0+ + - Firefox 16+ + - Google Chrome *infinite* + - Safari 5+ + +2. Support the latest generation of tablets: + + - iPad 2+ + - Android 4.1+ on 7" and 10" + - 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 @@ -63,9 +69,9 @@ In order to be prepared for 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 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!** @@ -97,9 +103,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/. From 2204ded09955b6edb61d46f522411ff9f1572434 Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Wed, 20 Feb 2013 13:22:12 -0800 Subject: [PATCH 5/7] further copyedits --- README.md | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index ff1328754f7..9127b918001 100644 --- a/README.md +++ b/README.md @@ -12,25 +12,28 @@ Whenever you need ... ## 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 +- Ruby 1.9.3+ - PostgreSQL 9.1+ - Redis 2.6+ -- Ruby 1.9.3+ ## Vision -This is a **Civilized Discourse Construction Kit**, an 100% open-source discussion platform that is free to use and contribute to -- forever. +Discourse is a **Civilized Discourse Construction Kit**, an 100% open-source discussion platform that is free for everyone to use and contribute to -- forever. Key Discourse mission goals: -- **Flattened discussion**, to avoid the akwardness of threaded discussion, while attaching replies which can be expanded in place for additional context. +- A **flattened discussion**, to avoid the akwardness of threaded discussion, while allowing replies to be expanded 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, but delivers usability on both the desktop and the tablet, without the need for a native app. + +- 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, and ensure that online discussions can grow and thrive in an Internet age dominated by micro-blogging and diminishing attention spans. @@ -38,20 +41,15 @@ The Discourse team wishes to **foster an active community of contributors**, all This vision translates to the following functional commitments: 1. Support only modern browsers on the desktop: - - Internet Explorer 9.0, 10.0+ - Firefox 16+ - - Google Chrome *infinite* - - Safari 5+ - -2. Support the latest generation of tablets: - + - Google Chrome 23+ + - Safari 5+ +2. Support the latest generation of tablets, 7" or larger - iPad 2+ - - Android 4.1+ on 7" and 10" + - 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+ @@ -67,7 +65,7 @@ accepts contributions from the public, and we'd like you to be a part of that co In order to be prepared for 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 @@ -77,7 +75,7 @@ In order to be prepared for contributing to Discourse, please: ## 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 From 85f8f8f2d5dda35f9948c820404b813ac935840d Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 20 Feb 2013 16:24:52 -0500 Subject: [PATCH 6/7] Better checking of blacklisted emails on create and when email is being updated --- app/models/user.rb | 4 ++-- spec/models/user_spec.rb | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 47d5eb24ac8..e9ae855b7da 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index a8b740340a1..1771f9b2efb 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -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 From 68ad545f0f275390a5c1f1e216edbb482d372a45 Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Wed, 20 Feb 2013 13:33:11 -0800 Subject: [PATCH 7/7] copyedits --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9127b918001..12b1d5ee6db 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Discourse is a **Civilized Discourse Construction Kit**, an 100% open-source dis Key Discourse mission goals: -- A **flattened discussion**, to avoid the akwardness of threaded discussion, while allowing replies to be expanded for additional context. +- 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. @@ -36,7 +36,7 @@ Key Discourse mission goals: - 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, and ensure that online discussions can grow and thrive in an Internet age dominated by micro-blogging and diminishing attention spans. +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: @@ -62,7 +62,7 @@ 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 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