slowlane 1.2.1 → 1.2.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: 54cc6428d0bde63578b1c4a7a1f87ef81088ad1f
4
- data.tar.gz: 6daa808c5bef31ae74e1863046a829b7955fe168
3
+ metadata.gz: df099b47e27d5d21cf0229e67362d9569a53f974
4
+ data.tar.gz: 50eeaf332affa659c7debf61bc0213e467ae36b9
5
5
  SHA512:
6
- metadata.gz: 8bf4711b75005ad0a8e4b8e0a42d44cba10793da5f68c061dd26dd36f45bb6f17883338e9407c9450c545dc1bce116b2f4f3991d8822e591d5c72e596980be0d
7
- data.tar.gz: bf7f380e75422ad60c7836fe11829c9e84d6b19534052d818d880e2e54a998fdb8a8363bfba0a8728cf71597c5d8418294a3dbd519dc040946e8e5051ba4c58d
6
+ metadata.gz: 5fdb38358eb5651c43b50aea138bb9dc17c9c8729ba5c117f9c1bb012ef904d4f03c4463cf2a7d48be9ffcf5e49c1e16db28bbf908e536683eed5563430516fe
7
+ data.tar.gz: d2b3493de67c0dd42f857bda8e3aa38f9eec1568fd21ebf988632429d5250d0b4ac1a4ed902f3fa511d9e4d8e85c6390b4f91e379939d79a8791634ebdad2cfd
data/README.md CHANGED
@@ -32,6 +32,7 @@ results in binaries:
32
32
  - `slowlane-ipa` (NOTE: this might change to a more generic `slowlane-ios` command)
33
33
 
34
34
  ## Changes
35
+ - 1.2.2: (portal) add_device to provisioning profile
35
36
  - 1.2.1: (fabric) list all devices
36
37
  - 1.2.0: (fabric) list testers, list devices of tester, list members
37
38
  - 1.1.1: fix missing mechanize gem
@@ -63,6 +64,7 @@ results in binaries:
63
64
  - `slowlane-portal device list`
64
65
  - `slowlane-portal profile list`
65
66
  - `slowlane-portal profile decode <provisioningfile>`
67
+ - `slowlane-portal profile add_device <bundle_id> <udid>`
66
68
  - `slowlane-portal profile download`
67
69
  - `slowlane-portal psn list`
68
70
  - `slowlane-portal team list`
@@ -132,17 +132,37 @@ module Slowlane
132
132
  return testers['testers']
133
133
  end
134
134
 
135
- def list_devices(app_id,tester_id)
135
+ def list_tester_devices(tester_id)
136
136
  bootstrap
137
137
 
138
138
  page = get("/api/v2/organizations/#{self.team_id}/beta_distribution/testers/#{tester_id}/devices")
139
139
 
140
- devices = JSON.parse(page.body)
141
- return devices['devices']
140
+ data = JSON.parse(page.body)
141
+ return data['devices']
142
142
 
143
143
  end
144
144
 
145
145
 
146
+ def list_tester_apps(tester_id)
147
+ bootstrap
148
+
149
+ page = get("/api/v2/organizations/#{self.team_id}/beta_distribution/testers/#{tester_id}/apps")
150
+
151
+ data = JSON.parse(page.body)
152
+ return data['apps']
153
+
154
+ end
155
+
156
+ def list_tester_groups(tester_id)
157
+ bootstrap
158
+
159
+ page = get("/api/v2/organizations/#{self.team_id}/beta_distribution/testers/#{tester_id}/groups")
160
+
161
+ data = JSON.parse(page.body)
162
+ return data['groups']
163
+
164
+ end
165
+
146
166
  def csrf!
147
167
  page = get('/login')
148
168
 
@@ -23,15 +23,13 @@ module Slowlane
23
23
  exit(-1)
24
24
  end
25
25
 
26
- app = apps.first()
27
-
28
26
  all_devices = []
29
27
 
30
28
  testers = fabric.list_testers(nil)
31
29
  testers.each do |tester|
32
30
  tester_id = tester['id']
33
31
  if tester_id.is_a? Integer
34
- tester_devices = fabric.list_devices(app['id'],tester_id)
32
+ tester_devices = fabric.list_tester_devices(tester_id)
35
33
  tester_devices.each do |d|
36
34
  d['owner'] = tester['name']
37
35
  d['email'] = tester['email']
@@ -48,6 +46,7 @@ module Slowlane
48
46
  row = []
49
47
 
50
48
  row << device['owner']
49
+ row << device['email']
51
50
  row << device['identifier']
52
51
  row << device['model_name']
53
52
  row << device['platform']
@@ -40,6 +40,33 @@ module Slowlane
40
40
 
41
41
  end
42
42
 
43
+ desc "info", "get info of tester <email>"
44
+ def info(email)
45
+
46
+ c=Utils.credentials(options)
47
+
48
+ fabric = Slowlane::Fabric::Client.new
49
+ fabric.username = c.username
50
+ fabric.password = c.password
51
+ fabric.team = Utils.team(options)
52
+
53
+ tester = fabric.find_tester_by_email(email)
54
+ if tester.nil?
55
+ puts "No tester with email #{email} found"
56
+ exit(-1)
57
+ end
58
+
59
+ devices = fabric.list_tester_devices(tester['id'])
60
+ groups = fabric.list_tester_groups(tester['id'])
61
+ apps = fabric.list_tester_apps(tester['id'])
62
+
63
+ require 'pp'
64
+ pp devices
65
+ pp groups
66
+ pp apps
67
+
68
+ end
69
+
43
70
  desc "devices", "get devices of tester <email>"
44
71
  def devices(email)
45
72
 
@@ -56,14 +83,13 @@ module Slowlane
56
83
  exit(-1)
57
84
  end
58
85
 
59
- app = apps.first()
60
86
  tester = fabric.find_tester_by_email(email)
61
87
  if tester.nil?
62
88
  puts "No tester with email #{email} found"
63
89
  exit(-1)
64
90
  end
65
91
 
66
- devices = fabric.list_devices(app['id'],tester['id'])
92
+ devices = fabric.list_devices(tester['id'])
67
93
 
68
94
  headings = ['id', 'name', 'platform', 'type' , 'os_version', 'transferred']
69
95
  rows = []
@@ -52,7 +52,13 @@ module Slowlane
52
52
  end
53
53
 
54
54
  desc "add_device","add_device <bundle_id> <device_udid>"
55
- def device_add(bundle_id,device_udid)
55
+ def add_device(bundle_id,device_udid)
56
+ c=Utils.credentials(options)
57
+ Spaceship::Portal.login(c.username,c.password)
58
+
59
+ t=Utils.team(options)
60
+ Spaceship::Portal.client.team_id=t
61
+
56
62
  puts "Note: only adding devices to distribution adhoc profiles"
57
63
 
58
64
  device=Spaceship.device.find_by_udid(device_udid)
data/slowlane.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "slowlane"
5
- s.version = "1.2.1"
5
+ s.version = "1.2.2"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.license = 'MIT'
8
8
  s.authors = ["Patrick Debois"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slowlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Debois
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-14 00:00:00.000000000 Z
11
+ date: 2016-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor