guard-xctool-test 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1784e9f38e9085bfb1c1385ab806671fbb85c1c2
4
- data.tar.gz: 06f2ba6dc15c8e24dec0126d4fd93fc3d28631c9
3
+ metadata.gz: 9d2a4b8aaf6af6e278edd38769a5c33bbad8d27a
4
+ data.tar.gz: 538b1402ec0aed2452b6ab6511b236ceed4c34d9
5
5
  SHA512:
6
- metadata.gz: 347d74162692a7468167fa1070c3c243c7cb2b60b4f070fb3c6686d984d51432b0664b6f4560f7a22aeeed7ca61f86ed03db8d6deefab9c10236c71664def933
7
- data.tar.gz: ab96309cf9564946cf3e0df3a0fc3629bd8fdf4242a73b2099b7ad31a7cbb3c92afd8bb4bf0a4f03415bb19f172e8f08ad45690c6510f536fb3db4e3bac806dc
6
+ metadata.gz: fc06829513472da72305b1800bfde6c8a41a4bec9c82c89f671ac132c9504fe5c50c1df402158aad042d9598c585d32f7fba4839cc5c16e1425bee59eb087bc4
7
+ data.tar.gz: 793994fd90051680e386ee32155ca9fe15cce00fa3a81d6a24661c7a886d0b7e4abe612df176fdb13418d9c44e736894918294901af282a78ab45bdc6c798584
data/.travis.yml CHANGED
@@ -1,15 +1,9 @@
1
- language: ruby
2
- bundler_args: --without development
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - ruby-head
7
- - jruby-19mode
8
- - jruby-head
9
- - rbx-19mode
10
- - rbx-head
11
- matrix:
12
- allow_failures:
13
- - rvm: ruby-head
14
- - rvm: jruby-head
15
- - rvm: rbx-head
1
+ language: objective-c
2
+ env:
3
+ - RVM_RUBY_VERSION=1.9.3 NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 && curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem' SSL_CERT_FILE=/usr/local/share/cacert.pem
4
+ - RVM_RUBY_VERSION=2.0.0 NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 && curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem' SSL_CERT_FILE=/usr/local/share/cacert.pem
5
+ before_install:
6
+ - source ~/.rvm/scripts/rvm && rvm use $RVM_RUBY_VERSION
7
+ - sudo chown -R $USER /usr/local
8
+ install: eval $RUBY_VERSION_SPECIFIC && bundle install
9
+ script: bundle exec rake spec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # guard-xctool-test
2
2
 
3
- Xctool test guard allows you to automically & intelligently aunch specs when files are modified.
3
+ guard-xctool-test allows you to automically & intelligently launch specs when files are modified.
4
4
 
5
5
  ## Installation
6
6
 
@@ -21,7 +21,6 @@ Or install it yourself as:
21
21
  - Ruby 1.9.3 or above
22
22
  - [xctool](https://github.com/facebook/xctool)
23
23
 
24
-
25
24
  ## Guardfile
26
25
 
27
26
  ```ruby
data/Rakefile CHANGED
@@ -1 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -5,7 +5,7 @@ module Guard
5
5
  class XctoolTest < ::Guard::Guard
6
6
  include XctoolHelper
7
7
 
8
- attr_reader :xctool, :test_paths, :test_target, :cli
8
+ attr_reader :xctool, :test_paths, :test_target, :cli, :all_on_start
9
9
 
10
10
  # Initializes a Guard plugin.
11
11
  # Don't do any work here, especially as Guard plugins get initialized even if they are not in an active group!
@@ -22,6 +22,7 @@ module Guard
22
22
  @test_paths = options[:test_paths] || "."
23
23
  @test_target = options[:test_target] || find_test_target
24
24
  @xctool = options[:xctool_command] || "xctool"
25
+ @all_on_start = options[:all_on_start] || false
25
26
  end
26
27
 
27
28
  # Called once when Guard starts. Please override initialize method to init stuff.
@@ -32,14 +33,16 @@ module Guard
32
33
  def start
33
34
  # required user having xctool to start
34
35
  unless system("which #{xctool}")
35
- UI.info "xctool not found, please specify :xctool_command option"
36
+ UI.error "xctool not found, please specify :xctool_command option"
36
37
  throw :task_has_failed
37
38
  end
38
39
 
39
40
  unless test_target
40
- UI.info "Cannot find test target, please specify :test_target option"
41
+ UI.error "Cannot find test target, please specify :test_target option"
41
42
  throw :task_has_failed
42
43
  end
44
+
45
+ run_all if all_on_start
43
46
  end
44
47
 
45
48
  # Called when just `enter` is pressed
@@ -71,7 +74,9 @@ module Guard
71
74
  commands << xctool
72
75
  commands << cli if cli && cli.strip != ""
73
76
  commands << command
74
- system(commands.join(" "))
77
+ unless passe = system(commands.join(" "))
78
+ throw :task_has_failed
79
+ end
75
80
  end
76
81
  end
77
82
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module XctoolTestVersion
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-xctool-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Chong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-14 00:00:00.000000000 Z
11
+ date: 2013-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 2.0.3
125
+ rubygems_version: 2.0.0
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Xctool test guard allows you to automically & intelligently aunch specs when