firespring_dev_commands 2.1.11.pre.alpha.1 → 2.1.11.pre.alpha.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
  SHA256:
3
- metadata.gz: 56bf08e32560ceaa334b8d40fca0488b851527a472b36e5338b49084d3da295b
4
- data.tar.gz: a54b0aaa2fd492e7a8ac2564fddec64458a0b2c742759b67ea8fc3758d7704ae
3
+ metadata.gz: fc8f0bc322b7f4a223de4a702efbf2a9d5018c35393e705c9ced4c144f646b77
4
+ data.tar.gz: f6ac473e759540fc0432e37e6a899cfa6628b07d38506e4d27223b395aaa7beb
5
5
  SHA512:
6
- metadata.gz: c319501a7c3dbad17908f5d1af9c7b63835a676eefc182cf11a054912dcda5b2b2b3430df4dcfeabed834c5146572d63bd5aaca99158c8cf2a64632112e13874
7
- data.tar.gz: bc6544562f620053912cc68772892c24d20dbcea9d171132518ec8f1a81adc9344ae8fc4d2bdfaf4712bbe7d57fe02d26e97828f5ba0ab0752fa5bb4a6f1f0c3
6
+ metadata.gz: c8913c2462bc151d46b53e8b70d1ef6ff0718a5713b206975f891a21560c262485c41253ca4b6780540d1d25b732687f4ff1b826771f2cea4c6815b41b5b8292
7
+ data.tar.gz: 50f74eba4f799fac640a6b82e2b463a9c91248a80ac2b6c9356e75259aabbeac83caa93ab82258697fa77f456b8ef8ae9778f4c188ae2c09318245c76e97f755
@@ -83,6 +83,11 @@ module Dev
83
83
  self << "(EndDate lt '#{end_date}')" if end_date
84
84
  end
85
85
 
86
+ def filter_date_between(start_date, end_date)
87
+ self << "(Date gte '#{start_date}')" if start_date
88
+ self << "(Date lt '#{end_date}')" if end_date
89
+ end
90
+
86
91
  # Add a filter that looks for stories which do not have a linked test plan
87
92
  def filter_by_missing_tests
88
93
  self << '(LinkedTestPlan is nil)'
@@ -0,0 +1,45 @@
1
+ module Dev
2
+ class TargetProcess
3
+ # Class containing user story information
4
+ class UserStoryHistory
5
+ # The resource type for the api endpoint
6
+ RESOURCE_TYPE = 'UserStoryHistory'.freeze
7
+
8
+ # The api path for user story requests
9
+ PATH = '/UserStoryHistories'.freeze
10
+
11
+ attr_accessor :type, :id, :source_entity_id, :name, :description, :start_date, :end_date, :create_date, :modify_date, :tags, :effort, :time_spent,
12
+ :last_state_change_date, :project, :owner, :creator, :release, :team, :priority, :state, :original_data
13
+
14
+ def initialize(data)
15
+ @id = data['Id']
16
+ @source_entity_id = data['SourceEntityId']
17
+ @type = data['ResourceType']
18
+ @name = data['Name']
19
+ @description = data['Description']
20
+ @state = data['EntityState']['Name'] if data['EntityState']
21
+ @project = Project.new(data['Project']) if data['Project']
22
+ @owner = User.new(data['Owner']) if data['Owner']
23
+ @creator = User.new(data['Creator']) if data['Creator']
24
+ @release = Release.new(data['Release']) if data['Release']
25
+ @team = Team.new(data['Team']) if data['Team']
26
+ @start_date = parse_time(data['StartDate'])
27
+ @end_date = parse_time(data['EndDate'])
28
+ @create_date = parse_time(data['CreateDate'])
29
+ @modify_date = parse_time(data['ModifyDate'])
30
+ @tags = data['Tags']
31
+ @effort = data['Effort']
32
+ @time_spent = data['TimeSpent']
33
+ @last_state_change_date = parse_time(data['LastStateChangeDate'])
34
+ @original_data = original_data
35
+ end
36
+
37
+ # Parse the dot net time representation into something that ruby can use
38
+ def parse_time(string)
39
+ return nil unless string && !string.empty?
40
+
41
+ Time.at(string.slice(6, 10).to_i)
42
+ end
43
+ end
44
+ end
45
+ end
@@ -45,6 +45,10 @@ module Dev
45
45
 
46
46
  # Initialize a new target process client using the given inputs
47
47
  def initialize(username: self.class.config.username, password: self.class.config.password, url: self.class.config.url)
48
+ raise 'username is required' if username.to_s.strip.empty?
49
+ raise 'password is required' if password.to_s.strip.empty?
50
+ raise 'url is required' if url.to_s.strip.empty?
51
+
48
52
  @username = username
49
53
  @password = password
50
54
  @auth = Base64.strict_encode64("#{@username}:#{@password}")
@@ -85,6 +89,18 @@ module Dev
85
89
  end
86
90
  end
87
91
 
92
+ # Perform a query to the user story history api path
93
+ # Call the given block (if present) with each user story history
94
+ # Return all user stories
95
+ def user_story_histories(query, &)
96
+ [].tap do |ary|
97
+ get(UserStoryHistory::PATH, query) do |result|
98
+ ary << UserStoryHistory.new(result)
99
+ end
100
+ ary.each(&)
101
+ end
102
+ end
103
+
88
104
  # Perform a query to the team assignments api path
89
105
  # Call the given block (if present) with each team assignment
90
106
  # Return all team assignments
@@ -6,6 +6,6 @@ module Dev
6
6
  # Use 'v.v.v.pre.alpha.v' for pre-release vesions
7
7
  # Use 'v.v.v.beta.v for beta versions
8
8
  # Use semantic versioning for any releases (https://semver.org/)
9
- VERSION = '2.1.11.pre.alpha.1'.freeze
9
+ VERSION = '2.1.11.pre.alpha.2'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firespring_dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.11.pre.alpha.1
4
+ version: 2.1.11.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
@@ -313,6 +313,7 @@ files:
313
313
  - lib/firespring_dev_commands/target_process/team_assignment.rb
314
314
  - lib/firespring_dev_commands/target_process/user.rb
315
315
  - lib/firespring_dev_commands/target_process/user_story.rb
316
+ - lib/firespring_dev_commands/target_process/user_story_history.rb
316
317
  - lib/firespring_dev_commands/templates/aws.rb
317
318
  - lib/firespring_dev_commands/templates/base_interface.rb
318
319
  - lib/firespring_dev_commands/templates/ci.rb