Merge pull request #2565 from swalkinshaw/move-discourse-plugin

Move discourse_plugin to lib
This commit is contained in:
Robin Ward 2014-07-23 10:56:12 -04:00
commit c93a7020ec
16 changed files with 4 additions and 205 deletions

View file

@ -187,10 +187,6 @@ group :development do
gem 'foreman', require: false
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
# to String#blank? a method that is called quite frequently in current
# ActiveRecord, this may change in the future

View file

@ -1,8 +1,3 @@
PATH
remote: vendor/gems/discourse_plugin
specs:
discourse_plugin (0.0.1)
PATH
remote: vendor/gems/rails_multisite
specs:
@ -407,7 +402,6 @@ DEPENDENCIES
better_errors
binding_of_caller
certified
discourse_plugin!
email_reply_parser-discourse
ember-rails
ember-source (= 1.6.0.beta.2)

View file

@ -2,6 +2,8 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Plugin related stuff
require_relative '../lib/discourse_event'
require_relative '../lib/discourse_plugin'
require_relative '../lib/discourse_plugin_registry'
# Global config

View file

@ -1,6 +1,5 @@
require 'spec_helper'
require 'discourse_event'
require 'ostruct'
require_dependency 'discourse_event'
describe DiscourseEvent do

View file

@ -1,6 +1,5 @@
require 'spec_helper'
require 'discourse_plugin'
require 'ostruct'
require_dependency 'discourse_plugin'
describe DiscoursePlugin do

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -1,3 +0,0 @@
# Discourse Plugin
The basic stuff a plugin needs to exist in Discourse

View file

@ -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

View file

@ -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

View file

@ -1,3 +0,0 @@
require 'discourse_event'
require 'discourse_plugin/version'
require 'discourse_plugin/discourse_plugin'

View file

@ -1,3 +0,0 @@
class DiscoursePlugin
VERSION = "0.0.1"
end

View file

@ -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