mpxj 9.2.0 → 9.2.1
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 +4 -4
- data/README.md +125 -125
- data/bin/console +14 -14
- data/bin/setup +7 -7
- data/docs/AssignmentAttributes.md +162 -162
- data/docs/PropertiesAttributes.md +128 -128
- data/docs/RelationAttributes.md +5 -5
- data/docs/ResourceAttributes.md +201 -201
- data/docs/TaskAttributes.md +318 -318
- data/legal/licence.rtfparserkit.txt +202 -202
- data/lib/mpxj/assignment.rb +18 -18
- data/lib/mpxj/mpxj.jar +0 -0
- data/lib/mpxj/properties.rb +5 -5
- data/lib/mpxj/relation.rb +5 -5
- data/lib/mpxj/resource.rb +10 -10
- data/lib/mpxj/task.rb +52 -52
- data/lib/mpxj/version.rb +1 -1
- metadata +3 -3
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
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.
|
|
4
|
+
version: 9.2.1
|
|
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-
|
|
11
|
+
date: 2021-04-04 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
|
|
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
|