hawk 0.2.0 → 1.0.0

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.
data/README.md CHANGED
@@ -2,28 +2,10 @@
2
2
 
3
3
  Hawk is a simple iOS ad-hoc distribution tool. Deployments are lightweight,
4
4
  backed by S3 storage (sourced from your own AWS account), and notifications of
5
- new builds happen via email. Beyond a couple of S3 buckets, the only moving
6
- parts to hawk are local on your machine. Hawk is a lightweight, low-friction way
5
+ new builds happen via email. Beyond an AWS account and an S3 bucket, the only moving
6
+ parts to hawk are on your machine. Hawk is a lightweight, low-friction way
7
7
  to make ad-hoc deploys easy.
8
8
 
9
- ## Status
10
-
11
- Hawk is alpha quality software at this point, although I'm rapidly working
12
- towards firming up a 1.0 release in the next few weeks (by mid Feb 2013). Some
13
- features that will be coming in the near future include
14
-
15
- ### Planned for 0.2
16
- * Automatic object expiry on S3 for .ipa and plist bundles
17
- * Support for Xcode workspace files
18
-
19
- ### Planned for 0.3
20
- * Automatic bucket name selection option
21
- * Tighter ACL support on uploaded files
22
-
23
- ### Planned for 0.4
24
- * UDID validation
25
- * Internal refactor
26
-
27
9
  ## Installation
28
10
 
29
11
  Install hawk on your machine by either running `gem install hawk`, or else by
data/lib/hawk/builder.rb CHANGED
@@ -64,10 +64,6 @@ 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://?action=download-manifest&url=#{plist_url}"
69
- end
70
-
71
67
  private
72
68
 
73
69
  def app_file
data/lib/hawk/notifier.rb CHANGED
@@ -1,13 +1,12 @@
1
1
  require 'uri'
2
+ require 'cgi'
2
3
 
3
4
  module Hawk
4
5
  module Notifier
5
6
  module DSL
6
7
  def user(user)
7
- puts "Warning: UDID check not implemented yet" if user.is_a? Hash
8
- user = { user => nil } unless (user.is_a? Hash)
9
- @users ||= {}
10
- @users.merge!(user)
8
+ @users ||= []
9
+ @users << user
11
10
  end
12
11
 
13
12
  def email_subject(subject)
@@ -19,10 +18,18 @@ module Hawk
19
18
  end
20
19
  end
21
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
+
22
29
  def notify_users
23
30
  subject = URI.encode(ERB.new(@email_subject).result(binding)).gsub('?','%3F').gsub('&','%26')
24
31
  body = URI.encode(ERB.new(@email_body).result(binding)).gsub('?','%3F').gsub('&','%26')
25
- `open "mailto:?bcc=#{@users.keys.join(',')}&subject=#{subject}&body=#{body}"`
32
+ `open "mailto:?bcc=#{@users.join(',')}&subject=#{subject}&body=#{body}"`
26
33
  end
27
34
  end
28
35
  end
@@ -25,7 +25,7 @@ module Hawk
25
25
  file = ipa_file
26
26
  @ipa_url = object(File.basename(file)) do |obj|
27
27
  print "Uploading #{File.basename(file)} to S3..."
28
- obj.write(Pathname.new(file))
28
+ obj.write(Pathname.new(file), :content_type => 'application/octet-stream')
29
29
  puts 'done'
30
30
  end
31
31
  end
@@ -58,8 +58,7 @@ module Hawk
58
58
  end
59
59
  obj = @bucket.objects["#{prefix}#{name}"]
60
60
  yield obj
61
- obj.acl = :public_read
62
- obj.public_url
61
+ obj.url_for(:read, :expires => 86400 * (@delete_after || 30)).to_s
63
62
  end
64
63
  end
65
64
  end
data/lib/hawk/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hawk
2
- VERSION = "0.2.0"
2
+ VERSION = "1.0.0"
3
3
  end
data/templates/Hawkfile CHANGED
@@ -25,6 +25,11 @@
25
25
  # AWS Credentials - used to upload your app and associated metadata into S3 so
26
26
  # that users can download and install your app
27
27
  #
28
+ # Note that if you don't want to check your key material into source control,
29
+ # you can erase the two access key lines from this file and set some environment
30
+ # variables instead. See http://amazon.rubyforge.org/doc/files/README.html for
31
+ # details. Note that the bucket name is always required
32
+ #
28
33
  #access_key_id 'AAAAAAAAAAAAAAAAAAAA'
29
34
  #secret_access_key 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
30
35
  #bucket_name 'mah-bukkit'
@@ -34,14 +39,11 @@
34
39
 
35
40
  #
36
41
  # User list - a list of users to send emails to upon successsful upload of a new
37
- # version of your app. Can be specified as simple email addresses, or optionally
38
- # as a hash with the value being the UDID of their device. Any specified UDIDs
39
- # will be checked against the built app, to verify that they are entitled to run
40
- # the app. Any failures will result in a warning being displayed
42
+ # version of your app. Specified one email address per line, to keep diffs sane
41
43
  #
42
44
  #user 'alice@example.com'
43
45
  #user 'bob@example.com'
44
- #user 'claire@example.com' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
46
+ #user 'claire@example.com'
45
47
 
46
48
  #
47
49
  # Notification settings - parameters describing the email to be sent out. This
@@ -11,7 +11,7 @@
11
11
  <key>kind</key>
12
12
  <string>software-package</string>
13
13
  <key>url</key>
14
- <string><%= ipa_url %></string>
14
+ <string><%= escaped_ipa_url %></string>
15
15
  </dict>
16
16
  </array>
17
17
  <key>metadata</key>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hawk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-13 00:00:00.000000000 Z
12
+ date: 2013-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk