gym 0.4.6 → 0.5.0

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: 8e204c7647cdb4e93f202073ce9de6e9562083fb
4
- data.tar.gz: eed4ff9f5e34840b4db990d668fa118e1e9e2d11
3
+ metadata.gz: 0c76a24f7879f86175a8a39ce9679116e669d9c5
4
+ data.tar.gz: ad0f0ce1ff3e9da26eea7a1e17754f6c6e4c1963
5
5
  SHA512:
6
- metadata.gz: 2a32a4a2dab5887db302686da0762e75b90006a7c09494b4e053aad42ae28ce23c43236f6e4ce6b47c84746c04933a9c8b47de442ee5c1960438c8cf1b7fbbf1
7
- data.tar.gz: a483b959adaaea510d7dadd96409cb092f5d1242c2b636b7895a930884d6563efe4a5c810db02e3e7d8afef18a0b61197892431f0c42d22a34da547f1586d2f8
6
+ metadata.gz: 04f9486f03e74325e53c66a3fcc21a2d60d4650e2eb530a28cd7592e2dcdc5573fe4c74fffd6b747617a516277279cae82d450db56010c50d04a12642c2b446a
7
+ data.tar.gz: 9f36f4679516d67dcf4fe49488bf58760ba226b1369fe13731c817cbf1f67092deee928d82c12e83e7c3bffd4d32e02c09d043084a2494c6f1db92c786ffb03f
@@ -76,6 +76,7 @@ module Gym
76
76
  end
77
77
 
78
78
  def archive_path
79
+ @archive_path ||= Gym.config[:archive_path]
79
80
  unless @archive_path
80
81
  file_name = [Gym.config[:output_name], Time.now.strftime("%F %H.%M.%S")] # e.g. 2015-08-07 14.49.12
81
82
  @archive_path = File.join(build_path, file_name.join(" ") + ".xcarchive")
@@ -170,6 +170,5 @@ module Gym
170
170
  end
171
171
  end
172
172
  end
173
-
174
173
  end
175
174
  end
@@ -17,6 +17,7 @@ module Gym
17
17
  rows << ["Workspace", config[:workspace]] if config[:workspace]
18
18
  rows << ["Scheme", config[:scheme]] if config[:scheme]
19
19
  rows << ["Configuration", config[:configuration]] if config[:configuration]
20
+ rows << ["Archive Path", config[:archive_path]] if config[:archive_path]
20
21
  rows << ["Platform", Gym.project.ios? ? "iOS" : "Mac"]
21
22
  rows << ["Xcode Path", Gym.xcode_path.gsub("/Contents/Developer", "")]
22
23
 
@@ -9,7 +9,6 @@ module Gym
9
9
  @options = plain_options
10
10
  end
11
11
 
12
- # rubocop:disable Metrics/MethodLength
13
12
  def self.plain_options
