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 +4 -4
- data/etc/installer.sh +11 -2
- data/lib/guard/gradle.rb +19 -1
- data/lib/guard/gradle/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2375d2d250302e9a6462d77e78859075603d914
|
4
|
+
data.tar.gz: 9685635149c0654588f5be5f12d46f775619dde7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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
|
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
|
data/lib/guard/gradle/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|