diff --git a/.gitignore b/.gitignore index 5a7d5419a1e..b61a4a34a55 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,9 @@ dump.rdb /cache /coverage/* +config/database.yml +config/redis.yml + # Ignore the default SQLite database and db dumps /db/*.sqlite3 /dbs/*.sql @@ -59,3 +62,6 @@ config/fog_credentials.yml # Scripts used for downloading/refshing db script/download_db script/refresh_db + +# temp directory for chef (used to configure vagrant VM) +chef/tmp/* diff --git a/.travis.yml b/.travis.yml index bb1d6fec500..bb5d35d9498 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,8 @@ language: ruby rvm: - 1.9.3 before_script: + - cp config/database.yml.sample config/database.yml + - cp config/redis.yml.sample config/redis.yml - psql -c 'create database discourse_test;' -U postgres - rake db:migrate script: 'rake spec && bundle exec guard-jasmine --server-timeout=60' diff --git a/DEVELOPER-ADVANCED.md b/DEVELOPER-ADVANCED.md new file mode 100644 index 00000000000..89cc2594109 --- /dev/null +++ b/DEVELOPER-ADVANCED.md @@ -0,0 +1,128 @@ +# Discourse Advanced Developer Install Guide + +This guide is aimed at advanced Rails developers who have installed their own Rails apps before. If you are new +to rails, you are likely much better off with our **[Discourse Vagrant Developer Guide](https://github.com/discourse/discourse/blob/master/VAGRANT.md)**. + +## First Steps + +1. Install and configure PostgreSQL 9.1+ +2. Install and configure Redis 2+ +3. Install Rails 1.9.3 and Bundler. +3. Clone the project. +4. Create development and test databases in postgres. +5. Copy `config/database.yml.sample' and `config/redis.yml.sample` to `config/database.yml` and `config/redis.yml.sample` and input the correct values to point to your postgres and redis instances. +6. We recommend starting with seed data to play around in your development environment. [Download Seed SQL Data](http://discourse.org/vms/dev-discourse-seed.sql). Install it into postgres using a command like this: `psql -d discourse_development < dev-discourse-seed.sql`. + + +## Before you start Rails + +1. `bundle install` +2. `rake db:migrate` +3. `rake db:test:prepare` +4. Try running the specs: `bundle exec rspec` +5. `bundle exec rails server` + +You should now be able to connect to rails on http://localhost:3000 - try it out! The seed data includes a pinned topic that explains how to get an admin account, so start there! Happy hacking! + + +# Building your own Vagrant VM + +Here are the steps we used to create the **[Vagrant Virtual Machine](https://github.com/discourse/discourse/blob/master/VAGRANT.md)**. They might be useful if you plan on setting up an environment from scratch on Linux: + + +## Base box + +Vagrant version 1.0.5. With this Vagrantfile: + + Vagrant::Config.run do |config| + config.vm.box = 'precise32' + config.vm.box_url = 'http://files.vagrantup.com/precise32.box' + config.vm.network :hostonly, '192.168.10.200' + + if RUBY_PLATFORM =~ /darwin/ + config.vm.share_folder("v-root", "/vagrant", ".", :nfs => true) + end + end + + vagrant up + vagrant ssh + +## Some basic setup: + + sudo su - + ln -sf /usr/share/zoneinfo/Canada/Eastern /etc/localtime + apt-get -yqq update + apt-get -yqq install python-software-properties + apt-get -yqq install vim curl expect debconf-utils git-core build-essential zlib1g-dev libssl-dev openssl libcurl4-openssl-dev libreadline6-dev libpcre3 libpcre3-dev + +## Unicode + + echo "export LANGUAGE=en_US.UTF-8" >> /etc/bash.bashrc + echo "export LANG=en_US.UTF-8" >> /etc/bash.bashrc + echo "export LC_ALL=en_US.UTF-8" >> /etc/bash.bashrc + export LANGUAGE=en_US.UTF-8 + export LANG=en_US.UTF-8 + export LC_ALL=en_US.UTF-8 + + locale-gen en_US.UTF-8 + dpkg-reconfigure locales + +## RVM and Ruby + + apt-get -yqq install libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config curl build-essential git + + su - vagrant -c "sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)" + adduser vagrant rvm + source /etc/profile.d/rvm.sh + su - vagrant -c "rvm pkg install libyaml" + su - vagrant -c "rvm install 1.9.3-p374" + su - vagrant -c "rvm use 1.9.3-p374 --default" + + echo "gem: --no-rdoc --no-ri" >> /etc/gemrc + su - vagrant -c "echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc" + +## Postgres 9.1 + +Configure so that the vagrant user doesn't need to provide username and password. + + apt-get -yqq install postgresql postgresql-contrib-9.1 libpq-dev postgresql-server-dev-9.1 + su - postgres + psql -c "CREATE USER vagrant WITH PASSWORD 'password';" + psql -c "ALTER USER vagrant WITH PASSWORD 'password';" + createdb vagrant + psql -c "CREATE EXTENSION hstore;" + psql -c "ALTER USER vagrant CREATEDB" + psql -c "create database discourse_development owner vagrant encoding 'UTF8' TEMPLATE template0;" + psql -c "create database discourse_test owner vagrant encoding 'UTF8' TEMPLATE template0;" + +Also, a user "discourse" is needed when importing a database image. + + createuser --createdb --superuser discourse + psql -c "ALTER USER discourse WITH PASSWORD 'password';" + +Edit /etc/postgresql/9.1/main/pg_hba.conf to have this: + + local all all trust + host all all 127.0.0.1/32 trust + host all all ::1/128 trust + host all all 0.0.0.0/0 trust # wide-open + +Download a database image from [http://discourse.org/vms/dev-discourse-seed.sql][1] + +Load it (as vagrant user): + + psql -d discourse_development < dev-discourse-seed.sql + +## Redis + + mkdir /tmp/redis_install + cd /tmp/redis_install + wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz + tar xvf redis-2.6.7.tar.gz + cd redis-2.6.7 + make + make install + cd utils + ./install_server.sh + # Press enter to accept all the defaults + /etc/init.d/redis_6379 start \ No newline at end of file diff --git a/Gemfile b/Gemfile index be92a1d594a..2a23a5704db 100644 --- a/Gemfile +++ b/Gemfile @@ -90,5 +90,7 @@ end group :development do gem 'better_errors' gem 'binding_of_caller' # I tried adding this and got an occational crash - gem 'pry-rails' -end \ No newline at end of file + gem 'librarian', '>= 0.0.25', require: false + gem 'pry-rails' +end + diff --git a/Gemfile.lock b/Gemfile.lock index 513b7daea8b..e545bfd986d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,6 +98,7 @@ GEM airbrake (3.1.2) activesupport builder + archive-tar-minitar (0.5.2) arel (3.0.2) barber (0.2.0) execjs @@ -112,6 +113,20 @@ GEM facter (>= 1.6.12) timers (>= 1.0.0) certified (0.1.1) + chef (11.2.0) + erubis + highline (>= 1.6.9) + json (~> 1.7.6, >= 1.4.4) + mixlib-authentication (>= 1.3.0) + mixlib-cli (~> 1.3.0) + mixlib-config (>= 1.1.2) + mixlib-log (>= 1.3.0) + mixlib-shellout + net-ssh (~> 2.6) + net-ssh-multi (~> 1.1.0) + ohai (>= 0.6.0) + rest-client (>= 1.0.4, < 1.7.0) + yajl-ruby (~> 1.1) childprocess (0.3.7) ffi (~> 1.0, >= 1.0.6) clockwork (0.4.1) @@ -174,6 +189,7 @@ GEM haml (3.1.7) has_ip_address (0.0.1) hashie (1.2.0) + highline (1.6.15) hike (1.2.1) hiredis (0.4.5) hpricot (0.8.6) @@ -188,6 +204,7 @@ GEM progress (~> 2.4.0) image_size (1.1.1) in_threads (1.1.1) + ipaddress (0.8.0) jasminerice (0.0.10) coffee-rails haml @@ -198,6 +215,11 @@ GEM json (1.7.7) jwt (0.1.5) multi_json (>= 1.0) + librarian (0.0.26) + archive-tar-minitar (>= 0.5.2) + chef (>= 0.10) + highline + thor (~> 0.15) libv8 (3.11.8.13) listen (0.7.2) lumberjack (1.0.2) @@ -208,6 +230,12 @@ GEM metaclass (0.0.1) method_source (0.8.1) mime-types (1.21) + mixlib-authentication (1.3.0) + mixlib-log + mixlib-cli (1.3.0) + mixlib-config (1.1.2) + mixlib-log (1.4.1) + mixlib-shellout (1.1.0) mocha (0.10.5) metaclass (~> 0.0.1) multi_json (1.5.1) @@ -216,6 +244,11 @@ GEM net-scp (1.0.4) net-ssh (>= 1.99.1) net-ssh (2.6.3) + net-ssh-gateway (1.1.0) + net-ssh (>= 1.99.1) + net-ssh-multi (1.1) + net-ssh (>= 2.1.4) + net-ssh-gateway (>= 0.99.0) nokogiri (1.5.6) oauth (0.4.7) oauth2 (0.8.0) @@ -224,6 +257,14 @@ GEM jwt (~> 0.1.4) multi_json (~> 1.0) rack (~> 1.2) + ohai (6.16.0) + ipaddress + mixlib-cli + mixlib-config + mixlib-log + mixlib-shellout + systemu + yajl-ruby oj (2.0.3) omniauth (1.1.1) hashie (~> 1.2) @@ -356,8 +397,8 @@ GEM rack (~> 1.4) rack-protection (~> 1.3) tilt (~> 1.3, >= 1.3.3) - slim (1.3.0) - temple (~> 0.4.1) + slim (1.3.6) + temple (~> 0.5.5) tilt (~> 1.3.3) slop (3.4.3) spork (0.9.2) @@ -366,7 +407,8 @@ GEM multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - temple (0.4.1) + systemu (2.5.2) + temple (0.5.5) terminal-notifier-guard (1.5.3) terminal-table (1.4.5) therubyracer (0.11.3) @@ -389,6 +431,7 @@ GEM uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) + yajl-ruby (1.1.0) PLATFORMS ruby @@ -423,6 +466,7 @@ DEPENDENCIES image_optim jasminerice jquery-rails + librarian (>= 0.0.25) message_bus! mocha multi_json diff --git a/README.md b/README.md index ddd2f6d49cb..404dbc94398 100644 --- a/README.md +++ b/README.md @@ -13,26 +13,15 @@ Whenever you need ... ## Getting Started -If you're interested in helping us develop Discourse, please start with our **[Discourse Developer Install Guide](https://github.com/discourse/discourse/blob/master/DEVELOPMENT.md)**, which includes instructions to get up and running in a development environment. +If you're interested in helping us develop Discourse, please start with our **[Discourse Vagrant Developer Guide](https://github.com/discourse/discourse/blob/master/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 environemnt, you can use our **[Discourse Advanced Developer Guide](https://github.com/discourse/discourse/blob/master/DEVELOPER-ADVANCED.md)** ### Requirements * PostgreSQL 9.1+ * Redis 2+ -### The quick and easy setup - -``` -git clone git@github.com:discourse/discourse.git -cd discourse -bundle install -rake db:create -rake db:migrate -rake db:seed_fu -redis-cli flushall -thin start -``` - ## 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: @@ -64,6 +53,7 @@ This vision translates to the following functional commitments: ## Contributing [![Build Status](https://travis-ci.org/discourse/discourse.png)](https://travis-ci.org/discourse/discourse) +[![Code Climate](https://codeclimate.com/github/discourse/discourse.png)](https://codeclimate.com/github/discourse/discourse) 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. diff --git a/DEVELOPMENT.md b/VAGRANT.md similarity index 84% rename from DEVELOPMENT.md rename to VAGRANT.md index 5f71482907f..5addb73ef17 100644 --- a/DEVELOPMENT.md +++ b/VAGRANT.md @@ -1,6 +1,8 @@ -# Discourse Developer Install Guide +# Discourse Developer Install Guide (Vagrant) If you'd like to set up a development environment for Discourse, the easiest way is by using a virtual machine. +If you have experience setting up Rails projects, you might want to take a look at our **[Discourse Advanced Developer Guide](https://github.com/discourse/discourse/blob/master/DEVELOPER-ADVANCED.md)**. +It also contains instructions on building your own Vagrant VM. The following instructions will automatically download and provision a virtual machine for you to begin hacking on Discourse with: @@ -49,7 +51,7 @@ Once your VM is up to date, you can start a rails instance using the following c bundle exec rails server ``` -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! +In a few seconds, rails will start serving 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! 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 changes. diff --git a/Vagrantfile b/Vagrantfile index 870554d2890..ab165e419b3 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -27,4 +27,27 @@ Vagrant::Config.run do |config| nfs_setting = RUBY_PLATFORM =~ /darwin/ ? true : false config.vm.share_folder("v-root", "/vagrant", ".", :nfs => nfs_setting) + + chef_cookbooks_path = ["chef/cookbooks"] + + # The first chef run just upgrades the chef installation using omnibus + config.vm.provision :chef_solo do |chef| + chef.binary_env = "GEM_HOME=/opt/vagrant_ruby/lib/ruby/gems/1.8/ GEM_PATH= " + chef.binary_path = "/opt/vagrant_ruby/bin/" + chef.cookbooks_path = chef_cookbooks_path + chef.add_recipe "recipe[omnibus_updater]" + chef.add_recipe "discourse" + chef.json = { :omnibus_updater => { 'version_search' => false }} + end + + # The second chef run uses the updated chef-solo and does normal configuration + config.vm.provision :chef_solo do |chef| + chef.binary_env = "GEM_HOME=/opt/chef/embedded/lib/ruby/gems/1.9.1/ GEM_PATH= " + chef.binary_path = "/opt/chef/bin/" + chef.cookbooks_path = chef_cookbooks_path + chef.add_recipe "recipe[apt]" + chef.add_recipe "recipe[build-essential]" + chef.add_recipe "recipe[phantomjs]" + chef.add_recipe "recipe[vim]" + end end diff --git a/app/assets/images/auth/facebook.gif b/app/assets/images/auth/facebook.gif deleted file mode 100644 index b997b358f78..00000000000 Binary files a/app/assets/images/auth/facebook.gif and /dev/null differ diff --git a/app/assets/images/auth/google.gif b/app/assets/images/auth/google.gif deleted file mode 100644 index 1b6cd07bd8b..00000000000 Binary files a/app/assets/images/auth/google.gif and /dev/null differ diff --git a/app/assets/images/auth/twitter.png b/app/assets/images/auth/twitter.png deleted file mode 100644 index 16dfa69477f..00000000000 Binary files a/app/assets/images/auth/twitter.png and /dev/null differ diff --git a/app/assets/images/auth/yahoo.gif b/app/assets/images/auth/yahoo.gif deleted file mode 100644 index 42adbfa57f8..00000000000 Binary files a/app/assets/images/auth/yahoo.gif and /dev/null differ diff --git a/app/assets/images/avatars/0.jpg b/app/assets/images/avatars/0.jpg deleted file mode 100644 index 333bc6f6e33..00000000000 Binary files a/app/assets/images/avatars/0.jpg and /dev/null differ diff --git a/app/assets/images/avatars/1.jpg b/app/assets/images/avatars/1.jpg deleted file mode 100644 index baefa551c71..00000000000 Binary files a/app/assets/images/avatars/1.jpg and /dev/null differ diff --git a/app/assets/images/avatars/10.jpg b/app/assets/images/avatars/10.jpg deleted file mode 100644 index c8f45dcd431..00000000000 Binary files a/app/assets/images/avatars/10.jpg and /dev/null differ diff --git a/app/assets/images/avatars/100.jpg b/app/assets/images/avatars/100.jpg deleted file mode 100644 index d799cd2acd4..00000000000 Binary files a/app/assets/images/avatars/100.jpg and /dev/null differ diff --git a/app/assets/images/avatars/101.jpg b/app/assets/images/avatars/101.jpg deleted file mode 100644 index de9910f0840..00000000000 Binary files a/app/assets/images/avatars/101.jpg and /dev/null differ diff --git a/app/assets/images/avatars/102.jpg b/app/assets/images/avatars/102.jpg deleted file mode 100644 index 7088c12b6dd..00000000000 Binary files a/app/assets/images/avatars/102.jpg and /dev/null differ diff --git a/app/assets/images/avatars/103.jpg b/app/assets/images/avatars/103.jpg deleted file mode 100644 index 277d481f477..00000000000 Binary files a/app/assets/images/avatars/103.jpg and /dev/null differ diff --git a/app/assets/images/avatars/104.jpg b/app/assets/images/avatars/104.jpg deleted file mode 100644 index 787c4ab792c..00000000000 Binary files a/app/assets/images/avatars/104.jpg and /dev/null differ diff --git a/app/assets/images/avatars/105.jpg b/app/assets/images/avatars/105.jpg deleted file mode 100644 index c1f90418ea8..00000000000 Binary files a/app/assets/images/avatars/105.jpg and /dev/null differ diff --git a/app/assets/images/avatars/106.jpg b/app/assets/images/avatars/106.jpg deleted file mode 100644 index 04782209da6..00000000000 Binary files a/app/assets/images/avatars/106.jpg and /dev/null differ diff --git a/app/assets/images/avatars/107.jpg b/app/assets/images/avatars/107.jpg deleted file mode 100644 index ff5bfd7a278..00000000000 Binary files a/app/assets/images/avatars/107.jpg and /dev/null differ diff --git a/app/assets/images/avatars/108.jpg b/app/assets/images/avatars/108.jpg deleted file mode 100644 index 7011b72fcb0..00000000000 Binary files a/app/assets/images/avatars/108.jpg and /dev/null differ diff --git a/app/assets/images/avatars/109.jpg b/app/assets/images/avatars/109.jpg deleted file mode 100644 index 7a8c43d983a..00000000000 Binary files a/app/assets/images/avatars/109.jpg and /dev/null differ diff --git a/app/assets/images/avatars/11.jpg b/app/assets/images/avatars/11.jpg deleted file mode 100644 index 4b89d1c71a5..00000000000 Binary files a/app/assets/images/avatars/11.jpg and /dev/null differ diff --git a/app/assets/images/avatars/110.jpg b/app/assets/images/avatars/110.jpg deleted file mode 100644 index ff378683179..00000000000 Binary files a/app/assets/images/avatars/110.jpg and /dev/null differ diff --git a/app/assets/images/avatars/111.jpg b/app/assets/images/avatars/111.jpg deleted file mode 100644 index 78efc513dff..00000000000 Binary files a/app/assets/images/avatars/111.jpg and /dev/null differ diff --git a/app/assets/images/avatars/112.jpg b/app/assets/images/avatars/112.jpg deleted file mode 100644 index c6f30e6d8bc..00000000000 Binary files a/app/assets/images/avatars/112.jpg and /dev/null differ diff --git a/app/assets/images/avatars/113.jpg b/app/assets/images/avatars/113.jpg deleted file mode 100644 index 65bfa5f2d1d..00000000000 Binary files a/app/assets/images/avatars/113.jpg and /dev/null differ diff --git a/app/assets/images/avatars/114.jpg b/app/assets/images/avatars/114.jpg deleted file mode 100644 index 00889de5393..00000000000 Binary files a/app/assets/images/avatars/114.jpg and /dev/null differ diff --git a/app/assets/images/avatars/115.jpg b/app/assets/images/avatars/115.jpg deleted file mode 100644 index dc60ebcebbd..00000000000 Binary files a/app/assets/images/avatars/115.jpg and /dev/null differ diff --git a/app/assets/images/avatars/116.jpg b/app/assets/images/avatars/116.jpg deleted file mode 100644 index 1d424b10f7c..00000000000 Binary files a/app/assets/images/avatars/116.jpg and /dev/null differ diff --git a/app/assets/images/avatars/117.jpg b/app/assets/images/avatars/117.jpg deleted file mode 100644 index 898ff6f54d0..00000000000 Binary files a/app/assets/images/avatars/117.jpg and /dev/null differ diff --git a/app/assets/images/avatars/118.jpg b/app/assets/images/avatars/118.jpg deleted file mode 100644 index c61aa71322a..00000000000 Binary files a/app/assets/images/avatars/118.jpg and /dev/null differ diff --git a/app/assets/images/avatars/119.jpg b/app/assets/images/avatars/119.jpg deleted file mode 100644 index 8b6e7b0397f..00000000000 Binary files a/app/assets/images/avatars/119.jpg and /dev/null differ diff --git a/app/assets/images/avatars/12.jpg b/app/assets/images/avatars/12.jpg deleted file mode 100644 index 46daa73ae4c..00000000000 Binary files a/app/assets/images/avatars/12.jpg and /dev/null differ diff --git a/app/assets/images/avatars/120.jpg b/app/assets/images/avatars/120.jpg deleted file mode 100644 index f4476eb4048..00000000000 Binary files a/app/assets/images/avatars/120.jpg and /dev/null differ diff --git a/app/assets/images/avatars/121.jpg b/app/assets/images/avatars/121.jpg deleted file mode 100644 index 5df73cf42e3..00000000000 Binary files a/app/assets/images/avatars/121.jpg and /dev/null differ diff --git a/app/assets/images/avatars/122.jpg b/app/assets/images/avatars/122.jpg deleted file mode 100644 index 87a1ca759b3..00000000000 Binary files a/app/assets/images/avatars/122.jpg and /dev/null differ diff --git a/app/assets/images/avatars/123.jpg b/app/assets/images/avatars/123.jpg deleted file mode 100644 index 21918bab528..00000000000 Binary files a/app/assets/images/avatars/123.jpg and /dev/null differ diff --git a/app/assets/images/avatars/124.jpg b/app/assets/images/avatars/124.jpg deleted file mode 100644 index ae3eb5765d1..00000000000 Binary files a/app/assets/images/avatars/124.jpg and /dev/null differ diff --git a/app/assets/images/avatars/125.jpg b/app/assets/images/avatars/125.jpg deleted file mode 100644 index 3b8e3e97eeb..00000000000 Binary files a/app/assets/images/avatars/125.jpg and /dev/null differ diff --git a/app/assets/images/avatars/126.jpg b/app/assets/images/avatars/126.jpg deleted file mode 100644 index ce7d29b2125..00000000000 Binary files a/app/assets/images/avatars/126.jpg and /dev/null differ diff --git a/app/assets/images/avatars/127.jpg b/app/assets/images/avatars/127.jpg deleted file mode 100644 index ddd555874ee..00000000000 Binary files a/app/assets/images/avatars/127.jpg and /dev/null differ diff --git a/app/assets/images/avatars/128.jpg b/app/assets/images/avatars/128.jpg deleted file mode 100644 index 8b83526dde1..00000000000 Binary files a/app/assets/images/avatars/128.jpg and /dev/null differ diff --git a/app/assets/images/avatars/129.jpg b/app/assets/images/avatars/129.jpg deleted file mode 100644 index febde00da72..00000000000 Binary files a/app/assets/images/avatars/129.jpg and /dev/null differ diff --git a/app/assets/images/avatars/13.jpg b/app/assets/images/avatars/13.jpg deleted file mode 100644 index ef0af0f5725..00000000000 Binary files a/app/assets/images/avatars/13.jpg and /dev/null differ diff --git a/app/assets/images/avatars/130.jpg b/app/assets/images/avatars/130.jpg deleted file mode 100644 index b273edbffa2..00000000000 Binary files a/app/assets/images/avatars/130.jpg and /dev/null differ diff --git a/app/assets/images/avatars/131.jpg b/app/assets/images/avatars/131.jpg deleted file mode 100644 index bfa98c856b5..00000000000 Binary files a/app/assets/images/avatars/131.jpg and /dev/null differ diff --git a/app/assets/images/avatars/132.jpg b/app/assets/images/avatars/132.jpg deleted file mode 100644 index 95b2853ff17..00000000000 Binary files a/app/assets/images/avatars/132.jpg and /dev/null differ diff --git a/app/assets/images/avatars/133.jpg b/app/assets/images/avatars/133.jpg deleted file mode 100644 index 75aceadb5bc..00000000000 Binary files a/app/assets/images/avatars/133.jpg and /dev/null differ diff --git a/app/assets/images/avatars/134.jpg b/app/assets/images/avatars/134.jpg deleted file mode 100644 index a8b41f26f19..00000000000 Binary files a/app/assets/images/avatars/134.jpg and /dev/null differ diff --git a/app/assets/images/avatars/135.jpg b/app/assets/images/avatars/135.jpg deleted file mode 100644 index 0ea04ee28b7..00000000000 Binary files a/app/assets/images/avatars/135.jpg and /dev/null differ diff --git a/app/assets/images/avatars/136.jpg b/app/assets/images/avatars/136.jpg deleted file mode 100644 index 4cf72453ce4..00000000000 Binary files a/app/assets/images/avatars/136.jpg and /dev/null differ diff --git a/app/assets/images/avatars/137.jpg b/app/assets/images/avatars/137.jpg deleted file mode 100644 index 6962b18cd38..00000000000 Binary files a/app/assets/images/avatars/137.jpg and /dev/null differ diff --git a/app/assets/images/avatars/138.jpg b/app/assets/images/avatars/138.jpg deleted file mode 100644 index df51a3c4996..00000000000 Binary files a/app/assets/images/avatars/138.jpg and /dev/null differ diff --git a/app/assets/images/avatars/14.jpg b/app/assets/images/avatars/14.jpg deleted file mode 100644 index a75f00a59b7..00000000000 Binary files a/app/assets/images/avatars/14.jpg and /dev/null differ diff --git a/app/assets/images/avatars/15.jpg b/app/assets/images/avatars/15.jpg deleted file mode 100644 index b733a49accc..00000000000 Binary files a/app/assets/images/avatars/15.jpg and /dev/null differ diff --git a/app/assets/images/avatars/16.jpg b/app/assets/images/avatars/16.jpg deleted file mode 100644 index e3475ef53dd..00000000000 Binary files a/app/assets/images/avatars/16.jpg and /dev/null differ diff --git a/app/assets/images/avatars/17.jpg b/app/assets/images/avatars/17.jpg deleted file mode 100644 index 4d7ef00868d..00000000000 Binary files a/app/assets/images/avatars/17.jpg and /dev/null differ diff --git a/app/assets/images/avatars/18.jpg b/app/assets/images/avatars/18.jpg deleted file mode 100644 index d179eb8e067..00000000000 Binary files a/app/assets/images/avatars/18.jpg and /dev/null differ diff --git a/app/assets/images/avatars/19.jpg b/app/assets/images/avatars/19.jpg deleted file mode 100644 index 3077d922114..00000000000 Binary files a/app/assets/images/avatars/19.jpg and /dev/null differ diff --git a/app/assets/images/avatars/2.jpg b/app/assets/images/avatars/2.jpg deleted file mode 100644 index f33b4ec055c..00000000000 Binary files a/app/assets/images/avatars/2.jpg and /dev/null differ diff --git a/app/assets/images/avatars/20.jpg b/app/assets/images/avatars/20.jpg deleted file mode 100644 index 6bd1cfb5671..00000000000 Binary files a/app/assets/images/avatars/20.jpg and /dev/null differ diff --git a/app/assets/images/avatars/21.jpg b/app/assets/images/avatars/21.jpg deleted file mode 100644 index 86dca6b9305..00000000000 Binary files a/app/assets/images/avatars/21.jpg and /dev/null differ diff --git a/app/assets/images/avatars/22.jpg b/app/assets/images/avatars/22.jpg deleted file mode 100644 index aa0181c1235..00000000000 Binary files a/app/assets/images/avatars/22.jpg and /dev/null differ diff --git a/app/assets/images/avatars/23.jpg b/app/assets/images/avatars/23.jpg deleted file mode 100644 index c1b56de2e06..00000000000 Binary files a/app/assets/images/avatars/23.jpg and /dev/null differ diff --git a/app/assets/images/avatars/24.jpg b/app/assets/images/avatars/24.jpg deleted file mode 100644 index 78e302e6871..00000000000 Binary files a/app/assets/images/avatars/24.jpg and /dev/null differ diff --git a/app/assets/images/avatars/25.jpg b/app/assets/images/avatars/25.jpg deleted file mode 100644 index 93c9d81421b..00000000000 Binary files a/app/assets/images/avatars/25.jpg and /dev/null differ diff --git a/app/assets/images/avatars/26.jpg b/app/assets/images/avatars/26.jpg deleted file mode 100644 index 163c060ffaa..00000000000 Binary files a/app/assets/images/avatars/26.jpg and /dev/null differ diff --git a/app/assets/images/avatars/27.jpg b/app/assets/images/avatars/27.jpg deleted file mode 100644 index 34c999a05b3..00000000000 Binary files a/app/assets/images/avatars/27.jpg and /dev/null differ diff --git a/app/assets/images/avatars/28.jpg b/app/assets/images/avatars/28.jpg deleted file mode 100644 index f2baa6f7e4b..00000000000 Binary files a/app/assets/images/avatars/28.jpg and /dev/null differ diff --git a/app/assets/images/avatars/29.jpg b/app/assets/images/avatars/29.jpg deleted file mode 100644 index c5ffd0cb742..00000000000 Binary files a/app/assets/images/avatars/29.jpg and /dev/null differ diff --git a/app/assets/images/avatars/3.jpg b/app/assets/images/avatars/3.jpg deleted file mode 100644 index 5199884e181..00000000000 Binary files a/app/assets/images/avatars/3.jpg and /dev/null differ diff --git a/app/assets/images/avatars/30.jpg b/app/assets/images/avatars/30.jpg deleted file mode 100644 index 5b2012bb13e..00000000000 Binary files a/app/assets/images/avatars/30.jpg and /dev/null differ diff --git a/app/assets/images/avatars/31.jpg b/app/assets/images/avatars/31.jpg deleted file mode 100644 index 1fd53318f76..00000000000 Binary files a/app/assets/images/avatars/31.jpg and /dev/null differ diff --git a/app/assets/images/avatars/32.jpg b/app/assets/images/avatars/32.jpg deleted file mode 100644 index 1903fb73b69..00000000000 Binary files a/app/assets/images/avatars/32.jpg and /dev/null differ diff --git a/app/assets/images/avatars/33.jpg b/app/assets/images/avatars/33.jpg deleted file mode 100644 index 87378327d58..00000000000 Binary files a/app/assets/images/avatars/33.jpg and /dev/null differ diff --git a/app/assets/images/avatars/34.jpg b/app/assets/images/avatars/34.jpg deleted file mode 100644 index beceaad1f89..00000000000 Binary files a/app/assets/images/avatars/34.jpg and /dev/null differ diff --git a/app/assets/images/avatars/35.jpg b/app/assets/images/avatars/35.jpg deleted file mode 100644 index 964e80b69b7..00000000000 Binary files a/app/assets/images/avatars/35.jpg and /dev/null differ diff --git a/app/assets/images/avatars/36.jpg b/app/assets/images/avatars/36.jpg deleted file mode 100644 index 5e858d53c63..00000000000 Binary files a/app/assets/images/avatars/36.jpg and /dev/null differ diff --git a/app/assets/images/avatars/37.jpg b/app/assets/images/avatars/37.jpg deleted file mode 100644 index 8c62dd38cf2..00000000000 Binary files a/app/assets/images/avatars/37.jpg and /dev/null differ diff --git a/app/assets/images/avatars/38.jpg b/app/assets/images/avatars/38.jpg deleted file mode 100644 index 12b9d2dde36..00000000000 Binary files a/app/assets/images/avatars/38.jpg and /dev/null differ diff --git a/app/assets/images/avatars/39.jpg b/app/assets/images/avatars/39.jpg deleted file mode 100644 index 5043c0e2a81..00000000000 Binary files a/app/assets/images/avatars/39.jpg and /dev/null differ diff --git a/app/assets/images/avatars/4.jpg b/app/assets/images/avatars/4.jpg deleted file mode 100644 index b3561e09cab..00000000000 Binary files a/app/assets/images/avatars/4.jpg and /dev/null differ diff --git a/app/assets/images/avatars/40.jpg b/app/assets/images/avatars/40.jpg deleted file mode 100644 index 8ecaa03810a..00000000000 Binary files a/app/assets/images/avatars/40.jpg and /dev/null differ diff --git a/app/assets/images/avatars/41.jpg b/app/assets/images/avatars/41.jpg deleted file mode 100644 index 1deab2c54b2..00000000000 Binary files a/app/assets/images/avatars/41.jpg and /dev/null differ diff --git a/app/assets/images/avatars/42.jpg b/app/assets/images/avatars/42.jpg deleted file mode 100644 index 6e8ca955577..00000000000 Binary files a/app/assets/images/avatars/42.jpg and /dev/null differ diff --git a/app/assets/images/avatars/43.jpg b/app/assets/images/avatars/43.jpg deleted file mode 100644 index 9d602a8349e..00000000000 Binary files a/app/assets/images/avatars/43.jpg and /dev/null differ diff --git a/app/assets/images/avatars/44.jpg b/app/assets/images/avatars/44.jpg deleted file mode 100644 index 656ba0fd9c5..00000000000 Binary files a/app/assets/images/avatars/44.jpg and /dev/null differ diff --git a/app/assets/images/avatars/45.jpg b/app/assets/images/avatars/45.jpg deleted file mode 100644 index 8b9a28eb6e3..00000000000 Binary files a/app/assets/images/avatars/45.jpg and /dev/null differ diff --git a/app/assets/images/avatars/46.jpg b/app/assets/images/avatars/46.jpg deleted file mode 100644 index abf62df72de..00000000000 Binary files a/app/assets/images/avatars/46.jpg and /dev/null differ diff --git a/app/assets/images/avatars/47.jpg b/app/assets/images/avatars/47.jpg deleted file mode 100644 index f736eba3de5..00000000000 Binary files a/app/assets/images/avatars/47.jpg and /dev/null differ diff --git a/app/assets/images/avatars/48.jpg b/app/assets/images/avatars/48.jpg deleted file mode 100644 index 3afc22b7a95..00000000000 Binary files a/app/assets/images/avatars/48.jpg and /dev/null differ diff --git a/app/assets/images/avatars/49.jpg b/app/assets/images/avatars/49.jpg deleted file mode 100644 index a71e67c8f96..00000000000 Binary files a/app/assets/images/avatars/49.jpg and /dev/null differ diff --git a/app/assets/images/avatars/5.jpg b/app/assets/images/avatars/5.jpg deleted file mode 100644 index aa888ce038a..00000000000 Binary files a/app/assets/images/avatars/5.jpg and /dev/null differ diff --git a/app/assets/images/avatars/50.jpg b/app/assets/images/avatars/50.jpg deleted file mode 100644 index 47498194a8c..00000000000 Binary files a/app/assets/images/avatars/50.jpg and /dev/null differ diff --git a/app/assets/images/avatars/51.jpg b/app/assets/images/avatars/51.jpg deleted file mode 100644 index f24b184f29e..00000000000 Binary files a/app/assets/images/avatars/51.jpg and /dev/null differ diff --git a/app/assets/images/avatars/52.jpg b/app/assets/images/avatars/52.jpg deleted file mode 100644 index c8eb28b96a3..00000000000 Binary files a/app/assets/images/avatars/52.jpg and /dev/null differ diff --git a/app/assets/images/avatars/53.jpg b/app/assets/images/avatars/53.jpg deleted file mode 100644 index fed2bd52bec..00000000000 Binary files a/app/assets/images/avatars/53.jpg and /dev/null differ diff --git a/app/assets/images/avatars/54.jpg b/app/assets/images/avatars/54.jpg deleted file mode 100644 index 6068a2b4d32..00000000000 Binary files a/app/assets/images/avatars/54.jpg and /dev/null differ diff --git a/app/assets/images/avatars/55.jpg b/app/assets/images/avatars/55.jpg deleted file mode 100644 index 9ecb6dfce66..00000000000 Binary files a/app/assets/images/avatars/55.jpg and /dev/null differ diff --git a/app/assets/images/avatars/56.jpg b/app/assets/images/avatars/56.jpg deleted file mode 100644 index b8ce39f4db8..00000000000 Binary files a/app/assets/images/avatars/56.jpg and /dev/null differ diff --git a/app/assets/images/avatars/57.jpg b/app/assets/images/avatars/57.jpg deleted file mode 100644 index becf5faf2dd..00000000000 Binary files a/app/assets/images/avatars/57.jpg and /dev/null differ diff --git a/app/assets/images/avatars/58.jpg b/app/assets/images/avatars/58.jpg deleted file mode 100644 index a244807eb88..00000000000 Binary files a/app/assets/images/avatars/58.jpg and /dev/null differ diff --git a/app/assets/images/avatars/59.jpg b/app/assets/images/avatars/59.jpg deleted file mode 100644 index 93ec84f4bf3..00000000000 Binary files a/app/assets/images/avatars/59.jpg and /dev/null differ diff --git a/app/assets/images/avatars/6.jpg b/app/assets/images/avatars/6.jpg deleted file mode 100644 index 9a36246b6f6..00000000000 Binary files a/app/assets/images/avatars/6.jpg and /dev/null differ diff --git a/app/assets/images/avatars/60.jpg b/app/assets/images/avatars/60.jpg deleted file mode 100644 index 86b8cb1562e..00000000000 Binary files a/app/assets/images/avatars/60.jpg and /dev/null differ diff --git a/app/assets/images/avatars/61.jpg b/app/assets/images/avatars/61.jpg deleted file mode 100644 index 329264f2000..00000000000 Binary files a/app/assets/images/avatars/61.jpg and /dev/null differ diff --git a/app/assets/images/avatars/62.jpg b/app/assets/images/avatars/62.jpg deleted file mode 100644 index 15416ae82cc..00000000000 Binary files a/app/assets/images/avatars/62.jpg and /dev/null differ diff --git a/app/assets/images/avatars/63.jpg b/app/assets/images/avatars/63.jpg deleted file mode 100644 index c5cebab3ad2..00000000000 Binary files a/app/assets/images/avatars/63.jpg and /dev/null differ diff --git a/app/assets/images/avatars/64.jpg b/app/assets/images/avatars/64.jpg deleted file mode 100644 index d991f98e2f0..00000000000 Binary files a/app/assets/images/avatars/64.jpg and /dev/null differ diff --git a/app/assets/images/avatars/65.jpg b/app/assets/images/avatars/65.jpg deleted file mode 100644 index 4d792acfb1d..00000000000 Binary files a/app/assets/images/avatars/65.jpg and /dev/null differ diff --git a/app/assets/images/avatars/66.jpg b/app/assets/images/avatars/66.jpg deleted file mode 100644 index edca436cd5a..00000000000 Binary files a/app/assets/images/avatars/66.jpg and /dev/null differ diff --git a/app/assets/images/avatars/67.jpg b/app/assets/images/avatars/67.jpg deleted file mode 100644 index 85e6554a61a..00000000000 Binary files a/app/assets/images/avatars/67.jpg and /dev/null differ diff --git a/app/assets/images/avatars/68.jpg b/app/assets/images/avatars/68.jpg deleted file mode 100644 index 625e396ede5..00000000000 Binary files a/app/assets/images/avatars/68.jpg and /dev/null differ diff --git a/app/assets/images/avatars/69.jpg b/app/assets/images/avatars/69.jpg deleted file mode 100644 index 8a0ccc375b4..00000000000 Binary files a/app/assets/images/avatars/69.jpg and /dev/null differ diff --git a/app/assets/images/avatars/7.jpg b/app/assets/images/avatars/7.jpg deleted file mode 100644 index 8c04d50e06c..00000000000 Binary files a/app/assets/images/avatars/7.jpg and /dev/null differ diff --git a/app/assets/images/avatars/70.jpg b/app/assets/images/avatars/70.jpg deleted file mode 100644 index 0e33b149d3b..00000000000 Binary files a/app/assets/images/avatars/70.jpg and /dev/null differ diff --git a/app/assets/images/avatars/71.jpg b/app/assets/images/avatars/71.jpg deleted file mode 100644 index dba82d8173f..00000000000 Binary files a/app/assets/images/avatars/71.jpg and /dev/null differ diff --git a/app/assets/images/avatars/72.jpg b/app/assets/images/avatars/72.jpg deleted file mode 100644 index 399336bedf6..00000000000 Binary files a/app/assets/images/avatars/72.jpg and /dev/null differ diff --git a/app/assets/images/avatars/73.jpg b/app/assets/images/avatars/73.jpg deleted file mode 100644 index 2ee65c7f154..00000000000 Binary files a/app/assets/images/avatars/73.jpg and /dev/null differ diff --git a/app/assets/images/avatars/74.jpg b/app/assets/images/avatars/74.jpg deleted file mode 100644 index 75cc0d4af3d..00000000000 Binary files a/app/assets/images/avatars/74.jpg and /dev/null differ diff --git a/app/assets/images/avatars/75.jpg b/app/assets/images/avatars/75.jpg deleted file mode 100644 index fff0bf15182..00000000000 Binary files a/app/assets/images/avatars/75.jpg and /dev/null differ diff --git a/app/assets/images/avatars/76.jpg b/app/assets/images/avatars/76.jpg deleted file mode 100644 index c70857272c8..00000000000 Binary files a/app/assets/images/avatars/76.jpg and /dev/null differ diff --git a/app/assets/images/avatars/77.jpg b/app/assets/images/avatars/77.jpg deleted file mode 100644 index e254f097d3a..00000000000 Binary files a/app/assets/images/avatars/77.jpg and /dev/null differ diff --git a/app/assets/images/avatars/78.jpg b/app/assets/images/avatars/78.jpg deleted file mode 100644 index 0d311ef663c..00000000000 Binary files a/app/assets/images/avatars/78.jpg and /dev/null differ diff --git a/app/assets/images/avatars/79.jpg b/app/assets/images/avatars/79.jpg deleted file mode 100644 index c0f4c5eda7d..00000000000 Binary files a/app/assets/images/avatars/79.jpg and /dev/null differ diff --git a/app/assets/images/avatars/8.jpg b/app/assets/images/avatars/8.jpg deleted file mode 100644 index ed907a9d55d..00000000000 Binary files a/app/assets/images/avatars/8.jpg and /dev/null differ diff --git a/app/assets/images/avatars/80.jpg b/app/assets/images/avatars/80.jpg deleted file mode 100644 index 9100ac281a5..00000000000 Binary files a/app/assets/images/avatars/80.jpg and /dev/null differ diff --git a/app/assets/images/avatars/81.jpg b/app/assets/images/avatars/81.jpg deleted file mode 100644 index fe1abfd1762..00000000000 Binary files a/app/assets/images/avatars/81.jpg and /dev/null differ diff --git a/app/assets/images/avatars/82.jpg b/app/assets/images/avatars/82.jpg deleted file mode 100644 index c2b3e07e5b1..00000000000 Binary files a/app/assets/images/avatars/82.jpg and /dev/null differ diff --git a/app/assets/images/avatars/83.jpg b/app/assets/images/avatars/83.jpg deleted file mode 100644 index 895cd08bf53..00000000000 Binary files a/app/assets/images/avatars/83.jpg and /dev/null differ diff --git a/app/assets/images/avatars/84.jpg b/app/assets/images/avatars/84.jpg deleted file mode 100644 index f3278f29095..00000000000 Binary files a/app/assets/images/avatars/84.jpg and /dev/null differ diff --git a/app/assets/images/avatars/85.jpg b/app/assets/images/avatars/85.jpg deleted file mode 100644 index 4513811cd42..00000000000 Binary files a/app/assets/images/avatars/85.jpg and /dev/null differ diff --git a/app/assets/images/avatars/86.jpg b/app/assets/images/avatars/86.jpg deleted file mode 100644 index 4d814a88643..00000000000 Binary files a/app/assets/images/avatars/86.jpg and /dev/null differ diff --git a/app/assets/images/avatars/87.jpg b/app/assets/images/avatars/87.jpg deleted file mode 100644 index 119101b8dc6..00000000000 Binary files a/app/assets/images/avatars/87.jpg and /dev/null differ diff --git a/app/assets/images/avatars/88.jpg b/app/assets/images/avatars/88.jpg deleted file mode 100644 index f2aa09749ba..00000000000 Binary files a/app/assets/images/avatars/88.jpg and /dev/null differ diff --git a/app/assets/images/avatars/89.jpg b/app/assets/images/avatars/89.jpg deleted file mode 100644 index e3c90140c32..00000000000 Binary files a/app/assets/images/avatars/89.jpg and /dev/null differ diff --git a/app/assets/images/avatars/9.jpg b/app/assets/images/avatars/9.jpg deleted file mode 100644 index ea9d5c3afa5..00000000000 Binary files a/app/assets/images/avatars/9.jpg and /dev/null differ diff --git a/app/assets/images/avatars/90.jpg b/app/assets/images/avatars/90.jpg deleted file mode 100644 index 18d895ffb76..00000000000 Binary files a/app/assets/images/avatars/90.jpg and /dev/null differ diff --git a/app/assets/images/avatars/91.jpg b/app/assets/images/avatars/91.jpg deleted file mode 100644 index cbd3c97da13..00000000000 Binary files a/app/assets/images/avatars/91.jpg and /dev/null differ diff --git a/app/assets/images/avatars/92.jpg b/app/assets/images/avatars/92.jpg deleted file mode 100644 index aa5b12156ed..00000000000 Binary files a/app/assets/images/avatars/92.jpg and /dev/null differ diff --git a/app/assets/images/avatars/93.jpg b/app/assets/images/avatars/93.jpg deleted file mode 100644 index 6d4042a7a1d..00000000000 Binary files a/app/assets/images/avatars/93.jpg and /dev/null differ diff --git a/app/assets/images/avatars/94.jpg b/app/assets/images/avatars/94.jpg deleted file mode 100644 index 4ee77cd453f..00000000000 Binary files a/app/assets/images/avatars/94.jpg and /dev/null differ diff --git a/app/assets/images/avatars/95.jpg b/app/assets/images/avatars/95.jpg deleted file mode 100644 index dfafa89c443..00000000000 Binary files a/app/assets/images/avatars/95.jpg and /dev/null differ diff --git a/app/assets/images/avatars/96.jpg b/app/assets/images/avatars/96.jpg deleted file mode 100644 index 50a2fdf0d34..00000000000 Binary files a/app/assets/images/avatars/96.jpg and /dev/null differ diff --git a/app/assets/images/avatars/97.jpg b/app/assets/images/avatars/97.jpg deleted file mode 100644 index 9de3139140c..00000000000 Binary files a/app/assets/images/avatars/97.jpg and /dev/null differ diff --git a/app/assets/images/avatars/98.jpg b/app/assets/images/avatars/98.jpg deleted file mode 100644 index 3459eeadaa4..00000000000 Binary files a/app/assets/images/avatars/98.jpg and /dev/null differ diff --git a/app/assets/images/avatars/99.jpg b/app/assets/images/avatars/99.jpg deleted file mode 100644 index fd61d20d640..00000000000 Binary files a/app/assets/images/avatars/99.jpg and /dev/null differ diff --git a/app/assets/images/avatars/rename.rb b/app/assets/images/avatars/rename.rb deleted file mode 100644 index 5fc145287c5..00000000000 --- a/app/assets/images/avatars/rename.rb +++ /dev/null @@ -1,9 +0,0 @@ -all_files = [Dir["*.jpg"] + Dir["*.jpeg"]].flatten -all_files.each do |f| - File.rename(f, "#{rand(2**256).to_s(36)[0..7]}.jpg") -end - -all_files = [Dir["*.jpg"] + Dir["*.jpeg"]].flatten -all_files.each_with_index do |f, i| - File.rename(f, "#{i}.jpg") -end diff --git a/app/assets/images/cool_avatars/coding_horror.png b/app/assets/images/cool_avatars/coding_horror.png deleted file mode 100644 index b2ef339d232..00000000000 Binary files a/app/assets/images/cool_avatars/coding_horror.png and /dev/null differ diff --git a/app/assets/images/cool_avatars/evil_trout.jpg b/app/assets/images/cool_avatars/evil_trout.jpg deleted file mode 100644 index d46c42e4f5b..00000000000 Binary files a/app/assets/images/cool_avatars/evil_trout.jpg and /dev/null differ diff --git a/app/assets/images/cool_avatars/hanzo.png b/app/assets/images/cool_avatars/hanzo.png deleted file mode 100644 index 1dcf8e0f100..00000000000 Binary files a/app/assets/images/cool_avatars/hanzo.png and /dev/null differ diff --git a/app/assets/images/cool_avatars/sam.png b/app/assets/images/cool_avatars/sam.png deleted file mode 100644 index 068a638bcfd..00000000000 Binary files a/app/assets/images/cool_avatars/sam.png and /dev/null differ diff --git a/app/assets/images/d-logo-sketch-small.png b/app/assets/images/d-logo-sketch-small.png new file mode 100644 index 00000000000..3467f147f55 Binary files /dev/null and b/app/assets/images/d-logo-sketch-small.png differ diff --git a/app/assets/images/d-logo-sketch.png b/app/assets/images/d-logo-sketch.png new file mode 100755 index 00000000000..56f3284fd3e Binary files /dev/null and b/app/assets/images/d-logo-sketch.png differ diff --git a/app/assets/images/default-favicon.png b/app/assets/images/default-favicon.png new file mode 100644 index 00000000000..37f8ac9a0c0 Binary files /dev/null and b/app/assets/images/default-favicon.png differ diff --git a/app/assets/images/thread-default.png b/app/assets/images/thread-default.png deleted file mode 100644 index 0e12b0d0ad7..00000000000 Binary files a/app/assets/images/thread-default.png and /dev/null differ diff --git a/app/assets/javascripts/discourse/components/div_resizer.js.coffee b/app/assets/javascripts/discourse/components/div_resizer.js.coffee index 19cf0918bc2..0b4c3683343 100644 --- a/app/assets/javascripts/discourse/components/div_resizer.js.coffee +++ b/app/assets/javascripts/discourse/components/div_resizer.js.coffee @@ -29,6 +29,7 @@ thisMousePos = mousePosition(e).y size = originalDivHeight + (originalPos - thisMousePos) lastMousePos = thisMousePos + size = Math.min(size, $(window).height()) size = Math.max(min, size) div.height size + "px" endDrag e,opts if size < min diff --git a/app/assets/javascripts/discourse/models/post.js.coffee.erb b/app/assets/javascripts/discourse/models/post.js.coffee.erb index 564512e454a..038611e7b59 100644 --- a/app/assets/javascripts/discourse/models/post.js.coffee.erb +++ b/app/assets/javascripts/discourse/models/post.js.coffee.erb @@ -173,6 +173,27 @@ window.Discourse.Post = Ember.Object.extend Discourse.Presence, loadVersions: (callback) -> $.get "/posts/#{@get('id')}/versions.json", (result) -> callback(result) + + # Whether to show replies directly below + showRepliesBelow: (-> + reply_count = @get('reply_count') + + # We don't show replies if there aren't any + return false if reply_count is 0 + + # Always show replies if the setting `supress_reply_directly_below` is false. + return true unless Discourse.SiteSettings.supress_reply_directly_below + + # Always show replies if there's more than one + return true if reply_count > 1 + + # If we have *exactly* one reply, we have to consider if it's directly below us + return false if @get('topic')?.isReplyDirectlyBelow(@) + + true + + ).property('reply_count') + window.Discourse.Post.reopenClass REGULAR_TYPE: <%= Post::REGULAR %> diff --git a/app/assets/javascripts/discourse/models/topic.js.coffee b/app/assets/javascripts/discourse/models/topic.js.coffee index cba49d52f48..30705f4a0e9 100644 --- a/app/assets/javascripts/discourse/models/topic.js.coffee +++ b/app/assets/javascripts/discourse/models/topic.js.coffee @@ -243,6 +243,18 @@ Discourse.Topic = Discourse.Model.extend Discourse.Presence, newPosts.each (p)-> posts.pushObject(p) unless map[p.get('post_number')] + # Is the reply to a post directly below it? + isReplyDirectlyBelow: (post) -> + posts = @get('posts') + return unless posts + + postBelow = posts[posts.indexOf(post) + 1] + + # If the post directly below's reply_to_post_number is our post number, it's + # considered directly below. + return postBelow?.get('reply_to_post_number') is post.get('post_number') + + window.Discourse.Topic.reopenClass NotificationLevel: diff --git a/app/assets/javascripts/discourse/routes/list_category_route.js.coffee b/app/assets/javascripts/discourse/routes/list_category_route.js.coffee index dfd1519ec5b..5e38ad1acd2 100644 --- a/app/assets/javascripts/discourse/routes/list_category_route.js.coffee +++ b/app/assets/javascripts/discourse/routes/list_category_route.js.coffee @@ -1,10 +1,13 @@ window.Discourse.ListCategoryRoute = Discourse.FilteredListRoute.extend - serialize: (params) -> slug: params.get('slug') - setupController: (controller, model) -> + + slug = Em.get(model, 'slug') + category = Discourse.get('site.categories').findProperty('slug', slug) + category ||= Discourse.Category.create(name: slug, slug: slug) + listController = @controllerFor('list') - listController.set('filterMode', "category/#{model.slug}") - listController.load("category/#{model.slug}").then (topicList) => + listController.set('filterMode', "category/#{category.get('slug')}") + listController.load("category/#{category.get('slug')}").then (topicList) => listController.set('canCreateTopic', topicList.get('can_create_topic')) - listController.set('category', Discourse.Category.create(name: model.slug)) + listController.set('category',category) @controllerFor('listTopics').set('content', topicList) diff --git a/app/assets/javascripts/discourse/views/post_menu_view.js.coffee b/app/assets/javascripts/discourse/views/post_menu_view.js.coffee index 75855407f07..bf884bbcfea 100644 --- a/app/assets/javascripts/discourse/views/post_menu_view.js.coffee +++ b/app/assets/javascripts/discourse/views/post_menu_view.js.coffee @@ -26,15 +26,13 @@ window.Discourse.PostMenuView = Ember.View.extend Discourse.Presence, # Trigger re rendering needsToRender: (-> @rerender() - ).observes('post.deleted_at', 'post.flagsAvailable.@each', 'post.url', 'post.bookmarked', 'post.reply_count', 'post.can_delete') + ).observes('post.deleted_at', 'post.flagsAvailable.@each', 'post.url', 'post.bookmarked', 'post.reply_count', 'post.showRepliesBelow', 'post.can_delete') # Replies Button renderReplies: (post, buffer) -> - return if @get('post.replyFollowing') - + return unless post.get('showRepliesBelow') reply_count = post.get('reply_count') - return if reply_count == 0 buffer.push("