mpxj 9.2.0 → 9.2.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mpxj might be problematic. Click here for more details.

@@ -1,18 +1,18 @@
1
- module MPXJ
2
- # Represents a relationship between a task and a resource in a project plan
3
- class Assignment < Container
4
- # Retrieve the task associated with this assignment
5
- #
6
- # @return [Task] the task associated with this assignment.
7
- def task
8
- parent_project.get_task_by_unique_id(task_unique_id)
9
- end
10
-
11
- # Retrieve the resource associated with this assignment
12
- #
13
- # @return [Resource] the resource associated with this assignment.
14
- def resource
15
- parent_project.get_resource_by_unique_id(resource_unique_id)
16
- end
17
- end
18
- end
1
+ module MPXJ
2
+ # Represents a relationship between a task and a resource in a project plan
3
+ class Assignment < Container
4
+ # Retrieve the task associated with this assignment
5
+ #
6
+ # @return [Task] the task associated with this assignment.
7
+ def task
8
+ parent_project.get_task_by_unique_id(task_unique_id)
9
+ end
10
+
11
+ # Retrieve the resource associated with this assignment
12
+ #
13
+ # @return [Resource] the resource associated with this assignment.
14
+ def resource
15
+ parent_project.get_resource_by_unique_id(resource_unique_id)
16
+ end
17
+ end
18
+ end
data/lib/mpxj/mpxj.jar CHANGED
Binary file
@@ -1,5 +1,5 @@
1
- module MPXJ
2
- # Represents the properties of a project
3
- class Properties < Container
4
- end
5
- end
1
+ module MPXJ
2
+ # Represents the properties of a project
3
+ class Properties < Container
4
+ end
5
+ end
data/lib/mpxj/relation.rb CHANGED
@@ -1,5 +1,5 @@
1
- module MPXJ
2
- # Represents a relationship between two tasks in a project plan
3
- class Relation < Container
4
- end
5
- end
1
+ module MPXJ
2
+ # Represents a relationship between two tasks in a project plan
3
+ class Relation < Container
4
+ end
5
+ end
data/lib/mpxj/resource.rb CHANGED
@@ -1,10 +1,10 @@
1
- module MPXJ
2
- # Represents a resource in a project plan
3
- class Resource < Container
4
- attr_reader :assignments
5
- def initialize(parent_project, attribute_types, attribute_values)
6
- super(parent_project, attribute_types, attribute_values)
7
- @assignments = []
8
- end
9
- end
10
- end
1
+ module MPXJ
2
+ # Represents a resource in a project plan
3
+ class Resource < Container
4
+ attr_reader :assignments
5
+ def initialize(parent_project, attribute_types, attribute_values)
6
+ super(parent_project, attribute_types, attribute_values)
7
+ @assignments = []
8
+ end
9
+ end
10
+ end
data/lib/mpxj/task.rb CHANGED
@@ -1,52 +1,52 @@
1
- module MPXJ
2
- # Represents a task in a project plan
3
- class Task < Container
4
- attr_reader :assignments
5
- attr_reader :predecessors
6
- attr_reader :successors
7
- attr_reader :child_tasks
8
-
9
- def initialize(parent_project, attribute_types, attribute_values)
10
- super(parent_project, attribute_types, attribute_values)
11
- @assignments = []
12
- @child_tasks = []
13
- process_relations
14
- process_hierarchy
15
- end
16
-
17
- # Retrieve the parent task of this task
18
- #
19
- # @return [Task] if this task is the child of another task
20
- # @return [nil] if this is the root task
21
- def parent_task
22
- parent_project.get_task_by_unique_id(parent_task_unique_id)
23
- end
24
-
25
- private
26
-
27
- RELATION_ATTRIBUTE_TYPES = {"task_unique_id" => 17, "lag" => 6, "type" => 10}
28
-
29
- def process_relations
30
- @predecessors = process_relation_list(attribute_values["predecessors"])
31
- @successors = process_relation_list(attribute_values["successors"])
32
- end
33
-
34
- def process_relation_list(list)
35
- result = []
36
- if list
37
- list.each do |attribute_values|
38
- result << Relation.new(self, RELATION_ATTRIBUTE_TYPES, attribute_values)
39
- end
40
- end
41
- result
42
- end
43
-
44
- def process_hierarchy
45
- if parent_task
46
- parent_task.child_tasks << self
47
- else
48
- parent_project.child_tasks << self
49
- end
50
- end
51
- end
52
- end
1
+ module MPXJ
2
+ # Represents a task in a project plan
3
+ class Task < Container
4
+ attr_reader :assignments
5
+ attr_reader :predecessors
6
+ attr_reader :successors
7
+ attr_reader :child_tasks
8
+
9
+ def initialize(parent_project, attribute_types, attribute_values)
10
+ super(parent_project, attribute_types, attribute_values)
11
+ @assignments = []
12
+ @child_tasks = []
13
+ process_relations
14
+ process_hierarchy
15
+ end
16
+
17
+ # Retrieve the parent task of this task
18
+ #
19
+ # @return [Task] if this task is the child of another task
20
+ # @return [nil] if this is the root task
21
+ def parent_task
22
+ parent_project.get_task_by_unique_id(parent_task_unique_id)
23
+ end
24
+
25
+ private
26
+
27
+ RELATION_ATTRIBUTE_TYPES = {"task_unique_id" => 17, "lag" => 6, "type" => 10}
28
+
29
+ def process_relations
30
+ @predecessors = process_relation_list(attribute_values["predecessors"])
31
+ @successors = process_relation_list(attribute_values["successors"])
32
+ end
33
+
34
+ def process_relation_list(list)
35
+ result = []
36
+ if list
37
+ list.each do |attribute_values|
38
+ result << Relation.new(self, RELATION_ATTRIBUTE_TYPES, attribute_values)
39
+ end
40
+ end
41
+ result
42
+ end
43
+
44
+ def process_hierarchy
45
+ if parent_task
46
+ parent_task.child_tasks << self
47
+ else
48
+ parent_project.child_tasks << self
49
+ end
50
+ end
51
+ end
52
+ end
data/lib/mpxj/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # MPXJ gem module
2
2
  module MPXJ
3
3
  # MPXJ gem version number
4
- VERSION = "9.2.0"
4
+ VERSION = "9.2.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mpxj
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.2.0
4
+ version: 9.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Iles
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-30 00:00:00.000000000 Z
11
+ date: 2021-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  requirements: []
174
- rubygems_version: 3.0.6
174
+ rubygems_version: 3.2.0
175
175
  signing_key:
176
176
  specification_version: 4
177
177
  summary: The MPXJ gem allows Ruby applications to work with schedule data from project