Merge branch 'upgrade_rails'
This commit is contained in:
commit
ae29e2478a
12 changed files with 85 additions and 77 deletions
5
Gemfile
5
Gemfile
|
|
@ -3,7 +3,7 @@ source 'http://rubygems.org'
|
|||
gem 'mysql2', '0.2.6'
|
||||
#gem 'pg'
|
||||
#gem 'sqlite3'
|
||||
gem 'rails', '3.0.3'
|
||||
gem 'rails', '3.0.9'
|
||||
gem 'foreigner', '0.9.1'
|
||||
gem 'activerecord-import'
|
||||
|
||||
|
|
@ -32,7 +32,8 @@ gem 'faraday'
|
|||
gem 'faraday-stack'
|
||||
|
||||
#Views
|
||||
gem 'haml', '3.0.25'
|
||||
gem 'haml', '3.1.2'
|
||||
gem 'sass', '3.1.4'
|
||||
gem 'will_paginate', '3.0.pre2'
|
||||
|
||||
#Localization
|
||||
|
|
|
|||
106
Gemfile.lock
106
Gemfile.lock
|
|
@ -31,7 +31,7 @@ GIT
|
|||
|
||||
GIT
|
||||
remote: git://github.com/diaspora/diaspora-client.git
|
||||
revision: 7924e3cc576e54b5ade4014caea8b79e9f1d6343
|
||||
revision: 1421deef3df1f7fd9e04d13cc4c86e0d08747f1a
|
||||
specs:
|
||||
diaspora-client (0.0.0)
|
||||
activerecord
|
||||
|
|
@ -72,34 +72,34 @@ GEM
|
|||
Platform (0.4.0)
|
||||
SystemTimer (1.2.1)
|
||||
abstract (1.0.0)
|
||||
actionmailer (3.0.3)
|
||||
actionpack (= 3.0.3)
|
||||
mail (~> 2.2.9)
|
||||
actionpack (3.0.3)
|
||||
activemodel (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
actionmailer (3.0.9)
|
||||
actionpack (= 3.0.9)
|
||||
mail (~> 2.2.19)
|
||||
actionpack (3.0.9)
|
||||
activemodel (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
builder (~> 2.1.2)
|
||||
erubis (~> 2.6.6)
|
||||
i18n (~> 0.4)
|
||||
i18n (~> 0.5.0)
|
||||
rack (~> 1.2.1)
|
||||
rack-mount (~> 0.6.13)
|
||||
rack-test (~> 0.5.6)
|
||||
rack-mount (~> 0.6.14)
|
||||
rack-test (~> 0.5.7)
|
||||
tzinfo (~> 0.3.23)
|
||||
activemodel (3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
activemodel (3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
builder (~> 2.1.2)
|
||||
i18n (~> 0.4)
|
||||
activerecord (3.0.3)
|
||||
activemodel (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
arel (~> 2.0.2)
|
||||
i18n (~> 0.5.0)
|
||||
activerecord (3.0.9)
|
||||
activemodel (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
arel (~> 2.0.10)
|
||||
tzinfo (~> 0.3.23)
|
||||
activerecord-import (0.2.7)
|
||||
activerecord (~> 3.0.0)
|
||||
activeresource (3.0.3)
|
||||
activemodel (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
activesupport (3.0.3)
|
||||
activeresource (3.0.9)
|
||||
activemodel (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
activesupport (3.0.9)
|
||||
addressable (2.2.4)
|
||||
archive-tar-minitar (0.5.2)
|
||||
arel (2.0.10)
|
||||
|
|
@ -148,19 +148,19 @@ GEM
|
|||
closure-compiler (1.1.1)
|
||||
cloudfiles (1.4.10)
|
||||
mime-types (>= 1.16)
|
||||
columnize (0.3.2)
|
||||
configuration (1.2.0)
|
||||
columnize (0.3.4)
|
||||
configuration (1.3.1)
|
||||
crack (0.1.8)
|
||||
cucumber (0.10.3)
|
||||
cucumber (1.0.1)
|
||||
builder (>= 2.1.2)
|
||||
diff-lcs (>= 1.1.2)
|
||||
gherkin (>= 2.3.8)
|
||||
gherkin (~> 2.4.5)
|
||||
json (>= 1.4.6)
|
||||
term-ansicolor (>= 1.0.5)
|
||||
cucumber-rails (0.3.2)
|
||||
cucumber (>= 0.8.0)
|
||||
culerity (0.2.15)
|
||||
daemons (1.1.3)
|
||||
daemons (1.1.4)
|
||||
database_cleaner (0.6.0)
|
||||
devise (1.3.4)
|
||||
bcrypt-ruby (~> 2.1.2)
|
||||
|
|
@ -183,9 +183,9 @@ GEM
|
|||
addressable (~> 2.2.4)
|
||||
multipart-post (~> 1.1.0)
|
||||
rack (< 2, >= 1.1.0)
|
||||
faraday-stack (0.1.2)
|
||||
faraday-stack (0.1.3)
|
||||
faraday (~> 0.6)
|
||||
faraday_middleware (0.6.3)
|
||||
faraday_middleware (0.6.5)
|
||||
faraday (~> 0.6.0)
|
||||
fastercsv (1.5.4)
|
||||
fastthread (1.0.7)
|
||||
|
|
@ -201,19 +201,19 @@ GEM
|
|||
nokogiri (~> 1.4.3.1)
|
||||
ruby-hmac
|
||||
foreigner (0.9.1)
|
||||
formatador (0.1.4)
|
||||
formatador (0.1.5)
|
||||
fuubar (0.0.5)
|
||||
rspec (~> 2.0)
|
||||
rspec-instafail (~> 0.1.4)
|
||||
ruby-progressbar (~> 0.0.10)
|
||||
gem_plugin (0.2.3)
|
||||
gherkin (2.3.10)
|
||||
gherkin (2.4.5)
|
||||
json (>= 1.4.6)
|
||||
haml (3.0.25)
|
||||
haml (3.1.2)
|
||||
hashie (1.0.0)
|
||||
highline (1.6.2)
|
||||
http_connection (1.4.1)
|
||||
i18n (0.6.0)
|
||||
i18n (0.5.0)
|
||||
i18n-inflector (2.6.1)
|
||||
i18n (>= 0.4.1)
|
||||
i18n-inflector-rails (1.0.4)
|
||||
|
|
@ -267,7 +267,7 @@ GEM
|
|||
net-ssh (2.0.24)
|
||||
net-ssh-gateway (1.1.0)
|
||||
net-ssh (>= 1.99.1)
|
||||
newrelic_rpm (3.0.1)
|
||||
newrelic_rpm (3.1.0)
|
||||
nokogiri (1.4.3.1)
|
||||
oa-basic (0.2.6)
|
||||
oa-core (= 0.2.6)
|
||||
|
|
@ -295,7 +295,7 @@ GEM
|
|||
oa-core (= 0.2.6)
|
||||
rack-openid (~> 1.3.1)
|
||||
ruby-openid-apps-discovery (~> 1.2.0)
|
||||
oauth (0.4.4)
|
||||
oauth (0.4.5)
|
||||
oauth2 (0.4.1)
|
||||
faraday (~> 0.6.1)
|
||||
multi_json (>= 0.0.5)
|
||||
|
|
@ -316,7 +316,7 @@ GEM
|
|||
oa-more (= 0.2.6)
|
||||
oa-oauth (= 0.2.6)
|
||||
oa-openid (= 0.2.6)
|
||||
open4 (1.0.1)
|
||||
open4 (1.1.0)
|
||||
orm_adapter (0.0.5)
|
||||
polyglot (0.3.1)
|
||||
pyu-ruby-sasl (0.0.3.3)
|
||||
|
|
@ -328,26 +328,28 @@ GEM
|
|||
ruby-openid (>= 2.1.8)
|
||||
rack-test (0.5.7)
|
||||
rack (>= 1.0)
|
||||
rails (3.0.3)
|
||||
actionmailer (= 3.0.3)
|
||||
actionpack (= 3.0.3)
|
||||
activerecord (= 3.0.3)
|
||||
activeresource (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
rails (3.0.9)
|
||||
actionmailer (= 3.0.9)
|
||||
actionpack (= 3.0.9)
|
||||
activerecord (= 3.0.9)
|
||||
activeresource (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.0.3)
|
||||
railties (= 3.0.9)
|
||||
rails-i18n (0.1.0)
|
||||
activesupport (~> 3)
|
||||
railties (3.0.3)
|
||||
actionpack (= 3.0.3)
|
||||
activesupport (= 3.0.3)
|
||||
railties (3.0.9)
|
||||
actionpack (= 3.0.9)
|
||||
activesupport (= 3.0.9)
|
||||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (~> 0.14.4)
|
||||
rake (0.9.2)
|
||||
rash (0.3.0)
|
||||
hashie (~> 1.0.0)
|
||||
rcov (0.9.9)
|
||||
redis (2.2.0)
|
||||
rdoc (3.8)
|
||||
redis (2.2.1)
|
||||
redis-namespace (0.8.0)
|
||||
redis (< 3.0.0)
|
||||
resque (1.10.0)
|
||||
|
|
@ -367,7 +369,7 @@ GEM
|
|||
rspec-core (2.6.0)
|
||||
rspec-expectations (2.6.0)
|
||||
diff-lcs (~> 1.1.2)
|
||||
rspec-instafail (0.1.7)
|
||||
rspec-instafail (0.1.8)
|
||||
rspec-mocks (2.6.0)
|
||||
rspec-rails (2.6.1)
|
||||
actionpack (~> 3.0)
|
||||
|
|
@ -396,6 +398,7 @@ GEM
|
|||
archive-tar-minitar (>= 0.5.2)
|
||||
rubyntlm (0.1.1)
|
||||
rubyzip (0.9.4)
|
||||
sass (3.1.4)
|
||||
selenium-webdriver (0.2.2)
|
||||
childprocess (>= 0.1.9)
|
||||
ffi (>= 1.0.7)
|
||||
|
|
@ -439,8 +442,8 @@ GEM
|
|||
addressable (>= 2.2.2)
|
||||
crack (>= 0.1.7)
|
||||
will_paginate (3.0.pre2)
|
||||
xml-simple (1.0.16)
|
||||
yard (0.7.1)
|
||||
xml-simple (1.1.0)
|
||||
yard (0.7.2)
|
||||
yui-compressor (0.9.6)
|
||||
POpen4 (>= 0.1.4)
|
||||
|
||||
|
|
@ -475,7 +478,7 @@ DEPENDENCIES
|
|||
fog (= 0.3.25)
|
||||
foreigner (= 0.9.1)
|
||||
fuubar
|
||||
haml (= 3.0.25)
|
||||
haml (= 3.1.2)
|
||||
http_accept_language!
|
||||
i18n-inflector-rails (~> 1.0)
|
||||
jammit (= 0.5.4)
|
||||
|
|
@ -492,7 +495,7 @@ DEPENDENCIES
|
|||
oauth2-provider (= 0.0.16)
|
||||
ohai (= 0.5.8)
|
||||
omniauth (= 0.2.6)
|
||||
rails (= 3.0.3)
|
||||
rails (= 3.0.9)
|
||||
rails-i18n
|
||||
rcov
|
||||
resque (= 1.10.0)
|
||||
|
|
@ -505,6 +508,7 @@ DEPENDENCIES
|
|||
rspec-rails (>= 2.0.0)
|
||||
ruby-debug
|
||||
ruby-debug19
|
||||
sass (= 3.1.4)
|
||||
selenium-webdriver (= 0.2.2)
|
||||
settingslogic (= 2.0.6)
|
||||
sod!
|
||||
|
|
|
|||
|
|
@ -20,6 +20,6 @@ module CommentsHelper
|
|||
def new_comment_form(post_id, current_user)
|
||||
@form ||= controller.render_to_string(
|
||||
:partial => 'comments/new_comment', :locals => {:post_id => GSUB_THIS, :current_user => current_user})
|
||||
@form.gsub(GSUB_THIS, post_id.to_s)
|
||||
@form.gsub(GSUB_THIS, post_id.to_s).html_safe
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
module MarkdownifyHelper
|
||||
def markdownify(message, options={})
|
||||
message = h(message).html_safe
|
||||
message = h(message).to_str
|
||||
|
||||
options[:newlines] = true if !options.has_key?(:newlines)
|
||||
options[:specialchars] = true if !options.has_key?(:specialchars)
|
||||
|
|
@ -17,7 +17,7 @@ module MarkdownifyHelper
|
|||
message = process_specialchars(message) if options[:specialchars]
|
||||
message = process_newlines(message) if options[:newlines]
|
||||
|
||||
message
|
||||
message.html_safe
|
||||
end
|
||||
|
||||
def process_newlines(message)
|
||||
|
|
@ -132,4 +132,4 @@ module MarkdownifyHelper
|
|||
end
|
||||
message
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
# Copyright (c) 2010, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
#
|
||||
class OpenSSL::PKey::RSA
|
||||
def to_yaml
|
||||
self.to_s
|
||||
end
|
||||
end
|
||||
|
||||
class Invitation < ActiveRecord::Base
|
||||
|
||||
|
|
@ -26,7 +32,6 @@ class Invitation < ActiveRecord::Base
|
|||
raise "You already invited this person"
|
||||
end
|
||||
end
|
||||
|
||||
opts[:existing_user] = existing_user
|
||||
create_invitee(opts)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class StatusMessage < Post
|
|||
|
||||
def format_mentions(text, opts = {})
|
||||
regex = /@\{([^;]+); ([^\}]+)\}/
|
||||
form_message = text.gsub(regex) do |matched_string|
|
||||
form_message = text.to_str.gsub(regex) do |matched_string|
|
||||
people = self.mentioned_people
|
||||
person = people.detect{ |p|
|
||||
p.diaspora_handle == $~[2] unless p.nil?
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ class User < ActiveRecord::Base
|
|||
|
||||
def self.generate_key
|
||||
key_size = (Rails.env == 'test' ? 512 : 4096)
|
||||
OpenSSL::PKey::RSA::generate key_size
|
||||
OpenSSL::PKey::RSA::generate(key_size)
|
||||
end
|
||||
|
||||
def encryption_key
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@
|
|||
|
||||
#new_status_message_pane
|
||||
.span-15.last
|
||||
#facebox_header
|
||||
%h4
|
||||
=t('bookmarklet.post_something')
|
||||
|
||||
%h4
|
||||
=t('bookmarklet.post_something')
|
||||
= render :partial => 'shared/publisher', :locals => { :aspect => :profile, :aspects_with_person => @aspects, :aspect_ids => @aspect_ids}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,13 +14,3 @@ AVAILABLE_LANGUAGE_CODES.each do |c|
|
|||
I18n.fallbacks[c.to_sym] = [c.to_sym, DEFAULT_LANGUAGE.to_sym, :en]
|
||||
end
|
||||
end
|
||||
|
||||
# Workaround for https://rails.lighthouseapp.com/projects/8994/tickets/5329-using-i18nwith_locale-in-actionmailer-raises-systemstackerror
|
||||
module AbstractController
|
||||
class I18nProxy
|
||||
def initialize(i18n_config, lookup_context)
|
||||
@i18n_config, @lookup_context = i18n_config, lookup_context
|
||||
@i18n_config = @i18n_config.i18n_config if @i18n_config.respond_to?(:i18n_config)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ module Diaspora
|
|||
return text if opts[:plain_text]
|
||||
text = ERB::Util.h(text) unless opts[:no_escape]
|
||||
regex = /(^|\s)#(#{VALID_TAG_BODY})/
|
||||
form_message = text.gsub(regex) do |matched_string|
|
||||
form_message = text.to_str.gsub(regex) do |matched_string|
|
||||
"#{$~[1]}<a href=\"/tags/#{$~[2]}\" class=\"tag\">##{$~[2]}</a>"
|
||||
end
|
||||
form_message.html_safe
|
||||
|
|
|
|||
|
|
@ -100,6 +100,16 @@ describe AdminsController do
|
|||
AppConfig[:admins] = [@user.username]
|
||||
end
|
||||
|
||||
it 'succeeds' do
|
||||
get :admin_inviter, :identifier => 'bob@moms.com'
|
||||
response.should be_redirect
|
||||
end
|
||||
|
||||
it 'does not die if you do it twice' do
|
||||
get :admin_inviter, :identifier => 'bob@moms.com'
|
||||
get :admin_inviter, :identifier => 'bob@moms.com'
|
||||
response.should be_redirect
|
||||
end
|
||||
it 'invites a new user' do
|
||||
Invitation.should_receive(:create_invitee).with(:service => 'email', :identifier => 'bob@moms.com')
|
||||
get :admin_inviter, :identifier => 'bob@moms.com'
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ describe PeopleController do
|
|||
:profile => Factory.build(:profile, :first_name => "Eugene",
|
||||
:last_name => "w"))
|
||||
get :index, :q => "Eug"
|
||||
assigns[:people].should =~ [@eugene, eugene2]
|
||||
assigns[:people].map{|x| x.id}.should =~ [@eugene.id, eugene2.id]
|
||||
end
|
||||
|
||||
it "excludes people that are not searchable" do
|
||||
|
|
@ -55,7 +55,7 @@ describe PeopleController do
|
|||
:profile => Factory.build(:profile, :first_name => "Eugene",
|
||||
:last_name => "w", :searchable => false))
|
||||
get :index, :q => "eugene@example.org"
|
||||
assigns[:people].should =~ [eugene2]
|
||||
assigns[:people][0].id.should == eugene2.id
|
||||
end
|
||||
|
||||
it "does not redirect to person page if there is exactly one match" do
|
||||
|
|
|
|||
Loading…
Reference in a new issue