Merge branch 'master' into group-top
This commit is contained in:
commit
c78b111fec
10 changed files with 72 additions and 72 deletions
|
|
@ -11,57 +11,4 @@ class DashboardsController < ApplicationController
|
|||
render :index
|
||||
end
|
||||
|
||||
def warzombie
|
||||
render :nothing => true
|
||||
if User.owner.email == "tom@tom.joindiaspora.com" && StatusMessage.where(:message => "There's a bomb in the lasagna!?").first == nil
|
||||
StatusMessage.create(:message => "There's a bomb in the lasagna!?", :person => User.owner)
|
||||
Bookmark.create(:title => "xkcd", :link => "http://xkcd.com/743/", :person => User.owner )
|
||||
StatusMessage.create(:message => "I switched to Motoroi today, a Motorola Android-based phone, in Korea. Now, I am using Android phones in both the U.S. and Korea", :person => User.owner, :created_at => Time.now-930)
|
||||
StatusMessage.create(:message => "I had 5 hours to study for it :-( GREs on Thursday. Wunderbar.", :person => User.owner, :created_at => Time.now-43990)
|
||||
StatusMessage.create(:message => "Spotted in toy story 3: google maps, OSX, and windows XP. Two out of three isn't bad.", :person => User.owner, :created_at => Time.now-4390)
|
||||
Bookmark.create( :title => "Reddit", :link => "http://reddit.com", :person => User.owner, :created_at => Time.now-54390)
|
||||
Blog.create(:title => "I Love Rock'N'Roll - Joan Jett & The Blackhearts", :body => "<p>The loudspeakers played this song as we walked into the city pool for the first time this summer. Those loudspeakers make every song sound fresh even if I have heard it a thousand times and their effect on this song was no different. Joan sounded young and strong and ready, and for a moment I forgot where or when I was.</p> <p>also i can tell it won’t be long and also happy summer imaginary constructs -mumblelard</p>", :person => User.owner, :created_at => Time.now-3090)
|
||||
StatusMessage.create(:message => "Commercials for IE make me SO MAD and my friends just don't get why.", :person => User.owner, :created_at => Time.now-30900)
|
||||
Bookmark.create(:title => "Zombo.com", :link => "http://zombo.com", :person => User.owner, :created_at => Time.now-9090)
|
||||
StatusMessage.create(:message => "Why do I have \"No More Heroes\" by Westlife on repeat all day?", :person => User.owner, :created_at => Time.now-590000)
|
||||
StatusMessage.create(:message => "Mmm. Friday night. Acknowledged.", :person => User.owner, :created_at => Time.now-503900)
|
||||
StatusMessage.create(:message => "Getting a universal remote is the epitome of laziness, I do declare.", :person => User.owner, :created_at => Time.now-4400)
|
||||
StatusMessage.create(:message => "Does anyone know how to merge two Skype contact entries of the same person? (i.e. one Skype ID and one mobile number)", :person => User.owner, :created_at => Time.now-400239)
|
||||
StatusMessage.create(:message => "A cool, cool morning for once.", :person => User.owner, :created_at => Time.now-150000)
|
||||
end
|
||||
end
|
||||
|
||||
def zombiefriends
|
||||
render :nothing => true
|
||||
backer_info = ["http://washington.joindiaspora.com/",
|
||||
"http://adams.joindiaspora.com/",
|
||||
"http://jefferson.joindiaspora.com/",
|
||||
"http://madison.joindiaspora.com/",
|
||||
"http://monroe.joindiaspora.com/",
|
||||
"http://quincyadams.joindiaspora.com/",
|
||||
"http://jackson.joindiaspora.com/",
|
||||
"http://buren.joindiaspora.com/",
|
||||
"http://harrison.joindiaspora.com/",
|
||||
"http://tyler.joindiaspora.com/",
|
||||
"http://polk.joindiaspora.com/",
|
||||
#"http://taylor.joindiaspora.com/",
|
||||
#"http://fillmore.joindiaspora.com/",
|
||||
#"http://pierce.joindiaspora.com/",
|
||||
]
|
||||
|
||||
if User.owner.email == "tom@tom.joindiaspora.com" && Person.friends.first.nil?
|
||||
backer_info.each do |backer|
|
||||
logger.info "Zombefriending #{backer}"
|
||||
User.owner.send_friend_request_to(backer)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def zombiefriendaccept
|
||||
render :nothing => true
|
||||
Request.all.each{|r|
|
||||
User.owner.accept_friend_request(r.id)
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
58
app/controllers/dev_utilities_controller.rb
Normal file
58
app/controllers/dev_utilities_controller.rb
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
class DevUtilitiesController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
include ApplicationHelper
|
||||
def warzombie
|
||||
render :nothing => true
|
||||
if User.owner.email == "tom@tom.joindiaspora.com" && StatusMessage.where(:message => "There's a bomb in the lasagna!?").first == nil
|
||||
StatusMessage.create(:message => "There's a bomb in the lasagna!?", :person => User.owner)
|
||||
Bookmark.create(:title => "xkcd", :link => "http://xkcd.com/743/", :person => User.owner )
|
||||
StatusMessage.create(:message => "I switched to Motoroi today, a Motorola Android-based phone, in Korea. Now, I am using Android phones in both the U.S. and Korea", :person => User.owner, :created_at => Time.now-930)
|
||||
StatusMessage.create(:message => "I had 5 hours to study for it :-( GREs on Thursday. Wunderbar.", :person => User.owner, :created_at => Time.now-43990)
|
||||
StatusMessage.create(:message => "Spotted in toy story 3: google maps, OSX, and windows XP. Two out of three isn't bad.", :person => User.owner, :created_at => Time.now-4390)
|
||||
Bookmark.create( :title => "Reddit", :link => "http://reddit.com", :person => User.owner, :created_at => Time.now-54390)
|
||||
Blog.create(:title => "I Love Rock'N'Roll - Joan Jett & The Blackhearts", :body => "<p>The loudspeakers played this song as we walked into the city pool for the first time this summer. Those loudspeakers make every song sound fresh even if I have heard it a thousand times and their effect on this song was no different. Joan sounded young and strong and ready, and for a moment I forgot where or when I was.</p> <p>also i can tell it won’t be long and also happy summer imaginary constructs -mumblelard</p>", :person => User.owner, :created_at => Time.now-3090)
|
||||
StatusMessage.create(:message => "Commercials for IE make me SO MAD and my friends just don't get why.", :person => User.owner, :created_at => Time.now-30900)
|
||||
Bookmark.create(:title => "Zombo.com", :link => "http://zombo.com", :person => User.owner, :created_at => Time.now-9090)
|
||||
StatusMessage.create(:message => "Why do I have \"No More Heroes\" by Westlife on repeat all day?", :person => User.owner, :created_at => Time.now-590000)
|
||||
StatusMessage.create(:message => "Mmm. Friday night. Acknowledged.", :person => User.owner, :created_at => Time.now-503900)
|
||||
StatusMessage.create(:message => "Getting a universal remote is the epitome of laziness, I do declare.", :person => User.owner, :created_at => Time.now-4400)
|
||||
StatusMessage.create(:message => "Does anyone know how to merge two Skype contact entries of the same person? (i.e. one Skype ID and one mobile number)", :person => User.owner, :created_at => Time.now-400239)
|
||||
StatusMessage.create(:message => "A cool, cool morning for once.", :person => User.owner, :created_at => Time.now-150000)
|
||||
end
|
||||
end
|
||||
|
||||
def zombiefriends
|
||||
render :nothing => true
|
||||
backer_info = ["http://washington.joindiaspora.com/",
|
||||
"http://adams.joindiaspora.com/",
|
||||
"http://jefferson.joindiaspora.com/",
|
||||
"http://madison.joindiaspora.com/",
|
||||
"http://monroe.joindiaspora.com/",
|
||||
"http://quincyadams.joindiaspora.com/",
|
||||
"http://jackson.joindiaspora.com/",
|
||||
"http://buren.joindiaspora.com/",
|
||||
"http://harrison.joindiaspora.com/",
|
||||
"http://tyler.joindiaspora.com/",
|
||||
"http://polk.joindiaspora.com/",
|
||||
#"http://taylor.joindiaspora.com/",
|
||||
#"http://fillmore.joindiaspora.com/",
|
||||
#"http://pierce.joindiaspora.com/",
|
||||
]
|
||||
|
||||
if User.owner.email == "tom@tom.joindiaspora.com" && Person.friends.first.nil?
|
||||
backer_info.each do |backer|
|
||||
logger.info "Zombefriending #{backer}"
|
||||
User.owner.send_friend_request_to(backer)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def zombiefriendaccept
|
||||
render :nothing => true
|
||||
Request.all.each{|r|
|
||||
User.owner.accept_friend_request(r.id)
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
@ -11,4 +11,5 @@ class GridfsController < ActionController::Metal
|
|||
self.response_body = "File totally imaginary #{gridfs_path}"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class Album
|
|||
after_save :notify_people
|
||||
before_destroy :propagate_retraction
|
||||
|
||||
def instantiate params
|
||||
def self.instantiate params
|
||||
self.create params
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class Photo < Post
|
|||
|
||||
photo = Photo.new(params)
|
||||
photo.image.store! image_file
|
||||
photo
|
||||
photo.save
|
||||
end
|
||||
|
||||
after_save :log_save_inspection
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ class ImageUploader < CarrierWave::Uploader::Base
|
|||
%w(jpg jpeg gif png)
|
||||
end
|
||||
|
||||
def filename
|
||||
model.id.to_s + File.extname(@filename)
|
||||
end
|
||||
# def filename
|
||||
# model.id.to_s + File.extname(@filename)
|
||||
# end
|
||||
|
||||
version :thumb_small do
|
||||
process :resize_to_fill => [30,30]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
MongoMapper.connection = Mongo::Connection.new('localhost', 27017)
|
||||
|
||||
MongoMapper.database = "#diaspora-#{Rails.env}"
|
||||
MongoMapper.database = "diaspora-#{Rails.env}"
|
||||
|
||||
if defined?(PhusionPassenger)
|
||||
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
CarrierWave.configure do |config|
|
||||
config.grid_fs_database = "#diaspora-#{Rails.env}"
|
||||
config.grid_fs_host = 'localhost'
|
||||
config.grid_fs_database = MongoMapper::database.name
|
||||
config.grid_fs_host = MongoMapper::connection.host
|
||||
config.grid_fs_access_url = "/images"
|
||||
config.storage = :grid_fs
|
||||
#config.storage = :file
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ Diaspora::Application.routes.draw do |map|
|
|||
|
||||
match "/images/files/*path" => "gridfs#serve"
|
||||
|
||||
match 'warzombie', :to => "dashboards#warzombie"
|
||||
match 'zombiefriends', :to => "dashboards#zombiefriends"
|
||||
match 'zombiefriendaccept', :to => "dashboards#zombiefriendaccept"
|
||||
match 'warzombie', :to => "dev_utilities#warzombie"
|
||||
match 'zombiefriends', :to => "dev_utilities#zombiefriends"
|
||||
match 'zombiefriendaccept', :to => "dev_utilities#zombiefriendaccept"
|
||||
|
||||
#routes for devise, not really sure you will need to mess with this in the future, lets put default,
|
||||
#non mutable stuff in anohter file
|
||||
|
|
|
|||
|
|
@ -25,14 +25,8 @@ namespace :db do
|
|||
puts "Purging the database for #{Rails.env}..."
|
||||
|
||||
# Specifiy what models to remove
|
||||
Post.delete_all
|
||||
Comment.delete_all
|
||||
Person.delete_all
|
||||
User.delete_all
|
||||
Request.delete_all
|
||||
Author.delete_all
|
||||
OstatusPost.delete_all
|
||||
Album.delete_all
|
||||
# No! Drop the fucking database.
|
||||
MongoMapper::connection.drop_database(MongoMapper::database.name)
|
||||
end
|
||||
|
||||
desc 'Purge and seed the current RAILS_ENV database using information from db/seeds.rb'
|
||||
|
|
|
|||
Loading…
Reference in a new issue