dryrun 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc5f1d32dd2a7d259ad043ecde9a25fc5f0b7146
4
- data.tar.gz: 3384737896f649bc8619ad52e82da91b13fc2069
3
+ metadata.gz: 3bf2583a4eb91ffe822b62c53228541ae74c578c
4
+ data.tar.gz: 1cb504c8a1be9c27e221650d3127c5ecbcaa2c36
5
5
  SHA512:
6
- metadata.gz: d4ff45ec0e483640a4b9994575608b970e129e393f81daadd9542c312e80ca3e7797d6ccf16d5bcbbdf76f6adafa10c2d8319298d088957fbe9a52fd5e898cd1
7
- data.tar.gz: a192021cf82eb0670b42a99e50ebca1e55850b7a047ad985f3ca69abef137d5a8e9ac43d570434476b0b62334d571fa0361a3e440f6207169938de079cf35266
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 GITHUB_URL [OPTIONS]
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 GITHUB_URL [OPTIONS]"
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 github @url"
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
 
@@ -11,6 +11,7 @@ module DryRun
11
11
  @custom_module = custom_module
12
12
  @base_path = path
13
13
  @flavour = flavour
14
+
14
15
  @settings_gradle_path = settings_gradle_file
15
16
 
16
17
  check_custom_app_path
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
 
@@ -1,3 +1,3 @@
1
1
  module DryRun
2
- VERSION = '0.5.6'
2
+ VERSION = '0.5.7'
3
3
  end
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.6
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-03-10 00:00:00.000000000 Z
11
+ date: 2016-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake