From 4d04c47251a28a372c4c7cce985277bd619c5557 Mon Sep 17 00:00:00 2001 From: Luke Barratt Date: Sun, 23 Aug 2015 12:06:27 +0100 Subject: [PATCH] Fold in acts_as_readable plugin into lib so that it's loaded properly --- app/models/issue.rb | 2 -- .../plugins/acts_as_readable}/README | 0 .../acts_as_readable_migration_generator.rb | 0 .../acts_as_readable_migration/templates/migration.rb | 0 lib/plugins/acts_as_readable/init.rb | 3 +++ .../plugins/acts_as_readable}/lib/acts_as_readable.rb | 0 .../plugins/acts_as_readable}/lib/reading.rb | 0 .../plugins/acts_as_readable}/lib/user_with_readings.rb | 0 vendor/plugins/acts-as-readable/init.rb | 6 ------ 9 files changed, 3 insertions(+), 8 deletions(-) rename {vendor/plugins/acts-as-readable => lib/plugins/acts_as_readable}/README (100%) rename {vendor/plugins/acts-as-readable => lib/plugins/acts_as_readable}/generators/acts_as_readable_migration/acts_as_readable_migration_generator.rb (100%) rename {vendor/plugins/acts-as-readable => lib/plugins/acts_as_readable}/generators/acts_as_readable_migration/templates/migration.rb (100%) create mode 100644 lib/plugins/acts_as_readable/init.rb rename {vendor/plugins/acts-as-readable => lib/plugins/acts_as_readable}/lib/acts_as_readable.rb (100%) rename {vendor/plugins/acts-as-readable => lib/plugins/acts_as_readable}/lib/reading.rb (100%) rename {vendor/plugins/acts-as-readable => lib/plugins/acts_as_readable}/lib/user_with_readings.rb (100%) delete mode 100644 vendor/plugins/acts-as-readable/init.rb diff --git a/app/models/issue.rb b/app/models/issue.rb index 594ddb0..62c3815 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -15,8 +15,6 @@ # text_parsed :text # -require File.join(Rails.root, 'vendor', 'plugins', 'acts-as-readable', 'init.rb') - class Issue < ActiveRecord::Base include Extra diff --git a/vendor/plugins/acts-as-readable/README b/lib/plugins/acts_as_readable/README similarity index 100% rename from vendor/plugins/acts-as-readable/README rename to lib/plugins/acts_as_readable/README diff --git a/vendor/plugins/acts-as-readable/generators/acts_as_readable_migration/acts_as_readable_migration_generator.rb b/lib/plugins/acts_as_readable/generators/acts_as_readable_migration/acts_as_readable_migration_generator.rb similarity index 100% rename from vendor/plugins/acts-as-readable/generators/acts_as_readable_migration/acts_as_readable_migration_generator.rb rename to lib/plugins/acts_as_readable/generators/acts_as_readable_migration/acts_as_readable_migration_generator.rb diff --git a/vendor/plugins/acts-as-readable/generators/acts_as_readable_migration/templates/migration.rb b/lib/plugins/acts_as_readable/generators/acts_as_readable_migration/templates/migration.rb similarity index 100% rename from vendor/plugins/acts-as-readable/generators/acts_as_readable_migration/templates/migration.rb rename to lib/plugins/acts_as_readable/generators/acts_as_readable_migration/templates/migration.rb diff --git a/lib/plugins/acts_as_readable/init.rb b/lib/plugins/acts_as_readable/init.rb new file mode 100644 index 0000000..1381afe --- /dev/null +++ b/lib/plugins/acts_as_readable/init.rb @@ -0,0 +1,3 @@ +require 'acts_as_readable' + +ActiveRecord::Base.send :include, ActiveRecord::Acts::Readable diff --git a/vendor/plugins/acts-as-readable/lib/acts_as_readable.rb b/lib/plugins/acts_as_readable/lib/acts_as_readable.rb similarity index 100% rename from vendor/plugins/acts-as-readable/lib/acts_as_readable.rb rename to lib/plugins/acts_as_readable/lib/acts_as_readable.rb diff --git a/vendor/plugins/acts-as-readable/lib/reading.rb b/lib/plugins/acts_as_readable/lib/reading.rb similarity index 100% rename from vendor/plugins/acts-as-readable/lib/reading.rb rename to lib/plugins/acts_as_readable/lib/reading.rb diff --git a/vendor/plugins/acts-as-readable/lib/user_with_readings.rb b/lib/plugins/acts_as_readable/lib/user_with_readings.rb similarity index 100% rename from vendor/plugins/acts-as-readable/lib/user_with_readings.rb rename to lib/plugins/acts_as_readable/lib/user_with_readings.rb diff --git a/vendor/plugins/acts-as-readable/init.rb b/vendor/plugins/acts-as-readable/init.rb deleted file mode 100644 index 52f6a29..0000000 --- a/vendor/plugins/acts-as-readable/init.rb +++ /dev/null @@ -1,6 +0,0 @@ - -require File.join(File.dirname(__FILE__), 'lib', 'acts_as_readable') -require File.join(File.dirname(__FILE__), 'lib', 'reading') -require File.join(File.dirname(__FILE__), 'lib', 'user_with_readings') - -ActiveRecord::Base.send :include, ActiveRecord::Acts::Readable