Skip to content
Browse files

initial checkin

  • Loading branch information...
0 parents commit 53874328b8d280eb843bb9454fb43d339fcc8d0b Ryan Sonnek committed Aug 3, 2011
Showing with 88 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +1 −0 .rvmrc
  3. +4 −0 Gemfile
  4. +2 −0 Rakefile
  5. +23 −0 guard-jslint-on-rails.gemspec
  6. +54 −0 lib/guard/jslint-on-rails.rb
4 .gitignore
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
1 .rvmrc
@@ -0,0 +1 @@
+rvm use ree-1.8.7-2011.03@guard-jslint-on-rails --create
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in guard-jslint-on-rails.gemspec
+gemspec
2 Rakefile
@@ -0,0 +1,2 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
23 guard-jslint-on-rails.gemspec
@@ -0,0 +1,23 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "guard/jslint-on-rails"
+
+Gem::Specification.new do |s|
+ s.name = "guard-jslint-on-rails"
+ s.version = Guard::JslintOnRails::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["TODO: Write your name"]
+ s.email = ["TODO: Write your email address"]
+ s.homepage = ""
+ s.summary = %q{TODO: Write a gem summary}
+ s.description = %q{TODO: Write a gem description}
+
+ s.rubyforge_project = "guard-jslint-on-rails"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ s.add_dependency 'guard', '>= 0.4.0'
+end
54 lib/guard/jslint-on-rails.rb
@@ -0,0 +1,54 @@
+require 'guard'
+require 'guard/guard'
+
+puts 'loading'
+module Guard
+ class JslintOnRails < Guard
+ VERSION = '0.0.1'
+
+ # def initialize(watchers = [], options = {})
+ # @process = nil
+ # @pid = nil
+ # @command = options[:command]
+ # @env = options[:env]
+ # @name = options[:name]
+ # @stop_signal = options[:stop_signal] || "TERM"
+ # super
+ # end
+ # def process_running?
+ # begin
+ # @pid ? ::Process.kill(0, @pid) : false
+ # rescue Errno::ESRCH => e
+ # false
+ # end
+ # end
+ # def start
+ # UI.info("Starting process #{@name}")
+ # @process = @env ? IO.popen([@env, @command]) : IO.popen(@command)
+ # UI.info("Started process #{@name}")
+ # @pid = @process.pid
+ # end
+ # def stop
+ # if @process
+ # UI.info("Stopping process #{@name}")
+ # ::Process.kill(@stop_signal, @process.pid)
+ # ::Process.waitpid(@pid) rescue Errno::ESRCH
+ # @process.close
+ # @pid = nil
+ # UI.info("Stopped process #{@name}")
+ # end
+ # end
+ # def reload
+ # stop
+ # start
+ # end
+ # def run_all
+ # true
+ # end
+
+ def run_on_change(paths)
+ puts paths.inspect
+ reload
+ end
+ end
+end

0 comments on commit 5387432

Please sign in to comment.
Something went wrong with that request. Please try again.