dryrun 0.5.6 → 0.5.7
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 -1
- data/lib/dryrun.rb +9 -4
- data/lib/dryrun/android_project.rb +1 -0
- data/lib/dryrun/github.rb +6 -1
- data/lib/dryrun/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: 3bf2583a4eb91ffe822b62c53228541ae74c578c
|
4
|
+
data.tar.gz: 1cb504c8a1be9c27e221650d3127c5ecbcaa2c36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 423c7eb608aec7c7ff3fc38c86ff1d88214e3f2c6bdc99b7f403ce8a47770f1c4537acf63cca891406a6430ed3644a8e0b51e4e99d25b847c6b73b0ed3d738f0
|
7
|
+
data.tar.gz: b736cc9d989da85da18aa81696ccfa8dc965f7c426673e95d0d0b1aedff6af0af226a252f8b2b1789f72034268be6711a0cd933bfcb3841b50254dc2c93813e4
|
data/README.md
CHANGED
@@ -19,12 +19,13 @@ Wait a few seconds and the app is now opened on your phone :smiley:
|
|
19
19
|
### Advanced usage
|
20
20
|
```bash
|
21
21
|
$ dryrun -h
|
22
|
-
Usage: dryrun
|
22
|
+
Usage: dryrun GIT_URL [OPTIONS]
|
23
23
|
|
24
24
|
Options
|
25
25
|
-m, --module MODULE_NAME Custom module to run
|
26
26
|
-f, --flavour FLAVOUR Specifies the flavour (e.g. dev, qa, prod)
|
27
27
|
-p, --path PATH Custom path to android project
|
28
|
+
-t, --tag TAG Specifies a custom tag to clone (e.g. "v0.4.5", "6f7dd4b")
|
28
29
|
-h, --help Displays help
|
29
30
|
-v, --version Displays version
|
30
31
|
```
|
data/lib/dryrun.rb
CHANGED
@@ -16,6 +16,7 @@ module DryRun
|
|
16
16
|
@app_path = nil
|
17
17
|
@custom_module = nil
|
18
18
|
@flavour = ''
|
19
|
+
@tag = nil
|
19
20
|
|
20
21
|
# Parse Options
|
21
22
|
arguments.push "-h" unless @url
|
@@ -24,7 +25,7 @@ module DryRun
|
|
24
25
|
|
25
26
|
def create_options_parser(args)
|
26
27
|
args.options do |opts|
|
27
|
-
opts.banner = "Usage: dryrun
|
28
|
+
opts.banner = "Usage: dryrun GIT_URL [OPTIONS]"
|
28
29
|
opts.separator ''
|
29
30
|
opts.separator "Options"
|
30
31
|
|
@@ -40,12 +41,16 @@ module DryRun
|
|
40
41
|
@app_path = app_path
|
41
42
|
end
|
42
43
|
|
44
|
+
opts.on('-t TAG', '--tag TAG', 'Specifies a custom tag/commit hash to clone (e.g. "v0.4.5", "6f7dd4b")') do |tag|
|
45
|
+
@tag = tag
|
46
|
+
end
|
47
|
+
|
43
48
|
opts.on('-h', '--help', 'Displays help') do
|
44
49
|
puts opts.help
|
45
50
|
exit
|
46
51
|
end
|
47
52
|
|
48
|
-
opts.on('-v', '--version', 'Displays version') do
|
53
|
+
opts.on('-v', '--version', 'Displays the version') do
|
49
54
|
puts DryRun::VERSION
|
50
55
|
exit
|
51
56
|
end
|
@@ -71,12 +76,12 @@ module DryRun
|
|
71
76
|
github = Github.new(@url)
|
72
77
|
|
73
78
|
unless github.is_valid
|
74
|
-
puts "#{@url.red} is not a valid
|
79
|
+
puts "#{@url.red} is not a valid git @url"
|
75
80
|
exit 1
|
76
81
|
end
|
77
82
|
|
78
83
|
# clone the repository
|
79
|
-
repository_path = github.clone
|
84
|
+
repository_path = github.clone @tag
|
80
85
|
|
81
86
|
android_project = AndroidProject.new(repository_path, @app_path, @custom_module, @flavour)
|
82
87
|
|
data/lib/dryrun/github.rb
CHANGED
@@ -46,7 +46,7 @@ module DryRun
|
|
46
46
|
##
|
47
47
|
## CLONE THE REPOSITORY
|
48
48
|
##
|
49
|
-
def clone
|
49
|
+
def clone(tag)
|
50
50
|
clonable = self.clonable_url
|
51
51
|
|
52
52
|
tmpdir = Dir.tmpdir+"/dryrun/#{@destination}"
|
@@ -54,6 +54,11 @@ module DryRun
|
|
54
54
|
|
55
55
|
DryrunUtils.execute("git clone #{clonable} #{tmpdir}")
|
56
56
|
|
57
|
+
if tag
|
58
|
+
Dir.chdir tmpdir
|
59
|
+
DryrunUtils.execute("git checkout #{tag} -b #{tag}")
|
60
|
+
end
|
61
|
+
|
57
62
|
tmpdir
|
58
63
|
end
|
59
64
|
|
data/lib/dryrun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryrun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cesar ferreira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|