This repository has been archived by the owner on Feb 12, 2018. It is now read-only.
forked from jonsgreen/guard-spin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial guard runner support for Spin
Push matched files to spin
- Loading branch information
jonathangreenberg
committed
Nov 3, 2011
0 parents
commit 86efcf6
Showing
7 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
.yardoc | ||
Gemfile.lock | ||
InstalledFiles | ||
_yardoc | ||
coverage | ||
doc/ | ||
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'http://rubygems.org' | ||
|
||
# Specify your gem's dependencies in guard-spin.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env rake | ||
require "bundler/gem_tasks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- encoding: utf-8 -*- | ||
require File.expand_path('../lib/guard/spin/version', __FILE__) | ||
|
||
Gem::Specification.new do |gem| | ||
gem.authors = ["jonathangreenberg"] | ||
gem.email = ["greenberg@entryway.net"] | ||
gem.description = %q{Guard gem for Spin} | ||
gem.summary = %q{Pushes watched files to Spin} | ||
gem.homepage = "" | ||
|
||
gem.add_runtime_dependency 'guard' | ||
gem.add_runtime_dependency 'spin' | ||
|
||
gem.name = "guard-spin" | ||
gem.files = Dir.glob('{lib}/**/*') + %w[LICENSE README.md] | ||
gem.require_path = 'lib' | ||
gem.version = Guard::SpinVersion::VERSION | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'guard' | ||
require 'guard/guard' | ||
|
||
module Guard | ||
class Spin < Guard | ||
|
||
autoload :Runner, 'guard/spin/runner' | ||
|
||
def run_on_change(paths) | ||
Runner.new(paths).run | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Guard | ||
class Spin | ||
class Runner | ||
attr_reader :paths | ||
|
||
def initialize(paths) | ||
@paths = paths | ||
end | ||
|
||
def run | ||
puts "Running #{paths.join(" ")}\n" | ||
system(run_command) | ||
end | ||
|
||
def run_command | ||
"spin push #{paths.join(" ")}" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Guard | ||
module SpinVersion | ||
VERSION = "0.0.1" | ||
end | ||
end |