platinum-deployer 0.1.5 → 0.2.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.
- checksums.yaml +4 -4
- data/Session.vim +14 -14
- data/bin/setup +5 -4
- data/exe/platinum +50 -13
- data/lib/platinum/deployer/version.rb +1 -1
- data/platinum_config.yml +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d0d85ca8429c25c38acf9e5cec8815fc5a5dc8f
|
4
|
+
data.tar.gz: aa14e5d97035d560d113cde8a75bf3819dbb41e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2d8cee0bffc726aa6a339c73c8c7f809d020bbb32ab1c3c5e0188b32e6d28f9eb9c2e96c9f011953ee5774b6600f0f30e3d76c8835263663254cea80b1cb477
|
7
|
+
data.tar.gz: 1dd6bf16051b57719236ab80a1f80095d30b15e40b3691295cb73326449e5f3d994d98f8a4b16ef9f0b7628b236f20bf11dceff1376999737ae091ce971af9f0
|
data/Session.vim
CHANGED
@@ -38,9 +38,9 @@ set nosplitright
|
|
38
38
|
wincmd t
|
39
39
|
set winheight=1 winwidth=1
|
40
40
|
exe '1resize ' . ((&lines * 19 + 30) / 60)
|
41
|
-
exe 'vert 1resize ' . ((&columns *
|
41
|
+
exe 'vert 1resize ' . ((&columns * 52 + 92) / 185)
|
42
42
|
exe '2resize ' . ((&lines * 19 + 30) / 60)
|
43
|
-
exe 'vert 2resize ' . ((&columns *
|
43
|
+
exe 'vert 2resize ' . ((&columns * 132 + 92) / 185)
|
44
44
|
exe '3resize ' . ((&lines * 18 + 30) / 60)
|
45
45
|
exe '4resize ' . ((&lines * 19 + 30) / 60)
|
46
46
|
argglobal
|
@@ -58,7 +58,7 @@ if s:l < 1 | let s:l = 1 | endif
|
|
58
58
|
exe s:l
|
59
59
|
normal! zt
|
60
60
|
3
|
61
|
-
normal!
|
61
|
+
normal! 018|
|
62
62
|
wincmd w
|
63
63
|
argglobal
|
64
64
|
edit bin/setup
|
@@ -71,12 +71,12 @@ setlocal fml=1
|
|
71
71
|
setlocal fdn=20
|
72
72
|
setlocal fen
|
73
73
|
silent! normal! zE
|
74
|
-
let s:l =
|
74
|
+
let s:l = 12 - ((6 * winheight(0) + 9) / 19)
|
75
75
|
if s:l < 1 | let s:l = 1 | endif
|
76
76
|
exe s:l
|
77
77
|
normal! zt
|
78
|
-
|
79
|
-
normal!
|
78
|
+
12
|
79
|
+
normal! 03|
|
80
80
|
wincmd w
|
81
81
|
argglobal
|
82
82
|
edit exe/platinum-ios-simulate.js
|
@@ -89,12 +89,12 @@ setlocal fml=1
|
|
89
89
|
setlocal fdn=20
|
90
90
|
setlocal fen
|
91
91
|
silent! normal! zE
|
92
|
-
let s:l =
|
92
|
+
let s:l = 35 - ((10 * winheight(0) + 9) / 18)
|
93
93
|
if s:l < 1 | let s:l = 1 | endif
|
94
94
|
exe s:l
|
95
95
|
normal! zt
|
96
|
-
|
97
|
-
normal!
|
96
|
+
35
|
97
|
+
normal! 011|
|
98
98
|
wincmd w
|
99
99
|
argglobal
|
100
100
|
edit exe/platinum
|
@@ -107,18 +107,18 @@ setlocal fml=1
|
|
107
107
|
setlocal fdn=20
|
108
108
|
setlocal fen
|
109
109
|
silent! normal! zE
|
110
|
-
let s:l =
|
110
|
+
let s:l = 413 - ((12 * winheight(0) + 9) / 19)
|
111
111
|
if s:l < 1 | let s:l = 1 | endif
|
112
112
|
exe s:l
|
113
113
|
normal! zt
|
114
|
-
|
115
|
-
normal!
|
114
|
+
413
|
115
|
+
normal! 049|
|
116
116
|
wincmd w
|
117
117
|
4wincmd w
|
118
118
|
exe '1resize ' . ((&lines * 19 + 30) / 60)
|
119
|
-
exe 'vert 1resize ' . ((&columns *
|
119
|
+
exe 'vert 1resize ' . ((&columns * 52 + 92) / 185)
|
120
120
|
exe '2resize ' . ((&lines * 19 + 30) / 60)
|
121
|
-
exe 'vert 2resize ' . ((&columns *
|
121
|
+
exe 'vert 2resize ' . ((&columns * 132 + 92) / 185)
|
122
122
|
exe '3resize ' . ((&lines * 18 + 30) / 60)
|
123
123
|
exe '4resize ' . ((&lines * 19 + 30) / 60)
|
124
124
|
tabnext 1
|
data/bin/setup
CHANGED
@@ -5,7 +5,8 @@ IFS=$'\n\t'
|
|
5
5
|
bundle install
|
6
6
|
|
7
7
|
# Do any other automated setup that you need to do here
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
8
|
+
# npm install -g titanium
|
9
|
+
# npm install -g alloy
|
10
|
+
# npm install -g ios-sim
|
11
|
+
# npm install -g ios-deploy
|
12
|
+
# npm install -g ioslib
|
data/exe/platinum
CHANGED
@@ -44,6 +44,7 @@ end
|
|
44
44
|
|
45
45
|
DEFAULT_OPTIONS = {
|
46
46
|
:app_name => 'CHANGEME',
|
47
|
+
# TODO: option for app root directory
|
47
48
|
:skip_compile => false,
|
48
49
|
:skip_build => false,
|
49
50
|
:titanium_command => {
|
@@ -244,6 +245,10 @@ OptionParser.new do |opts|
|
|
244
245
|
end
|
245
246
|
end.parse!
|
246
247
|
@options = parsed_options
|
248
|
+
if @options[:app_name] == 'CHANGEME'
|
249
|
+
# TODO: search for and parse app name from tiapp.xml
|
250
|
+
fatal 'You must set the name of your application!'
|
251
|
+
end
|
247
252
|
|
248
253
|
#
|
249
254
|
# Compilation Methods
|
@@ -363,31 +368,63 @@ def deploy!
|
|
363
368
|
log_success 'Application deployed successfully!'; puts; true
|
364
369
|
end
|
365
370
|
def deploy_to_emulator!
|
371
|
+
# TODO: Android support
|
366
372
|
sim_opts = @options[:ios_simulator]
|
367
|
-
base_cmd = base_cmd_for_simjs
|
368
|
-
if sim_opts[:udid].nil?
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
373
|
+
# base_cmd = base_cmd_for_simjs
|
374
|
+
# if sim_opts[:udid].nil?
|
375
|
+
# sim_list = get_simjs_sims
|
376
|
+
# # ap sim_list; puts
|
377
|
+
# sim_choices = {}
|
378
|
+
# sim_list.each {|ios_version, simulators|
|
379
|
+
# simulators.each {|s|
|
380
|
+
# sim_choices[s['udid']] = "#{s['name']} running iOS #{ios_version}" } }
|
381
|
+
# if sim_choices.keys.any?
|
382
|
+
# choose do |menu|
|
383
|
+
# menu.header = 'Installed iOS Simulators'
|
384
|
+
# menu.prompt = 'Please choose a simulator to deploy to: '
|
385
|
+
#
|
386
|
+
# sim_choices.each {|udid, name|
|
387
|
+
# menu.choice(name) {|choice| sim_opts[:udid] = udid } }
|
388
|
+
# end
|
389
|
+
# else
|
390
|
+
# fatal 'You have no iOS simulators installed.'
|
391
|
+
# end
|
392
|
+
# end
|
393
|
+
# cmd = "#{base_cmd} command=launch appPath=#{bundle_path}"
|
394
|
+
# cmd << " simUDID=#{sim_opts[:udid]}"
|
395
|
+
|
396
|
+
if sim_opts[:devicetypeid].nil?
|
397
|
+
devicetypes = `ios-sim showdevicetypes`.strip
|
398
|
+
if devicetypes.length
|
399
|
+
sim_choices = {}
|
400
|
+
devicetypes.lines.each do |line|
|
401
|
+
dtid, ios_version = line.strip.split ', '
|
402
|
+
sim_choices[dtid] = "#{dtid.gsub('-', ' ')} running iOS #{ios_version}"
|
403
|
+
end
|
376
404
|
choose do |menu|
|
377
405
|
menu.header = 'Installed iOS Simulators'
|
378
406
|
menu.prompt = 'Please choose a simulator to deploy to: '
|
379
407
|
|
380
|
-
sim_choices.each {|
|
381
|
-
menu.choice(name) {|choice| sim_opts[:
|
408
|
+
sim_choices.each {|dtid, name|
|
409
|
+
menu.choice(name) {|choice| sim_opts[:devicetypeid] = name } }
|
382
410
|
end
|
383
411
|
else
|
384
412
|
fatal 'You have no iOS simulators installed.'
|
385
413
|
end
|
386
414
|
end
|
387
|
-
cmd = "
|
388
|
-
cmd << "
|
415
|
+
cmd = "ios-sim launch #{bundle_path} --exit"
|
416
|
+
cmd << " --devicetypeid #{sim_opts[:devicetypeid]}" if sim_opts[:devicetypeid]
|
389
417
|
system cmd
|
418
|
+
# TODO: hook up lldb somehow
|
419
|
+
rescue Errno::ENOENT => e
|
420
|
+
if e.message == 'No such file or directory - ios-sim'
|
421
|
+
warn 'Looks like you haven\'t installed the ios-sim package yet.'
|
422
|
+
warn 'Run the following command to install it:'
|
423
|
+
puts; puts 'npm install -g ios-sim'; puts
|
424
|
+
fatal 'Package ios-sim is required for simulator deployment!'
|
425
|
+
else raise e end
|
390
426
|
end
|
427
|
+
alias deploy_to_simulator! deploy_to_emulator!
|
391
428
|
@path_to_sim_script = File.expand_path(
|
392
429
|
File.join(__dir__, 'platinum-ios-simulate.js'))
|
393
430
|
def base_cmd_for_simjs; "node #{@path_to_sim_script}" end
|
data/platinum_config.yml
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: platinum-deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MacKinley Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -205,6 +205,7 @@ files:
|
|
205
205
|
- lib/platinum/deployer.rb
|
206
206
|
- lib/platinum/deployer/version.rb
|
207
207
|
- platinum-deployer.gemspec
|
208
|
+
- platinum_config.yml
|
208
209
|
homepage: http://rubygems.org/gems/platinum-deployer
|
209
210
|
licenses:
|
210
211
|
- MIT
|