From 26cfe7090b94f5a87c75f254b605c48efe59aa8d Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Tue, 4 Apr 2017 03:28:37 +0200 Subject: [PATCH] Cleanup dummy rails app --- .gitignore | 5 --- lib/tasks/diaspora_federation_tasks.rake | 4 --- test/dummy/app/assets/images/user/default.png | Bin 1736 -> 0 bytes .../app/controllers/application_controller.rb | 5 --- .../app/controllers/discovery_controller.rb | 7 ---- .../app/views/layouts/application.html.erb | 12 ------- test/dummy/bin/bundle | 3 -- test/dummy/bin/rake | 9 ----- test/dummy/bin/setup | 29 --------------- test/dummy/bin/spring | 16 --------- test/dummy/config/database.yml | 25 ------------- .../initializers/backtrace_silencers.rb | 7 ---- .../migrate/20150614014411_create_people.rb | 12 ------- ...1_rename_diaspora_handle_to_diaspora_id.rb | 5 --- ...24_add_serialized_private_key_to_person.rb | 5 --- .../migrate/20160202221606_create_entity.rb | 11 ------ test/dummy/db/schema.rb | 33 ------------------ test/dummy/lib/diaspora/guid.rb | 22 ------------ test/dummy/public/favicon.ico | 0 19 files changed, 210 deletions(-) delete mode 100644 lib/tasks/diaspora_federation_tasks.rake delete mode 100644 test/dummy/app/assets/images/user/default.png delete mode 100644 test/dummy/app/controllers/application_controller.rb delete mode 100644 test/dummy/app/controllers/discovery_controller.rb delete mode 100644 test/dummy/app/views/layouts/application.html.erb delete mode 100755 test/dummy/bin/bundle delete mode 100755 test/dummy/bin/rake delete mode 100755 test/dummy/bin/setup delete mode 100755 test/dummy/bin/spring delete mode 100644 test/dummy/config/database.yml delete mode 100644 test/dummy/config/initializers/backtrace_silencers.rb delete mode 100644 test/dummy/db/migrate/20150614014411_create_people.rb delete mode 100644 test/dummy/db/migrate/20150722224751_rename_diaspora_handle_to_diaspora_id.rb delete mode 100644 test/dummy/db/migrate/20160202020724_add_serialized_private_key_to_person.rb delete mode 100644 test/dummy/db/migrate/20160202221606_create_entity.rb delete mode 100644 test/dummy/db/schema.rb delete mode 100644 test/dummy/lib/diaspora/guid.rb delete mode 100644 test/dummy/public/favicon.ico diff --git a/.gitignore b/.gitignore index a18d897..08f8a00 100644 --- a/.gitignore +++ b/.gitignore @@ -20,13 +20,8 @@ doc *.directory # dummmy app -test/dummy/db/*.sqlite3 -test/dummy/db/*.sqlite3-journal test/dummy/log/*.log test/dummy/log/*.log* -test/dummy/tmp/ -test/dummy/.sass-cache -test/dummy/test/fixtures/*.y*ml rspec-persistance.txt diff --git a/lib/tasks/diaspora_federation_tasks.rake b/lib/tasks/diaspora_federation_tasks.rake deleted file mode 100644 index 26df6e9..0000000 --- a/lib/tasks/diaspora_federation_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :diaspora_federation do -# # Task goes here -# end diff --git a/test/dummy/app/assets/images/user/default.png b/test/dummy/app/assets/images/user/default.png deleted file mode 100644 index 53d10ffc0371cdf94146121da55755662219df9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1736 zcmV;(1~>VMP)~DVD)9LZ8b$(haobM4)sl0H zA;cI{E^X}c%di!v(Mk%Rl^S9FyP`@A_ml=<$w>XL*a+)a^*tf=u0mMvsDeoA7uRxF zJqNK?8$HfJ^{!mURbiFz4aH^2YbC4}!*`WRzZ9&I!;ciR`2t%8tA+_OcKlVaa+ssk z-NPCwOj91dVg10_muCAFuu7P$INZX@VY*^>3QK|2o0>~lI;?DH!3nDnsykSEtSo5R z!YV;i-4(2+$|@vJuzFBdaRe)B!_qE9_%Qd6aOwqC4F)PcV2xlRAF#3wtmXk$vtgwh zAFN97nJma4;>z{-RrmnAFBW*XkA z@N`(2uy$*q4N@t*RpH^V3Sn)TNR>~-3}6Mq5~~}-DksCLgte`|pA9P;!^$VaN`$rJ zkkkPzV^*4@Qgv8^u=b5vnsa4!SdFmu&7?=evd*NMcSF=+Wy0DwlO7E#n!_4|MOcKj z8dg6SRv@gMVKu_q;l#ortU_2j%xE0K(#sAWVO7G~U}@jBFD%oqqolJP%NCYqj<4QeX->9=J6L*!7;pYy^^^BP z^H26^Ev@DeRyo%`l!>Whwg-c+~U0Q~gwFFi< zu`gT&YaAKh7r~l3TyEZB%}fv7JFJ-&KitEbI4`}qhgAt{iD~(V)#+JFl9qp1H%5mg z*`ab}u{TtK72U%cXZAbC=Pb)QTmx(Bown{9*4zW0>={;{eOJ=&@qJae8Pa^h>N+=Y zn?qPb?T_WDdxNF=zp(7;FLc^((!}lu*3f^yr+R^9^0Gtm0jt}*f>AxdGJA~1!CN$j z&u{kAVVOQv+Ruh%`$D4TyCM4Tlv+Qo9MApQZ?k{mJRSOd!?EDaZpDl7s<7&c&kTek zKiRhml^!iESYsh7wNbMUte(SSskpobteV1lX-sTp!x}AzO*DTTI2BgkVom*ltL+M_ zml(EFEPXpzZ^gGEsSjRbBUodz;`?H2tYZgQz3#iD=Gzy3PQw{KwiGpxgR7a7c(99>r+Cn^7Qcj66Gl^BH+|05?PV+yQKM zmN(E1Pa>D&?-Gn7{V0000 - - - Dummy - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/test/dummy/bin/bundle b/test/dummy/bin/bundle deleted file mode 100755 index 66e9889..0000000 --- a/test/dummy/bin/bundle +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -load Gem.bin_path('bundler', 'bundle') diff --git a/test/dummy/bin/rake b/test/dummy/bin/rake deleted file mode 100755 index d87d5f5..0000000 --- a/test/dummy/bin/rake +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ruby -begin - load File.expand_path('../spring', __FILE__) -rescue LoadError => e - raise unless e.message.include?('spring') -end -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/test/dummy/bin/setup b/test/dummy/bin/setup deleted file mode 100755 index acdb2c1..0000000 --- a/test/dummy/bin/setup +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -require 'pathname' - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) - -Dir.chdir APP_ROOT do - # This script is a starting point to setup your application. - # Add necessary setup steps to this file: - - puts "== Installing dependencies ==" - system "gem install bundler --conservative" - system "bundle check || bundle install" - - # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # system "cp config/database.yml.sample config/database.yml" - # end - - puts "\n== Preparing database ==" - system "bin/rake db:setup" - - puts "\n== Removing old logs and tempfiles ==" - system "rm -f log/*" - system "rm -rf tmp/cache" - - puts "\n== Restarting application server ==" - system "touch tmp/restart.txt" -end diff --git a/test/dummy/bin/spring b/test/dummy/bin/spring deleted file mode 100755 index 9bc076b..0000000 --- a/test/dummy/bin/spring +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby - -# This file loads spring without using Bundler, in order to be fast. -# It gets overwritten when you run the `spring binstub` command. - -unless defined?(Spring) - require 'rubygems' - require 'bundler' - - lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) - if spring = lockfile.specs.detect { |spec| spec.name == "spring" } - Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path - gem 'spring', spring.version - require 'spring/binstub' - end -end diff --git a/test/dummy/config/database.yml b/test/dummy/config/database.yml deleted file mode 100644 index 1c1a37c..0000000 --- a/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -# -default: &default - adapter: sqlite3 - pool: 5 - timeout: 5000 - -development: - <<: *default - database: db/development.sqlite3 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: db/test.sqlite3 - -production: - <<: *default - database: db/production.sqlite3 diff --git a/test/dummy/config/initializers/backtrace_silencers.rb b/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# 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. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/test/dummy/db/migrate/20150614014411_create_people.rb b/test/dummy/db/migrate/20150614014411_create_people.rb deleted file mode 100644 index 1bd5087..0000000 --- a/test/dummy/db/migrate/20150614014411_create_people.rb +++ /dev/null @@ -1,12 +0,0 @@ -class CreatePeople < ActiveRecord::Migration - def change - create_table :people do |t| - t.string "guid", null: false - t.text "url", null: false - t.string "diaspora_handle", null: false - t.text "serialized_public_key", null: false - - t.timestamps null: false - end - end -end diff --git a/test/dummy/db/migrate/20150722224751_rename_diaspora_handle_to_diaspora_id.rb b/test/dummy/db/migrate/20150722224751_rename_diaspora_handle_to_diaspora_id.rb deleted file mode 100644 index e997558..0000000 --- a/test/dummy/db/migrate/20150722224751_rename_diaspora_handle_to_diaspora_id.rb +++ /dev/null @@ -1,5 +0,0 @@ -class RenameDiasporaHandleToDiasporaId < ActiveRecord::Migration - def change - rename_column :people, :diaspora_handle, :diaspora_id - end -end diff --git a/test/dummy/db/migrate/20160202020724_add_serialized_private_key_to_person.rb b/test/dummy/db/migrate/20160202020724_add_serialized_private_key_to_person.rb deleted file mode 100644 index 6d56d4f..0000000 --- a/test/dummy/db/migrate/20160202020724_add_serialized_private_key_to_person.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddSerializedPrivateKeyToPerson < ActiveRecord::Migration - def change - add_column :people, :serialized_private_key, :text - end -end diff --git a/test/dummy/db/migrate/20160202221606_create_entity.rb b/test/dummy/db/migrate/20160202221606_create_entity.rb deleted file mode 100644 index 2bd4e8b..0000000 --- a/test/dummy/db/migrate/20160202221606_create_entity.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateEntity < ActiveRecord::Migration - def change - create_table :entities do |t| - t.belongs_to :author, class_name: "Person", null: false - t.string :guid, null: false - t.string :entity_type, null: false - - t.timestamps null: false - end - end -end diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb deleted file mode 100644 index 4e86501..0000000 --- a/test/dummy/db/schema.rb +++ /dev/null @@ -1,33 +0,0 @@ -# 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. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema.define(version: 20160202221606) do - - create_table "entities", force: :cascade do |t| - t.integer "author_id", null: false - t.string "guid", null: false - t.string "entity_type", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "people", force: :cascade do |t| - t.string "guid", null: false - t.text "url", null: false - t.string "diaspora_id", null: false - t.text "serialized_public_key", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.text "serialized_private_key" - end - -end diff --git a/test/dummy/lib/diaspora/guid.rb b/test/dummy/lib/diaspora/guid.rb deleted file mode 100644 index a94ff3b..0000000 --- a/test/dummy/lib/diaspora/guid.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2010-2011, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - -# from diaspora for testing - -module Diaspora - module Guid - # Creates a before_create callback which calls #set_guid - def self.included(model) - model.class_eval do - after_initialize :set_guid - validates :guid, uniqueness: true - end - end - - # @return [String] The model's guid. - def set_guid - self.guid = UUID.generate :compact if guid.blank? - end - end -end diff --git a/test/dummy/public/favicon.ico b/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29..0000000