Skip to content

Commit

Permalink
various structural updates.
Browse files Browse the repository at this point in the history
- adds coveralls
- attempts to load teaspoon from master so that can be tested
- updates for teaspoon 0.8.0
- updates version to match teaspoon
  • Loading branch information
jejacks0n committed Feb 18, 2014
1 parent ed066c6 commit c09c8cc
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 111 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,6 +3,7 @@
pkg/
tmp
tags
coverage/

spec/dummy/log/*.log
spec/dummy/tmp/
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
@@ -1,4 +1,4 @@
language: ruby
before_script:
- 'gem install specific_install && gem specific_install -l git@github.com:modeset/teaspoon.git'
rvm:
- 1.9.3
- 2.0.0
5 changes: 4 additions & 1 deletion Gemfile
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

gemspec

gem "teaspoon"
gem "teaspoon", github: "modeset/teaspoon"

# used by the dummy application
gem "rails", ">= 4.0.0"
Expand All @@ -22,3 +22,6 @@ group :development, :test do
gem "capybara"
gem "aruba"
end

# io services
gem "coveralls", require: false
2 changes: 2 additions & 0 deletions README.md
@@ -1,8 +1,10 @@
Guard Teaspoon
==============
[![Gem Version](https://badge.fury.io/rb/guard-teaspoon.png)](http://badge.fury.io/rb/guard-teaspoon)
[![Dependency Status](https://gemnasium.com/modeset/guard-teaspoon.png)](https://gemnasium.com/modeset/guard-teaspoon)
[![Build Status](https://travis-ci.org/modeset/guard-teaspoon.png?branch=master)](https://travis-ci.org/modeset/guard-teaspoon)
[![Code Climate](https://codeclimate.com/github/modeset/guard-teaspoon.png)](https://codeclimate.com/github/modeset/guard-teaspoon)
[![Coverage Status](https://coveralls.io/repos/modeset/guard-teaspoon/badge.png?branch=master)](https://coveralls.io/r/modeset/guard-teaspoon?branch=master)

Guard-Teaspoon allows you to run [Teaspoon](https://github.com/modeset/teaspoon) using [Guard](https://github.com/guard/guard).

Expand Down
33 changes: 15 additions & 18 deletions guard-teaspoon.gemspec
@@ -1,25 +1,22 @@
# encoding: utf-8
$:.push File.expand_path('../lib', __FILE__)
require 'guard/teaspoon/version'
$:.push File.expand_path("../lib", __FILE__)

# Maintain your gem's version:
require "guard/teaspoon/version"

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = 'guard-teaspoon'
s.name = "guard-teaspoon"
s.version = Guard::TeaspoonVersion::VERSION
s.platform = Gem::Platform::RUBY
s.license = 'MIT'
s.authors = ['jejacks0n']
s.email = ['info@modeset.com']
s.homepage = 'https://rubygems.org/gems/guard-teaspoon'
s.summary = 'Guard plugin for Teaspoon'
s.description = 'Guard::Teaspoon automatically runs your Javascript tests with all the features of Teaspoon.'

s.required_ruby_version = '>= 1.9.2'
s.authors = ["jejacks0n", "jayzes", "jedschneider"]
s.email = ["info@modeset.com"]
s.homepage = "https://rubygems.org/gems/guard-teaspoon"
s.summary = "Guard plugin for Teaspoon"
s.description = "Guard::Teaspoon automatically runs your Javascript tests with all the features of Teaspoon."
s.license = "MIT"

s.add_runtime_dependency 'guard', '~> 2.2'
s.add_runtime_dependency 'teaspoon', '>= 0.7.7'
s.files = Dir["{lib}/**/*"] + ["MIT.LICENSE", "README.md"]
s.test_files = `git ls-files -- {spec,test}/*`.split("\n")

s.files = Dir['{lib}/**/*'] + ['MIT.LICENSE', 'README.md']
s.test_files = Dir['{spec}/**/*']
s.require_path = 'lib'
s.add_dependency "guard", "~> 2.2"
s.add_dependency "teaspoon", ">= 0.8.0"
end
8 changes: 4 additions & 4 deletions lib/guard/teaspoon.rb
@@ -1,10 +1,10 @@
require 'guard'
require 'guard/plugin'
require "guard"
require "guard/plugin"

module Guard
class Teaspoon < Plugin
require 'guard/teaspoon/resolver'
require 'guard/teaspoon/runner'
require "guard/teaspoon/resolver"
require "guard/teaspoon/runner"

attr_accessor :runner, :failed_paths, :last_failed

Expand Down
1 change: 0 additions & 1 deletion lib/guard/teaspoon/resolver.rb
Expand Up @@ -19,7 +19,6 @@ def resolve(original_paths)
end
end
end

end
end
end
2 changes: 1 addition & 1 deletion lib/guard/teaspoon/version.rb
@@ -1,5 +1,5 @@
module Guard
module TeaspoonVersion
VERSION = '1.0.0'
VERSION = "0.8.0"
end
end
58 changes: 0 additions & 58 deletions spec/dummy/config/initializers/teaspoon.rb

This file was deleted.

37 changes: 12 additions & 25 deletions spec/dummy/spec/teaspoon_env.rb
@@ -1,28 +1,15 @@
# This file allows you to override various Teaspoon configuration directives when running from the command line. It is not
# required from within the Rails environment, so overriding directives that have been defined within the initializer
# is not possible.
#
# Set RAILS_ROOT and load the environment.
ENV["RAILS_ROOT"] = File.expand_path("../../", __FILE__)
require File.expand_path("../../config/environment", __FILE__)

# Provide default configuration.
#
# You can override various configuration directives defined here by using arguments with the teaspoon command.
#
# teaspoon --driver=selenium --suppress-log
# rake teaspoon DRIVER=selenium SUPPRESS_LOG=false
Teaspoon.setup do |config|
# Driver
#config.driver = "phantomjs" # available: phantomjs, selenium
#config.phantomjs_bin = nil
# Set RAILS_ROOT and load the environment if it's not already loaded.
unless defined?(Rails)
ENV["RAILS_ROOT"] = File.expand_path("../../", __FILE__)
require File.expand_path("../../config/environment", __FILE__)
end

# Behaviors
#config.server_timeout = 20 # timeout for starting the server
#config.fail_fast = true # abort after the first failing suite
Teaspoon.configure do |config|
config.suite do |suite|
suite.use_framework :jasmine, "1.3.1"
end

# Output
#config.formatters = "dot" # available: dot, tap_y, swayze_or_oprah
#config.suppress_log = false # suppress logs coming from console[log/error/debug]
#config.color = true
config.suite :targeted do |suite|
suite.matcher = "spec/javascripts/**/*_tspec.{js,js.coffee,coffee}"
end
end
1 change: 0 additions & 1 deletion spec/features/guard_teaspoon_spec.rb
Expand Up @@ -14,7 +14,6 @@

scenario "installing Teaspoon and generating the Guardfile" do
run_simple("bundle exec rails g teaspoon:install")
check_file_presence(["config/initializers/teaspoon.rb"], true)
check_file_presence(["spec/teaspoon_env.rb"], true)
check_file_presence(["spec/javascripts/spec_helper.js"], true)

Expand Down
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -7,6 +7,9 @@
require "capybara/rails"
require "aruba/api"

require "coveralls"
Coveralls.wear!

require "guard/teaspoon"

Dir[File.expand_path("../support/**/*.rb", __FILE__)].each { |f| require f }
Expand Down

0 comments on commit c09c8cc

Please sign in to comment.