mpxj 4.7.6 → 5.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2656a315b29923fc6cb8fed83c6844335c6baeba
4
- data.tar.gz: 2dfc647773084c4f15c41ba3a80f3d367c47ad60
3
+ metadata.gz: 064540c89cdf2a506c065cdc9b139a40c46e2555
4
+ data.tar.gz: bc01f3da20fb42fbc886d2fa17e12c7e09d041a9
5
5
  SHA512:
6
- metadata.gz: 62b63a532e34f90423b2d317a565ad0a9cbf142b1b051ffd418ee5d244c4505a4b5917da8b29db2202fd9a4754e947c978d03ffd4faa29c4f0aef8c31ee99031
7
- data.tar.gz: 7017cefdbcd2b770e9e3f364de2d0a68a5382f705f70179ed3c36f01ff6ab767adeb1a4ceda1f26dbc5a96f69846f833577969f5dd25294d22b87ca49944c7b3
6
+ metadata.gz: e29bcd8d7c7c0aad550b06ea0e02ee0070166dad2efc0560d89d750b13d4f1c5923126d4e16ceaa9ec97fc04c3f77cc8f223081a8c102bc0df444d2a6d2c544e
7
+ data.tar.gz: 580ed7adda124b2f97b7ec6ec32c1455d0313b04d4a08b7d6293768212ee70e5556a967d7069b9bf34275f8ea6fa92189461ba53c9b4c903953bb7610c54163a
data/README.md CHANGED
@@ -109,8 +109,14 @@ Each attribute supported by these classes is represented by appropriate data typ
109
109
 
110
110
  The attributes supported by each class are listed here:
111
111
 
112
+ * [Properties Attributes](docs/PropertiesAttributes.md)
112
113
  * [Task Attributes](docs/TaskAttributes.md)
113
114
  * [Resource Attributes](docs/ResourceAttributes.md)
114
115
  * [Assignment Attributes](docs/AssignmentAttributes.md)
115
116
  * [Relation Attributes](docs/RelationAttributes.md)
116
117
 
118
+ ## Acknowledgements
119
+ This gem includes functionality provided by POI [http://poi.apache.org](http://poi.apache.org/)
120
+
121
+ This gem includes functionality provided by RTF Parser Kit [https://github.com/joniles/rtfparserkit](https://github.com/joniles/rtfparserkit/)
122
+
@@ -0,0 +1,128 @@
1
+ # Properties Attributes
2
+
3
+ Properties#start_date
4
+ Properties#currency_symbol
5
+ Properties#currency_symbol_position
6
+ Properties#currency_digits
7
+ Properties#thousands_separator
8
+ Properties#decimal_separator
9
+ Properties#default_duration_units
10
+ Properties#default_duration_is_fixed
11
+ Properties#default_work_units
12
+ Properties#default_standard_rate
13
+ Properties#default_overtime_rate
14
+ Properties#updating_task_status_updates_resource_status
15
+ Properties#split_in_progress_tasks
16
+ Properties#date_order
17
+ Properties#time_format
18
+ Properties#default_start_time
19
+ Properties#date_separator
20
+ Properties#time_separator
21
+ Properties#am_text
22
+ Properties#pm_text
23
+ Properties#date_format
24
+ Properties#bar_text_date_format
25
+ Properties#project_title
26
+ Properties#company
27
+ Properties#manager
28
+ Properties#default_calendar_name
29
+ Properties#schedule_from
30
+ Properties#current_date
31
+ Properties#comments
32
+ Properties#cost
33
+ Properties#baseline_cost
34
+ Properties#actual_cost
35
+ Properties#work
36
+ Properties#baseline_work
37
+ Properties#actual_work
38
+ Properties#work2
39
+ Properties#duration
40
+ Properties#baseline_duration
41
+ Properties#actual_duration
42
+ Properties#percentage_complete
43
+ Properties#baseline_start
44
+ Properties#baseline_finish
45
+ Properties#actual_start
46
+ Properties#actual_finish
47
+ Properties#start_variance
48
+ Properties#finish_variance
49
+ Properties#subject
50
+ Properties#author
51
+ Properties#keywords
52
+ Properties#hyperlink_base
53
+ Properties#default_end_time
54
+ Properties#project_externally_edited
55
+ Properties#category
56
+ Properties#minutes_per_day
57
+ Properties#days_per_month
58
+ Properties#minutes_per_week
59
+ Properties#fiscal_year_start
60
+ Properties#default_task_earned_value_method
61
+ Properties#remove_file_properties
62
+ Properties#move_completed_ends_back
63
+ Properties#new_tasks_estimated
64
+ Properties#spread_actual_cost
65
+ Properties#multiple_critical_paths
66
+ Properties#auto_add_new_resources_and_tasks
67
+ Properties#last_saved
68
+ Properties#status_date
69
+ Properties#move_remaining_starts_back
70
+ Properties#auto_link
71
+ Properties#microsoft_project_server_url
72
+ Properties#honor_constraints
73
+ Properties#admin_project
74
+ Properties#inserted_projects_like_summary
75
+ Properties#name
76
+ Properties#spread_percent_complete
77
+ Properties#move_completed_ends_forward
78
+ Properties#editable_actual_costs
79
+ Properties#unique_id
80
+ Properties#revision
81
+ Properties#new_tasks_effort_driven
82
+ Properties#move_remaining_starts_forward
83
+ Properties#actuals_in_sync
84
+ Properties#default_task_type
85
+ Properties#earned_value_method
86
+ Properties#creation_date
87
+ Properties#extended_creation_date
88
+ Properties#default_fixed_cost_accrual
89
+ Properties#critical_slack_limit
90
+ Properties#baseline_for_earned_value
91
+ Properties#fiscal_year_start_month
92
+ Properties#new_task_start_is_project_start
93
+ Properties#week_start_day
94
+ Properties#calculate_multiple_critical_paths
95
+ Properties#custom_properties
96
+ Properties#currency_code
97
+ Properties#show_project_summary_task
98
+ Properties#baseline_date
99
+ Properties#baseline1_date
100
+ Properties#baseline2_date
101
+ Properties#baseline3_date
102
+ Properties#baseline4_date
103
+ Properties#baseline5_date
104
+ Properties#baseline6_date
105
+ Properties#baseline7_date
106
+ Properties#baseline8_date
107
+ Properties#baseline9_date
108
+ Properties#baseline10_date
109
+ Properties#template
110
+ Properties#last_author
111
+ Properties#lastprinted
112
+ Properties#short_application_name
113
+ Properties#editing_time
114
+ Properties#presentation_format
115
+ Properties#content_type
116
+ Properties#content_status
117
+ Properties#language
118
+ Properties#document_version
119
+ Properties#mpx_delimiter
120
+ Properties#mpx_program_name
121
+ Properties#mpx_file_version
122
+ Properties#mpx_code_page
123
+ Properties#project_file_path
124
+ Properties#full_application_name
125
+ Properties#application_version
126
+ Properties#mpp_file_type
127
+ Properties#autofilter
128
+ Properties#finish_date
data/lib/mpxj.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "mpxj/version"
2
2
  require "mpxj/container"
3
3
  require "mpxj/project"
4
+ require "mpxj/properties"
4
5
  require "mpxj/resource"
5
6
  require "mpxj/task"
6
7
  require "mpxj/assignment"
@@ -10,7 +10,7 @@ module MPXJ
10
10
 
11
11
  # Retrieve the resource associated with this assignment
12
12
  #
13
- # @return [Resource] the resource associated with this assignment.
13
+ # @return [Resource] the resource associated with this assignment.
14
14
  def resource
15
15
  parent_project.get_resource_by_unique_id(resource_unique_id)
16
16
  end
@@ -11,7 +11,6 @@ module MPXJ
11
11
  @attribute_values = attribute_values
12
12
  end
13
13
 
14
-
15
14
  def method_missing(name, *args, &block)
16
15
  # We can probably do this more efficiently with dynamic methods... but let's get some feedback first!
17
16
  attribute_name = name.to_s
data/lib/mpxj/mpxj.jar CHANGED
Binary file
data/lib/mpxj/project.rb CHANGED
@@ -3,6 +3,7 @@ require 'json'
3
3
  module MPXJ
4
4
  # Represents a project plan
5
5
  class Project
6
+ attr_reader :properties
6
7
  attr_reader :all_resources
7
8
  attr_reader :all_tasks
8
9
  attr_reader :child_tasks
@@ -21,6 +22,7 @@ module MPXJ
21
22
 
22
23
  file = File.read(file_name)
23
24
  json_data = JSON.parse(file)
25
+ process_properties(json_data)
24
26
  process_resources(json_data)
25
27
  process_tasks(json_data)
26
28
  process_assignments(json_data)
@@ -64,6 +66,12 @@ module MPXJ
64
66
 
65
67
  private
66
68
 
69
+ def process_properties(json_data)
70
+ attribute_types = json_data["property_types"]
71
+ attribute_values = json_data["property_values"]
72
+ @properties = Properties.new(self, attribute_types, attribute_values)
73
+ end
74
+
67
75
  def process_resources(json_data)
68
76
  attribute_types = json_data["resource_types"]
69
77
  resources = json_data["resources"]
@@ -0,0 +1,5 @@
1
+ module MPXJ
2
+ # Represents the properties of a project
3
+ class Properties < Container
4
+ end
5
+ end
data/lib/mpxj/task.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module MPXJ
2
2
  # Represents a task in a project plan
3
- class Task < Container
3
+ class Task < Container
4
4
  attr_reader :assignments
5
5
  attr_reader :predecessors
6
6
  attr_reader :successors
@@ -17,7 +17,7 @@ module MPXJ
17
17
  # Retrieve the parent task of this task
18
18
  #
19
19
  # @return [Task] if this task is the child of another task
20
- # @return [nil] if this is the root task
20
+ # @return [nil] if this is the root task
21
21
  def parent_task
22
22
  parent_project.get_task_by_unique_id(parent_task_unique_id)
23
23
  end
@@ -25,7 +25,7 @@ module MPXJ
25
25
  private
26
26
 
27
27
  RELATION_ATTRIBUTE_TYPES = {"task_unique_id" => 17, "lag" => 6, "type" => 10}
28
-
28
+
29
29
  def process_relations
30
30
  @predecessors = process_relation_list(attribute_values["predecessors"])
31
31
  @successors = process_relation_list(attribute_values["successors"])
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 = "4.7.6"
4
+ VERSION = "5.0.0"
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: 4.7.6
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Iles
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,6 +91,7 @@ files:
91
91
  - bin/console
92
92
  - bin/setup
93
93
  - docs/AssignmentAttributes.md
94
+ - docs/PropertiesAttributes.md
94
95
  - docs/RelationAttributes.md
95
96
  - docs/ResourceAttributes.md
96
97
  - docs/TaskAttributes.md
@@ -105,6 +106,7 @@ files:
105
106
  - lib/mpxj/mpxj.jar
106
107
  - lib/mpxj/poi-3.11-20141221.jar
107
108
  - lib/mpxj/project.rb
109
+ - lib/mpxj/properties.rb
108
110
  - lib/mpxj/reader.rb
109
111
  - lib/mpxj/relation.rb
110
112
  - lib/mpxj/resource.rb