diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f0ca5bfc84de79c7800a8e7c7ed4c09a83c094d7..a39d827e48834d709a1a212e44fb0dfa100b512c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class ApplicationController < ActionController::Base protect_from_forgery :except => :receive diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 2bf1edb769a42d5099f659786b7fb14e3310668b..ba9d3ffd96b63368126f577296f38c1583d7b8a4 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class AspectsController < ApplicationController before_filter :authenticate_user! diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index fe11cb8ae28782923f3a90defc676587da9e39f5..d1efc3e109c068970d1edbdfa0ff23b320fddd7b 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class CommentsController < ApplicationController before_filter :authenticate_user! diff --git a/app/controllers/dev_utilities_controller.rb b/app/controllers/dev_utilities_controller.rb index 77867af81cc18675ac59de5fa51449129b0e749f..e8a40a4c2e87d2cbc5b6f4ec000d114415a03ec2 100644 --- a/app/controllers/dev_utilities_controller.rb +++ b/app/controllers/dev_utilities_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class DevUtilitiesController < ApplicationController before_filter :authenticate_user!, :except => [:set_backer_number] include ApplicationHelper @@ -57,7 +56,6 @@ class DevUtilitiesController < ApplicationController current_user.raw_visible_posts << photo current_user.save - current_user.update_profile(:image_url => photo.url(:thumb_medium)) current_user.save end diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 08acdd4241dd3980bf766d4e76c439621ccc9241..a8b8fffc053143ef8fcfda5dd14f57dbb538c332 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class PeopleController < ApplicationController before_filter :authenticate_user! diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 0866751d09dc68e0c1184e9c97694f016b55ebc5..4d865573c8c85ecd5e5ac96350403ad2aab131f5 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class PhotosController < ApplicationController before_filter :authenticate_user! @@ -35,12 +34,10 @@ class PhotosController < ApplicationController ############## - params[:user_file] = file data = clean_hash(params) - @photo = current_user.post(:photo, data) respond_to do |format| @@ -103,7 +100,6 @@ class PhotosController < ApplicationController end end - private def clean_hash(params) if params[:photo] diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index 6be195e302b9298a2265ffb76510e6182524ae72..fcfdb0db671030a930b6ba406cfa229c106bf64e 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class PublicsController < ApplicationController require File.expand_path('../../../lib/diaspora/parser', __FILE__) include Diaspora::Parser diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index 44e1a801685838b98d0d993b2960240d16c2fce9..31c6e6efd565e6bc2ea6d0ed06868276bbe3242c 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class RequestsController < ApplicationController before_filter :authenticate_user! include RequestsHelper @@ -42,8 +41,6 @@ class RequestsController < ApplicationController return end - - # rel_hash = {:friend => params[:friend_handle]} Rails.logger.debug("Sending request: #{rel_hash}") diff --git a/app/controllers/sockets_controller.rb b/app/controllers/sockets_controller.rb index 9b90ea83177a7447f778d704dd2b4bbededa1103..88d8e6b409c7374832f4569d9ad63fa99d4c03ef 100644 --- a/app/controllers/sockets_controller.rb +++ b/app/controllers/sockets_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class SocketsController < ApplicationController include ApplicationHelper include SocketsHelper diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 5a8efbe066d41cc7da845fe51dd838050aefed0c..ef519a1a4af556e9a82380c7d8f64564cb5caea2 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class StatusMessagesController < ApplicationController before_filter :authenticate_user! diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 819a88d288f6e37887da21c2c47587c19a53fcc4..260b5b7fa9e967fe963233cb578f22fc17a06b35 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class UsersController < ApplicationController before_filter :authenticate_user!, :except => [:new, :create] diff --git a/app/helpers/albums_helper.rb b/app/helpers/albums_helper.rb index 9a1e78fd19f2bbf60455147c9f03be9e3609d797..6d85c747c27c70aa32e48e816e376727540134cf 100644 --- a/app/helpers/albums_helper.rb +++ b/app/helpers/albums_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module AlbumsHelper def friends_albums_link if params[:friends] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 89df261556cb6780f131bec08d2ba8e6f1810e43..688ddb10bd3bd1b396c2b269031197e2b7f03e70 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module ApplicationHelper def current_aspect?(aspect) !@aspect.is_a?(Symbol) && @aspect.id == aspect.id diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb index 536bb8b0b8f2f31e330c9fc192c269dd25c5b852..66baffca2b98e36d9a925354c4a3c5e70847f914 100644 --- a/app/helpers/aspects_helper.rb +++ b/app/helpers/aspects_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module AspectsHelper def link_for_aspect( aspect ) link_to aspect.name, aspect diff --git a/app/helpers/dashboards_helper.rb b/app/helpers/dashboards_helper.rb index 271b6825374dfd49a6cd4bf9ea7ccd0f6d315bed..e8a9d8f7171339edaacafe0a6f7f58fe772289c0 100644 --- a/app/helpers/dashboards_helper.rb +++ b/app/helpers/dashboards_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module DashboardsHelper def title_for_page I18n.t('dashboards.helper.home') diff --git a/app/helpers/error_messages_helper.rb b/app/helpers/error_messages_helper.rb index 274d60edf381576ca2471e58fa9817c13df478d1..9a64dca365f1f0281b45c29219e4dad411734d91 100644 --- a/app/helpers/error_messages_helper.rb +++ b/app/helpers/error_messages_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module ErrorMessagesHelper # Render error messages for the given objects. The :message and :header_message options are allowed. def error_messages_for(*objects) diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb index 2398771a30a6f81a03f71fba6143472c1bcf2203..e33556c355f052615adb511c515b05213bd43fe5 100644 --- a/app/helpers/layout_helper.rb +++ b/app/helpers/layout_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - # These helper methods can be called in your template to set variables to be used in the layout # This module should be included in all views globally, # to do so you may need to add this line to your ApplicationController diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb index 90ffb517d310a1865d94e34e936ef75370a5a9aa..f1fa6487f5278cd1f9acac30d321daf0e7bfe595 100644 --- a/app/helpers/people_helper.rb +++ b/app/helpers/people_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module PeopleHelper def search_or_index diff --git a/app/helpers/photos_helper.rb b/app/helpers/photos_helper.rb index 2737d3a2d0d9f77dec91c1a601f37775966d62f2..1f52daa0cd97fe2b2713103a7833129e2eda17dd 100644 --- a/app/helpers/photos_helper.rb +++ b/app/helpers/photos_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module PhotosHelper def linked_scaled_photo(photo, album) link_to (image_tag photo.url(:scaled_full)), photo_path(album.next_photo(photo)), :rel => "prefetch" diff --git a/app/helpers/publics_helper.rb b/app/helpers/publics_helper.rb index 46e778e2bd0a1219421d5b264e0dd886b7372f00..f14fad7a6a04e97627958602fb0c0daffa862abc 100644 --- a/app/helpers/publics_helper.rb +++ b/app/helpers/publics_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module PublicsHelper def subscribe(opts = {}) subscriber = Subscriber.first(:url => opts[:callback], :topic => opts[:topic]) diff --git a/app/helpers/requests_helper.rb b/app/helpers/requests_helper.rb index fec093aac6ae860f1daa04ef9b9917c237e14383..98ccc8f75d6cb3032343ac97b78c6fb4de2a4327 100644 --- a/app/helpers/requests_helper.rb +++ b/app/helpers/requests_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module RequestsHelper def subscription_mode(profile) if diaspora?(profile) diff --git a/app/helpers/sockets_helper.rb b/app/helpers/sockets_helper.rb index 69135092a2bfe143d80ba6dbc9a9032fd5bc30fc..892e15f59bb445658c0da8d14361eb51f73dc1ee 100644 --- a/app/helpers/sockets_helper.rb +++ b/app/helpers/sockets_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module SocketsHelper include ApplicationHelper diff --git a/app/helpers/status_messages_helper.rb b/app/helpers/status_messages_helper.rb index 7c1322762584f7d1db5f4c9d3bd1eb87f136b7b3..08461b6353ebbb92714b4a4c88d2803cf95e6880 100644 --- a/app/helpers/status_messages_helper.rb +++ b/app/helpers/status_messages_helper.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - module StatusMessagesHelper def my_latest_message unless @latest_status_message.nil? diff --git a/app/models/album.rb b/app/models/album.rb index 10737bdfade1f1d4c91ebca503d63e853dfbf640..f62cbdb794a9437939597625fe00aeb64541adbd 100644 --- a/app/models/album.rb +++ b/app/models/album.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class Album < Post xml_reader :name @@ -17,7 +16,6 @@ class Album < Post before_destroy :destroy_photos - def self.mine_or_friends(friend_param, current_user) friend_param ? Album.find_all_by_person_id(current_user.friend_ids) : current_user.person.albums end diff --git a/app/models/aspect.rb b/app/models/aspect.rb index b6014267137eb9d1a8ed04a0cf29e972681f0ff9..10f7aba142de6c7dd0a37092b52563d40407c671 100644 --- a/app/models/aspect.rb +++ b/app/models/aspect.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class Aspect include MongoMapper::Document diff --git a/app/models/comment.rb b/app/models/comment.rb index 3fa986503f7db886aa08692bee12ff50a5847265..4bf0dbd5e86e4777ab434b81cb42090cc692443c 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class Comment include MongoMapper::Document include ROXML @@ -19,7 +18,6 @@ class Comment key :post_id, ObjectId key :person_id, ObjectId - belongs_to :post, :class_name => "Post" belongs_to :person, :class_name => "Person" diff --git a/app/models/person.rb b/app/models/person.rb index a94f4106c3ac8b596edb5db03205fa29efc02929..38a55db2b97b23683404679fec444a79810be89b 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - require File.expand_path('../../../lib/hcard', __FILE__) class Person diff --git a/app/models/photo.rb b/app/models/photo.rb index fbab51ea50fd4e957c72dba180f0d54b88366a3d..15d105739c7963f1cc61d9bbc7b009d959aa8c79 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -73,4 +73,3 @@ class Photo < Post end end - diff --git a/app/models/post.rb b/app/models/post.rb index 431d1c7e0ab77c01e88b7698e774886d48069435..983d0e68fc953db3db66bf1b2da1c2d2c06ec0be 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class Post require File.expand_path('../../../lib/encryptable', __FILE__) require File.expand_path('../../../lib/diaspora/websocket', __FILE__) @@ -33,7 +32,6 @@ class Post self.create params.to_hash end - def as_json(opts={}) { :post => { diff --git a/app/models/profile.rb b/app/models/profile.rb index 2bb54028a9d8d9c2c608e0f584e7ff4f12369e22..2b8303bd18dd6a97672642390c94f65fc989f7e6 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class Profile include MongoMapper::EmbeddedDocument require File.expand_path('../../../lib/diaspora/webhooks', __FILE__) diff --git a/app/models/request.rb b/app/models/request.rb index bf9dd872164b6711668257084fae25cefc3e7fd9..5ba4769a206b87a4ae6fcaf4520da09c77f2d8e6 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class Request require File.expand_path('../../../lib/diaspora/webhooks', __FILE__) include MongoMapper::Document diff --git a/app/models/retraction.rb b/app/models/retraction.rb index 9c1f13f450c31cf87bf6b96091808bf25e62e996..20f74bf29285eca1916bf0f08e5f669cc5f32bd1 100644 --- a/app/models/retraction.rb +++ b/app/models/retraction.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class Retraction include ROXML include Diaspora::Webhooks diff --git a/app/models/status_message.rb b/app/models/status_message.rb index f75536205e95b1acbf9e669b0172a486ea8a80d5..c616efc5e7fa11ddc17f2246c649a0bbba442851 100644 --- a/app/models/status_message.rb +++ b/app/models/status_message.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class StatusMessage < Post xml_name :status_message @@ -11,7 +10,6 @@ class StatusMessage < Post key :message, String validates_presence_of :message - def to_activity <<-XML <entry> diff --git a/app/models/user.rb b/app/models/user.rb index 272f404bc5d2b07cafa3d5a6c6efd1e04733444a..ade7b7a2a8ab8f3a41507204741d2ba6b565bdda 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -71,7 +71,6 @@ class User end end - def move_friend( opts = {}) return true if opts[:to] == opts[:from] friend = Person.first(:_id => opts[:friend_id]) @@ -107,7 +106,6 @@ class User intitial_post(class_name, aspect_ids, options) end - def intitial_post(class_name, aspect_ids, options = {}) post = build_post(class_name, options) post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to?(:socket_to_uid) @@ -270,7 +268,6 @@ class User username.downcase! if username end - def as_json(opts={}) { :user => { diff --git a/app/uploaders/image_uploader.rb b/app/uploaders/image_uploader.rb index 6e5312341628cbddb47f8b748fe5d72268cd9a41..58399c90d46831e02b51a4ce74416a56f9475c54 100644 --- a/app/uploaders/image_uploader.rb +++ b/app/uploaders/image_uploader.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - class ImageUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick diff --git a/autotest/discover.rb b/autotest/discover.rb index 99ab1f6e44543a0d3f36fc4212237f9a991cbdb6..76b9d2044101321d9997650c53c6a2a4dec7a1c2 100644 --- a/autotest/discover.rb +++ b/autotest/discover.rb @@ -2,6 +2,5 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - Autotest.add_discovery { "rails" } Autotest.add_discovery { "rspec2" } diff --git a/config/application.rb b/config/application.rb index 79302a2894fa8c92e17dd1d1d683e4e934ddec9e..59b82e21697ab87e64bc948c76ce9b7662981ffd 100644 --- a/config/application.rb +++ b/config/application.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - require File.expand_path('../boot', __FILE__) require 'action_controller/railtie' diff --git a/config/boot.rb b/config/boot.rb index faeac67421c4325bf206025c157359246d8a12bd..0d0c42268975555044d179ada47e531923e3e296 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - require 'rubygems' # Set up gems listed in the Gemfile. diff --git a/config/deploy.rb b/config/deploy.rb index 2f8065134d50f494dc3e5658cdeb69c586661b76..ab240e18c16e6696bc8ec8298e1e11be6f9c73e6 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - config = YAML.load_file(File.dirname(__FILE__) + '/deploy_config.yml') all = config['cross_server'] @@ -108,7 +106,6 @@ namespace :deploy do run 'gem install bundler' end - task :migrate do end end @@ -152,7 +149,6 @@ namespace :db do tom_seed end - end after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle", 'deploy:symlink_config' diff --git a/config/environment.rb b/config/environment.rb index 385a96651defc4938ac3b6f94ed3bea5094d6bf9..5bde8792bf82d08843c182d97bbc40c9feff4d1d 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - # Load the rails application require File.expand_path('../application', __FILE__) Haml::Template.options[:format] = :html5 @@ -11,4 +9,3 @@ Haml::Template.options[:escape_html] = true # Initialize the rails application Diaspora::Application.initialize! - diff --git a/config/environments/development.rb b/config/environments/development.rb index 44ba8e55efca95cc676bb9cec65bcb3585ee4329..15d1fc2bba372ae28e8260a22b0563d0dd401af7 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - require File.expand_path('../../../lib/mongo_mapper/clear_dev_memory', __FILE__) Diaspora::Application.configure do # Settings specified here will take precedence over those in config/environment.rb diff --git a/config/environments/production.rb b/config/environments/production.rb index 3207c627d934257211e452da1d27c2e64889c02b..358e6e092f142885d9a4996bd3b587d612f1ef0b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - Diaspora::Application.configure do # Settings specified here will take precedence over those in config/environment.rb diff --git a/config/environments/test.rb b/config/environments/test.rb index 4e17d81e87a072f034160106f69f9e7ef31cb6b0..46b44db551a26d7bc07b570600568bf7d4c8ec1d 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - Diaspora::Application.configure do # Settings specified here will take precedence over those in config/environment.rb @@ -32,13 +31,11 @@ Diaspora::Application.configure do config.active_support.deprecation = :stderr config.threadsafe! - # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql - begin require 'database_cleaner' DatabaseCleaner.strategy = :truncation diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb index d456f8c8bbd13359d935842bdb93ffc4ea989669..1efed86e96f62305d888eb35a905082827e36be3 100644 --- a/config/initializers/backtrace_silencers.rb +++ b/config/initializers/backtrace_silencers.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index 6dea937e9f98ea80255127ea60c9bff238aa607d..b28f1be669466018ced26e91411de3bc7d6af795 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - CarrierWave.configure do |config| config.storage = :file end diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 9f483a8bf21789fc5f13d849b69165fd0db5d4f6..a02045546ee67aac310969916ed69b91008c459d 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - # Use this hook to configure devise mailer, warden hooks and so forth. The first # four configuration values can also be set straight in your models. Devise.setup do |config| diff --git a/config/initializers/git_info.rb b/config/initializers/git_info.rb index ac2e4ba276fcb3966ce296196dbabb4207cf3941..82fc99143c2db46c72acb66c6bfec6db6f172166 100644 --- a/config/initializers/git_info.rb +++ b/config/initializers/git_info.rb @@ -2,5 +2,4 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - GIT_INFO = `git show --name-only` diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 3171994eedcb9535c03c06292cb813ee9dda6620..0e4097c04451821067c4921b1068c191b44c3a36 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb index dd607a2737c5678d07a2a08db57f458d3fa70d01..823179842d6e01d3a177b4949f11feaef56b4820 100644 --- a/config/initializers/locale.rb +++ b/config/initializers/locale.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] -I18n.default_locale = :en \ No newline at end of file +I18n.default_locale = :en diff --git a/config/initializers/logging.rb b/config/initializers/logging.rb index 86abdbea3c35a2ada22521662370388c0144b187..48cc2fa303da9316d03df477eb9d4fbf86ae31aa 100644 --- a/config/initializers/logging.rb +++ b/config/initializers/logging.rb @@ -2,6 +2,5 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - Rails.logger = Logger.new( Rails.root.join("log",Rails.env + ".log"),3,5*1024*1024) diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index a5a89433ad76351c7b747cce5c6124e63e37c75d..77424db27ac5e336e2674bf66a14f2b91aea983b 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: diff --git a/config/initializers/rspec_generator.rb b/config/initializers/rspec_generator.rb index caf2be23a558b589753050a6e2c71dd66fd0f37d..bdec44a0329f5f35ddcce37f03b633b277a164a5 100644 --- a/config/initializers/rspec_generator.rb +++ b/config/initializers/rspec_generator.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - Diaspora::Application.configure do config.generators do |g| g.integration_tool :rspec diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index c61c96d33df5c14a0dd7640d5706c278fe176b7a..20f6087bf8ff95c5874576a27de1fa0df9d39f05 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - # Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index de79a36ebcf8572acd679628f223a5ec48805240..f4e36ea899d2d79e83e832da5b394081ddf9a9e9 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - # Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, :key => '_diaspora_session' diff --git a/config/locales/devise/devise.he.yml b/config/locales/devise/devise.he.yml new file mode 100644 index 0000000000000000000000000000000000000000..851a907895ff53db230506d5a2e82f5e247ac1aa --- /dev/null +++ b/config/locales/devise/devise.he.yml @@ -0,0 +1,41 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +en: + errors: + messages: + not_found: "×œ× × ×ž×¦×" + already_confirmed: "כבר ×ושר" + not_locked: "×œ× × × ×¢×œ" + + devise: + failure: + unauthenticated: "צריך להתחבר ×ו ×œ×”×™×¨×©× ×œ×¤× ×™ ש×פשר להמשיך." + unconfirmed: "צריך ל×שר ×ת החשבון ×œ×¤× ×™ ש×פשר להמשיך." + locked: "החשבון שלך × ×¢×•×œ." + invalid: "×ימייל ×ו סיסמה ×œ× × ×›×•× ×™×." + invalid_token: "מספר ×ימות ×œ× × ×›×•×Ÿ." + timeout: "פג תוקפו של החיבור. × × ×œ×”×ª×—×‘×¨ מחדש על ×ž× ×ª להמשיך." + inactive: "החשבון ×œ× ×ומת עדיין." + sessions: + signed_in: "התחברות עברה בהצלחה." + signed_out: "×”×ª× ×ª×§×•×ª עברה בהצלחה." + passwords: + send_instructions: "×ימייל ×¢× ×”×•×¨×ות עיצד ל×פס סיסמה יתקבל בקרוב." + updated: "סיסמה הוחלפה בהצלחה, ×ת/×” כעת מחובר/ת." + confirmations: + send_instructions: "×ימייל ×¢× ×”×•×¨×ות כיצד ל×מת ×ת החשבון יתקבל בקרוב." + confirmed: "חשבון ×ומת בהצלחה. ×ת/×” כעת מחובר/ת." + registrations: + signed_up: "התחברת בהצלחה, ×× ×”×“×‘×¨ מ×ופשר, יתקבל ×ימייל ×ישור בקרוב.." + updated: "×—×©×‘×•× ×š עודכן בהצלחה." + destroyed: "להתר×ות! ×—×©×‘×•× ×š × ×ž×—×§ בהצלחה. ×ž×§×•×•×™× ×œ×¨×ותך שוב בקרוב!" + unlocks: + send_instructions: "×ימייל ×¢× ×”×•×¨×ות כיצד להסיר ×ת ×”× ×¢×™×œ×” ×ž×—×©×‘×•× ×š יתקבל בקרוב." + unlocked: "×—×©×‘×•× ×š × ×¤×ª×— בהצלחה. ×ת/×” כעת מחובר/ת." + mailer: + confirmation_instructions: "הור×ות ×ישור" + reset_password_instructions: "הור×ות ×יפוס סיסמה" + unlock_instructions: "הור×ות הסרת × ×¢×™×œ×”" diff --git a/config/locales/diaspora/he.yml b/config/locales/diaspora/he.yml new file mode 100644 index 0000000000000000000000000000000000000000..90ced9435fae68f78f8d9221adadc0d656975aee --- /dev/null +++ b/config/locales/diaspora/he.yml @@ -0,0 +1,201 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + +he: + hello: "×©×œ×•× ×¢×•×œ×" + application: + helper: + unknown_person: "××“× ×œ× ×ž×•×›×¨" + new_requests: "בקשות חדשות" + dashboards: + helper: + home: "בית" + error_messages: + helper: + invalid_fields: "שדות ×œ× ×—×•×§×™×™×" + correct_the_following_errors_and_try_again: "× × ×œ×ª×§×Ÿ ×ת השגי×ות הב×ות ×•×œ× ×¡×•×ª שוב." + people: + helper: + results_for: " תוצ×ות עבור %{params}" + people_on_pod_are_aware_of: " ×× ×©×™× ×‘×¤×•×“ ×ž×›×™×¨×™× ×ת" + layouts: + application: + edit_profile: "ערוך פרופיל" + logout: "×”×ª× ×ª×§" + shared: + aspect_nav: + all_aspects: "כל ×”×ספקטי×" + manage: "× ×”×œ" + manage_your_aspects: "× ×”×œ ×ספקטי×" + sub_header: + all_aspects: "כל ×”×ספקטי×" + manage_aspects: "× ×”×œ ×ספקטי×" + publisher: + share: "שתף" + aspect_friends: + add_friends: "הוסף חברי×" + albums: + album: + you: "×תה" + new_album: + create: "צור" + add_a_new_album: "הוסף ××œ×‘×•× ×—×“×©" + show: + edit_album: "ערוך ×לבו×" + albums: "×לבומי×" + updated: "עדכן" + by: "על ידי" + edit: + editing: "עריכה" + updated: "עודכן" + are_you_sure: "×”×× ×ת/×” בטוח/×”?" + delete_album: "מחק ×לבו×" + cancel: "בטל" + index: + home: "בית" + new_album: "××œ×‘×•× ×—×“×©" + create: + success: "יצרת ××œ×‘×•× ×‘×©× %{name}." + update: + success: "××œ×‘×•× %{name} עודכן בהצלחה." + failure: "עריכת ××œ×‘×•× %{name} × ×›×©×œ×”." + destroy: + success: "××œ×‘×•× %{name} × ×ž×—×§." + helper: + friends_albums: "××œ×‘×•×ž×™× ×©×œ חברי×" + your_albums: "×”××œ×‘×•×ž×™× ×©×œ×š" + aspects: + index: + photos: "×ª×ž×•× ×•×ª" + show: + photos: "×ª×ž×•× ×•×ª" + manage: + add_a_new_aspect: "הוסף ×ספקט" + add_a_new_friend: "הוסף חבר" + show: "הצג" + update_aspects: "עדכן ×ספקטי×" + requests: "בקשות" + ignore_remove: "התעל×/מחק" + new_aspect: + add_a_new_aspect: "הוסף ×ספקט" + create: "צור" + create: + success: "לחץ על הפלוס בצד ימין על ×ž× ×ª לקבוע מי רש××™ לצפות ב×ספקט." + destroy: + success: "%{name} הוסר בהצלחה." + update: + success: "×”×ספקט שלך, %{name}, × ×¢×¨×š בהצלחה." + move_friends: + failure: "עריכת ×ספקט × ×›×©×œ×” עבור %{real_name}." + success: "××¡×¤×§×˜×™× × ×¢×¨×›×• בהצלחה." + move_friend: + failure: "×œ× ×¢×‘×“ %{inspect}" + success: "×תה כעת מציג לחברך ×ספקט ×©×•× ×” שלך." + helper: + remove: "מחק" + aspect_not_empty: "×ספקט ×œ× ×¨×™×§" + users: + edit: + cancel: "בטל" + update_profile: "עדכן פרופיל" + home: "בית" + diaspora_username: "×©× ×ž×©×ª×ž×© בדי×ספורה" + info: "מידע" + picture: "×ª×ž×•× ×”" + editing_profile: "עורך פרופיל" + albums: "×לבומי×" + you_dont_have_any_photos: "×ין לך ×ª×ž×•× ×•×ª! עבור ל-" + page_to_upload_some: "דף להעל××”." + comments: + comment: + ago: "×œ×¤× ×™" + new_comment: + comment: "הערה" + photos: + show: + prev: "קוד×" + full_size: "גודל מל×" + next: "הב×" + edit_photo: "ערוך ×ª×ž×•× ×”" + delete_photo: "מחק ×ª×ž×•× ×”" + are_you_sure: "×”×× ×תה בטוח?" + comments: "הערות" + edit: + editing: "עריכה" + are_you_sure: "×”×× ×תה בטוח?" + delete_photo: "מחק ×ª×ž×•× ×”" + photo: + show_comments: "הצג הערות" + posted_a_new_photo_to: "הועלתה ×ª×ž×•× ×” חדשה ל-" + new: + new_photo: "×ª×ž×•× ×” חדשה" + back_to_list: "חרה לרשימה" + post_it: "שתף!" + create: + runtime_error: "העל×ת ×ª×ž×•× ×” × ×›×©×œ×”. ×”×× ×תה חוגר חגורת בטיחות?" + integrity_error: "העל×ת ×ª×ž×•× ×” × ×›×©×œ×”. ×”×× ×–×• ×כן הייתה ×ª×ž×•× ×”?" + type_error: "העל×ת ×ª×ž×•× ×” × ×›×©×œ×”. ×”×× ×כן × ×•×¡×¤×” ×ª×ž×•× ×”?" + update: + notice: "×ª×ž×•× ×” ×¢×•×“×›× ×” בהצלחה." + error: "עריכת ×ª×ž×•× ×” × ×›×©×œ×”." + destroy: + notice: "×ª×ž×•× ×” × ×ž×—×§×”." + registrations: + new: + sign_up: "הצטרפות" + create: + success: "הצטרפת לדי×ספורה!" + status_messages: + new_status_message: + tell_me_something_good: "ספר לי משהו × ×—×ž×“" + oh_yeah: "×חלה!" + status_message: + show_comments: "הצג תגובות" + delete: "מחק" + are_you_sure: "×”×× ×תה בטוח?" + show: + status_message: "הודעת סטטוס" + comments: "הערות" + are_you_sure: "×”×× ×תה בטוח?" + destroy: "השמד" + view_all: "הצג הכל" + message: "הודעה" + owner: "בעלי×" + helper: + no_message_to_display: "×ין הודעה להציג." + people: + person: + add_friend: "הוסף חבר" + pending_request: "בקשה על ×ª× ××™" + index: + add_friend: "הוסף חבר" + real_name: "×©× ×מיתי" + diaspora_handle: "×›×™× ×•×™ בדי×ספורה" + thats_you: "×–×” ×תה!" + friend_request_pending: "בקשת חברות ×ž×ž×ª×™× ×”" + you_have_a_friend_request_from_this_person: "יש לך בקשת חברות מ××“× ×–×”" + new: + new_person: "××“× ×—×“×©" + back_to_list: "חזרה לרשימה" + show: + last_seen: "× ×¨××” ל××—×¨×•× ×”: %{how_long_ago}" + friends_since: "×—×‘×¨×™× ×ž××–: %{how_long_ago}" + save: "שמור" + are_you_sure: "×”×× ×תה בטוח?" + remove_friend: "מחק חבר" + requests: + new_request: + add_a_new_friend_to: "הוסף חבר חדש ל-" + enter_a_diaspora_username: "×”×›× ×¡ ×©× ×ž×©×ª×ž×© בדי×ספורה:" + your_diaspora_username_is: "×©× ×”×ž×©×ª×ž×© שלך בדי×ספורה: %{diaspora_handle}" + friends_username: "×©× ×”×ž×©×ª×ž×© של חבר" + destroy: + success: "××ª× ×›×¢×ª חברי×." + error: "× × ×œ×‘×—×•×¨ ×ספקט!" + ignore: "התעלמת מבקשת חברות." + create: + error: "×œ× × ×ž×¦× ×–×¨×¢ די×ספורה ×¢× ×ימייל ×–×”!" + already_friends: "×ת/×” כבר חבר של %{destination_url}!" + success: "בקשת חברות × ×©×œ×—×” ל%{destination_url}." + horribly_wrong: "משהו רע מ×וד קרה." diff --git a/config/routes.rb b/config/routes.rb index 0ac115b76e67e6b68edaa3de375cf80ce5d7f78b..7f60bd63b9e33dd7b26eef61888b5f9a1e9aa2dd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - Diaspora::Application.routes.draw do resources :people, :only => [:index, :show, :destroy] resources :users, :except => [:create, :new, :show] @@ -18,7 +16,6 @@ Diaspora::Application.routes.draw do match 'aspects/manage', :to => 'aspects#manage' resources :aspects, :except => [:edit] - match 'warzombie', :to => "dev_utilities#warzombie" match 'zombiefriends', :to => "dev_utilities#zombiefriends" match 'zombiefriendaccept', :to => "dev_utilities#zombiefriendaccept" diff --git a/config/sprinkle/packages/database.rb b/config/sprinkle/packages/database.rb index 2463007ff4473eeafaa727b2c5b5644d9eca103e..0c1b1ca5072a375248e7e1448b3b7582e82f8231 100644 --- a/config/sprinkle/packages/database.rb +++ b/config/sprinkle/packages/database.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - #package :mongo, :provides => :database do # description 'Mongodb' # version '1.4.3' diff --git a/config/sprinkle/packages/essential.rb b/config/sprinkle/packages/essential.rb index fba076e270956a8b68ecbbcc7c8e31a3dd6ff193..8b4349d061ce71ec81932f6d2aca5aee130f3844 100644 --- a/config/sprinkle/packages/essential.rb +++ b/config/sprinkle/packages/essential.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - ## Special package, anything that defines a 'source' package means build-essential should be installed for Ubuntu package :build_essential do diff --git a/config/sprinkle/packages/ruby.rb b/config/sprinkle/packages/ruby.rb index 708ab0eeb20079d7042d68f97bc2963a19a5101b..261cf3ffe351d6ca2de6ed6c89767bc6f26b6a7e 100644 --- a/config/sprinkle/packages/ruby.rb +++ b/config/sprinkle/packages/ruby.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - ## Defines available packages package :ruby do diff --git a/config/sprinkle/packages/scm.rb b/config/sprinkle/packages/scm.rb index 22ece7d984ee9b6228b474644982563954e98991..981214a605738bd028b46be6a0316eb06e19e803 100644 --- a/config/sprinkle/packages/scm.rb +++ b/config/sprinkle/packages/scm.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - package :git, :provides => :scm do description 'Git Distributed Version Control' apt %w( git-core ) diff --git a/config/sprinkle/packages/server.rb b/config/sprinkle/packages/server.rb index 68e1a12aa08b9d4fbc1ff7eb6224c91986713876..004883dada463fc7e60f69f2115ff1e5a7cd4b6b 100644 --- a/config/sprinkle/packages/server.rb +++ b/config/sprinkle/packages/server.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - package :nginx, :provides=> :webserver do description 'Nginx HTTP server' version '0.7.67' diff --git a/config/sprinkle/packages/unfortunately_essential.rb b/config/sprinkle/packages/unfortunately_essential.rb index d1504bc43b9493b8856ef71574f1545dd9b4afef..23975f870933c1858188939d542e104c513648b6 100644 --- a/config/sprinkle/packages/unfortunately_essential.rb +++ b/config/sprinkle/packages/unfortunately_essential.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - #Fix dreamhost # diff --git a/config/sprinkle/provision.rb b/config/sprinkle/provision.rb index fc81b1ca3ee154adbb3971db1b4a8b50c8fd742e..3e30c26f4fc3998cde69bd06c835d01ba190f636 100644 --- a/config/sprinkle/provision.rb +++ b/config/sprinkle/provision.rb @@ -3,10 +3,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - - - require '#{File.dirname(__FILE__)}/packages/essential' require '#{File.dirname(__FILE__)}/packages/database' require '#{File.dirname(__FILE__)}/packages/server' @@ -26,7 +22,6 @@ policy :diaspora, :roles => [:pivots] do requires :nginx_conf end - deployment do # mechanism for deployment diff --git a/db/schema.rb b/db/schema.rb index a4f92eb4bb099513613e8ed2f3485487cde2dbed..19e6df260c35eb94eff1dc978dd690e92eb2ae66 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - # This file is auto-generated from the current state of the database. Instead of editing this file, # please use the migrations feature of Active Record to incrementally modify your database, and # then regenerate this schema definition. diff --git a/db/seeds.rb b/db/seeds.rb index 5b87469ca61215a9c1a987c0bb33ed01799eeeeb..687d2622e5a2b7b754ef89b9eda36dbb0f265884 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # diff --git a/db/seeds/backer.rb b/db/seeds/backer.rb index 22c81778d736d1d79d7fc43ec969155a319ce6a6..bc63a81a9d23ba40c3e58a448ea9cba5d2d2b404 100644 --- a/db/seeds/backer.rb +++ b/db/seeds/backer.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # @@ -16,7 +14,6 @@ require File.join(File.dirname(__FILE__), "..", "..", "config", "environment") def create - config = YAML.load_file(File.join(File.dirname(__FILE__), "..", "..", "config", "deploy_config.yml")) backer_info = config['servers']['backer'] diff --git a/db/seeds/dev.rb b/db/seeds/dev.rb index 375f5221f28fdb3d744ff1a8a45871f08faa2a1f..f10abec4f67d87fecd371dca3e46a4e54d9d0fb0 100644 --- a/db/seeds/dev.rb +++ b/db/seeds/dev.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - require File.join(File.dirname(__FILE__), "..", "..", "config", "environment") def set_app_config username diff --git a/db/seeds/tom.rb b/db/seeds/tom.rb index b54fedcc0a0460a8db16b8961e6791f2aa5a862a..3f8c4810f480475612f78324c0dd93d2613a0d27 100644 --- a/db/seeds/tom.rb +++ b/db/seeds/tom.rb @@ -2,7 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - require File.join(File.dirname(__FILE__), "..", "..", "config", "environment") def set_app_config username @@ -18,7 +17,6 @@ end set_app_config "tom" require 'config/initializers/_load_app_config.rb' - # Create seed user user = User.instantiate!( :email => "tom@tom.joindiaspora.com", :username => "tom", @@ -46,4 +44,3 @@ reversed_request = user2.accept_friend_request( request.id, user2.aspect(:name = user.receive reversed_request.to_diaspora_xml user.aspect(:name => "Presidents") - diff --git a/lib/chrome_frame.rb b/lib/chrome_frame.rb index 10ef3dea38f5f28501985141ce76881c513246a7..52a4eb45977bf39c6399b6127f7b1adfa0ea8b03 100644 --- a/lib/chrome_frame.rb +++ b/lib/chrome_frame.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Rack class ChromeFrame diff --git a/lib/diaspora.rb b/lib/diaspora.rb index 959d0bb92fcef9396a7f0049bfab6b9a07e16b0e..e8508b38ba0778135a4351bf2a1bd81e6c308fcb 100644 --- a/lib/diaspora.rb +++ b/lib/diaspora.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Diaspora autoload :Parser diff --git a/lib/diaspora/parser.rb b/lib/diaspora/parser.rb index 6bc5d4eabea4baaf971c271a77a2aba7ff0bbd9d..e8e7e8a2bfbbf131fca703341ed27235e85098ac 100644 --- a/lib/diaspora/parser.rb +++ b/lib/diaspora/parser.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Diaspora module Parser def self.owner_id_from_xml(xml) diff --git a/lib/diaspora/user/friending.rb b/lib/diaspora/user/friending.rb index f3b30f9b35b13eaf90cbc1f42743084e2c6ab301..35695c5463f6132d87fe2b816c4fef09c7aa8607 100644 --- a/lib/diaspora/user/friending.rb +++ b/lib/diaspora/user/friending.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Diaspora module UserModules module Friending @@ -29,7 +27,6 @@ module Diaspora request end - def accept_friend_request(friend_request_id, aspect_id) request = Request.find_by_id(friend_request_id) pending_requests.delete(request) diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb index bd4174c76e43b507d4c9a3900ebcddebee940755..29f11923842aa99b5131dc076f06f496451937d3 100644 --- a/lib/diaspora/user/querying.rb +++ b/lib/diaspora/user/querying.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Diaspora module UserModules module Querying diff --git a/lib/diaspora/webhooks.rb b/lib/diaspora/webhooks.rb index 81f7bcfaf17b86cf5dcfd313d832fa8925ec3f40..2be45d76a8b86554d9a128e28df8d11d383192b2 100644 --- a/lib/diaspora/webhooks.rb +++ b/lib/diaspora/webhooks.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Diaspora module Webhooks def self.included(klass) diff --git a/lib/diaspora/websocket.rb b/lib/diaspora/websocket.rb index 687bd2b7c27074a979ee47809e93dc6a066628ca..10e8bc9c83df666242c5413c262a89dd04c4fe08 100644 --- a/lib/diaspora/websocket.rb +++ b/lib/diaspora/websocket.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Diaspora module WebSocket def self.queue_to_user(uid, data) diff --git a/lib/encryptable.rb b/lib/encryptable.rb index ba36d6ec3de49960f94e8b4213b5d2ae28f4d64f..5b00ca9ead49d84d481ee92d02f0375d2a111a2e 100644 --- a/lib/encryptable.rb +++ b/lib/encryptable.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Encryptable def signable_string raise NotImplementedException("Override this in your encryptable class") diff --git a/lib/encryptor.rb b/lib/encryptor.rb index ed9fbedb1f56026f48fd5cb7e0117d434afa8656..d90e8bdfe245a5773c9a8257181ab029a05aac74 100644 --- a/lib/encryptor.rb +++ b/lib/encryptor.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module Encryptor module Public def encrypt cleartext @@ -60,6 +58,5 @@ module Encryptor txt end - end end diff --git a/lib/hcard.rb b/lib/hcard.rb index 7658c5a1d3d69aae39eb48b6745fad0f586b5c4d..5640e711b383667330132712ce0f6d2e455ead30 100644 --- a/lib/hcard.rb +++ b/lib/hcard.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module HCard def self.find url doc = Nokogiri::HTML(Net::HTTP.get URI.parse(url)) diff --git a/lib/message_handler.rb b/lib/message_handler.rb index 0b55ee0f7e50d14f339ce81574241a45d3831899..e6ce75ffc923b973b61021f5a715b6af69544392 100644 --- a/lib/message_handler.rb +++ b/lib/message_handler.rb @@ -2,11 +2,8 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - class MessageHandler - NUM_TRIES = 3 TIMEOUT = 5 #seconds diff --git a/lib/mongo_mapper/bson_id.rb b/lib/mongo_mapper/bson_id.rb index 4de833a66108da99c732464000e3b91e65274983..328c69a03b891b414d78e7bc5b0c81541e18b21b 100644 --- a/lib/mongo_mapper/bson_id.rb +++ b/lib/mongo_mapper/bson_id.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - class String def to_id BSON::ObjectId self diff --git a/lib/mongo_mapper/clear_dev_memory.rb b/lib/mongo_mapper/clear_dev_memory.rb index 88c7faccedb733959a3fc3079185ea08de0a6f7a..d63084765781ed139b8a37cab446ba8273e4c4ec 100644 --- a/lib/mongo_mapper/clear_dev_memory.rb +++ b/lib/mongo_mapper/clear_dev_memory.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - module MongoMapper class ClearDevMemory def initialize(app) diff --git a/lib/salmon/salmon.rb b/lib/salmon/salmon.rb index 931598691ab77bba94230a3ea871d77b31bbe318..5d285719691a8f80f56c8cf846dd78c8b44ede97 100644 --- a/lib/salmon/salmon.rb +++ b/lib/salmon/salmon.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - # Add URL safe Base64 support module Base64 module_function @@ -51,8 +49,6 @@ module Salmon sig_doc = doc.search('entry') slap.magic_sig = MagicSigEnvelope.parse sig_doc - - if 'base64url' == slap.magic_sig.encoding slap.data = decode64url(slap.magic_sig.data) slap.sig = slap.magic_sig.sig @@ -98,9 +94,6 @@ ENTRY end end - - - # Decode URL-safe-Base64. This implements def self.decode64url(str) # remove whitespace @@ -128,7 +121,6 @@ ENTRY signature = Base64.urlsafe_decode64(self.magic_sig.sig) signed_data = self.magic_sig.signable_string# Base64.urlsafe_decode64(self.magic_sig.signable_string) - public_key.verify(OpenSSL::Digest::SHA256.new, signature, signed_data ) end @@ -194,7 +186,6 @@ ENTRY env.encoding = env.get_encoding env.alg = env.get_alg - env.sig = Base64.urlsafe_encode64( user.encryption_key.sign OpenSSL::Digest::SHA256.new, env.signable_string ) diff --git a/lib/tasks/whitespace.rake b/lib/tasks/whitespace.rake index 397674ae5e23db7de44c581c9f498f508a74feb9..c5b9d4c6ea646b43052e51601a1b7d464eee518f 100644 --- a/lib/tasks/whitespace.rake +++ b/lib/tasks/whitespace.rake @@ -3,8 +3,13 @@ namespace :whitespace do task :cleanup do sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;} end + desc 'Converts hard-tabs into two-space soft-tabs' task :retab do sh %{find . -name '*.rb' -exec sed -i '' 's/\t/ /g' {} \\;} end + desc 'Remove consecutive blank lines' + task :scrub_gratuitous_newlines do + sh %{find . -name '*.rb' -exec sed -i '' '/./,/^$/!d' {} \\;} + end end diff --git a/spec/controllers/albums_controller_spec.rb b/spec/controllers/albums_controller_spec.rb index e8ea4447935db7c0f5a617844970074b49572b23..a8f5f8506b7492cd02443701ecc86a4eb2c235f8 100644 --- a/spec/controllers/albums_controller_spec.rb +++ b/spec/controllers/albums_controller_spec.rb @@ -2,9 +2,8 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. +require 'spec_helper' -require File.dirname(__FILE__) + '/../spec_helper' -include ApplicationHelper describe AlbumsController do render_views before do diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index a186e8b7c45ac4147c459c882585f8b8cd049604..2e05b850ccc2b78cf353e6908c2122e887a8bbc1 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -2,10 +2,8 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. +require 'spec_helper' - -require File.dirname(__FILE__) + '/../spec_helper' -include ApplicationHelper describe AspectsController do render_views before do diff --git a/spec/controllers/people_controller_spec.rb b/spec/controllers/people_controller_spec.rb index badfdf496bb445bea5dfbf2e150b80d56d2e4601..4ce6e3e695048b2f8273a0e5885b8579a85ad287 100644 --- a/spec/controllers/people_controller_spec.rb +++ b/spec/controllers/people_controller_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe PeopleController do render_views diff --git a/spec/controllers/publics_controller_spec.rb b/spec/controllers/publics_controller_spec.rb index bea772e20c425771f2b61e1493b5ca1ced199c07..70d851a3e066523d1a3986fa58c278e273a853ae 100644 --- a/spec/controllers/publics_controller_spec.rb +++ b/spec/controllers/publics_controller_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe PublicsController do render_views diff --git a/spec/controllers/requests_controller_spec.rb b/spec/controllers/requests_controller_spec.rb deleted file mode 100644 index f0864abe1e018c00e0309f2e36e882fd356c7384..0000000000000000000000000000000000000000 --- a/spec/controllers/requests_controller_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3. See -# the COPYRIGHT file. - - - -require File.dirname(__FILE__) + '/../spec_helper' -include ApplicationHelper -include RequestsHelper -describe RequestsController do - render_views - before do - @user = Factory.create :user - stub_success("tom@tom.joindiaspora.com") - - @tom = Redfinger.finger('tom@tom.joindiaspora.com') - sign_in :user, @user - stub!(:current_user).and_return @user - end - it 'should return the correct tag and url for a given address' do - relationship_flow('tom@tom.joindiaspora.com')[:friend].receive_url.include?("receive/user").should == true - end -end diff --git a/spec/controllers/sockets_controller_spec.rb b/spec/controllers/sockets_controller_spec.rb index 799d37500ff6f216ec3be1b3c192187a25189a12..905b1611e3b10048a8a2d83efee2564c49185702 100644 --- a/spec/controllers/sockets_controller_spec.rb +++ b/spec/controllers/sockets_controller_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' SocketsController.class_eval <<-EOT def url_options diff --git a/spec/factories.rb b/spec/factories.rb index 21a7ad1103b8414f5fc294582bee0ba91701ca2c..834304e338382c782627430fa44182167904b0a1 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - #For Guidance #http://github.com/thoughtbot/factory_girl # http://railscasts.com/episodes/158-factories-not-fixtures @@ -55,7 +53,6 @@ Factory.define :blog do |b| b.sequence(:body) {|n| "jimmy's huge #{n} whales"} end - Factory.define :bookmark do |b| b.link "http://www.yahooligans.com/" end diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 4b89c7b31463f18c4e7f7a1d055c1d587548b9b2..459563cffb2b2bef8c01bdec9a4f20217a1894b3 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -2,18 +2,14 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. +require 'spec_helper' - -require File.dirname(__FILE__) + '/../spec_helper' - -include ApplicationHelper describe ApplicationHelper do before do @user = Factory.create(:user) @person = Factory.create(:person) end - it "should provide a correct show path for a given person" do person_url(@person).should == "/people/#{@person.id}" end diff --git a/spec/helpers/publics_helper_spec.rb b/spec/helpers/publics_helper_spec.rb index 70e9d460681c10029a1d6370ae1a23a41079c48b..bc6a5021b4ce596b392a949b15cefa8ef60dcbdb 100644 --- a/spec/helpers/publics_helper_spec.rb +++ b/spec/helpers/publics_helper_spec.rb @@ -2,11 +2,8 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. +require 'spec_helper' - -require File.dirname(__FILE__) + '/../spec_helper' - -include PublicsHelper describe PublicsHelper do before do @user = Factory.create(:user) diff --git a/spec/helpers/requests_helper_spec.rb b/spec/helpers/requests_helper_spec.rb index 2d2be1acb773ecba32e087b0f56c26ce16b93743..bf99f89d1893b2da25598a03bd9eb583bbeb4054 100644 --- a/spec/helpers/requests_helper_spec.rb +++ b/spec/helpers/requests_helper_spec.rb @@ -2,16 +2,11 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' - -include RequestsHelper +require 'spec_helper' describe RequestsHelper do before do - stub_success("tom@tom.joindiaspora.com") stub_success("evan@status.net") @tom = Redfinger.finger('tom@tom.joindiaspora.com') @@ -24,4 +19,16 @@ describe RequestsHelper do subscription_mode(@evan).should == :none end end + + describe "#relationship_flow" do + let(:tom){ Factory(:user, :email => 'tom@tom.joindiaspora.com') } + + before do + stub!(:current_user).and_return(tom) + end + + it 'should return the correct tag and url for a given address' do + relationship_flow('tom@tom.joindiaspora.com')[:friend].receive_url.should include("receive/user") + end + end end diff --git a/spec/lib/diaspora_parser_spec.rb b/spec/lib/diaspora_parser_spec.rb index 3f4e20b1e5737e3b9627be9c87ef11dba4a8839c..e37cf011652e22f917e2ec4f7df9b1c4f3f3d968 100644 --- a/spec/lib/diaspora_parser_spec.rb +++ b/spec/lib/diaspora_parser_spec.rb @@ -2,14 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' - -include ApplicationHelper -include Diaspora::Parser - - +require 'spec_helper' describe Diaspora::Parser do before do @@ -88,7 +81,6 @@ describe Diaspora::Parser do original_person_id = @user2.person.id xml = request.to_diaspora_xml - Person.all.count.should be person_count @user.receive xml Person.all.count.should be person_count @@ -121,7 +113,6 @@ describe Diaspora::Parser do @user.friends.include?(new_person).should be true end - it 'should process retraction for a person' do person_count = Person.all.count request = @user.send_friend_request_to( @user2.person, @aspect) @@ -140,7 +131,6 @@ describe Diaspora::Parser do aspect_people_count = @aspect.people.size #They are now friends - Person.count.should == person_count @user.receive retraction_xml diff --git a/spec/lib/hcard_spec.rb b/spec/lib/hcard_spec.rb index 89ad499249ee6d9b303bb1722e39c25a974a9d37..45d7157b9644f6817564da957ade00812ae101a8 100644 --- a/spec/lib/hcard_spec.rb +++ b/spec/lib/hcard_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' require File.dirname(__FILE__) + '/../../lib/hcard' describe HCard do diff --git a/spec/lib/message_handler_spec.rb b/spec/lib/message_handler_spec.rb index e6cd668e27675021d95231293a35c091165b5d56..adb375c1793d403f191b3dc7bcf108238cacbb0c 100644 --- a/spec/lib/message_handler_spec.rb +++ b/spec/lib/message_handler_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe MessageHandler do before do @@ -41,7 +39,6 @@ describe MessageHandler do } end - it 'should only retry a bad request three times ' do request = FakeHttpRequest.new(:failure) request.should_receive(:get).exactly(MessageHandler::NUM_TRIES).times.and_return(request) @@ -61,7 +58,6 @@ describe MessageHandler do describe 'POST messages' do - it 'should be able to add a post message to the queue' do EventMachine.run { @handler.size.should ==0 diff --git a/spec/lib/salmon_salmon_spec.rb b/spec/lib/salmon_salmon_spec.rb index a14ef8f77d68c0fb953dc230417a5ea520e83160..6d467d4eac26338b96b2e16cea15baed58d5ba5e 100644 --- a/spec/lib/salmon_salmon_spec.rb +++ b/spec/lib/salmon_salmon_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Salmon do before do @@ -23,7 +21,6 @@ describe Salmon do @sent_salmon.magic_sig.sig.should == @parsed_salmon.magic_sig.sig @sent_salmon.magic_sig.signable_string.should == @parsed_salmon.magic_sig.signable_string - @parsed_salmon.verified_for_key?(OpenSSL::PKey::RSA.new(@user.exported_key)).should be true @sent_salmon.verified_for_key?(OpenSSL::PKey::RSA.new(@user.exported_key)).should be true end diff --git a/spec/lib/web_hooks_spec.rb b/spec/lib/web_hooks_spec.rb index d3486f1b5055e19280fc17f059b4fa579a7e2774..e316817d402c999d9410019982d61fb8d08d2546 100644 --- a/spec/lib/web_hooks_spec.rb +++ b/spec/lib/web_hooks_spec.rb @@ -2,32 +2,25 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. +require 'spec_helper' + +describe Diaspora::Webhooks do + before do + @user = Factory.create(:user) + @aspect = @user.aspect(:name => "losers") + @user2 = Factory.create(:user) + @aspect2 = @user2.aspect(:name => "losers") + friend_users(@user, @aspect, @user2, @aspect2) + end - -require File.dirname(__FILE__) + '/../spec_helper' - -include Diaspora - -describe Diaspora do - - describe Webhooks do + describe "body" do before do - @user = Factory.create(:user) - @aspect = @user.aspect(:name => "losers") - @user2 = Factory.create(:user) - @aspect2 = @user2.aspect(:name => "losers") - friend_users(@user, @aspect, @user2, @aspect2) + @post = Factory.build(:status_message, :person => @user.person) end - describe "body" do - before do - @post = Factory.build(:status_message, :person => @user.person) - end - - it "should add the following methods to Post on inclusion" do - @post.respond_to?(:to_diaspora_xml).should be true - end - + it "should add the following methods to Post on inclusion" do + @post.respond_to?(:to_diaspora_xml).should be true end + end end diff --git a/spec/lib/websocket_spec.rb b/spec/lib/websocket_spec.rb index edac7051ad4998e0ec13cbe759ca602972372a68..0b76e0f5244e8f52756589822b24ee09a8fc7044 100644 --- a/spec/lib/websocket_spec.rb +++ b/spec/lib/websocket_spec.rb @@ -2,7 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Diaspora::WebSocket do before do diff --git a/spec/misc_spec.rb b/spec/misc_spec.rb index d033002119009cc604c3f8e6fa5d3bbf1565a949..65cb9da60cdc7f0660eb9b044de2172665bc32a6 100644 --- a/spec/misc_spec.rb +++ b/spec/misc_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/spec_helper' +require 'spec_helper' describe 'making sure the spec runner works' do diff --git a/spec/models/aspect_spec.rb b/spec/models/aspect_spec.rb index ea5afc7cf399165b5ab2ff32d67c91bc7cffba6a..23453eee915af22669da41338a4165947eef705d 100644 --- a/spec/models/aspect_spec.rb +++ b/spec/models/aspect_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Aspect do before do diff --git a/spec/models/comments_spec.rb b/spec/models/comments_spec.rb index 1c20354cf51a52a71282cc2ec6d6fa3bf00e2c57..732c4349b25e1754d7558582d72cdb33070c76c9 100644 --- a/spec/models/comments_spec.rb +++ b/spec/models/comments_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Comment do describe "user" do diff --git a/spec/models/person_spec.rb b/spec/models/person_spec.rb index 721310409c5400070181718d338ca4bcb590ebab..c11d03455302943865d5e5d2c5a183acd4bf8661 100644 --- a/spec/models/person_spec.rb +++ b/spec/models/person_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Person do before do @@ -21,7 +19,7 @@ describe Person do @user.person.diaspora_handle.should == @user.username + "@example.org" end end - + context 'remote people' do it 'stores the diaspora_handle in the database' do @person.diaspora_handle.include?(APP_CONFIG[:terse_pod_url]).should be false diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index 3e0b6852030435104ea8125ff5d48a7e1c92d616..f3f77f3db26f249006a8a50760fee43a678594c5 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Photo do before do @@ -16,7 +14,6 @@ describe Photo do @fixture_name = File.dirname(__FILE__) + '/../fixtures/button.png' @fail_fixture_name = File.dirname(__FILE__) + '/../fixtures/msg.xml' - @photo = Photo.new(:person => @user.person, :album => @album) end diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb index dc9d4a9b8bb1a99d5c20547092b99277a7a26227..b0ed59b7d59b066e2c9809b00440c70ca4a3678f 100644 --- a/spec/models/post_spec.rb +++ b/spec/models/post_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Post do before do diff --git a/spec/models/profile_spec.rb b/spec/models/profile_spec.rb index b5bd8f9a5ff2a44fa5a800c1e855eb4fa81b6ef2..2e38c20ae3afec3d561374b78445611263fcf173 100644 --- a/spec/models/profile_spec.rb +++ b/spec/models/profile_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Profile do before do @@ -29,4 +27,3 @@ describe Profile do end end - diff --git a/spec/models/request_spec.rb b/spec/models/request_spec.rb index 5899cb7fb03d140e49d3b3ad13c369253e686650..4e1380df1ba61076a72b1629f8b88a4311ea1ba2 100644 --- a/spec/models/request_spec.rb +++ b/spec/models/request_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Request do before do diff --git a/spec/models/retraction_spec.rb b/spec/models/retraction_spec.rb index 9aa2b8a769cff0454a6f091530053fb9338c9ab1..7778552340a923e9db42b4625ee2cfc2758ca393 100644 --- a/spec/models/retraction_spec.rb +++ b/spec/models/retraction_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Retraction do before do diff --git a/spec/models/status_message_spec.rb b/spec/models/status_message_spec.rb index 005038bf1d965aa06630d2a5e3acad5e5eb90b27..d7dbf19e45af5054b8e0d733b48e4e7e6cd70f29 100644 --- a/spec/models/status_message_spec.rb +++ b/spec/models/status_message_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe StatusMessage do before do @@ -37,6 +35,5 @@ describe StatusMessage do end end - end diff --git a/spec/models/user/posting_spec.rb b/spec/models/user/posting_spec.rb index d307e7a43686af2d1c26315a69522a5e5fab3a5b..2f86ac5491d929f3dc805b1de394d96569552b45 100644 --- a/spec/models/user/posting_spec.rb +++ b/spec/models/user/posting_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../../spec_helper' +require 'spec_helper' describe User do diff --git a/spec/models/user/receive_spec.rb b/spec/models/user/receive_spec.rb index 37648a98cd0a0f393894f76f0e6eb26f71dea815..5bdddce67a5fc8ef440be1adf73ac0e3124169a2 100644 --- a/spec/models/user/receive_spec.rb +++ b/spec/models/user/receive_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../../spec_helper' +require 'spec_helper' describe User do diff --git a/spec/models/user/user_friending_spec.rb b/spec/models/user/user_friending_spec.rb index 67ed9f7991272707df656e4d2741ab4636233e4d..4ea51ad19e72184ac05aafa4d2f0ee177113a35c 100644 --- a/spec/models/user/user_friending_spec.rb +++ b/spec/models/user/user_friending_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../../spec_helper' +require 'spec_helper' describe User do before do @@ -24,7 +22,6 @@ describe User do aspect.requests.size.should == 1 end - it "should be able to accept a pending friend request" do friend = Factory.create(:person) r = Request.instantiate(:to => @user.receive_url, :from => friend) @@ -53,12 +50,9 @@ describe User do @user.friends << friend @user.save - proc {@user.send_friend_request_to( friend, @aspect)}.should raise_error end - - describe 'multiple users accepting/rejecting the same person' do before do @person_one = Factory.create :person @@ -144,7 +138,6 @@ describe User do Person.all.count.should be 3 end - end describe 'a user accepting rejecting multiple people' do @@ -231,6 +224,5 @@ describe User do end end - end end diff --git a/spec/models/user/visible_posts_spec.rb b/spec/models/user/visible_posts_spec.rb index bcab473bcce0060021fdbcc6f1bb541856dc712e..8d20bcb96cf9b4585ad6f7580563b6a28d2a3f48 100644 --- a/spec/models/user/visible_posts_spec.rb +++ b/spec/models/user/visible_posts_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../../spec_helper' +require 'spec_helper' describe User do let(:user) { Factory(:user) } @@ -55,7 +53,6 @@ describe User do context 'albums' do - before do @album = user.post :album, :name => "Georges", :to => aspect.id aspect.reload diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 1608bbe581778b19cbcce74010ed23a1b07dac68..ad7070eaaf76fd30925e39d3ec2ce3c1953c8279 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -2,9 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe User do let(:user) { Factory(:user) } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ef5db93c24a79c37f93fb36d6ce10ed9287aaedc..fad7dfc5abda983052365f16dd11f68f25e73d01 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - # This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. @@ -16,8 +14,6 @@ require 'webmock/rspec' include Devise::TestHelpers include WebMock - - # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} diff --git a/spec/user_encryption_spec.rb b/spec/user_encryption_spec.rb index 33b86d52caae154b70eed8bac10a6167f100d95b..b74006e3d1373b6066019aa8f037dceabd83baf8 100644 --- a/spec/user_encryption_spec.rb +++ b/spec/user_encryption_spec.rb @@ -2,11 +2,7 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - -require File.dirname(__FILE__) + '/spec_helper' -include ApplicationHelper -include Diaspora::Parser +require 'spec_helper' describe 'user encryption' do before do diff --git a/test/performance/browsing_test.rb b/test/performance/browsing_test.rb index 74e8c942139d8d6fc8b7b32e8cc357ca89152df7..9cc248c9fbbf7f85940c6b9dc40997faf19a7b4f 100644 --- a/test/performance/browsing_test.rb +++ b/test/performance/browsing_test.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - require 'test_helper' require 'rails/performance_test_help' diff --git a/test/selenium/login_test.rb b/test/selenium/login_test.rb index 321d46e1deaa34eb05b98dec40f741bcfd156c1d..b60d2db8c0e2836003b46205172647c06f439f47 100644 --- a/test/selenium/login_test.rb +++ b/test/selenium/login_test.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - class SampleWebratTest < ActionController::IntegrationTest def test_widget diff --git a/test/selenium/selenium_suite.rb b/test/selenium/selenium_suite.rb index d5362b1d7e3db7e8fc43e7b59c3708f8f8343d5f..7f4df5e4c3aba9197ea5de51fdd671ecb56f8572 100644 --- a/test/selenium/selenium_suite.rb +++ b/test/selenium/selenium_suite.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper')) require 'test/unit/ui/console/testrunner' require 'webrat' diff --git a/test/test_helper.rb b/test/test_helper.rb index d9742c1164f03aeae00cdfb42dbcc42d0119985f..e46a0a70cbfdbfd50e605ead9ecf6d6e729a99d8 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,8 +2,6 @@ # licensed under the Affero General Public License version 3. See # the COPYRIGHT file. - - ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'