hawk 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hawk.gemspec +1 -0
- data/lib/hawk/builder.rb +12 -0
- data/lib/hawk/notifier.rb +0 -8
- data/lib/hawk/s3_uploader.rb +14 -0
- data/lib/hawk/version.rb +1 -1
- data/templates/Hawkfile +1 -1
- data/templates/install.html.erb +14 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f562f1efa781a2915077f3320b1ac772af68dde9
|
4
|
+
data.tar.gz: c3e22fa5894b5d47575cbf79245be03ecec10e93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a40f23d268f4a9ddaa487df69865dc653c7af53234e54bc0a513d9c94883e3f36cc83208194b0f20251bf52ff36bc84772390a5a8d28519d7b025c20c45f9e8
|
7
|
+
data.tar.gz: 6999b7c2245beb91bc0fbc631ca437aa0b17c32d8d4151fbe19d1307616e2e71bd9484d8cf2a9a826c4c8ee0764fde74241a4a1d54534c37b8f09af3b6746ea6
|
data/hawk.gemspec
CHANGED
data/lib/hawk/builder.rb
CHANGED
@@ -64,6 +64,18 @@ module Hawk
|
|
64
64
|
ERB.new(File.read(File.join(File.dirname(__FILE__), '..', '..', 'templates', 'manifest.plist.erb'))).result(binding)
|
65
65
|
end
|
66
66
|
|
67
|
+
def itms_url
|
68
|
+
"itms-services://?#{URI.encode_www_form(:action => "download-manifest", :url => plist_url)}"
|
69
|
+
end
|
70
|
+
|
71
|
+
def escaped_ipa_url
|
72
|
+
CGI.escapeHTML(ipa_url)
|
73
|
+
end
|
74
|
+
|
75
|
+
def build_webpage
|
76
|
+
ERB.new(File.read(File.join(File.dirname(__FILE__), '..', '..', 'templates', 'install.html.erb'))).result(binding)
|
77
|
+
end
|
78
|
+
|
67
79
|
private
|
68
80
|
|
69
81
|
def app_file
|
data/lib/hawk/notifier.rb
CHANGED
@@ -18,14 +18,6 @@ module Hawk
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def itms_url
|
22
|
-
"itms-services://?#{URI.encode_www_form(:action => "download-manifest", :url => plist_url)}"
|
23
|
-
end
|
24
|
-
|
25
|
-
def escaped_ipa_url
|
26
|
-
CGI.escapeHTML(ipa_url)
|
27
|
-
end
|
28
|
-
|
29
21
|
def notify_users
|
30
22
|
subject = URI.encode(ERB.new(@email_subject).result(binding)).gsub('?','%3F').gsub('&','%26')
|
31
23
|
body = URI.encode(ERB.new(@email_body).result(binding)).gsub('?','%3F').gsub('&','%26')
|
data/lib/hawk/s3_uploader.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'aws/s3'
|
2
|
+
require 'googl'
|
2
3
|
|
3
4
|
module Hawk
|
4
5
|
module S3Uploader
|
@@ -44,6 +45,19 @@ module Hawk
|
|
44
45
|
@plist_url
|
45
46
|
end
|
46
47
|
|
48
|
+
def webpage_url
|
49
|
+
if (!@webpage_url)
|
50
|
+
@webpage_url = object('install.html') do |obj|
|
51
|
+
webpage_data = build_webpage
|
52
|
+
print 'Uploading install page to S3...'
|
53
|
+
obj.write(webpage_data, :content_type => 'text/html')
|
54
|
+
puts 'done'
|
55
|
+
end
|
56
|
+
@webpage_url = Googl.shorten(@webpage_url).short_url
|
57
|
+
end
|
58
|
+
@webpage_url
|
59
|
+
end
|
60
|
+
|
47
61
|
private
|
48
62
|
|
49
63
|
def object(name, &block)
|
data/lib/hawk/version.rb
CHANGED
data/templates/Hawkfile
CHANGED
@@ -70,7 +70,7 @@ email_body <<EOF
|
|
70
70
|
A new build of <%= app_name %> is ready to install. Click the followling link
|
71
71
|
on your iOS device to install it:
|
72
72
|
|
73
|
-
<%=
|
73
|
+
<%= webpage_url %>
|
74
74
|
|
75
75
|
Please reference '<%= repo_version %>' in any bug reports to help us out.
|
76
76
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html lang="en-US">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<meta http-equiv="refresh" content="1;url=<%= itms_url %>">
|
6
|
+
<script type="text/javascript">
|
7
|
+
window.location.href = "<%= itms_url %>"
|
8
|
+
</script>
|
9
|
+
<title>hawk</title>
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
If you are not redirected automatically, tap <a href='<%= itms_url %>'>here</a>
|
13
|
+
</body>
|
14
|
+
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hawk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.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-
|
11
|
+
date: 2014-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: googl
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: A simple iOS ad-hoc distribution tool
|
42
56
|
email:
|
43
57
|
- mat@geeky.net
|
@@ -64,6 +78,7 @@ files:
|
|
64
78
|
- lib/hawk/s3_uploader.rb
|
65
79
|
- lib/hawk/version.rb
|
66
80
|
- templates/Hawkfile
|
81
|
+
- templates/install.html.erb
|
67
82
|
- templates/manifest.plist.erb
|
68
83
|
homepage: http://github.com/mtrudel/hawk
|
69
84
|
licenses: []
|