terrestrial-cli 0.6.4 → 0.6.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c034b644429adb22544f734a4df9694dc7c0b5bd
4
- data.tar.gz: 0e465bc08172654116424801839dfad90c9ada15
3
+ metadata.gz: 19809fc36efca682a72fa29685608946f2497e03
4
+ data.tar.gz: f61adc168c76bfd95be3dcf1af38e93e3cf35c76
5
5
  SHA512:
6
- metadata.gz: a655b3425d1abc750930db7d6b835e2fe3c84c9cf34fd2171586e94daf74a55f0a7beae320b2cdde76d7f763b9c92bc1501503f4ba1ca0dd27c7165f09e53009
7
- data.tar.gz: 981e687319e53f7c26197d27c87f7e2eea14d86cb0b45bff5583d788eff3e2ee3da0b1b5e41c04bdb54bd303791fcc247dba6fc9e627e64e5cf5e2d17c4141c9
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 = opts["language"]
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
- puts "Starting simulator in locale \"#{lang}\"..."
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}" -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64" -scheme #{app_name} -sdk iphonesimulator clean`
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}" -arch i386 -sdk iphonesimulator clean`
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
- puts "Starting simulator in photoshoot mode..."
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}" -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64" -scheme #{app_name} -sdk iphonesimulator clean`
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}" -arch i386 -sdk iphonesimulator clean`
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
 
@@ -1,5 +1,5 @@
1
1
  module Terrestrial
2
2
  module Cli
3
- VERSION = "0.6.4"
3
+ VERSION = "0.6.5"
4
4
  end
5
5
  end
@@ -75,7 +75,7 @@ module Terrestrial
75
75
  end
76
76
 
77
77
  def self.ignite(opts, args)
78
- opts["language"] = args[0]
78
+ opts[:language] = args[0]
79
79
  Terrestrial::Cli::Ignite.run(opts)
80
80
  end
81
81
 
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
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-02-25 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: terminal-table