mobile_deploy 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d222aa51739d06a41e8402f8ab3af486f77fc8d2
4
+ data.tar.gz: defa1c93658af754e220f8b208dff9dcd073d18e
5
+ SHA512:
6
+ metadata.gz: a70adb97f92a862dda7cd2765e707d0d020ccbea118e457342cb9bd2d152dd0f7269d89ec63ed3b0170772b28f61e022d50ba458695015165336835d31b6ff8a
7
+ data.tar.gz: 295a14c877b8a9719a72ca04b18efc90faf0f538ef5524f21e3d3ce5a3e5605f27686bfc5f352081b53b47d6a5ae029a6199dfe23b34a9b745ac77f8ea693289
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ require 'AndroidDeploy'
3
+
4
+ n = AndroidDeploy.new
5
+ if (ARGV.size < 1)
6
+ puts "Try deploy_android yourfilename.apk"
7
+ else
8
+ n.install_pkg_all_devices(ARGV[0])
9
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ require 'IOSDeploy'
3
+
4
+ n = IOSDeploy.new
5
+ if (ARGV.size < 1)
6
+ puts "Try deploy_ios yourfilename.app"
7
+ else
8
+ n.install_to_all_devices(ARGV[0])
9
+ end
@@ -0,0 +1,31 @@
1
+ class AndroidDeploy
2
+
3
+ def initialize
4
+ init = `which adb`
5
+ puts "Missing adb" if init.length < 1
6
+ end
7
+
8
+ def connected_devices
9
+ devices = []
10
+ stdout = `adb devices`
11
+ line = stdout.split("\n")
12
+ (1..line.length-1).each do |n|
13
+ devices << line[n].split(" ")[0]
14
+ end
15
+ devices
16
+ end
17
+
18
+ def install_pkg_all_devices(filename)
19
+ devices = connected_devices
20
+ puts "Installing"
21
+ devices.each do |d|
22
+ install_apk(d, filename)
23
+ end
24
+ end
25
+
26
+ def install_apk(device, filename)
27
+ puts "Device Name : #{device}"
28
+ `adb -s #{device} install #{filename}`
29
+ end
30
+
31
+ end
@@ -0,0 +1,27 @@
1
+ class IOSDeploy
2
+
3
+ def initialize
4
+ init = `which ios-deploy`
5
+ puts "Missing ios-deploy" if init.length < 1
6
+ end
7
+
8
+ def connected_devices
9
+ devices = []
10
+ stdout = `system_profiler SPUSBDataType | sed -n -E -e '/(iPhone|iPad)/,/Serial/s/ *Serial Number: *(.+)/\\1/p'`
11
+ stdout.split("\n")
12
+ end
13
+
14
+ def install_to_all_devices(filename)
15
+ devices = connected_devices
16
+ puts "Installing"
17
+ devices.each do |d|
18
+ install_apk(d, filename)
19
+ end
20
+ end
21
+
22
+ def install_apk(device, filename)
23
+ puts "Device Name : #{device}"
24
+ puts `ios-deploy -i #{device} --bundle #{filename}`
25
+ end
26
+
27
+ end
metadata ADDED
@@ -0,0 +1,50 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mobile_deploy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ben Harrington
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: mobile_deploy is a gem that allows you to deploy your application to
14
+ multiple connected devices
15
+ email: ben@harringtonweb.com
16
+ executables:
17
+ - deploy_ios
18
+ - deploy_android
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - bin/deploy_android
23
+ - bin/deploy_ios
24
+ - lib/AndroidDeploy.rb
25
+ - lib/IOSDeploy.rb
26
+ homepage: https://github.com/blh0021/mobile_deploy
27
+ licenses:
28
+ - MIT
29
+ metadata: {}
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubyforge_project:
46
+ rubygems_version: 2.2.0
47
+ signing_key:
48
+ specification_version: 4
49
+ summary: Mobile Application Deployment Gem
50
+ test_files: []