spaceship 0.1.0 → 0.1.1
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 +4 -4
- data/lib/spaceship/tunes/tester.rb +4 -2
- data/lib/spaceship/tunes/tunes_client.rb +14 -6
- data/lib/spaceship/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cecb5ddd86fe2c720e348787497b72acf74a766
|
4
|
+
data.tar.gz: 4f97f971ebeb8c5a2d300c596725e5cac85da2f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a267147f381f12a03e0877a715a91cc788c1cf7f509b1d68647c3bb885e0d32055721bf24b821472bf1bd170ac34ceb48d77a4318372404f548ea2a5b3af854d
|
7
|
+
data.tar.gz: aa8361be2622f0edec39c4fa8fd6611f3bc492b5e02c2e3483020f129ccd0c850be93b120ecc05e824198ea0dbe87c7a85bd87f2fb1c51df3686ecc961c8c828
|
@@ -71,14 +71,16 @@ module Spaceship
|
|
71
71
|
# @param email (String) (required): The email of the new tester
|
72
72
|
# @param first_name (String) (optional): The first name of the new tester
|
73
73
|
# @param last_name (String) (optional): The last name of the new tester
|
74
|
+
# @param group (String) (optional): The name of the group this tester should be added to
|
74
75
|
# @example
|
75
76
|
# Spaceship::Tunes::Tester.external.create!(email: "tester@mathiascarignani.com", first_name: "Cary", last_name:"Bennett")
|
76
77
|
# @return (Tester): The newly created tester
|
77
|
-
def create!(email: nil, first_name: nil, last_name: nil)
|
78
|
+
def create!(email: nil, first_name: nil, last_name: nil, group: nil)
|
78
79
|
data = client.create_tester!(tester: self,
|
79
80
|
email: email,
|
80
81
|
first_name: first_name,
|
81
|
-
last_name: last_name
|
82
|
+
last_name: last_name,
|
83
|
+
group: group)
|
82
84
|
self.factory(data)
|
83
85
|
end
|
84
86
|
|
@@ -252,13 +252,12 @@ module Spaceship
|
|
252
252
|
parse_response(r, 'data')['users']
|
253
253
|
end
|
254
254
|
|
255
|
-
|
255
|
+
# @param group (String) an optional group name
|
256
|
+
def create_tester!(tester: nil, email: nil, first_name: nil, last_name: nil, group: nil)
|
256
257
|
url = tester.url[:create]
|
257
258
|
raise "Action not provided for this tester type." unless url
|
258
259
|
|
259
|
-
|
260
|
-
testers: [
|
261
|
-
{
|
260
|
+
tester_data = {
|
262
261
|
emailAddress: {
|
263
262
|
value: email
|
264
263
|
},
|
@@ -272,8 +271,17 @@ module Spaceship
|
|
272
271
|
value: true
|
273
272
|
}
|
274
273
|
}
|
275
|
-
|
276
|
-
|
274
|
+
|
275
|
+
if group
|
276
|
+
tester_data[:groups] = [{
|
277
|
+
id: nil,
|
278
|
+
name: {
|
279
|
+
value: group
|
280
|
+
}
|
281
|
+
}]
|
282
|
+
end
|
283
|
+
|
284
|
+
data = { testers: [tester_data] }
|
277
285
|
|
278
286
|
r = request(:post) do |req|
|
279
287
|
req.url url
|
data/lib/spaceship/version.rb
CHANGED