gym 0.4.2 → 0.4.3

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: 8ce678cc45ab3fc3b06c8ff3fc4c793792359a9c
4
- data.tar.gz: 913800242d81cc04089ec4d0e53a98a8d5034529
3
+ metadata.gz: 39b1b950ed651f4c7312c3eac1f42b367710aa3d
4
+ data.tar.gz: 3955facd58fd0208f41a502c019f826c4166909f
5
5
  SHA512:
6
- metadata.gz: 70df21737fac27d4cd0a31d5b1feac957898af2e7bf6a716c4aaedafc0649ef2a499abe219cd69901cfb75fb6e9c7f66d16ddbc339f935eb491a03b605034488
7
- data.tar.gz: 4dfc77aea0be00fafbcf9389b1c81e42d14697249f7cd0bfb0358f45d2ac9fc878527643a4b04a409297de765f2c9705e35f9b37a9369ce528b0d5a9fe5245db
6
+ metadata.gz: 35a20b7e33f5c1f1d80fe7cf68a24e160605b004bd92d16117c67e6e9325e967dacd7c60e15a5cdf3d19ed4670cf77095642b7a576774f41fd7ea2a500a7fb75
7
+ data.tar.gz: fef1ab31216518a81f5f36a8d1a73edd43c17e1ea83f61ef1eb67b886852c047e47aa1ddf0dee8ce3157f0f09fed6386c59bf1f58cf8dee596ae5ab9240d3470
@@ -17,7 +17,6 @@ module Gym
17
17
  end
18
18
 
19
19
  Gym.project = Project.new(config)
20
- detect_platform
21
20
  detect_provisioning_profile
22
21
 
23
22
  # Go into the project's folder
@@ -26,6 +25,7 @@ module Gym
26
25
  end
27
26
 
28
27
  detect_scheme
28
+ detect_platform # we can only do that *after* we have the scheme
29
29
  detect_configuration
30
30
 
31
31
  config[:output_name] ||= Gym.project.app_name
@@ -122,7 +122,9 @@ module Gym
122
122
  config[:scheme] = choose(*(proj_schemes))
123
123
  end
124
124
  else
125
- raise "Couldn't find any schemes in this project".red
125
+ Helper.log.error "Couldn't find any schemes in this project, make sure that the scheme is shared if you are using a workspace".red
126
+
127
+ raise "No Schemes found".red
126
128
  end
127
129
  end
128
130
 
@@ -17,7 +17,8 @@ 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 << ["Xcode path", Gym.xcode_path]
20
+ rows << ["Platform", Gym.project.ios? ? "iOS" : "Mac"]
21
+ rows << ["Xcode Path", Gym.xcode_path.gsub("/Contents/Developer", "")]
21
22
 
22
23
  puts ""
23
24
  puts Terminal::Table.new(
@@ -15,10 +15,17 @@ module Gym
15
15
  end
16
16
  end
17
17
 
18
+ def workspace?
19
+ self.is_workspace
20
+ end
21
+
18
22
  # Get all available schemes in an array
19
23
  def schemes
20
24
  results = []
21
25
  output = raw_info.split("Schemes:").last.split(":").first
26
+
27
+ return results if is_workspace && output.start_with?("There are no schemes in workspace")
28
+
22
29
  output.split("\n").each do |current|
23
30
  current = current.strip
24
31
 
@@ -56,18 +63,18 @@ module Gym
56
63
  name = build_settings(key: "WRAPPER_NAME")
57
64
 
58
65
  return name.gsub(build_settings(key: "WRAPPER_SUFFIX"), "") if name
59
- nil
66
+ return "App" # default value
60
67
  end
61
68
 
62
69
  def mac?
63
- !ios?
70
+ # Some projects have different values... we have to look for all of them
71
+ return true if build_settings(key: "PLATFORM_NAME") == "macosx"
72
+ return true if build_settings(key: "PLATFORM_DISPLAY_NAME") == "OS X"
73
+ false
64
74
  end
65
75
 
66
76
  def ios?
67
- # Some proects have different values... we have to look for all of them
68
- return true if build_settings(key: "PLATFORM_NAME") == "iphoneos"
69
- return true if build_settings(key: "PLATFORM_DISPLAY_NAME") == "iOS"
70
- false
77
+ !mac?
71
78
  end
72
79
 
73
80
  #####################################################
@@ -124,7 +124,7 @@ module Gym
124
124
 
125
125
  ipa_path = File.join(Gym.config[:output_directory], File.basename(PackageCommandGenerator.ipa_path))
126
126
 
127
- Helper.log.info "Successfully exported and signed ipa file:".green
127
+ Helper.log.info "Successfully exported and signed the ipa file:".green
128
128
  Helper.log.info ipa_path
129
129
  ipa_path
130
130
  end
@@ -137,7 +137,7 @@ module Gym
137
137
  FileUtils.mv(app_path, Gym.config[:output_directory], force: true)
138
138
  app_path = File.join(Gym.config[:output_directory], File.basename(app_path))
139
139
 
140
- Helper.log.info "Successfully exported and signed ipa file:".green
140
+ Helper.log.info "Successfully exported the .app file:".green
141
141
  Helper.log.info app_path
142
142
  app_path
143
143
  end
@@ -1,4 +1,4 @@
1
1
  module Gym
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  DESCRIPTION = "Building your iOS apps has never been easier"
4
4
  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.2
4
+ version: 0.4.3
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-08-19 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core