firespring_dev_commands 2.1.31.pre.alpha.2 → 2.1.31
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/aws/cloudformation.rb +10 -3
- 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/time.rb +2 -1
- data/lib/firespring_dev_commands/target_process/user.rb +13 -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 -7
- data/lib/firespring_dev_commands/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0eee4b21d3098e76567bcc444c62b11d56963e638bbbc0d3cd02966fefb0d409
|
4
|
+
data.tar.gz: ae4c8e59b6e01b26aa6e205dc63b6edff11d1b6746c3111baeddaf74c4d97173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7968d613f3aa93a274205f92253888bb02d619a825ea025f1b6c15db0b3717f6e74e4f3bed91487f8ed6df3018fbd772dbb09dbd50bc6d9c0e895411b316555e
|
7
|
+
data.tar.gz: c67717d0593624bfaf84757d4c6d7af54f85a3d2088c5850740fce64313884a4629263a0d76bdfbc13945deb1c998f332fa9c5163be62a01d5eb940eb8ced31f
|
@@ -21,9 +21,10 @@ module Dev
|
|
21
21
|
# Finished status
|
22
22
|
FINISHED = :finished
|
23
23
|
|
24
|
-
attr_accessor :client, :name, :template_filename, :parameters, :capabilities, :failure_behavior, :state
|
24
|
+
attr_accessor :client, :name, :template_filename, :parameters, :capabilities, :failure_behavior, :preserve_parameters_on_update, :state
|
25
25
|
|
26
|
-
def initialize(name, template_filename, parameters: Dev::Aws::Cloudformation::Parameters.new, capabilities: [], failure_behavior: 'ROLLBACK'
|
26
|
+
def initialize(name, template_filename, parameters: Dev::Aws::Cloudformation::Parameters.new, capabilities: [], failure_behavior: 'ROLLBACK',
|
27
|
+
preserve_parameters_on_update: false)
|
27
28
|
raise 'parameters must be an intsance of parameters' unless parameters.is_a?(Dev::Aws::Cloudformation::Parameters)
|
28
29
|
|
29
30
|
@client = nil
|
@@ -32,6 +33,7 @@ module Dev
|
|
32
33
|
@parameters = parameters
|
33
34
|
@capabilities = capabilities
|
34
35
|
@failure_behavior = failure_behavior
|
36
|
+
@preserve_parameters_on_update = preserve_parameters_on_update
|
35
37
|
@state = NOT_STARTED
|
36
38
|
end
|
37
39
|
|
@@ -81,11 +83,16 @@ module Dev
|
|
81
83
|
# Call upload function to get the s3 url
|
82
84
|
template_url = upload(template_filename)
|
83
85
|
|
86
|
+
update_parameters = if preserve_parameters_on_update
|
87
|
+
parameters.preserve
|
88
|
+
else
|
89
|
+
parameters.default
|
90
|
+
end
|
84
91
|
# Update the cloudformation stack
|
85
92
|
client.update_stack(
|
86
93
|
stack_name: name,
|
87
94
|
template_url:,
|
88
|
-
parameters:
|
95
|
+
parameters: update_parameters,
|
89
96
|
capabilities:
|
90
97
|
)
|
91
98
|
@state = STARTED
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module Dev
|
2
2
|
class TargetProcess
|
3
|
+
# The class to query time information from Target Process
|
3
4
|
class Time
|
4
5
|
# The resource type for the api endpoint
|
5
6
|
RESOURCE_TYPE = 'Time'.freeze
|
6
7
|
|
7
|
-
# The api path for
|
8
|
+
# The api path for time requests
|
8
9
|
PATH = '/Time'.freeze
|
9
10
|
|
10
11
|
attr_accessor :data, :id, :type, :description, :hours, :date, :story, :user
|
@@ -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,12 @@ 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
|
+
# Get the user with the given id and return that object
|
23
|
+
def self.get(id)
|
24
|
+
new(TargetProcess.new.get("#{User::PATH}/#{id}", Query.new))
|
13
25
|
end
|
14
26
|
end
|
15
27
|
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,17 +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)
|
123
|
+
yield ary.last if block_given?
|
120
124
|
end
|
121
|
-
ary.each(&)
|
122
125
|
end
|
123
126
|
end
|
124
127
|
|
@@ -141,8 +144,11 @@ module Dev
|
|
141
144
|
parsed_response['Items'].each(&)
|
142
145
|
|
143
146
|
while parsed_response['Next']
|
144
|
-
|
145
|
-
|
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)
|
146
152
|
|
147
153
|
parsed_response = JSON.parse(response.body)
|
148
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
|
4
|
+
version: 2.1.31
|
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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -413,9 +413,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
413
413
|
version: '3.1'
|
414
414
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
415
415
|
requirements:
|
416
|
-
- - "
|
416
|
+
- - ">="
|
417
417
|
- !ruby/object:Gem::Version
|
418
|
-
version:
|
418
|
+
version: '0'
|
419
419
|
requirements: []
|
420
420
|
rubygems_version: 3.4.10
|
421
421
|
signing_key:
|