fastlane_core 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane_core/helper.rb +2 -0
- data/lib/fastlane_core/update_checker.rb +37 -0
- data/lib/fastlane_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef688289ddddd08d4b2a435d43201261eedc6507
|
4
|
+
data.tar.gz: 17ae8b634b92aaf56e6d6b59aee775c1d9a8f726
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e130adf75bb0ecde810ec4a0034f90d33bbd840abeef08384418b4853acfbbb2abbdff9d394f925ce6d6871160ff7cfc7d092ccd42e4f262a913124bed1c5b2f
|
7
|
+
data.tar.gz: e90fa76790904348afb298e0e7bd199306b348012267357861423863e7ce3cab5c0a027ba856dcf42f377e9175bcc9727b2e0f612310daa6f7cfc9aa55a0e8a9
|
data/lib/fastlane_core/helper.rb
CHANGED
@@ -68,6 +68,8 @@ module FastlaneCore
|
|
68
68
|
|
69
69
|
# @return the full path to the iTMSTransporter executable
|
70
70
|
def self.transporter_path
|
71
|
+
return '' if Helper.is_test? # to work on Linux too
|
72
|
+
|
71
73
|
[
|
72
74
|
"../Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter",
|
73
75
|
"../Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"
|
@@ -7,6 +7,40 @@ module FastlaneCore
|
|
7
7
|
# This web service is fully open source: https://github.com/fastlane/refresher
|
8
8
|
UPDATE_URL = "https://fastlane-refresher.herokuapp.com/"
|
9
9
|
|
10
|
+
def self.start_looking_for_update(gem_name)
|
11
|
+
Thread.new do
|
12
|
+
begin
|
13
|
+
server_results[gem_name] = fetch_latest(gem_name)
|
14
|
+
rescue
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.show_update_status(gem_name, current_version)
|
20
|
+
latest = server_results[gem_name]
|
21
|
+
if latest and Gem::Version.new(latest) > Gem::Version.new(current_version)
|
22
|
+
show_update_message(gem_name, latest, current_version)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.show_update_message(gem_name, available, current_version)
|
27
|
+
v = fetch_latest(gem_name)
|
28
|
+
puts '#######################################################################'.green
|
29
|
+
puts "# #{gem_name} #{available} is available. You are on #{current_version}.".green
|
30
|
+
puts "# It is recommended to use the latest version.".green
|
31
|
+
puts "# Update using 'sudo gem update #{gem_name.downcase}'.".green
|
32
|
+
puts "# To see what's new, open https://github.com/KrauseFx/#{gem_name}/releases.".green
|
33
|
+
puts '#######################################################################'.green
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.server_results
|
37
|
+
@@results ||= {}
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
# Old code
|
10
44
|
# This method will check if the latest version is installed and show a warning if that's not the case
|
11
45
|
def self.verify_latest_version(gem_name, current_version)
|
12
46
|
return true unless self.update_available?(gem_name, current_version)
|
@@ -34,6 +68,9 @@ module FastlaneCore
|
|
34
68
|
return false
|
35
69
|
end
|
36
70
|
|
71
|
+
|
72
|
+
|
73
|
+
# Relevant code
|
37
74
|
private
|
38
75
|
def self.fetch_latest(gem_name)
|
39
76
|
url = UPDATE_URL + gem_name
|
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.
|
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-04-
|
11
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|