motion-hockeyapp 1.1.7 → 1.2.1

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: 005b00b8848add29eb84afe79a9297a55f8bd215
4
- data.tar.gz: 9b9e7b6f905a2a5aa82942ca9f9bdabba2d905a6
3
+ metadata.gz: a215e44d85b908b3f2e66ca9bf0666887d8945be
4
+ data.tar.gz: a4f5be68587ce747f9e10d6aa9c73c9bbe542424
5
5
  SHA512:
6
- metadata.gz: 8d00f8cd303548cd6eccdb9a35af5238e806a71890e146d8fc5a8ad4c80e91c89eaa1f68acea8be0b3f05051c47791f2254adad5cb3e3a37338b776221397b3a
7
- data.tar.gz: edb53960406a00cc0f6bbda88d2b1f3300f2a23979e59d746cb4c6ff7b2f10c1796e4a15f62490946e490c5d04a9910a217d7c65a9c48fe7450e21b436931609
6
+ metadata.gz: 54aa40fa4fe81ab2dd08b50917d580a17c856ab57af1f2c87b40b8addd6f2c3eae6305dc360222434d105ea1762d5fa3a5b8e39e51a33d82950cad9e6d7d9b51
7
+ data.tar.gz: dbeb8fb5a6516cef8e2707cee88e7b3ea48395ad607c6b5bfb351357f5d2883474f0cb57472dba457f74c2181194e61c745d3334e9b994d603fdfc22266a3f6b
@@ -7,12 +7,6 @@ and be submitted to the HockeyApp platform.
7
7
 
8
8
  gem 'motion-hockeyapp'
9
9
 
10
- unzip the HockeySDK into vendor so you end up with exactly the following directory structure:
11
-
12
- vendor/HockeySDK/HockeySDK.framework
13
- vendor/HockeySDK/Resources
14
-
15
-
16
10
  == Setup
17
11
 
18
12
  Motion::Project::App.setup do |app|
@@ -22,4 +22,5 @@
22
22
  # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23
23
  # POSSIBILITY OF SUCH DAMAGE.
24
24
 
25
+ require 'motion-cocoapods'
25
26
  require 'motion/project/hockeyapp'
@@ -44,37 +44,46 @@ class HockeyAppConfig
44
44
  {:api_token => api_token, :beta_id => beta_id, :live_id => live_id, :status => status, :notify => notify, :notes_type => notes_type}.inspect
45
45
  end
46
46
 
47
- def configure!
48
- @configured ||= begin
49
- @config.vendor_project('vendor/HockeySDK/HockeySDK.framework', :static, products: ['HockeySDK'], headers_dir: 'Headers')
50
- @config.resources_dirs += [ './vendor/HockeySDK/Resources' ]
51
- @config.frameworks += [ 'HockeySDK' ]
52
- true
53
- end
54
- end
55
-
56
47
  end
57
48
 
58
- module Motion; module Project; class Config
49
+ module Motion
50
+ module Project
51
+ class Config
52
+
53
+ attr_accessor :hockeyapp_mode
59
54
 
60
- attr_accessor :hockeyapp_mode
55
+ variable :hockeyapp
61
56
 
62
- variable :hockeyapp
57
+ def hockeyapp(&block)
58
+ @hockeyapp ||= HockeyAppConfig.new(self)
59
+ @hockeyapp.instance_eval(&block) unless block.nil?
60
+ @hockeyapp
61
+ end
62
+
63
+ def hockeyapp?
64
+ @hockeyapp_mode == true
65
+ end
63
66
 
64
- def hockeyapp(&block)
65
- @hockeyapp ||= HockeyAppConfig.new(self)
66
- @hockeyapp.instance_eval(&block) unless block.nil?
67
- @hockeyapp.configure!
68
- @hockeyapp
67
+ end
69
68
  end
69
+ end
70
+
71
+ Motion::Project::App.setup do |app|
70
72
 
71
- def hockeyapp?
72
- @hockeyapp_mode == true
73
+ app.pods do
74
+ if app.deploy_platform == 'MacOSX'
75
+ pod 'HockeySDK-Mac', '~> 2.1'
76
+ else
77
+ pod "HockeySDK", "~> 3.5"
78
+ end
73
79
  end
74
80
 
