motion-hockeyapp 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +65 -15
- data/lib/motion/project/hockeyapp.rb +7 -38
- data/lib/motion/project/launcher-deviceid.rb +11 -0
- data/lib/motion/project/launcher.rb +15 -0
- metadata +9 -9
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d1fd3d2c8e038be9d81ea45dd7f5ec4660a703f2
|
4
|
+
data.tar.gz: 4d68a99138b4766d901d1a01bbf2d91323af91dc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8834c0493448920b94cd856e5d8b4bbdc1620ad967c069489b14cfa12d9ad329f115742678e7a031c797ecb2721f26bb4fdee726daceadc99771e2475880741a
|
7
|
+
data.tar.gz: 646f411c6dc4c3510bc9ecadb5d180dec82aba5cc9883bfcaca6c92431bde004a47256f6b70036c02461d25642921660e16e73f5f41a40a1cab84426578a5074
|
data/README.rdoc
CHANGED
@@ -17,23 +17,21 @@ and be submitted to the HockeyApp platform.
|
|
17
17
|
|
18
18
|
Motion::Project::App.setup do |app|
|
19
19
|
# ...
|
20
|
-
app.
|
21
|
-
|
22
|
-
|
23
|
-
set :live_id, '90a35939241bd75d785e152d37aeb25b'
|
24
|
-
set :status, "2"
|
25
|
-
set :notify, "0"
|
26
|
-
set :notes_type, "1"
|
27
|
-
end
|
20
|
+
# app.development do
|
21
|
+
# app.identifier = 'com.your.App.dev'
|
22
|
+
# end
|
28
23
|
# ...
|
29
|
-
app.
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
24
|
+
if app.hockeyapp?
|
25
|
+
app.hockeyapp do
|
26
|
+
set :api_token, '2fc2d1b97ef24ec38a70a721c65956e2'
|
27
|
+
set :beta_id, '83be1abdfb3acd29c0e012a644e71b7d'
|
28
|
+
set :live_id, '90a35939241bd75d785e152d37aeb25b'
|
29
|
+
set :status, "2"
|
30
|
+
set :notify, "0"
|
31
|
+
set :notes_type, "1"
|
36
32
|
end
|
33
|
+
# optional: do other config changes when in hockeyapp mode
|
34
|
+
# app.identifier = 'com.your.App.hockeyapp'
|
37
35
|
end
|
38
36
|
# ...
|
39
37
|
end
|
@@ -41,12 +39,64 @@ and be submitted to the HockeyApp platform.
|
|
41
39
|
You can retrieve the values in your HockeyApp account page.
|
42
40
|
Refer to http://support.hockeyapp.net/kb/api/api-upload-new-apps for Upload API options.
|
43
41
|
|
42
|
+
in app_delegate.rb :
|
43
|
+
|
44
|
+
def application(application, didFinishLaunchingWithOptions:launchOptions)
|
45
|
+
# ...
|
46
|
+
BITHockeyManagerLauncher.new.start
|
47
|
+
# ...
|
48
|
+
end
|
49
|
+
|
50
|
+
or, more advanced...
|
51
|
+
|
52
|
+
def application(application, didFinishLaunchingWithOptions:launchOptions)
|
53
|
+
# ...
|
54
|
+
if BITHockeyManagerLauncher.new.start { # execute this code before 'BITHockeyManager.sharedHockeyManager.startManager' is called }
|
55
|
+
if BITHockeyManager.sharedHockeyManager.crashManager.didCrashInLastSession
|
56
|
+
# maybe you need to do some cleanup after a crash
|
57
|
+
end
|
58
|
+
end
|
59
|
+
# ...
|
60
|
+
end
|
61
|
+
|
62
|
+
if you want to implement the BITCrashManagerDelegate, create a file opening the BITHockeyManagerLauncher
|
63
|
+
class and add your delegate methods. for example:
|
64
|
+
|
65
|
+
class BITHockeyManagerLauncher
|
66
|
+
|
67
|
+
def applicationLogForCrashManager(crashManager)
|
68
|
+
# ...
|
69
|
+
end
|
70
|
+
|
71
|
+
def shouldUseLiveIdentifierForHockeyManager(hockeyManager)
|
72
|
+
# ...
|
73
|
+
end
|
74
|
+
|
75
|
+
def userIDForHockeyManager(hockeyManager, componentManager:componentManager)
|
76
|
+
# ...
|
77
|
+
end
|
78
|
+
|
79
|
+
def userNameForHockeyManager(hockeyManager, componentManager:componentManager)
|
80
|
+
# ...
|
81
|
+
end
|
82
|
+
|
83
|
+
def userEmailForHockeyManager(hockeyManager, componentManager:componentManager)
|
84
|
+
# ...
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
|
44
90
|
== Usage
|
45
91
|
|
46
92
|
motion-hockeyapp introduces a +hockeyapp+ Rake task to your project, which can be used to submit a development build. The +notes+ parameter may be provided, and its content will be used as the submission release notes.
|
47
93
|
|
48
94
|
$ rake hockeyapp notes="zomg!"
|
49
95
|
|
96
|
+
or build in hockeyapp mode and try to deploy it to your device, but skip uploading it to hockeyapp:
|
97
|
+
|
98
|
+
$ rake hockeyapp:build
|
99
|
+
|
50
100
|
== License
|
51
101
|
|
52
102
|
Copyright (c) 2012, Joe Noon <joenoon@gmail.com>
|
@@ -45,45 +45,7 @@ class HockeyAppConfig
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def configure!
|
48
|
-
customDeviceIdentifierForUpdateManager = <<EOF
|
49
|
-
def customDeviceIdentifierForUpdateManager(updateManager)
|
50
|
-
if UIDevice.currentDevice.respond_to?('uniqueIdentifier')
|
51
|
-
UIDevice.currentDevice.uniqueIdentifier
|
52
|
-
else
|
53
|
-
nil
|
54
|
-
end
|
55
|
-
end
|
56
|
-
EOF
|
57
|
-
launcher_code = <<EOF
|
58
|
-
# This file is automatically generated. Do not edit.
|
59
|
-
|
60
|
-
if Object.const_defined?('BITHockeyManager') and !UIDevice.currentDevice.model.include?('Simulator')
|
61
|
-
class BITHockeyManagerLauncher
|
62
|
-
|
63
|
-
def start
|
64
|
-
(@plist = NSBundle.mainBundle.objectForInfoDictionaryKey('HockeySDK')) && (@plist = @plist.first)
|
65
|
-
return unless @plist
|
66
|
-
NSNotificationCenter.defaultCenter.addObserverForName(UIApplicationDidFinishLaunchingNotification, object:nil, queue:nil, usingBlock:lambda do |notification|
|
67
|
-
BITHockeyManager.sharedHockeyManager.configureWithBetaIdentifier(@plist['beta_id'], liveIdentifier:@plist['live_id'], delegate:self)
|
68
|
-
BITHockeyManager.sharedHockeyManager.crashManager.crashManagerStatus = BITCrashManagerStatusAutoSend
|
69
|
-
BITHockeyManager.sharedHockeyManager.startManager
|
70
|
-
end)
|
71
|
-
end
|
72
|
-
|
73
|
-
#{@config.release? ? "" : customDeviceIdentifierForUpdateManager}
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
BITHockeyManagerLauncher.new.start
|
78
|
-
end
|
79
|
-
EOF
|
80
|
-
launcher_file = './hockeyapp/launcher.rb'
|
81
|
-
FileUtils.mkdir_p('hockeyapp')
|
82
|
-
if !File.exist?(launcher_file) or File.read(launcher_file) != launcher_code
|
83
|
-
File.open(launcher_file, 'w') { |io| io.write(launcher_code) }
|
84
|
-
end
|
85
48
|
@configured ||= begin
|
86
|
-
@config.files << launcher_file
|
87
49
|
@config.vendor_project('vendor/HockeySDK/HockeySDK.framework', :static, products: ['HockeySDK'], headers_dir: 'Headers')
|
88
50
|
@config.resources_dirs += [ './vendor/HockeySDK/Resources' ]
|
89
51
|
@config.frameworks += [ 'HockeySDK' ]
|
@@ -112,6 +74,13 @@ module Motion; module Project; class Config
|
|
112
74
|
|
113
75
|
end; end; end
|
114
76
|
|
77
|
+
Motion::Project::App.setup do |app|
|
78
|
+
if Motion::Project::App.config_mode == :development
|
79
|
+
app.files.unshift(File.join(File.dirname(__FILE__), "launcher-deviceid.rb"))
|
80
|
+
end
|
81
|
+
app.files.unshift(File.join(File.dirname(__FILE__), "launcher.rb"))
|
82
|
+
end
|
83
|
+
|
115
84
|
namespace 'hockeyapp' do
|
116
85
|
desc "Submit an archive to HockeyApp"
|
117
86
|
task :submit do
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class BITHockeyManagerLauncher
|
2
|
+
|
3
|
+
def start(&block)
|
4
|
+
return if !Object.const_defined?('BITHockeyManager') || UIDevice.currentDevice.model.include?('Simulator')
|
5
|
+
(@plist = NSBundle.mainBundle.objectForInfoDictionaryKey('HockeySDK')) && (@plist = @plist.first)
|
6
|
+
return unless @plist
|
7
|
+
BITHockeyManager.sharedHockeyManager.configureWithBetaIdentifier(@plist['beta_id'], liveIdentifier:@plist['live_id'], delegate:self)
|
8
|
+
|
9
|
+
BITHockeyManager.sharedHockeyManager.crashManager.crashManagerStatus = ::BITCrashManagerStatusAutoSend
|
10
|
+
block.call if !block.nil?
|
11
|
+
BITHockeyManager.sharedHockeyManager.startManager
|
12
|
+
true
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-hockeyapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Joe Noon
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-13 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: motion-hockeyapp allows RubyMotion projects to easily embed the Hockey
|
15
14
|
SDK and be submitted to the HockeyApp platform.
|
@@ -21,29 +20,30 @@ files:
|
|
21
20
|
- README.rdoc
|
22
21
|
- LICENSE
|
23
22
|
- lib/motion/project/hockeyapp.rb
|
23
|
+
- lib/motion/project/launcher-deviceid.rb
|
24
|
+
- lib/motion/project/launcher.rb
|
24
25
|
- lib/motion-hockeyapp.rb
|
25
26
|
homepage: http://www.rubymotion.com
|
26
27
|
licenses: []
|
28
|
+
metadata: {}
|
27
29
|
post_install_message:
|
28
30
|
rdoc_options: []
|
29
31
|
require_paths:
|
30
32
|
- lib
|
31
33
|
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
-
none: false
|
33
34
|
requirements:
|
34
|
-
- -
|
35
|
+
- - '>='
|
35
36
|
- !ruby/object:Gem::Version
|
36
37
|
version: '0'
|
37
38
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
-
none: false
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - '>='
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
44
|
rubyforge_project:
|
45
|
-
rubygems_version:
|
45
|
+
rubygems_version: 2.0.3
|
46
46
|
signing_key:
|
47
|
-
specification_version:
|
47
|
+
specification_version: 4
|
48
48
|
summary: HockeyApp integration for RubyMotion projects
|
49
49
|
test_files: []
|