xcoder 0.0.18 → 0.0.19
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.
- data/README.md +18 -2
- data/lib/xcode/testflight.rb +33 -14
- data/lib/xcode/version.rb +1 -1
- metadata +11 -11
data/README.md
CHANGED
@@ -92,9 +92,25 @@ The missing component here is to be able to manipulate keychains. This is quite
|
|
92
92
|
|
93
93
|
### Testflight
|
94
94
|
|
95
|
-
The common output of this build/package process is to upload to testflight. This
|
95
|
+
The common output of this build/package process is to upload to testflight. This is pretty simple with xcoder:
|
96
96
|
|
97
|
-
|
97
|
+
builder.upload(API_TOKEN, TEAM_TOKEN) do |tf|
|
98
|
+
tf.notes = "some release notes"
|
99
|
+
tf.notify = true # Whether to send a notification to users, default is true
|
100
|
+
tf.lists << "AList" # The lists to distribute the build to
|
101
|
+
end
|
102
|
+
|
103
|
+
You can also optionally set a .proxy= property or just set the HTTP_PROXY environment variable.
|
104
|
+
|
105
|
+
### OCUnit to JUnit
|
106
|
+
|
107
|
+
You can invoke your test target/bundle from the builder
|
108
|
+
|
109
|
+
builder.test do |report|
|
110
|
+
report.write 'test-reports', :junit
|
111
|
+
end
|
112
|
+
|
113
|
+
This will invoke the test target, capture the output and write the junit reports to the test-reports directory. Currently only junit is supported.
|
98
114
|
|
99
115
|
## Tests
|
100
116
|
|
data/lib/xcode/testflight.rb
CHANGED
@@ -11,25 +11,44 @@ module Xcode
|
|
11
11
|
@notify = true
|
12
12
|
@notes = nil
|
13
13
|
@lists = []
|
14
|
+
@proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
|
14
15
|
end
|
15
16
|
|
16
17
|
def upload(ipa_path, dsymzip_path=nil)
|
17
|
-
# cmd = []
|
18
|
-
RestClient.proxy = @proxy || ENV['http_proxy'] || ENV['HTTP_PROXY']
|
19
|
-
RestClient.log = '/tmp/restclient.log'
|
20
|
-
|
21
18
|
puts "Uploading to Testflight..."
|
22
|
-
response = RestClient.post('http://testflightapp.com/api/builds.json',
|
23
|
-
:file => File.new(ipa_path),
|
24
|
-
:dsym => File.new(dsymzip_path),
|
25
|
-
:api_token => @api_token,
|
26
|
-
:team_token => @team_token,
|
27
|
-
:notes => @notes,
|
28
|
-
:notify => @notify ? 'True' : 'False',
|
29
|
-
:distribution_lists => @lists.join(',')
|
30
|
-
)
|
31
19
|
|
32
|
-
|
20
|
+
# RestClient.proxy = @proxy || ENV['http_proxy'] || ENV['HTTP_PROXY']
|
21
|
+
# RestClient.log = '/tmp/restclient.log'
|
22
|
+
#
|
23
|
+
# response = RestClient.post('http://testflightapp.com/api/builds.json',
|
24
|
+
# :file => File.new(ipa_path),
|
25
|
+
# :dsym => File.new(dsymzip_path),
|
26
|
+
# :api_token => @api_token,
|
27
|
+
# :team_token => @team_token,
|
28
|
+
# :notes => @notes,
|
29
|
+
# :notify => @notify ? 'True' : 'False',
|
30
|
+
# :distribution_lists => @lists.join(',')
|
31
|
+
# )
|
32
|
+
#
|
33
|
+
# json = JSON.parse(response)
|
34
|
+
# puts " + Done, got: #{json.inspect}"
|
35
|
+
# json
|
36
|
+
|
37
|
+
cmd = []
|
38
|
+
cmd << 'curl'
|
39
|
+
cmd << "--proxy #{@proxy}" unless @proxy.nil?
|
40
|
+
cmd << "-X POST http://testflightapp.com/api/builds.json"
|
41
|
+
cmd << "-F file=@\"#{ipa_path}\""
|
42
|
+
cmd << "-F dsym=@\"#{dsymzip_path}\"" unless dsymzip_path.nil?
|
43
|
+
cmd << "-F api_token='#{@api_token}'"
|
44
|
+
cmd << "-F team_token='#{@team_token}'"
|
45
|
+
cmd << "-F notes=\"#{@notes}\"" unless @notes.nil?
|
46
|
+
cmd << "-F notify=#{@notify ? 'True' : 'False'}"
|
47
|
+
cmd << "-F distribution_lists='#{@lists.join(',')}'" unless @lists.count==0
|
48
|
+
|
49
|
+
response = Xcode::Shell.execute(cmd)
|
50
|
+
|
51
|
+
json = JSON.parse(response.join(''))
|
33
52
|
puts " + Done, got: #{json.inspect}"
|
34
53
|
json
|
35
54
|
end
|
data/lib/xcode/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-10 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &70203942211620 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70203942211620
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: plist
|
27
|
-
requirement: &
|
27
|
+
requirement: &70203942211200 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70203942211200
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: nokogiri
|
38
|
-
requirement: &
|
38
|
+
requirement: &70203942210780 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70203942210780
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: builder
|
49
|
-
requirement: &
|
49
|
+
requirement: &70203942210360 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70203942210360
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rest-client
|
60
|
-
requirement: &
|
60
|
+
requirement: &70203942209940 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70203942209940
|
69
69
|
description: Provides a ruby based object-model for parsing project structures and
|
70
70
|
invoking builds
|
71
71
|
email:
|