gym 0.9.0 → 0.9.1
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/README.md +1 -3
- data/lib/assets/GymfileTemplate +1 -2
- data/lib/gym/commands_generator.rb +1 -1
- data/lib/gym/detect_values.rb +1 -54
- data/lib/gym/error_handler.rb +4 -2
- data/lib/gym/generators/build_command_generator.rb +1 -6
- data/lib/gym/generators/package_command_generator.rb +5 -0
- data/lib/gym/generators/package_command_generator_legacy.rb +5 -0
- data/lib/gym/generators/package_command_generator_xcode7.rb +6 -0
- data/lib/gym/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60fa75fbebf2e7c9dd32e7b473a67f19a577107a
|
4
|
+
data.tar.gz: 3ebbb7c07a5ce7c8ba39cc914ccc6d9407e7dd30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea18a6e63b2948fa680b5a6fce15199c70515ae08f9e885c540ec4a3b69654b0f4d138e89e8310496d05d7dd3878a4fef3837992b666b66f82874ec589a310de
|
7
|
+
data.tar.gz: 8922b95ade68033b86a7e542ce589946caecf0bc17d626a92933b1e818a725a1dbc4633a502f07d12b5a0728afada590ec1a7fd803fcec4b91f01cf34d56d608
|
data/README.md
CHANGED
@@ -100,8 +100,6 @@ gym
|
|
100
100
|
|
101
101
|
# Installation
|
102
102
|
|
103
|
-
This tool is still work in progress. You can already try it by cloning the repo and running
|
104
|
-
|
105
103
|
sudo gem install gym
|
106
104
|
|
107
105
|
Make sure, you have the latest version of the Xcode command line tools installed:
|
@@ -144,7 +142,7 @@ Run `gym init` to create a new configuration file. Example:
|
|
144
142
|
```ruby
|
145
143
|
scheme "Example"
|
146
144
|
|
147
|
-
sdk "
|
145
|
+
sdk "iphoneos9.0"
|
148
146
|
|
149
147
|
clean true
|
150
148
|
|
data/lib/assets/GymfileTemplate
CHANGED
@@ -48,7 +48,7 @@ module Gym
|
|
48
48
|
c.action do |_args, options|
|
49
49
|
containing = (File.directory?("fastlane") ? 'fastlane' : '.')
|
50
50
|
path = File.join(containing, Gym.gymfile_name)
|
51
|
-
raise "Gymfile already exists" if File.exist?(path)
|
51
|
+
raise "Gymfile already exists".yellow if File.exist?(path)
|
52
52
|
template = File.read("#{Helper.gem_path('gym')}/lib/assets/GymfileTemplate")
|
53
53
|
File.write(path, template)
|
54
54
|
Helper.log.info "Successfully created '#{path}'. Open the file using a code editor.".green
|
data/lib/gym/detect_values.rb
CHANGED
@@ -6,15 +6,7 @@ module Gym
|
|
6
6
|
def self.set_additional_default_values
|
7
7
|
config = Gym.config
|
8
8
|
|
9
|
-
detect_projects
|
10
|
-
|
11
|
-
if config[:workspace].to_s.length > 0 and config[:project].to_s.length > 0
|
12
|
-
raise "You can only pass either a workspace or a project path, not both".red
|
13
|
-
end
|
14
|
-
|
15
|
-
if config[:workspace].to_s.length == 0 and config[:project].to_s.length == 0
|
16
|
-
raise "No project/workspace found in the current directory.".red
|
17
|
-
end
|
9
|
+
FastlaneCore::Project.detect_projects(config)
|
18
10
|
|
19
11
|
Gym.project = FastlaneCore::Project.new(config)
|
20
12
|
detect_provisioning_profile
|
@@ -60,51 +52,6 @@ module Gym
|
|
60
52
|
end
|
61
53
|
end
|
62
54
|
|
63
|
-
def self.detect_projects
|
64
|
-
return if Gym.config[:project].to_s.length > 0
|
65
|
-
|
66
|
-
if Gym.config[:workspace].to_s.length == 0
|
67
|
-
workspace = Dir["./*.xcworkspace"]
|
68
|
-
if workspace.count > 1
|
69
|
-
puts "Select Workspace: "
|
70
|
-
Gym.config[:workspace] = choose(*(workspace))
|
71
|
-
else
|
72
|
-
Gym.config[:workspace] = workspace.first # this will result in nil if no files were found
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
return if Gym.config[:workspace].to_s.length > 0
|
77
|
-
|
78
|
-
if Gym.config[:workspace].to_s.length == 0 and Gym.config[:project].to_s.length == 0
|
79
|
-
project = Dir["./*.xcodeproj"]
|
80
|
-
if project.count > 1
|
81
|
-
puts "Select Project: "
|
82
|
-
Gym.config[:project] = choose(*(project))
|
83
|
-
else
|
84
|
-
Gym.config[:project] = project.first # this will result in nil if no files were found
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
def self.choose_project
|
90
|
-
loop do
|
91
|
-
path = ask("Couldn't automatically detect the project file, please provide a path: ".yellow).strip
|
92
|
-
if File.directory? path
|
93
|
-
if path.end_with? ".xcworkspace"
|
94
|
-
config[:workspace] = path
|
95
|
-
break
|
96
|
-
elsif path.end_with? ".xcodeproj"
|
97
|
-
config[:project] = path
|
98
|
-
break
|
99
|
-
else
|
100
|
-
Helper.log.error "Path must end with either .xcworkspace or .xcodeproj"
|
101
|
-
end
|
102
|
-
else
|
103
|
-
Helper.log.error "Couldn't find project at path '#{File.expand_path(path)}'".red
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
55
|
def self.detect_scheme
|
109
56
|
Gym.project.select_scheme
|
110
57
|
end
|
data/lib/gym/error_handler.rb
CHANGED
@@ -2,7 +2,7 @@ module Gym
|
|
2
2
|
# This classes methods are called when something goes wrong in the building process
|
3
3
|
class ErrorHandler
|
4
4
|
class << self
|
5
|
-
# @param [
|
5
|
+
# @param [String] The output of the errored build
|
6
6
|
# This method should raise an exception in any case, as the return code indicated a failed build
|
7
7
|
def handle_build_error(output)
|
8
8
|
# The order of the handling below is import
|
@@ -47,7 +47,7 @@ module Gym
|
|
47
47
|
print "You'll have to restart your shell session after updating the file."
|
48
48
|
print "If you are using zshell or another shell, make sure to edit the correct bash file."
|
49
49
|
print "For more information visit this stackoverflow answer:"
|
50
|
-
print "
|
50
|
+
print "https://stackoverflow.com/a/17031697/445598"
|
51
51
|
end
|
52
52
|
raise "Error building the application - see the log above".red
|
53
53
|
end
|
@@ -90,6 +90,8 @@ module Gym
|
|
90
90
|
print "The generated archive is invalid, this can have various reasons:"
|
91
91
|
print "Usually it's caused by the `Skip Install` option in Xcode, set it to `NO`"
|
92
92
|
print "For more information visit https://developer.apple.com/library/ios/technotes/tn2215/_index.html"
|
93
|
+
print "Also, make sure to have a valid code signing identity and provisioning profile installed"
|
94
|
+
print "Follow this guide to setup code signing https://github.com/KrauseFx/fastlane/blob/master/docs/CodeSigning.md"
|
93
95
|
raise "Archive invalid"
|
94
96
|
end
|
95
97
|
|
@@ -21,12 +21,7 @@ module Gym
|
|
21
21
|
# This will also include the scheme (if given)
|
22
22
|
# @return [Array] The array with all the components to join
|
23
23
|
def project_path_array
|
24
|
-
|
25
|
-
proj = []
|
26
|
-
proj << "-workspace '#{config[:workspace]}'" if config[:workspace]
|
27
|
-
proj << "-scheme '#{config[:scheme]}'" if config[:scheme]
|
28
|
-
proj << "-project '#{config[:project]}'" if config[:project]
|
29
|
-
|
24
|
+
proj = Gym.project.xcodebuild_parameters
|
30
25
|
return proj if proj.count > 0
|
31
26
|
raise "No project/workspace found"
|
32
27
|
end
|
@@ -1,3 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# from http://stackoverflow.com/a/9857493/445598
|
3
|
+
# because of
|
4
|
+
# `incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)`
|
5
|
+
|
1
6
|
module Gym
|
2
7
|
# Responsible for building the fully working xcodebuild command on Xcode < 7
|
3
8
|
#
|
@@ -1,3 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# from http://stackoverflow.com/a/9857493/445598
|
3
|
+
# because of
|
4
|
+
# `incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)`
|
5
|
+
|
1
6
|
module Gym
|
2
7
|
# Responsible for building the fully working xcodebuild command
|
3
8
|
class PackageCommandGeneratorXcode7
|
@@ -36,6 +41,7 @@ module Gym
|
|
36
41
|
def ipa_path
|
37
42
|
unless Gym.cache[:ipa_path]
|
38
43
|
path = Dir[File.join(temporary_output_path, "*.ipa")].last
|
44
|
+
ErrorHandler.handle_empty_archive unless path
|
39
45
|
|
40
46
|
Gym.cache[:ipa_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.ipa")
|
41
47
|
FileUtils.mv(path, Gym.cache[:ipa_path]) if File.expand_path(path).downcase != File.expand_path(Gym.cache[:ipa_path]).downcase
|
data/lib/gym/version.rb
CHANGED
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.9.
|
4
|
+
version: 0.9.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
|
+
date: 2015-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.22.3
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.22.3
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
version: '0'
|
268
268
|
requirements: []
|
269
269
|
rubyforge_project:
|
270
|
-
rubygems_version: 2.4.
|
270
|
+
rubygems_version: 2.4.8
|
271
271
|
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: Building your iOS apps has never been easier
|