hawk 1.1.2 → 1.2.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: eeb0b816ded0b6ce8152cfe057e0b1113b7b0c28
4
- data.tar.gz: bbcce06ee063840a563a6012ecb59b1f964c9d22
3
+ metadata.gz: ab3deafc194337b349ad8c93571940218715418c
4
+ data.tar.gz: fab353ca3ce2398d263d84536b05f7ef47a93e98
5
5
  SHA512:
6
- metadata.gz: 0ff8d69b438feca59c5fdaf535ee8ffbfbd08893e77251ea93c3430b8aff0ddc52326a954bf86720aac9aeb1f1a5159295ceb9d7c3d13712a734ba5dd7c8e581
7
- data.tar.gz: 162c0e170100f9cd5e99d96b02dafe7d930ab3baaef34d369fafab43b885a365051389f05ab93b95058019afbb5166fe5368362be90e5fd37a4555ca51f1c1a1
6
+ metadata.gz: f90c1d27935237c955abbfc05eb48fce7a44fd82650ef1f47e779e4da7aa748ba05b478d2176d5f4432268c2719b57cb6354e4e9240d37a383c5942964004141
7
+ data.tar.gz: c06286c596b726884eab5860ca1b53836d3677068b012f3a5d643f6cde350183ac20b66fec45799077d0184c46d40b3a0a193050cf0038b25db7b6d79c6084f5
data/lib/hawk/builder.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'tmpdir'
2
+ require 'fileutils'
2
3
  require 'osx/plist'
3
4
 
4
5
  module Hawk
@@ -57,6 +58,7 @@ module Hawk
57
58
  end
58
59
  puts "done"
59
60
  end
61
+ FileUtils.copy(@ipa_file, Dir.pwd) if @options[:preserve_ipa]
60
62
  @ipa_file
61
63
  end
62
64
 
data/lib/hawk/cli.rb CHANGED
@@ -1,10 +1,41 @@
1
+ require 'optparse'
2
+
1
3
  module Hawk
2
4
  module CLI
5
+ module Options
6
+ def self.parse!(args)
7
+ options = {}
8
+ optparse = OptionParser.new do |opts|
9
+ opts.banner = "Usage: hawk [options]"
10
+
11
+ options[:preserve_ipa] = false
12
+ opts.on( '-p', '--preserve-ipa', 'Leave a copy of the .ipa file in the current directory' ) do
13
+ options[:preserve_ipa] = true
14
+ end
15
+
16
+ opts.on( '-h', '--help', 'Display this screen' ) do
17
+ puts opts
18
+ exit
19
+ end
20
+ end
21
+ begin
22
+ optparse.parse!(args)
23
+ rescue
24
+ puts $!
25
+ puts optparse
26
+ exit
27
+ end
28
+
29
+ options
30
+ end
31
+ end
32
+
3
33
  def self.run(args)
34
+ options = Options.parse!(ARGV)
4
35
  hawkfile = closest_hawkfile(Dir.pwd)
5
36
  if (hawkfile)
6
37
  Dir.chdir(File.dirname(hawkfile))
7
- Hawk::DSL.load(hawkfile)
38
+ Hawk::DSL.load(hawkfile, options)
8
39
  else
9
40
  puts "Cannot find hawkfile"
10
41
  end
data/lib/hawk/dsl.rb CHANGED
@@ -8,13 +8,17 @@ module Hawk
8
8
  include Hawk::S3Uploader::DSL
9
9
  include Hawk::Notifier::DSL
10
10
 
11
- def self.load(file)
12
- instance = self.new
11
+ def self.load(file, options)
12
+ instance = self.new(options)
13
13
  instance.instance_eval(File.read(file), file)
14
14
 
15
15
  instance.execute
16
16
  end
17
17
 
18
+ def initialize(opts = {})
19
+ @options = opts
20
+ end
21
+
18
22
  def execute
19
23
  extend Hawk::Builder
20
24
  extend Hawk::S3Uploader
data/lib/hawk/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hawk
2
- VERSION = "1.1.2"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hawk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Trudel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-25 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: osx-plist
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: googl
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: A simple iOS ad-hoc distribution tool
@@ -61,7 +61,7 @@ executables:
61
61
  extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
64
- - .gitignore
64
+ - ".gitignore"
65
65
  - Gemfile
66
66
  - LICENSE.txt
67
67
  - README.md
@@ -89,12 +89,12 @@ require_paths:
89
89
  - lib
90
90
  required_ruby_version: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - '>='
92
+ - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - '>='
97
+ - - ">="
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []