guard-gradle 0.2.1 → 0.3.0

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: 624faea904104445bf71ee0d208a5f6fd140aa28
4
- data.tar.gz: 4e764223db021cd75b865d5eeb5d39a5f94770d6
3
+ metadata.gz: e2375d2d250302e9a6462d77e78859075603d914
4
+ data.tar.gz: 9685635149c0654588f5be5f12d46f775619dde7
5
5
  SHA512:
6
- metadata.gz: 95ad023c2f576e4b1445b4b30e74ae780aafd42f13b7d6016e25061464010ffd2381a53fcc2a477f9f4419a1ff272975c7f5467bf735d6b7d12dec618b825003
7
- data.tar.gz: 669bcc72692f1fcee889c84e0ffcace5a837aa1a8dad68eaf5c90f5e9285d3f7b06fc20766487a0cddb07d97e17a9f275c3d13d52df7d7e7b857ed1e27e36b28
6
+ metadata.gz: 54274d938a34d1ab3753d294924f39d54ff2c35ac8edfcaaf70077891e12d4dfa2ae0f3083a4ccb2be063818291524873a4d848eb97e954e6b5314d2e1fc9203
7
+ data.tar.gz: c1fe46c6c4cfd7dbdebaabe2efa303f2f12a5730f4f3afd42580aaf509094eac67ed928179a3b59dfe69650878e01a243164f56673666e5243bdc5b4ac00342e
data/etc/installer.sh CHANGED
@@ -14,7 +14,7 @@ echo 'Now installing required Guard::Gradle'
14
14
  sleep 1
15
15
  bundle install --path vendor
16
16
 
17
- echo 'Initializing the Guard Nebula plugin'
17
+ echo 'Initializing the Guard Gradle plugin'
18
18
  sleep 1
19
19
  bundle exec guard init gradle
20
20
 
@@ -24,4 +24,13 @@ cat <<EOF > guard.sh
24
24
  bundle exec guard
25
25
  EOF
26
26
 
27
- chmod +x guard.sh
27
+ if [ -e '.git' ];
28
+ then
29
+ echo 'Updating .gitignore file'
30
+ echo 'vendor/' >> .gitignore
31
+ echo '.bundle/' >> .gitignore
32
+ fi
33
+
34
+ chmod +x guard.sh
35
+
36
+ sleep 1
data/lib/guard/gradle.rb CHANGED
@@ -7,8 +7,25 @@ module Guard
7
7
 
8
8
  DEF_CMD = './gradlew test'
9
9
 
10
+ @multi_projs = false
11
+
12
+ def initialize(options = {})
13
+ if options.has_key? :multi_projects
14
+ @multi_projs = options[:multi_projects]
15
+ end
16
+ super
17
+ end
18
+
10
19
  def run_on_changes(paths)
11
- if(paths.size == 1) && (Dir.glob("src/test/**/#{paths[0]}*").size > 0)
20
+ if paths.size == 1 && @multi_projs
21
+ project = paths[0].split('/')[0]
22
+ file = paths[0].split('/')[1]
23
+ if Dir.glob("#{project}/src/test/**/#{file}*").size > 0
24
+ fire_command("#{DEF_CMD} -p #{project} -Dtest.single=#{file} --daemon")
25
+ else
26
+ run_all
27
+ end
28
+ elsif(paths.size == 1) && (Dir.glob("src/test/**/#{paths[0]}*").size > 0)
12
29
  fire_command("#{DEF_CMD} -Dtest.single=#{paths[0]} --daemon")
13
30
  else
14
31
  run_all
@@ -20,6 +37,7 @@ module Guard
20
37
  end
21
38
 
22
39
  def fire_command(command)
40
+ UI.info "running #{command}"
23
41
  result = system command
24
42
  summary = result ? 'Success' : 'Failure'
25
43
  image = result ? :success : :failed
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module GradleVersion
3
- VERSION = '0.2.1'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-gradle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Ricker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-05 00:00:00.000000000 Z
12
+ date: 2014-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard