terrestrial-cli 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/terrestrial +4 -0
- data/lib/terrestrial/cli/ignite.rb +9 -6
- data/lib/terrestrial/cli/photoshoot.rb +8 -5
- data/lib/terrestrial/cli/version.rb +1 -1
- data/lib/terrestrial/cli.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19809fc36efca682a72fa29685608946f2497e03
|
4
|
+
data.tar.gz: f61adc168c76bfd95be3dcf1af38e93e3cf35c76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1918ad3963dcd5e562326fdc9ead7252176611c2db7aa75a34e7a45510ba85c6044c0caec5787244d3d38e06ff88088dfe676b92adf648d19bac896c6dcfaae
|
7
|
+
data.tar.gz: 35c563e0a6c36ac769119e5b42e16d98bf1d60255f147f75ff50e5a25b37beb7b865a336ece743e7bdad669eca1dc01af0c4bc777b972da74261ae521f299ea5
|
data/bin/terrestrial
CHANGED
@@ -32,6 +32,10 @@ OptionParser.new do |opts|
|
|
32
32
|
options[:verbose] = true
|
33
33
|
end
|
34
34
|
|
35
|
+
opts.on("--scheme [string]", "Define the Xcode schema to launch your app in, in Ignite and Photoshoot commands.") do |sceme|
|
36
|
+
options[:scheme] = sceme.to_s
|
37
|
+
end
|
38
|
+
|
35
39
|
opts.on_tail("-v", "--version", "Show version") do
|
36
40
|
puts "Terrestrial CLI: #{Terrestrial::Cli::VERSION}"
|
37
41
|
exit
|
@@ -7,7 +7,8 @@ module Terrestrial
|
|
7
7
|
def run
|
8
8
|
Config.load!
|
9
9
|
MixpanelClient.track("cli-ignite-command")
|
10
|
-
lang
|
10
|
+
lang = opts[:language]
|
11
|
+
scheme = opts[:scheme]
|
11
12
|
|
12
13
|
if Config[:platform] != "ios"
|
13
14
|
abort "Unfortunately launching your app in a locale via 'ignite' is only supported on iOS at this time."
|
@@ -17,7 +18,11 @@ module Terrestrial
|
|
17
18
|
abort "Please provide a locale to launch the simulator in.\n e.g. 'terrestrial ignite es'"
|
18
19
|
end
|
19
20
|
|
20
|
-
|
21
|
+
if scheme
|
22
|
+
puts "Starting simulator in locale \"#{lang}\" with scheme \"#{scheme}\"..."
|
23
|
+
else
|
24
|
+
puts "Starting simulator in locale \"#{lang}\"..."
|
25
|
+
end
|
21
26
|
|
22
27
|
TerminalUI.show_spinner do
|
23
28
|
ensure_var_folder_exists
|
@@ -33,12 +38,10 @@ module Terrestrial
|
|
33
38
|
# If a workspace exists we want to build it instead of the project.
|
34
39
|
# We assume the scheme we want to use is simply the application name
|
35
40
|
app_name = File.basename(workspace).split(".").first
|
36
|
-
`xcodebuild -workspace "#{workspace}" -
|
37
|
-
`xcodebuild -workspace "#{workspace}" -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64" -scheme #{app_name} -sdk iphonesimulator CONFIGURATION_BUILD_DIR=#{WORKING_DIR}`
|
41
|
+
`xcodebuild -workspace "#{workspace}" -destination 'platform=iOS Simulator,name=iPhone 6s' -scheme #{scheme || app_name} -configuration Debug clean build CONFIGURATION_BUILD_DIR=#{WORKING_DIR}`
|
38
42
|
else
|
39
43
|
app_name = File.basename(project).split(".").first
|
40
|
-
`xcodebuild -project "#{project}" -
|
41
|
-
`xcodebuild -project "#{project}" -arch i386 -sdk iphonesimulator CONFIGURATION_BUILD_DIR=#{WORKING_DIR}`
|
44
|
+
`xcodebuild -project "#{project}" -destination 'platform=iOS Simulator,name=iPhone 6s' -scheme #{scheme || app_name} -configuration Debug clean build CONFIGURATION_BUILD_DIR=#{WORKING_DIR}`
|
42
45
|
end
|
43
46
|
`open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app`
|
44
47
|
|
@@ -7,12 +7,17 @@ module Terrestrial
|
|
7
7
|
def run
|
8
8
|
Config.load!
|
9
9
|
MixpanelClient.track("cli-photoshoot-command")
|
10
|
+
scheme = opts[:scheme]
|
10
11
|
|
11
12
|
if Config[:platform] != "ios"
|
12
13
|
abort "Unfortunately photoshoot mode is only supported on iOS at this time."
|
13
14
|
end
|
14
15
|
|
15
|
-
|
16
|
+
if scheme
|
17
|
+
puts "Starting simulator in photoshoot mode with scheme \"#{scheme}\"..."
|
18
|
+
else
|
19
|
+
puts "Starting simulator in photoshoot mode..."
|
20
|
+
end
|
16
21
|
ensure_var_folder_exists
|
17
22
|
|
18
23
|
workspace = Dir["#{Config[:directory]}/*.xcworkspace"][0]
|
@@ -26,12 +31,10 @@ module Terrestrial
|
|
26
31
|
# If a workspace exists we want to build it instead of the project.
|
27
32
|
# We assume the scheme we want to use is simply the application name
|
28
33
|
app_name = File.basename(workspace).split(".").first
|
29
|
-
`xcodebuild -workspace "#{workspace}" -
|
30
|
-
`xcodebuild -workspace "#{workspace}" -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64" -scheme #{app_name} -sdk iphonesimulator CONFIGURATION_BUILD_DIR=#{WORKING_DIR}`
|
34
|
+
`xcodebuild -workspace "#{workspace}" -destination 'platform=iOS Simulator,name=iPhone 6s' -scheme #{scheme || app_name} -configuration Debug clean build CONFIGURATION_BUILD_DIR=#{WORKING_DIR}`
|
31
35
|
else
|
32
36
|
app_name = File.basename(project).split(".").first
|
33
|
-
`xcodebuild -project "#{project}" -
|
34
|
-
`xcodebuild -project "#{project}" -arch i386 -sdk iphonesimulator CONFIGURATION_BUILD_DIR=#{WORKING_DIR}`
|
37
|
+
`xcodebuild -project "#{project}" -destination 'platform=iOS Simulator,name=iPhone 6s' -scheme #{scheme || app_name} -configuration Debug clean build CONFIGURATION_BUILD_DIR=#{WORKING_DIR}`
|
35
38
|
end
|
36
39
|
`open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app`
|
37
40
|
|
data/lib/terrestrial/cli.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terrestrial-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Niklas Begley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: terminal-table
|