firespring_dev_commands 2.1.31.pre.alpha.1 → 2.1.31.pre.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/firespring_dev_commands/target_process/release.rb +1 -1
- data/lib/firespring_dev_commands/target_process/team_assignment.rb +1 -1
- data/lib/firespring_dev_commands/target_process/user.rb +12 -1
- data/lib/firespring_dev_commands/target_process/user_story.rb +1 -1
- data/lib/firespring_dev_commands/target_process/user_story_history.rb +1 -1
- data/lib/firespring_dev_commands/target_process.rb +13 -9
- data/lib/firespring_dev_commands/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e388b6e621433ccf04ef3976f1ed86b599876cda42273b75c443eeb5b2d4a4c
|
4
|
+
data.tar.gz: 9b63682ddb9b33e0215807037a01ea839491dba5512c8cb706da58507480eb23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9df2493a03611a7c4ad05f51cf3e2b432162704efbc97b8e451d7dfa7c3aec2c9dd5eb481d924fed1a9942ac1f5d24470efaadd0f4caf9f03eef88a1f29c14a
|
7
|
+
data.tar.gz: a6b85d0c59225c4877aa0de44ef4882aad7a02cd2dfdcfc0d9915bf29280deeb8efa715406f6ccffa56ccd4452064904fa391963af66b097c4b5e5ee90bef581
|
@@ -2,7 +2,13 @@ module Dev
|
|
2
2
|
class TargetProcess
|
3
3
|
# Class containing user information
|
4
4
|
class User
|
5
|
-
|
5
|
+
# The resource type for the api endpoint
|
6
|
+
RESOURCE_TYPE = 'User'.freeze
|
7
|
+
|
8
|
+
# The api path for user requests
|
9
|
+
PATH = '/User'.freeze
|
10
|
+
|
11
|
+
attr_accessor :data, :id, :type, :name, :login, :email
|
6
12
|
|
7
13
|
def initialize(data)
|
8
14
|
@data = data
|
@@ -10,6 +16,11 @@ module Dev
|
|
10
16
|
@type = data['ResourceType']
|
11
17
|
@name = data['FullName']
|
12
18
|
@login = data['Login']
|
19
|
+
@email = data['Email']
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get(id)
|
23
|
+
new(TargetProcess.new.get("#{User::PATH}/#{id}", Query.new))
|
13
24
|
end
|
14
25
|
end
|
15
26
|
end
|
@@ -72,8 +72,8 @@ module Dev
|
|
72
72
|
[].tap do |ary|
|
73
73
|
get(Release::PATH, query) do |result|
|
74
74
|
ary << Release.new(result)
|
75
|
+
yield ary.last if block_given?
|
75
76
|
end
|
76
|
-
ary.each(&)
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
@@ -84,8 +84,8 @@ module Dev
|
|
84
84
|
[].tap do |ary|
|
85
85
|
get(UserStory::PATH, query) do |result|
|
86
86
|
ary << UserStory.new(result)
|
87
|
+
yield ary.last if block_given?
|
87
88
|
end
|
88
|
-
ary.each(&)
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
@@ -96,8 +96,8 @@ module Dev
|
|
96
96
|
[].tap do |ary|
|
97
97
|
get(UserStoryHistory::PATH, query) do |result|
|
98
98
|
ary << UserStoryHistory.new(result)
|
99
|
+
yield ary.last if block_given?
|
99
100
|
end
|
100
|
-
ary.each(&)
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
@@ -108,19 +108,20 @@ module Dev
|
|
108
108
|
[].tap do |ary|
|
109
109
|
get(TeamAssignment::PATH, query) do |result|
|
110
110
|
ary << TeamAssignment.new(result)
|
111
|
+
yield ary.last if block_given?
|
111
112
|
end
|
112
|
-
ary.each(&)
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
|
+
# Perform a query to the time api path
|
117
|
+
# Call the given block (if present) with each time
|
118
|
+
# Return all times
|
116
119
|
def times(query, &)
|
117
120
|
[].tap do |ary|
|
118
121
|
get(Time::PATH, query) do |result|
|
119
122
|
ary << Time.new(result)
|
120
|
-
|
121
|
-
exit 1
|
123
|
+
yield ary.last if block_given?
|
122
124
|
end
|
123
|
-
ary.each(&)
|
124
125
|
end
|
125
126
|
end
|
126
127
|
|
@@ -143,8 +144,11 @@ module Dev
|
|
143
144
|
parsed_response['Items'].each(&)
|
144
145
|
|
145
146
|
while parsed_response['Next']
|
146
|
-
|
147
|
-
|
147
|
+
next_query_string = URI(parsed_response['Next']).query
|
148
|
+
next_url = "/api/v1/#{path}"
|
149
|
+
next_url << "?#{next_query_string}" unless query_string.empty?
|
150
|
+
response = client.request_get(next_url, headers)
|
151
|
+
raise "Error querying #{next_url} [#{next_query_string}]: #{response.inspect}" unless response.response.is_a?(Net::HTTPSuccess)
|
148
152
|
|
149
153
|
parsed_response = JSON.parse(response.body)
|
150
154
|
return parsed_response unless parsed_response.key?('Items')
|
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.31.pre.alpha.
|
4
|
+
version: 2.1.31.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: 2024-04-
|
11
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|