From 7628387b8703d6599cd5dd442c466a11adec79de Mon Sep 17 00:00:00 2001 From: Wynn Netherland Date: Sat, 23 Mar 2013 15:40:33 -0500 Subject: [PATCH] Set up guard for tmux --- .gitignore | 1 + Gemfile | 9 +++++++++ Gemfile.lock | 37 ++++++++++++++++++++++++++++++------- Guardfile | 18 ++++++++++++++++++ rdio-cli.gemspec | 5 ----- 5 files changed, 58 insertions(+), 12 deletions(-) create mode 100644 Guardfile diff --git a/.gitignore b/.gitignore index efa037d..156ad17 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ tmp/fakehome/.rdio pkg/ +tmp/rspec_guard_result diff --git a/Gemfile b/Gemfile index 851fabc..1268d86 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,11 @@ source 'https://rubygems.org' +group :development do + gem 'guard-rspec' + gem 'rake', '~> 10.0.3' + gem 'rb-fsevent', '~> 0.9.3' + gem 'rspec', '~> 2.12.0' + gem 'rspec-mocks', '~> 2.12.0' + gem 'simplecov' + gem 'webmock' +end gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 27ffe44..935f27c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rdio-cli (0.1.0) + rdio-cli (1.2.0) gli (= 2.5.2) highline (~> 1.6.15) launchy (~> 2.1.2) @@ -10,16 +10,31 @@ GEM remote: https://rubygems.org/ specs: addressable (2.3.2) + coderay (1.0.9) crack (0.3.1) diff-lcs (1.1.3) gli (2.5.2) + guard (1.5.4) + listen (>= 0.4.2) + lumberjack (>= 1.0.2) + pry (>= 0.9.10) + thor (>= 0.14.6) + guard-rspec (2.5.1) + guard (>= 1.1) + rspec (~> 2.11) highline (1.6.15) - json (1.7.5) launchy (2.1.2) addressable (~> 2.3) - rake (10.0.1) - rdoc (3.12) - json (~> 1.4) + listen (0.6.0) + lumberjack (1.0.2) + method_source (0.8.1) + multi_json (1.7.1) + pry (0.9.12) + coderay (~> 1.0.5) + method_source (~> 0.8) + slop (~> 3.4) + rake (10.0.3) + rb-fsevent (0.9.3) rspec (2.12.0) rspec-core (~> 2.12.0) rspec-expectations (~> 2.12.0) @@ -28,6 +43,12 @@ GEM rspec-expectations (2.12.0) diff-lcs (~> 1.1.3) rspec-mocks (2.12.0) + simplecov (0.7.1) + multi_json (~> 1.0) + simplecov-html (~> 0.7.1) + simplecov-html (0.7.1) + slop (3.4.3) + thor (0.17.0) webmock (1.8.7) addressable (>= 2.2.7) crack (>= 0.1.7) @@ -36,9 +57,11 @@ PLATFORMS ruby DEPENDENCIES - rake + guard-rspec + rake (~> 10.0.3) + rb-fsevent (~> 0.9.3) rdio-cli! - rdoc rspec (~> 2.12.0) rspec-mocks (~> 2.12.0) + simplecov webmock diff --git a/Guardfile b/Guardfile new file mode 100644 index 0000000..fe365b8 --- /dev/null +++ b/Guardfile @@ -0,0 +1,18 @@ +# A sample Guardfile +# More info at https://github.com/guard/guard#readme +guard 'rspec' do + watch(%r{^spec/.+_spec\.rb$}) + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } + watch('spec/spec_helper.rb') { "spec" } + + notification :tmux, + :display_message => true, + :timeout => 5, # in seconds + :default_message_format => '%s // %s', + # the first %s will show the title, the second the message + # Alternately you can also configure *success_message_format*, + # *pending_message_format*, *failed_message_format* + :line_separator => ' > ', # since we are single line we need a separator + :color_location => '-a pane-active-border-fg' # to customize which tmux element will change color +end + diff --git a/rdio-cli.gemspec b/rdio-cli.gemspec index d74eb44..0ad57fb 100644 --- a/rdio-cli.gemspec +++ b/rdio-cli.gemspec @@ -19,10 +19,5 @@ spec = Gem::Specification.new do |s| s.executables << 'rdio' s.add_dependency('highline', '~> 1.6.15') s.add_dependency('launchy', '~> 2.1.2') - s.add_development_dependency('rake') - s.add_development_dependency('rdoc') - s.add_development_dependency('rspec', '~> 2.12.0') - s.add_development_dependency('rspec-mocks', '~> 2.12.0') - s.add_development_dependency 'webmock' s.add_runtime_dependency('gli','2.5.2') end