Merge pull request #2565 from swalkinshaw/move-discourse-plugin
Move discourse_plugin to lib
This commit is contained in:
commit
c93a7020ec
4
Gemfile
4
Gemfile
|
@ -187,10 +187,6 @@ group :development do
|
||||||
gem 'foreman', require: false
|
gem 'foreman', require: false
|
||||||
end
|
end
|
||||||
|
|
||||||
# Gem that enables support for plugins. It is required.
|
|
||||||
# TODO: does this really need to be a gem ?
|
|
||||||
gem 'discourse_plugin', path: 'vendor/gems/discourse_plugin'
|
|
||||||
|
|
||||||
# this is an optional gem, it provides a high performance replacement
|
# this is an optional gem, it provides a high performance replacement
|
||||||
# to String#blank? a method that is called quite frequently in current
|
# to String#blank? a method that is called quite frequently in current
|
||||||
# ActiveRecord, this may change in the future
|
# ActiveRecord, this may change in the future
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
PATH
|
|
||||||
remote: vendor/gems/discourse_plugin
|
|
||||||
specs:
|
|
||||||
discourse_plugin (0.0.1)
|
|
||||||
|
|
||||||
PATH
|
PATH
|
||||||
remote: vendor/gems/rails_multisite
|
remote: vendor/gems/rails_multisite
|
||||||
specs:
|
specs:
|
||||||
|
@ -407,7 +402,6 @@ DEPENDENCIES
|
||||||
better_errors
|
better_errors
|
||||||
binding_of_caller
|
binding_of_caller
|
||||||
certified
|
certified
|
||||||
discourse_plugin!
|
|
||||||
email_reply_parser-discourse
|
email_reply_parser-discourse
|
||||||
ember-rails
|
ember-rails
|
||||||
ember-source (= 1.6.0.beta.2)
|
ember-source (= 1.6.0.beta.2)
|
||||||
|
|
|
@ -2,6 +2,8 @@ require File.expand_path('../boot', __FILE__)
|
||||||
require 'rails/all'
|
require 'rails/all'
|
||||||
|
|
||||||
# Plugin related stuff
|
# Plugin related stuff
|
||||||
|
require_relative '../lib/discourse_event'
|
||||||
|
require_relative '../lib/discourse_plugin'
|
||||||
require_relative '../lib/discourse_plugin_registry'
|
require_relative '../lib/discourse_plugin_registry'
|
||||||
|
|
||||||
# Global config
|
# Global config
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
require 'discourse_event'
|
require_dependency 'discourse_event'
|
||||||
require 'ostruct'
|
|
||||||
|
|
||||||
describe DiscourseEvent do
|
describe DiscourseEvent do
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
require 'discourse_plugin'
|
require_dependency 'discourse_plugin'
|
||||||
require 'ostruct'
|
|
||||||
|
|
||||||
describe DiscoursePlugin do
|
describe DiscoursePlugin do
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
source 'https://rubygems.org'
|
|
||||||
|
|
||||||
group :test do
|
|
||||||
gem 'rails'
|
|
||||||
gem 'rspec'
|
|
||||||
gem 'mocha'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Specify your gem's dependencies in rails_multisite.gemspec
|
|
||||||
gemspec
|
|
|
@ -1,105 +0,0 @@
|
||||||
PATH
|
|
||||||
remote: .
|
|
||||||
specs:
|
|
||||||
discourse_plugin (0.0.1)
|
|
||||||
|
|
||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
actionmailer (3.2.8)
|
|
||||||
actionpack (= 3.2.8)
|
|
||||||
mail (~> 2.4.4)
|
|
||||||
actionpack (3.2.8)
|
|
||||||
activemodel (= 3.2.8)
|
|
||||||
activesupport (= 3.2.8)
|
|
||||||
builder (~> 3.0.0)
|
|
||||||
erubis (~> 2.7.0)
|
|
||||||
journey (~> 1.0.4)
|
|
||||||
rack (~> 1.4.0)
|
|
||||||
rack-cache (~> 1.2)
|
|
||||||
rack-test (~> 0.6.1)
|
|
||||||
sprockets (~> 2.1.3)
|
|
||||||
activemodel (3.2.8)
|
|
||||||
activesupport (= 3.2.8)
|
|
||||||
builder (~> 3.0.0)
|
|
||||||
activerecord (3.2.8)
|
|
||||||
activemodel (= 3.2.8)
|
|
||||||
activesupport (= 3.2.8)
|
|
||||||
arel (~> 3.0.2)
|
|
||||||
tzinfo (~> 0.3.29)
|
|
||||||
activeresource (3.2.8)
|
|
||||||
activemodel (= 3.2.8)
|
|
||||||
activesupport (= 3.2.8)
|
|
||||||
activesupport (3.2.8)
|
|
||||||
i18n (~> 0.6)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
arel (3.0.2)
|
|
||||||
builder (3.0.3)
|
|
||||||
diff-lcs (1.1.3)
|
|
||||||
erubis (2.7.0)
|
|
||||||
hike (1.2.1)
|
|
||||||
i18n (0.6.1)
|
|
||||||
journey (1.0.4)
|
|
||||||
json (1.7.5)
|
|
||||||
mail (2.4.4)
|
|
||||||
i18n (>= 0.4.0)
|
|
||||||
mime-types (~> 1.16)
|
|
||||||
treetop (~> 1.4.8)
|
|
||||||
metaclass (0.0.1)
|
|
||||||
mime-types (1.19)
|
|
||||||
mocha (0.12.7)
|
|
||||||
metaclass (~> 0.0.1)
|
|
||||||
multi_json (1.3.6)
|
|
||||||
polyglot (0.3.3)
|
|
||||||
rack (1.4.1)
|
|
||||||
rack-cache (1.2)
|
|
||||||
rack (>= 0.4)
|
|
||||||
rack-ssl (1.3.2)
|
|
||||||
rack
|
|
||||||
rack-test (0.6.2)
|
|
||||||
rack (>= 1.0)
|
|
||||||
rails (3.2.8)
|
|
||||||
actionmailer (= 3.2.8)
|
|
||||||
actionpack (= 3.2.8)
|
|
||||||
activerecord (= 3.2.8)
|
|
||||||
activeresource (= 3.2.8)
|
|
||||||
activesupport (= 3.2.8)
|
|
||||||
bundler (~> 1.0)
|
|
||||||
railties (= 3.2.8)
|
|
||||||
railties (3.2.8)
|
|
||||||
actionpack (= 3.2.8)
|
|
||||||
activesupport (= 3.2.8)
|
|
||||||
rack-ssl (~> 1.3.2)
|
|
||||||
rake (>= 0.8.7)
|
|
||||||
rdoc (~> 3.4)
|
|
||||||
thor (>= 0.14.6, < 2.0)
|
|
||||||
rake (0.9.2.2)
|
|
||||||
rdoc (3.12)
|
|
||||||
json (~> 1.4)
|
|
||||||
rspec (2.11.0)
|
|
||||||
rspec-core (~> 2.11.0)
|
|
||||||
rspec-expectations (~> 2.11.0)
|
|
||||||
rspec-mocks (~> 2.11.0)
|
|
||||||
rspec-core (2.11.1)
|
|
||||||
rspec-expectations (2.11.3)
|
|
||||||
diff-lcs (~> 1.1.3)
|
|
||||||
rspec-mocks (2.11.3)
|
|
||||||
sprockets (2.1.3)
|
|
||||||
hike (~> 1.2)
|
|
||||||
rack (~> 1.0)
|
|
||||||
tilt (~> 1.1, != 1.3.0)
|
|
||||||
thor (0.16.0)
|
|
||||||
tilt (1.3.3)
|
|
||||||
treetop (1.4.10)
|
|
||||||
polyglot
|
|
||||||
polyglot (>= 0.3.1)
|
|
||||||
tzinfo (0.3.33)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
discourse_plugin!
|
|
||||||
mocha
|
|
||||||
rails
|
|
||||||
rspec
|
|
|
@ -1,22 +0,0 @@
|
||||||
Copyright (c) 2012 Robin Ward
|
|
||||||
|
|
||||||
MIT License
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
@ -1,3 +0,0 @@
|
||||||
# Discourse Plugin
|
|
||||||
|
|
||||||
The basic stuff a plugin needs to exist in Discourse
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env rake
|
|
||||||
require "bundler/gem_tasks"
|
|
||||||
require "rspec/core/rake_task"
|
|
||||||
|
|
||||||
RSpec::Core::RakeTask.new(:test) do |spec|
|
|
||||||
spec.pattern = 'spec/*_spec.rb'
|
|
||||||
end
|
|
|
@ -1,20 +0,0 @@
|
||||||
# -*- encoding: utf-8 -*-
|
|
||||||
require File.expand_path('../lib/discourse_plugin/version', __FILE__)
|
|
||||||
|
|
||||||
Gem::Specification.new do |gem|
|
|
||||||
gem.authors = ["Robin Ward"]
|
|
||||||
gem.email = ["robin.ward@gmail.com"]
|
|
||||||
gem.description = %q{Toolkit for creating a discourse plugin}
|
|
||||||
gem.summary = %q{Toolkit for creating a discourse plugin}
|
|
||||||
gem.homepage = ""
|
|
||||||
|
|
||||||
# when this is extracted comment it back in, prd has no .git
|
|
||||||
# gem.files = `git ls-files`.split($\)
|
|
||||||
gem.files = Dir['README*','LICENSE','lib/**/*.rb']
|
|
||||||
|
|
||||||
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
||||||
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
||||||
gem.name = "discourse_plugin"
|
|
||||||
gem.require_paths = ["lib"]
|
|
||||||
gem.version = DiscoursePlugin::VERSION
|
|
||||||
end
|
|
|
@ -1,3 +0,0 @@
|
||||||
require 'discourse_event'
|
|
||||||
require 'discourse_plugin/version'
|
|
||||||
require 'discourse_plugin/discourse_plugin'
|
|
|
@ -1,3 +0,0 @@
|
||||||
class DiscoursePlugin
|
|
||||||
VERSION = "0.0.1"
|
|
||||||
end
|
|
|
@ -1,18 +0,0 @@
|
||||||
require 'rubygems'
|
|
||||||
require 'rails'
|
|
||||||
|
|
||||||
ENV["RAILS_ENV"] ||= 'test'
|
|
||||||
|
|
||||||
|
|
||||||
RSpec.configure do |config|
|
|
||||||
|
|
||||||
config.mock_framework = :mocha
|
|
||||||
config.color_enabled = true
|
|
||||||
|
|
||||||
config.before(:each) do
|
|
||||||
DiscourseEvent.clear
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue