firespring_dev_commands 2.1.15.pre.alpha.1 → 2.1.15.pre.alpha.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1856da4e537764cfc357aa23d0b18f99eabb33533a0c5a7e3ae7d3c658267eb2
|
4
|
+
data.tar.gz: 7c47a334b53f9c6a5a6ca0bcc609bf3943beefd411befa3671e56ddfb486b1c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3492a4ab1fb934fc74ea382758dacf6fb042d3f779d83b4ae4581a4b14061b2d437ec875236b195938c982cfb1429dc1ae554617fd924ab7f11d19c46e71ba77
|
7
|
+
data.tar.gz: 8f6477ef4201b6c352bd08dbe0b11da211782e69a33c7acfdfa32e30014397dd476a59fcc9b243b8fe8cc33ae64f5fdf75fdee52d68affa9b9b8bae5c527611c
|
@@ -9,7 +9,7 @@ module Dev
|
|
9
9
|
@id = data['Id']
|
10
10
|
@type = data['Type']
|
11
11
|
@name = data['Name'].to_s.strip
|
12
|
-
@owner = User.new(data['Owner'])
|
12
|
+
@owner = User.new(data['Owner']) if data['Owner']
|
13
13
|
@complete = data['Complete']
|
14
14
|
@state = completion_to_state(data['Completion'])
|
15
15
|
@created = Time.parse(data['CreateTime']) if data['CreateTime']
|
@@ -2,7 +2,7 @@ module Dev
|
|
2
2
|
class BloomGrowth
|
3
3
|
# Class containing user information
|
4
4
|
class User
|
5
|
-
attr_accessor :data, :id, :type, :name
|
5
|
+
attr_accessor :data, :id, :type, :name, :rocks, :direct_reports
|
6
6
|
|
7
7
|
def initialize(data)
|
8
8
|
@data = data
|
@@ -10,6 +10,22 @@ module Dev
|
|
10
10
|
@type = data['Type']
|
11
11
|
@name = data['Name'].to_s.strip
|
12
12
|
end
|
13
|
+
|
14
|
+
def rocks
|
15
|
+
@rocks ||= [].tap do |ary|
|
16
|
+
get("/api/v1/rocks/user/#{id}") do |data|
|
17
|
+
ary << Rock.new(data)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def direct_reports
|
23
|
+
@direct_reports ||= [].tap do |ary|
|
24
|
+
get("/api/v1/users/#{id}/directreports") do |data|
|
25
|
+
ary << User.new(data)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
13
29
|
end
|
14
30
|
end
|
15
31
|
end
|
@@ -89,15 +89,6 @@ module Dev
|
|
89
89
|
@token
|
90
90
|
end
|
91
91
|
|
92
|
-
def visible_user_rocks(&)
|
93
|
-
{}.tap do |hsh|
|
94
|
-
visible_users.each do |user|
|
95
|
-
hsh[user] = user_rocks(user.id)
|
96
|
-
end
|
97
|
-
hsh.each(&)
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
92
|
def visible_users(&)
|
102
93
|
[].tap do |ary|
|
103
94
|
get('/api/v1/users/mineviewable') do |user_data|
|
@@ -107,15 +98,6 @@ module Dev
|
|
107
98
|
end
|
108
99
|
end
|
109
100
|
|
110
|
-
def user_rocks(user_id, &)
|
111
|
-
[].tap do |ary|
|
112
|
-
get("/api/v1/rocks/user/#{user_id}") do |rock_data|
|
113
|
-
ary << Rock.new(rock_data)
|
114
|
-
end
|
115
|
-
ary.each(&)
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
101
|
# Perform a get request to the given path using the given query
|
120
102
|
# Call the given block (if present) with each piece of data
|
121
103
|
# Return all pieces of data
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.15.pre.alpha.
|
4
|
+
version: 2.1.15.pre.alpha.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|