From 921c7dc3d0675931f2a71293db6f9898f75f7b46 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Sat, 25 Jul 2015 12:09:57 +0500 Subject: [PATCH] Initialize Lita adapter $ lita adapter tox from parent directory --- .travis.yml | 8 ++++++++ Gemfile | 3 +++ README.md | 22 ++++++++++++++++++++++ Rakefile | 6 ++++++ lib/lita-tox.rb | 7 +++++++ lib/lita/adapters/tox.rb | 8 ++++++++ lita-tox.gemspec | 26 ++++++++++++++++++++++++++ locales/en.yml | 4 ++++ spec/lita/adapters/tox_spec.rb | 4 ++++ spec/spec_helper.rb | 14 ++++++++++++++ 10 files changed, 102 insertions(+) create mode 100644 .travis.yml create mode 100644 Gemfile create mode 100644 README.md create mode 100644 Rakefile create mode 100644 lib/lita-tox.rb create mode 100644 lib/lita/adapters/tox.rb create mode 100644 lita-tox.gemspec create mode 100644 locales/en.yml create mode 100644 spec/lita/adapters/tox_spec.rb create mode 100644 spec/spec_helper.rb diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..348801e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: ruby +rvm: + - 2.0.0 +script: bundle exec rake +before_install: + - gem update --system +services: + - redis-server diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..b4e2a20 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gemspec diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e97593 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# lita-tox + +[![Build Status](https://travis-ci.org/braiden-vasco/lita-tox.png?branch=master)](https://travis-ci.org/braiden-vasco/lita-tox) +[![Coverage Status](https://coveralls.io/repos/braiden-vasco/lita-tox/badge.png)](https://coveralls.io/r/braiden-vasco/lita-tox) + +TODO: Add a description of the plugin. + +## Installation + +Add lita-tox to your Lita instance's Gemfile: + +``` ruby +gem "lita-tox" +``` + +## Configuration + +TODO: Describe any configuration attributes the plugin exposes. + +## Usage + +TODO: Describe the plugin's features and how to use them. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..c92b11e --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +require "bundler/gem_tasks" +require "rspec/core/rake_task" + +RSpec::Core::RakeTask.new(:spec) + +task default: :spec diff --git a/lib/lita-tox.rb b/lib/lita-tox.rb new file mode 100644 index 0000000..6b12e0f --- /dev/null +++ b/lib/lita-tox.rb @@ -0,0 +1,7 @@ +require "lita" + +Lita.load_locales Dir[File.expand_path( + File.join("..", "..", "locales", "*.yml"), __FILE__ +)] + +require "lita/adapters/tox" diff --git a/lib/lita/adapters/tox.rb b/lib/lita/adapters/tox.rb new file mode 100644 index 0000000..2ae519a --- /dev/null +++ b/lib/lita/adapters/tox.rb @@ -0,0 +1,8 @@ +module Lita + module Adapters + class Tox < Adapter + end + + Lita.register_adapter(:tox, Tox) + end +end diff --git a/lita-tox.gemspec b/lita-tox.gemspec new file mode 100644 index 0000000..ac7f626 --- /dev/null +++ b/lita-tox.gemspec @@ -0,0 +1,26 @@ +Gem::Specification.new do |spec| + spec.name = "lita-tox" + spec.version = "0.1.0" + spec.authors = ["Braiden Vasco"] + spec.email = ["braiden-vasco@mailtor.net"] + spec.description = "TODO: Add a description" + spec.summary = "TODO: Add a summary" + spec.homepage = "TODO: Add a homepage" + spec.license = "TODO: Add a license" + spec.metadata = { "lita_plugin_type" => "adapter" } + + spec.files = `git ls-files`.split($/) + spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } + spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) + spec.require_paths = ["lib"] + + spec.add_runtime_dependency "lita", ">= 4.4" + + spec.add_development_dependency "bundler", "~> 1.3" + spec.add_development_dependency "pry-byebug" + spec.add_development_dependency "rake" + spec.add_development_dependency "rack-test" + spec.add_development_dependency "rspec", ">= 3.0.0" + spec.add_development_dependency "simplecov" + spec.add_development_dependency "coveralls" +end diff --git a/locales/en.yml b/locales/en.yml new file mode 100644 index 0000000..e9ef952 --- /dev/null +++ b/locales/en.yml @@ -0,0 +1,4 @@ +en: + lita: + adapters: + tox: diff --git a/spec/lita/adapters/tox_spec.rb b/spec/lita/adapters/tox_spec.rb new file mode 100644 index 0000000..340598c --- /dev/null +++ b/spec/lita/adapters/tox_spec.rb @@ -0,0 +1,4 @@ +require "spec_helper" + +describe Lita::Adapters::Tox, lita: true do +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..189c063 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,14 @@ +require "simplecov" +require "coveralls" +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + Coveralls::SimpleCov::Formatter +] +SimpleCov.start { add_filter "/spec/" } + +require "lita-tox" +require "lita/rspec" + +# A compatibility mode is provided for older plugins upgrading from Lita 3. Since this plugin +# was generated with Lita 4, the compatibility mode should be left disabled. +Lita.version_3_compatibility_mode = false