75
- end; end; end
81
+ Dir.glob(File.join(File.dirname(__FILE__), '**/*.rb')).each do |file|
82
+ if app.respond_to?("exclude_from_detect_dependencies")
83
+ app.exclude_from_detect_dependencies << file
84
+ end
85
+ end
76
86
 
77
- Motion::Project::App.setup do |app|
78
87
  app.files.push(File.join(File.dirname(__FILE__), "launcher.rb"))
79
88
  end
80
89
 
@@ -89,13 +98,14 @@ namespace 'hockeyapp' do
89
98
 
90
99
  App.fail "A value for app.hockeyapp.api_token is mandatory" unless prefs.api_token
91
100
 
92
- Rake::Task["archive"].invoke
101
+ Rake::Task[App.config_mode == :release ? "archive:distribution" : "archive"].invoke
102
+ platform = App.config.deploy_platform
93
103
 
94
104
  # An archived version of the .dSYM bundle is needed.
95
105
  app_dsym = if App.config.respond_to?(:app_bundle_dsym)
96
- App.config.app_bundle_dsym('iPhoneOS')
106
+ App.config.app_bundle_dsym(platform)
97
107
  else
98
- App.config.app_bundle('iPhoneOS').sub(/\.app$/, '.dSYM')
108
+ App.config.app_bundle(platform).sub(/\.app$/, '.dSYM')
99
109
  end
100
110
  app_dsym_zip = app_dsym + '.zip'
101
111
  if !File.exist?(app_dsym_zip) or File.mtime(app_dsym) > File.mtime(app_dsym_zip)
@@ -129,7 +139,7 @@ namespace 'hockeyapp' do
129
139
  task :record_mode do
130
140
  hockeyapp_mode = App.config_without_setup.hockeyapp_mode ? "True" : "False"
131
141
 
132
- platform = 'iPhoneOS'
142
+ platform = App.config.deploy_platform
133
143
  bundle_path = App.config.app_bundle(platform)
134
144
  build_dir = File.join(App.config.versionized_build_dir(platform))
135
145
  FileUtils.mkdir_p(build_dir)
@@ -5,11 +5,18 @@ class BITHockeyManagerLauncher
5
5
  BITCrashManagerStatusAutoSend = 2
6
6
 
7
7
  def start(&block)
8
- return if !Object.const_defined?('BITHockeyManager') || UIDevice.currentDevice.model.include?('Simulator')
8
+ return if !Object.const_defined?('BITHockeyManager') || (Kernel.const_defined?(:UIApplication) && UIDevice.currentDevice.model.include?('Simulator'))
9
9
  (@plist = NSBundle.mainBundle.objectForInfoDictionaryKey('HockeySDK')) && (@plist = @plist.first)
10
10
  return unless @plist
11
- BITHockeyManager.sharedHockeyManager.configureWithBetaIdentifier(@plist['beta_id'], liveIdentifier:@plist['live_id'], delegate:self)
12
- BITHockeyManager.sharedHockeyManager.crashManager.crashManagerStatus = BITCrashManagerStatusAutoSend
11
+ #Retain self since BITHockeyManager keeps a weak reference and app code typically don't retain the BITHockeyManagerLauncher instance. No worry about memory leak since this instance should last for the duration of the app's lifetime.
12
+ self.retain
13
+ if BITHockeyManager.sharedHockeyManager.respond_to? 'configureWithBetaIdentifier:liveIdentifier:delegate:'
14
+ BITHockeyManager.sharedHockeyManager.configureWithBetaIdentifier(@plist['beta_id'], liveIdentifier:@plist['live_id'], delegate:self)
15
+ BITHockeyManager.sharedHockeyManager.crashManager.crashManagerStatus = BITCrashManagerStatusAutoSend
16
+ else
17
+ BITHockeyManager.sharedHockeyManager.configureWithIdentifier(@plist['beta_id'], delegate:self)
18
+ BITHockeyManager.sharedHockeyManager.crashManager.autoSubmitCrashReport = true
19
+ end
13
20
  block.call if !block.nil?
14
21
  BITHockeyManager.sharedHockeyManager.startManager
15
22
  true
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-hockeyapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Noon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-20 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2014-09-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: motion-cocoapods
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.4.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.4.1
13
27
  description: motion-hockeyapp allows RubyMotion projects to easily embed the Hockey
14
28
  SDK and be submitted to the HockeyApp platform.
15
29
  email: joenoon@gmail.com