Skip to content

Instantly share code, notes, and snippets.

diff --git a/Gemfile b/Gemfile
index 1f40a5e..5017eff 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,7 @@
source "https://rubygems.org"
+gem "ruby-prof"
+
gem "rails", "4.2.5"
diff --git a/db/schema.rb b/db/schema.rb
index 6a526fe..878e18e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,19 +11,22 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20151003142048) do
+ActiveRecord::Schema.define(version: 20151210213023) do
BEGIN { print"strict digraph G {\n";x = 0}
END { print "}" }
/SGN_DBG/ { if (x > 0) print ";"; x = 1; }
/^\[/ && !/SGN_DBG/ { if (x > 0) print ";"; x = 0; }
{
if (x > 0) {
if($0 ~ /SGN_DBG/)
print "\""$5 $9"\"";
else if ($0 ~ / from /) {
sub(/\"/, "")
ruby gistfile1.rb
-- create_table(:users, {:force=>true})
D, [2015-12-03T18:37:11.236466 #11431] DEBUG -- : (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar)
-> 0.0043s
-- create_table(:people, {:force=>true})
D, [2015-12-03T18:37:11.237299 #11431] DEBUG -- : (0.2ms) CREATE TABLE "people" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar)
-> 0.0008s
Run options: --seed 28553
# Running:
# Activate the gem you are reporting the issue against.
gem 'activerecord', '4.2.5'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
It's being called before this line: https://github.com/cmrd-senya/diaspora/commit/9e5cdb13266a001b701a410e946dbca2670731cc#diff-dc587c8c9dfabe96cfbdfd55bb8ac920R43
Here is how I dump:
logger.info("d: #{defined?(super)}")
logger.info("i: #{self.class.instance_methods.include?(__method__)}")
logger.info("i: #{self.class.superclass.instance_methods.include?(__method__)}")
logger.info("#{self} #{self.class} #{self.class.superclass} #{self.class.superclass.superclass}")
logger.info("anc: #{self.class.ancestors}")
logger.info("sup: #{method(:author_signature=).super_method}")
user@debian:~/diaspora$ bundle exec rspec spec/federation_callbacks_spec.rb
WARNING: Namespace test not found in /home/user/diaspora/config/diaspora.yml
=> Building fixtures
=> Built aspects.yml, contacts.yml, aspect_memberships.yml, people.yml, users.yml, and profiles.yml
Run options: exclude {:performance=>true}
Randomized with seed 4618
1) diaspora federation callbacks post_author_is_local? returns false for a post by a remote user
Failure/Error: expect(
[2015-11-14T01:50:29] DEBUG PID-1586 TID-15980900 XMLLogger: from_xml: <comment>
<guid>dc99c8106c860133a80f0800276d7a8d</guid>
<parent_guid>dc96f3f06c860133a80f0800276d7a8d</parent_guid>
<parent_author_signature/>
<author_signature>jIgNvcDmyoRazztDASjw2xKyYRs7lFGFOuhuHo2xjQCiKxskjIiFFNtbk585jsMxg2Nu+x+TBemoezsyuOFqZwjw/rc0lgCyLSpfe+2IRcPHfhHjTYpA3trSF15uDZPnkVNnqi5AcArznTHCpkCDDwfbn0rXcJjvVUx2h0Hnkuw=</author_signature>
<text>this is a very informative comment</text>
<diaspora_handle>bob4751c1a@localhost:9887</diaspora_handle>
</comment>
[2015-11-14T01:50:29] INFO PID-1586 TID-15980900 Postzord::Receiver::Private: user:381 starting private receive from person:dc9181a06c860133a80f0800276d7a8d
[2015-11-14T01:50:29] INFO PID-1586 TID-15980900 Comment: event=verify_signature status=complete guid=dc99c8106c860133a80f0800276d7a8d validity=false
[2015-11-14T01:41:19] DEBUG PID-1517 TID-16284000 XMLLogger: from_xml: <comment>
<guid>94f414d06c850133a80e0800276d7a8d</guid>
<parent_guid>94f135506c850133a80e0800276d7a8d</parent_guid>
<parent_author_signature>bkn+h5kjMi3P4yJ2Ddevht6k8FBO8iZYAxXEtpf43wYi7AjHlAWYDD/dwn4mZfK0iJiJq4ixOpp3/H8BYIoXiKRAPT1b7McSVx/WNKmHnsUflhgs3SLccOV1NiUjoOxNL2V9og+ZGsn/tfT5aUADW5W+FjuJrk9NpGxrxSgSn74=</parent_author_signature>
<author_signature/>
<text>this is a very informative comment</text>
<diaspora_handle>bob4508afe@localhost:9887</diaspora_handle>
</comment>
[2015-11-14T01:41:19] INFO PID-1517 TID-16284000 Postzord::Receiver::Private: user:375 starting private receive from person:94ec55606c850133a80e0800276d7a8d
[2015-11-14T01:41:19] INFO PID-1517 TID-16284000 Comment: event=verify_signature status=complete guid=94f414d06c850133a80e0800276d7a8d validity=true
[2015-11-14T01:36:49] DEBUG PID-1457 TID-14104940 XMLLogger: from_xml: <comment>
<guid>f3fa0e506c840133a80c0800276d7a8d</guid>
<parent_guid>f3f741706c840133a80c0800276d7a8d</parent_guid>
<parent_author_signature>YpELXuS+kDnx2oWKkwLCEOMMK3BmZr0mCapJeW+nguSRAlY1eKkThF+C4jneuB2hC4Q99ft54gK3VKU9hrUQOkx1zO/k/JkTiXvexLWljBdnhTH7ziS/mX5a97HsCDILrALOCxzQl8r8c5A+H3UQwub0roNDmeBVt8TnOzR4vO8=</parent_author_signature>
<author_signature>YpELXuS+kDnx2oWKkwLCEOMMK3BmZr0mCapJeW+nguSRAlY1eKkThF+C4jneuB2hC4Q99ft54gK3VKU9hrUQOkx1zO/k/JkTiXvexLWljBdnhTH7ziS/mX5a97HsCDILrALOCxzQl8r8c5A+H3UQwub0roNDmeBVt8TnOzR4vO8=</author_signature>
<text>this is a very informative comment</text>
<diaspora_handle>bob49f221e@localhost:9887</diaspora_handle>
</comment>
[2015-11-14T01:36:49] INFO PID-1457 TID-14104940 Postzord::Receiver::Private: user:363 starting private receive from person:f3f226a06c840133a80c0800276d7a8d
[2015-11-14T01:36:49] INFO PID-1457 TID-14104940 Comment: event=verify_signature status=complete guid=f3fa0e506c