fastlane_core 0.21.0 → 0.21.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: 8864dafc1405a2f38899dc54cedb5ac96f9e02fd
4
- data.tar.gz: 5fdf7b6e3f17cb57bb5fa41cda33a041704fe6dd
3
+ metadata.gz: 46008f19afec35b2dd7b91606ecd4b103443153a
4
+ data.tar.gz: 67ef2cc2f473ab9b9027f61c21272c615d38c64e
5
5
  SHA512:
6
- metadata.gz: e0869c7ee5c3c26ca4b729b57eeb0c070f0514854e8f2a871e4832d91e668ddf6b50ec05db353749aeaf0b35d55a7835fc4707f6968d024d560f7279b0082580
7
- data.tar.gz: b00441b5e8a242f97945a0124575e20205d78bf54cfb3236242322df7ee1c25ae51c3cc5b894f164cf8e511200906b22a70388ad0986f85acbdaa918d1398e48
6
+ metadata.gz: 50490e1c4b3a034e4afacfc578b83a394ee2836d82c89a2c8c1c74a42607ed330e0813c727307991195455b3e5c5b7361007d5607e2cff2fe8c9fdd638f7922b
7
+ data.tar.gz: c1486fbd7fa984a74a7c9e2e3853fa5ea5958ae13e760b04287bea1c54043be308995214a7983eba7ab6c0809a1ddbf55b770775e9981466c299be430313b47a
data/lib/fastlane_core.rb CHANGED
@@ -13,6 +13,7 @@ require 'fastlane_core/command_executor'
13
13
  require 'fastlane_core/ipa_upload_package_builder'
14
14
  require 'fastlane_core/print_table'
15
15
  require 'fastlane_core/project'
16
+ require 'fastlane_core/simulator'
16
17
 
17
18
  # Third Party code
18
19
  require 'colored'
@@ -15,7 +15,9 @@ module FastlaneCore
15
15
  attr_accessor :config_file_name
16
16
 
17
17
  def self.create(available_options, values)
18
- Configuration.new(available_options, values)
18
+ v = values.dup
19
+ v.delete(:verbose) # as this is being processed by commander
20
+ Configuration.new(available_options, v)
19
21
  end
20
22
 
21
23
  #####################################################
@@ -0,0 +1,82 @@
1
+ require 'open3'
2
+
3
+ module FastlaneCore
4
+ class Simulator
5
+ class << self
6
+ def all
7
+ return @devices if @devices
8
+ Helper.log.info "Fetching available devices" if $verbose
9
+
10
+ # we do it using open since ` just randomly hangs with instruments -s
11
+ output = ''
12
+ Open3.popen3('instruments -s') do |stdin, stdout, stderr, wait_thr|
13
+ output = stdout.read
14
+ end
15
+
16
+ unless output.include?("Known Devices")
17
+ Helper.log.error "Instruments CLI broken, run `instruments -s` and make sure it works".red
18
+ Helper.log.error "The easiest way to fix this is to restart your Mac".red
19
+ raise "Instruments CLI not working.".red
20
+ end
21
+
22
+ output = output.split("Known Devices:").last.split("Known Templates:").first
23
+ @devices = []
24
+ output.split("\n").each do |current|
25
+ m = current.match(/(.*) \((.*)\) \[(.*)\]/)
26
+ next unless m
27
+ name = m[1].to_s.strip
28
+ ios = m[2].to_s.strip
29
+ udid = m[3].to_s.strip
30
+ next unless udid.include?("-") # as we want to ignore the real devices
31
+
32
+ @devices << Device.new(name: name, ios_version: ios, udid: udid)
33
+ end
34
+
35
+ return @devices
36
+ end
37
+
38
+ def clear_cache
39
+ @devices = nil
40
+ end
41
+ end
42
+
43
+ # Example Output for `instruments -s`
44
+ #
45
+ # Known Devices:
46
+ # Felix [A8B765B9-70D4-5B89-AFF5-EDDAF0BC8AAA]
47
+ # Felix Krause's iPhone 6 (9.0.1) [2cce6c8deb5ea9a46e19304f4c4e665069ccaaaa]
48
+ # iPad 2 (9.0) [863234B6-C857-4DF3-9E27-897DEDF26EDA]
49
+ # iPad Air (9.0) [3827540A-D953-49D3-BC52-B66FC59B085E]
50
+ # iPad Air 2 (9.0) [6731E2F9-B70A-4102-9B49-6AEFE300F460]
51
+ # iPad Retina (9.0) [DFEE2E76-DABF-47C6-AA1A-ACF873E57435]
52
+ # iPhone 4s (9.0) [CDEB0462-9ECD-40C7-9916-B7C44EC10E17]
53
+ # iPhone 5 (9.0) [1685B071-AFB2-4DC1-BE29-8370BA4A6EBD]
54
+ # iPhone 5s (9.0) [C60F3E7A-3D0E-407B-8D0A-EDAF033ED626]
55
+ # iPhone 6 (9.0) [4A822E0C-4873-4F12-B798-8B39613B24CE]
56
+ # iPhone 6 Plus (9.0) [A522ACFF-7948-4344-8CA8-3F62ED9FFB18]
57
+ # iPhone 6s (9.0) [C956F5AA-2EA3-4141-B7D2-C5BE6250A60D]
58
+ # iPhone 6s Plus (9.0) [A3754407-21A3-4A80-9559-3170BB3D50FC]
59
+ # Known Templates:
60
+ # "/Applications/Xcode70.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate"
61
+ # "/Applications/Xcode70.app/Contents/Applications/Instruments.app/Contents/PlugIns/OpenGLESAnalyzerInstrument.xrplugin/Contents/Resources/OpenGL ES Analysis.tracetemplate"
62
+ # "/Applications/Xcode70.app/Contents/Applications/Instruments.app/Contents/PlugIns/XRMobileDeviceDiscoveryPlugIn.xrplugin/Contents/Resources/Energy Diagnostics.tracetemplate"
63
+
64
+ class Device
65
+ attr_accessor :name
66
+
67
+ attr_accessor :udid
68
+
69
+ attr_accessor :ios_version
70
+
71
+ def initialize(name: nil, udid: nil, ios_version: nil)
72
+ self.name = name
73
+ self.udid = udid
74
+ self.ios_version = ios_version
75
+ end
76
+
77
+ def to_s
78
+ self.name
79
+ end
80
+ end
81
+ end
82
+ end
@@ -1,3 +1,3 @@
1
1
  module FastlaneCore
2
- VERSION = "0.21.0"
2
+ VERSION = "0.21.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-11 00:00:00.000000000 Z
11
+ date: 2015-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -368,6 +368,7 @@ files:
368
368
  - lib/fastlane_core/print_table.rb
369
369
  - lib/fastlane_core/project.rb
370
370
  - lib/fastlane_core/provisioning_profile.rb
371
+ - lib/fastlane_core/simulator.rb
371
372
  - lib/fastlane_core/update_checker.rb
372
373
  - lib/fastlane_core/version.rb
373
374
  homepage: https://fastlane.tools