dryrun 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/lib/dryrun.rb +1 -1
- data/lib/dryrun/github.rb +19 -4
- data/lib/dryrun/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 103e1c06ee696ecdb3da241e0dcb406edc6cc38b
|
4
|
+
data.tar.gz: d370ecbb990cc9eb5f1b4b6325ecdc950b57fadc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90ed2eb595844cfea635adaf7fb6ddf65b5f51cf8cd158d55eb727f53cfe7c630f838672a043a832f15cfd5f63deb7f849fc583a4b12836d9fe55f413e124cfa
|
7
|
+
data.tar.gz: 344a4380aa0f371669835580f3e28a0868e768b7e906309ec5b881ccf2171e4e60cf7d019f4bfaf45e3724ae04509db30c0b925974bf91a3879c5b00979b8832
|
data/README.md
CHANGED
@@ -3,10 +3,8 @@
|
|
3
3
|
|
4
4
|
**Try** any **android library** hosted online **directly** from the **command line**
|
5
5
|
|
6
|
-
> A dry run is a testing process where the effects of a possible failure are intentionally mitigated. For example, an aerospace company may conduct a "dry run" test of a jet's new pilot ejection seat while the jet is parked on the ground, rather than while it is in flight.
|
7
|
-
|
8
6
|
<p align="center">
|
9
|
-
<img src="https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/
|
7
|
+
<img src="https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/usage_v3.gif" width="100%" />
|
10
8
|
</p>
|
11
9
|
|
12
10
|
## Usage
|
@@ -25,7 +23,7 @@ Options
|
|
25
23
|
-m, --module MODULE_NAME Custom module to run
|
26
24
|
-f, --flavour FLAVOUR Specifies the flavour (e.g. dev, qa, prod)
|
27
25
|
-p, --path PATH Custom path to android project
|
28
|
-
-t, --tag TAG Specifies a custom tag to clone (e.g. "v0.4.5", "6f7dd4b")
|
26
|
+
-t, --tag TAG Specifies a custom tag/commit hash to clone (e.g. "v0.4.5", "6f7dd4b")
|
29
27
|
-h, --help Displays help
|
30
28
|
-v, --version Displays version
|
31
29
|
```
|
data/lib/dryrun.rb
CHANGED
@@ -97,7 +97,7 @@ module DryRun
|
|
97
97
|
# clean and install the apk
|
98
98
|
android_project.install
|
99
99
|
|
100
|
-
puts "\n> If you want to remove the app you just installed, execute:\n#{android_project.get_uninstall_command.
|
100
|
+
puts "\n> If you want to remove the app you just installed, execute:\n#{android_project.get_uninstall_command.red}\n\n"
|
101
101
|
end
|
102
102
|
end
|
103
103
|
end
|
data/lib/dryrun/github.rb
CHANGED
@@ -50,13 +50,28 @@ module DryRun
|
|
50
50
|
clonable = self.clonable_url
|
51
51
|
|
52
52
|
tmpdir = Dir.tmpdir+"/dryrun/#{@destination}"
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
folder_exists = File.directory?(tmpdir)
|
54
|
+
|
55
|
+
if folder_exists
|
56
|
+
Dir.chdir tmpdir
|
57
|
+
is_git_repo = system("git rev-parse")
|
58
|
+
|
59
|
+
if !is_git_repo
|
60
|
+
FileUtils.rm_rf(tmpdir)
|
61
|
+
DryrunUtils.execute("git clone #{clonable} #{tmpdir}")
|
62
|
+
else
|
63
|
+
DryrunUtils.execute("git reset --hard HEAD")
|
64
|
+
DryrunUtils.execute("git checkout master")
|
65
|
+
DryrunUtils.execute("git pull origin master")
|
66
|
+
end
|
67
|
+
|
68
|
+
else
|
69
|
+
DryrunUtils.execute("git clone #{clonable} #{tmpdir}")
|
70
|
+
end
|
56
71
|
|
57
72
|
if tag
|
58
73
|
Dir.chdir tmpdir
|
59
|
-
DryrunUtils.execute("git checkout #{tag}
|
74
|
+
DryrunUtils.execute("git checkout #{tag}")
|
60
75
|
end
|
61
76
|
|
62
77
|
tmpdir
|
data/lib/dryrun/version.rb
CHANGED