14
13
  [
15
14
  FastlaneCore::ConfigItem.new(key: :workspace,
@@ -50,6 +49,11 @@ module Gym
50
49
  env_name: "GYM_OUTPUT_DIRECTORY",
51
50
  description: "The directory in which the ipa file should be stored in",
52
51
  default_value: "."),
52
+ FastlaneCore::ConfigItem.new(key: :archive_path,
53
+ short_option: "-b",
54
+ env_name: "GYM_ARCHIVE_PATH",
55
+ description: "The directory in which the archive file should be stored in",
56
+ optional: true),
53
57
  FastlaneCore::ConfigItem.new(key: :output_name,
54
58
  short_option: "-n",
55
59
  env_name: "GYM_OUTPUT_NAME",
@@ -77,7 +81,7 @@ module Gym
77
81
  FastlaneCore::ConfigItem.new(key: :codesigning_identity,
78
82
  short_option: "-i",
79
83
  env_name: "GYM_CODE_SIGNING_IDENTITY",
80
- description: "The name of the code signing identity to use. It has to match the name exactly. You usually don't need this! e.g. 'iPhone Distribution: SunApps GmbH'",
84
+ description: "The name of the code signing identity to use. It has to match the name exactly. e.g. 'iPhone Distribution: SunApps GmbH'",
81
85
  optional: true),
82
86
  FastlaneCore::ConfigItem.new(key: :destination,
83
87
  short_option: "-d",
@@ -87,7 +91,7 @@ module Gym
87
91
  FastlaneCore::ConfigItem.new(key: :xcargs,
88
92
  short_option: "-x",
89
93
  env_name: "GYM_XCARGS",
90
- description: "Pass additional arguments to xcodebuild when building the app. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS=\"-ObjC -lstdc++\"",
94
+ description: "Pass additional arguments to xcodebuild. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS=\"-ObjC -lstdc++\"",
91
95
  optional: true),
92
96
  FastlaneCore::ConfigItem.new(key: :xcconfig,
93
97
  short_option: "-y",
@@ -108,6 +112,5 @@ module Gym
108
112
 
109
113
  ]
110
114
  end
111
- # rubocop:enable Metrics/MethodLength
112
115
  end
113
116
  end
@@ -1,4 +1,4 @@
1
1
  module Gym
2
- VERSION = "0.4.6"
2
+ VERSION = "0.5.0"
3
3
  DESCRIPTION = "Building your iOS apps has never been easier"
4
4
  end
@@ -1,3 +1,5 @@
1
+ require 'zip'
2
+
1
3
  module Gym
2
4
  class XcodebuildFixes
3
5
  class << self
@@ -6,11 +8,10 @@ module Gym
6
8
  def swift_library_fix
7
9
  require 'fileutils'
8
10
 
9
- ipa_swift_frameworks = Dir["#{PackageCommandGenerator.appfile_path}/Frameworks/libswift*"]
10
- Helper.log.info "Checking for Swift framework" if $verbose
11
+ return if check_for_swift PackageCommandGenerator
11
12
 
12
- return if ipa_swift_frameworks.empty?
13
13
  Helper.log.info "Packaging up the Swift Framework as the current app is a Swift app" if $verbose
14
+ ipa_swift_frameworks = Dir["#{PackageCommandGenerator.appfile_path}/Frameworks/libswift*"]
14
15
 
15
16
  Dir.mktmpdir do |tmpdir|
16
17
  # Copy all necessary Swift libraries to a temporary "SwiftSupport" directory so that we can
@@ -40,6 +41,27 @@ module Gym
40
41
  end
41
42
  end
42
43
  end
44
+
45
+ # @param the PackageCommandGenerator
46
+ # @return true if swift
47
+ def check_for_swift(pcg)
48
+ Helper.log.info "Checking for Swift framework" if $verbose
49
+ default_swift_libs = "#{pcg.appfile_path}/Frameworks/libswift.*" # note the extra ., this is a string representation of a regexp
50
+ zip_entries_matching(pcg.ipa_path, /#{default_swift_libs}/).count > 0
51
+ end
52
+
53
+ # return the entries (files or directories) in the zip matching the pattern
54
+ # @param zipfile a zipfile
55
+ # @return the files or directories matching the pattern
56
+ def zip_entries_matching(zipfile, file_pattern)
57
+ files = []
58
+ Zip::File.open(zipfile) do |zip_file|
59
+ zip_file.each do |entry|
60
+ files << entry.name if entry.name.match file_pattern
61
+ end
62
+ end
63
+ files
64
+ end
43
65
  end
44
66
  end
45
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gym
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.5.0
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-09-04 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.14.0
19
+ version: 0.16.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 0.14.0
29
+ version: 0.16.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: xcpretty
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +58,20 @@ dependencies:
52
58
  - - ">="
53
59
  - !ruby/object:Gem::Version
54
60
  version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rubyzip
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 1.1.7
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.1.7
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: bundler
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -70,16 +90,16 @@ dependencies:
70
90
  name: fastlane
71
91
  requirement: !ruby/object:Gem::Requirement
72
92
  requirements:
73
- - - "~>"
93
+ - - ">="
74
94
  - !ruby/object:Gem::Version
75
- version: 1.15.0
95
+ version: 1.25.0
76
96
  type: :development
77
97
  prerelease: false
78
98
  version_requirements: !ruby/object:Gem::Requirement
79
99
  requirements:
80
- - - "~>"
100
+ - - ">="
81
101
  - !ruby/object:Gem::Version
82
- version: 1.15.0
102
+ version: 1.25.0
83
103
  - !ruby/object:Gem::Dependency
84
104
  name: rake
85
105
  requirement: !ruby/object:Gem::Requirement