-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathtest.rb
More file actions
43 lines (32 loc) · 730 Bytes
/
test.rb
File metadata and controls
43 lines (32 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# frozen_string_literal: true
require 'netrc'
_, token = Netrc.read['api.heroku.com']
require './lib/heroics'
heroics = Heroics.new(
:cache => Heroics::FileCache.new(token),
:token => token
)
heroics.apps.list
apps = heroics.apps.list # should use cache
puts(apps)
puts
app = heroics.apps.info('stringer-geemus')
puts(app)
puts
puts(heroics.apps('stringer-geemus'))
puts
collaborators = app.collaborators.list
puts(collaborators)
puts
collaborator_id = collaborators.first.id
collaborator = app.collaborators.info(collaborator_id)
puts(collaborator)
puts
regions = heroics.regions.list
puts(regions)
puts
region_id = regions.first.id
puts(heroics.regions.info(region_id))
puts
puts(heroics.regions(region_id))
puts