gym 0.8.1 → 0.8.2

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: df0e9fa07fc14d3d303c941fc88f1595376b8d26
4
- data.tar.gz: d4993d0c27a2cc4bb27ff6d14d60ac6e4c392b10
3
+ metadata.gz: 689d73c313fb9f055dbdf4e17f6ce021607f7011
4
+ data.tar.gz: 309c39a87b32563a8f0de9f80c986bb88e9b67ba
5
5
  SHA512:
6
- metadata.gz: 489ee36c94c388ad342a8839966331771aab3ffacdc5c426c1cbac3c3a31307968e23f621da43127ccfdf7713d297aca7444136979ce93743ece0613232a5292
7
- data.tar.gz: 1aa7f1e53f35769b1fae65fe8990be242d2b2ae4cb3b65425c342f06022c85bf41dd3a8e436063c21f02645304832e8360eb03743a4b26cde1abf092b36a7404
6
+ metadata.gz: 2bb6a9803bdd19bda320dca0fd1522941f4b930b60f770cd7a2ee8b818ce4169a637105939eccf55139173e037d83a72c715a75e6fb1805bb954df83c4caa8c3
7
+ data.tar.gz: c7252695e59fdb113e6d871765a6a7b6594c208627aa60463b5fd3d560f4fafc9155bc6a8b69ea2d79e3c759190579fc6f68acda3a3756f6429beac400873ada
data/lib/gym.rb CHANGED
@@ -19,9 +19,12 @@ module Gym
19
19
 
20
20
  attr_accessor :project
21
21
 
22
+ attr_accessor :cache
23
+
22
24
  def config=(value)
23
25
  @config = value
24
26
  DetectValues.set_additional_default_values
27
+ @cache = {}
25
28
  end
26
29
 
27
30
  def gymfile_name
@@ -76,22 +76,22 @@ module Gym
76
76
 
77
77
  # The path to set the Derived Data to
78
78
  def build_path
79
- unless @build_path
79
+ unless Gym.cache[:build_path]
80
80
  day = Time.now.strftime("%F") # e.g. 2015-08-07
81
81
 
82
- @build_path = File.expand_path("~/Library/Developer/Xcode/Archives/#{day}/")
83
- FileUtils.mkdir_p @build_path
82
+ Gym.cache[:build_path] = File.expand_path("~/Library/Developer/Xcode/Archives/#{day}/")
83
+ FileUtils.mkdir_p Gym.cache[:build_path]
84
84
  end
85
- @build_path
85
+ Gym.cache[:build_path]
86
86
  end
87
87
 
88
88
  def archive_path
89
- @archive_path ||= Gym.config[:archive_path]
90
- unless @archive_path
89
+ Gym.cache[:archive_path] ||= Gym.config[:archive_path]
90
+ unless Gym.cache[:archive_path]
91
91
  file_name = [Gym.config[:output_name], Time.now.strftime("%F %H.%M.%S")] # e.g. 2015-08-07 14.49.12
92
- @archive_path = File.join(build_path, file_name.join(" ") + ".xcarchive")
92
+ Gym.cache[:archive_path] = File.join(build_path, file_name.join(" ") + ".xcarchive")
93
93
  end
94
- return @archive_path
94
+ return Gym.cache[:archive_path]
95
95
  end
96
96
  end
97
97
  end
@@ -30,17 +30,17 @@ module Gym
30
30
 
31
31
  # We export the ipa into this directory, as we can't specify the ipa file directly
32
32
  def temporary_output_path
33
- @temporary_output_path ||= File.join("/tmp", Time.now.to_i.to_s)
33
+ Gym.cache[:temporary_output_path] ||= File.join("/tmp", Time.now.to_i.to_s)
34
34
  end
35
35
 
36
36
  def ipa_path
37
- unless @ipa_path
37
+ unless Gym.cache[:ipa_path]
38
38
  path = Dir[File.join(temporary_output_path, "*.ipa")].last
39
39
 
40
- @ipa_path = File.join(temporary_output_path, "#{Gym.config[:output_name]}.ipa")
41
- FileUtils.mv(path, @ipa_path) if File.expand_path(path).downcase != File.expand_path(@ipa_path).downcase
40
+ Gym.cache[:ipa_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.ipa")
41
+ FileUtils.mv(path, Gym.cache[:ipa_path]) if File.expand_path(path).downcase != File.expand_path(Gym.cache[:ipa_path]).downcase
42
42
  end
43
- @ipa_path
43
+ Gym.cache[:ipa_path]
44
44
  end
45
45
 
46
46
  # The path the the dsym file for this app. Might be nil
@@ -50,8 +50,8 @@ module Gym
50
50
 
51
51
  # The path the config file we use to sign our app
52
52
  def config_path
53
- @config_path ||= "/tmp/gym_config_#{Time.now.to_i}.plist"
54
- return @config_path
53
+ Gym.cache[:config_path] ||= "/tmp/gym_config_#{Time.now.to_i}.plist"
54
+ return Gym.cache[:config_path]
55
55
  end
56
56
 
57
57
  private
@@ -1,4 +1,4 @@
1
1
  module Gym
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  DESCRIPTION = "Building your iOS apps has never been easier"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gym
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause