yolo 1.3.5 → 1.3.6

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e0da37b6adffca283ebb6a6803aef9d2597c1d27
4
+ data.tar.gz: c94d40d0f05cbc2af77ef2e201e72eccad46934d
5
+ SHA512:
6
+ metadata.gz: 371989a66dc466306acb36a6221defcf6f5fe3ae215255782feb08b4ebb0c25567d4fc52e61ea1a25f49aef437c36b676b668dd9acb95d07ec425962e343d995
7
+ data.tar.gz: 64ed3c0ebba731fbbf991092bdd093cf573700a9da4761fac5a6c3de09236df30f3cc751754aafcf8fb88414e7b8dddee1b071d56618fd4fdfefe4a74493786b
data/README.md CHANGED
@@ -2,7 +2,7 @@ yolo
2
2
  ====
3
3
 
4
4
  [![Coverage Status](https://coveralls.io/repos/alexfish/yolo/badge.png)](https://coveralls.io/r/alexfish/yolo)
5
- [![Build Status](https://travis-ci.org/alexfish/yolo.png)](https://travis-ci.org/alexefish/yolo)
5
+ [![Build Status](https://travis-ci.org/alexfish/yolo.png)](https://travis-ci.org/alexfish/yolo)
6
6
  [![Gem Version](https://badge.fury.io/rb/yolo.png)](http://badge.fury.io/rb/yolo)
7
7
 
8
8
  yolo is a RubyGem which provides a Ruby interface to Continuous Integration build tools. yolo is currently geared towards the Xcode toolchain and iOS development.
@@ -1,3 +1,5 @@
1
+ require "zip/zip"
2
+
1
3
  module Yolo
2
4
  module Deployment
3
5
 
@@ -20,7 +22,9 @@ module Yolo
20
22
  @progress_formatter = Yolo::Formatters::ProgressFormatter.new
21
23
  @progress_formatter.deploying_ipa(package_path)
22
24
 
23
- IO.popen(curl_string(package_path, opts)) do |io|
25
+ dsym_zip_path = generate_dsym_zip(package_path)
26
+
27
+ IO.popen(curl_string(package_path, dsym_zip_path, opts)) do |io|
24
28
  begin
25
29
  while line = io.readline
26
30
  response << line
@@ -122,19 +126,41 @@ module Yolo
122
126
  notes
123
127
  end
124
128
 
129
+ #
130
+ # Generates a zip file containing the dsym folder.
131
+ # The zip file is uploaded to test flight to help with debugging
132
+ # @param package_path The path to the package
133
+ #
134
+ # @return [String] The dSYM zip file location
135
+ def generate_dsym_zip(package_path)
136
+ dsym_path = package_path.sub(%r[\.ipa$],'.app.dSYM')
137
+
138
+ dsym_zip = File.path(dsym_path) + ".zip"
139
+ FileUtils.rm dsym_zip, :force => true
140
+
141
+ Zip::ZipFile.open(dsym_zip, 'w') do |zipfile|
142
+ Dir["#{dsym_path}/**/**"].reject{|f|f==dsym_zip}.each do |file|
143
+ zipfile.add(file.sub(dsym_path+'/',''),file)
144
+ end
145
+ return dsym_zip
146
+ end
147
+
148
+ end
149
+
125
150
  #
126
151
  # Generates the CURL command string for test flight distribution
127
152
  # @param package_path The path to the package
128
153
  # @param opts [Hash] The options array
129
154
  #
130
155
  # @return [String] The CURL command
131
- def curl_string(package_path, opts)
156
+ def curl_string(package_path, dsym_zip_path, opts)
132
157
  string = "curl http://testflightapp.com/api/builds.json -X POST -# "
133
158
  string = string + "-F file=@#{package_path} "
159
+ string = string + "-F dsym=@#{dsym_zip_path} "
134
160
  string = string + "-F api_token='#{api_token}' " if api_token.length > 0
135
161
  string = string + "-F team_token='#{team_token}' " if team_token.length > 0
136
162
  string = string + "-F notes='#{notes}' " if notes.length > 0
137
- string = string + "-F notify=#{notify(opts)}" if opts
163
+ string = string + "-F notify=#{notify(opts)} " if opts
138
164
  string = string + "-F distribution_lists=#{distribution_lists(opts)}" if opts and distribution_lists(opts).length > 0
139
165
  string
140
166
  end
@@ -32,6 +32,37 @@ module Yolo
32
32
  super
33
33
  end
34
34
 
35
+ #
36
+ # Returns the release class's mail_to attribute,
37
+ # if no attribute is set then check for the config env var
38
+ #
39
+ # @return The release class's mail_to attribute
40
+ def mail_to
41
+ mail_to = @mail_to
42
+
43
+ if !mail_to
44
+ mail_to = ENV['YOLO_RELEASE_MAIL_TO']
45
+ mail_to = mail_to.split(",")
46
+ end
47
+
48
+ return mail_to
49
+ end
50
+
51
+ #
52
+ # Returns the release class's configuration attribute,
53
+ # if no attribute is set then check for the config env var
54
+ #
55
+ # @return The release class's configuration attribute
56
+ def configuration
57
+ config = @configuration
58
+
59
+ if !config
60
+ config = ENV['YOLO_RELEASE_CONFIG']
61
+ end
62
+
63
+ return config
64
+ end
65
+
35
66
  #
36
67
  # Uses Xcode to find the full path to generated app file
37
68
  #
@@ -109,47 +109,51 @@ describe Yolo::Deployment::TestFlight do
109
109
  end
110
110
 
111
111
  it "should use curl" do
112
- @tf.instance_eval{curl_string("test", nil)}.should match(/curl/)
112
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should match(/curl/)
113
113
  end
114
114
 
115
115
  it "should set the correct URL" do
116
- @tf.instance_eval{curl_string("test", nil)}.should match(/http:\/\/testflightapp.com\/api\/builds.json/)
116
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should match(/http:\/\/testflightapp.com\/api\/builds.json/)
117
117
  end
118
118
 
119
119
  it "should be a post request" do
120
- @tf.instance_eval{curl_string("test", nil)}.should match(/-X POST -#/)
120
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should match(/-X POST -#/)
121
121
  end
122
122
 
123
123
  it "should set the file path" do
124
- @tf.instance_eval{curl_string("test", nil)}.should match(/-F file=@test/)
124
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should match(/-F file=@test/)
125
+ end
126
+
127
+ it "should set dsym zip path" do
128
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should match(/-F dsym=@testdsym/)
125
129
  end
126
130
 
127
131
  it "should set the api token" do
128
- @tf.instance_eval{curl_string("test", nil)}.should match(/-F api_token='apitoken'/)
132
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should match(/-F api_token='apitoken'/)
129
133
  end
130
134
 
131
135
  it "should set the team token" do
132
- @tf.instance_eval{curl_string("test", nil)}.should match(/-F team_token='teamtoken'/)
136
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should match(/-F team_token='teamtoken'/)
133
137
  end
134
138
 
135
139
  it "should set the notes" do
136
- @tf.instance_eval{curl_string("test", nil)}.should match(/-F notes='notes'/)
140
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should match(/-F notes='notes'/)
137
141
  end
138
142
 
139
143
  it "should set the notify string" do
140
- @tf.instance_eval{curl_string("test", {})}.should match(/-F notify=notify/)
144
+ @tf.instance_eval{curl_string("test", "testdsym", {})}.should match(/-F notify=notify/)
141
145
  end
142
146
 
143
147
  it "should set the distribution lists" do
144
- @tf.instance_eval{curl_string("test", {})}.should match(/-F distribution_lists=list/)
148
+ @tf.instance_eval{curl_string("test", "testdsym", {})}.should match(/-F distribution_lists=list/)
145
149
  end
146
150
 
147
151
  it "should not set notify with no options" do
148
- @tf.instance_eval{curl_string("test", nil)}.should_not match(/-F notify=notify/)
152
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should_not match(/-F notify=notify/)
149
153
  end
150
154
 
151
155
  it "should not set distribution lists with no options" do
152
- @tf.instance_eval{curl_string("test", nil)}.should_not match(/-F distribution_lists=list/)
156
+ @tf.instance_eval{curl_string("test", "testdsym", nil)}.should_not match(/-F distribution_lists=list/)
153
157
  end
154
158
  end
155
159
  end
@@ -185,5 +185,30 @@ describe Yolo::Tasks::Ios::Release do
185
185
  })
186
186
  @release.deploy("")
187
187
  end
188
+
189
+ it "should use the config env var if no config is set" do
190
+ config = "TEST_CONFIG"
191
+ ENV['YOLO_RELEASE_CONFIG'] = config
192
+ @release.configuration.should eq(config)
193
+ end
194
+
195
+ it "should use the config if it is set" do
196
+ config = "TEST_CONFIG"
197
+ @release.configuration = config
198
+ @release.configuration.should eq(config)
199
+ end
200
+
201
+ it "should use the mail_to env var if no config is set" do
202
+ mail_to = "TEST_MAIL_TO"
203
+ ENV['YOLO_RELEASE_MAIL_TO'] = mail_to
204
+ @release.mail_to.should eq([mail_to])
205
+ end
206
+
207
+ it "should use the mail_to if it is set" do
208
+ mail_to = "TEST_MAIL_TO"
209
+ @release.mail_to = mail_to
210
+ @release.mail_to.should eq(mail_to)
211
+ end
212
+
188
213
  end
189
214
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
5
- prerelease:
4
+ version: 1.3.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alex Fish
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-13 00:00:00.000000000 Z
11
+ date: 2014-05-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: xcodebuild-rb
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - '='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - '='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: ocunit2junit
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - '='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - '='
44
39
  - !ruby/object:Gem::Version
@@ -46,39 +41,34 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: calabash-cucumber
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: redcarpet
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rubyzip
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -161,26 +150,26 @@ files:
161
150
  homepage: http://rubygems.org/gems/yolo
162
151
  licenses:
163
152
  - MIT
153
+ metadata: {}
164
154
  post_install_message:
165
155
  rdoc_options: []
166
156
  require_paths:
167
157
  - lib
168
158
  required_ruby_version: !ruby/object:Gem::Requirement
169
- none: false
170
159
  requirements:
171
- - - ! '>='
160
+ - - '>='
172
161
  - !ruby/object:Gem::Version
173
162
  version: '0'
174
163
  required_rubygems_version: !ruby/object:Gem::Requirement
175
- none: false
176
164
  requirements:
177
- - - ! '>='
165
+ - - '>='
178
166
  - !ruby/object:Gem::Version
179
167
  version: '0'
180
168
  requirements: []
181
169
  rubyforge_project:
182
- rubygems_version: 1.8.23
170
+ rubygems_version: 2.0.3
183
171
  signing_key:
184
- specification_version: 3
172
+ specification_version: 4
185
173
  summary: YOLO!
186
174
  test_files: []
175
+ has_rdoc: