mpxj 9.6.0 → 9.8.2

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38a97476efa42f1b99b80ec52a58dce877b5fb7c30b1af539375ac932e152cfd
4
- data.tar.gz: 12aa39677a5115c44c2cdc32caa6ef2b51e06e442321a0aa5693ed366efddb5a
3
+ metadata.gz: fef90d8fa78f60a24b8a0d5c169fc73a73d181eb329a7a8d90a22a07f996488d
4
+ data.tar.gz: 37dae36e1fde5469e5238fa72f2b6e9bab4dee23b64879b9e9b6003d14b84000
5
5
  SHA512:
6
- metadata.gz: 69e673a8503875a9c2ec06cd16aa864613b4361f8f7b29f2680d92b7bf7a72f8a3e6f9f0e26d2c0a77c6f62105fbc3884411d7d5a409e7e0f3fcb932daa3b622
7
- data.tar.gz: 7b1f5fb567e9628fa8b2351f5dab58dcf6184d4257a64d96b871e34c004e80d7aa35a8d07ba93030b6a5b342e335d02ba4935914ecc3d9301d40870c2ddef995
6
+ metadata.gz: 51fe3c10e6bf51a2448a235d6d6e6a85b2cf4b8ab7c870d693fa4a041190f046cb9ed51114e3b42b6445a5cd2ebe3e3f992ed0436ed4cb3bbd46479ee2ced8cf
7
+ data.tar.gz: ae64ec86a23311e153141e526e7de6ba551455809757e81edc4bd13a3b6311b2fc77186442dd28022a7769f71cf0f933e4e1c9c4ee98dad53504c1241a0bdf7e
@@ -1,4 +1,3 @@
1
- require 'duration'
2
1
  require 'time'
3
2
 
4
3
  module MPXJ
@@ -16,9 +15,9 @@ module MPXJ
16
15
 
17
16
  def get_duration_value(attribute_value)
18
17
  if attribute_value.nil?
19
- Duration.new(0)
18
+ 0.0
20
19
  else
21
- Duration.new(attribute_value.to_i)
20
+ attribute_value.to_f
22
21
  end
23
22
  end
24
23
 
data/lib/mpxj/mpxj.jar CHANGED
Binary file
@@ -424,9 +424,9 @@ module MPXJ
424
424
  get_date_value(attribute_values['default_start_time'])
425
425
  end
426
426
 
427
- # Retrieve the Default Tssk Earned Value Method value
427
+ # Retrieve the Default Task Earned Value Method value
428
428
  #
429
- # @return Default Tssk Earned Value Method value
429
+ # @return Default Task Earned Value Method value
430
430
  def default_task_earned_value_method
431
431
  attribute_values['default_task_earned_value_method']
432
432
  end
@@ -2027,6 +2027,13 @@ module MPXJ
2027
2027
  get_integer_value(attribute_values['minutes_per_day'])
2028
2028
  end
2029
2029
 
2030
+ # Retrieve the Minutes per Month value
2031
+ #
2032
+ # @return Minutes per Month value
2033
+ def minutes_per_month
2034
+ get_integer_value(attribute_values['minutes_per_month'])
2035
+ end
2036
+
2030
2037
  # Retrieve the Minutes per Week value
2031
2038
  #
2032
2039
  # @return Minutes per Week value
@@ -2034,6 +2041,13 @@ module MPXJ
2034
2041
  get_integer_value(attribute_values['minutes_per_week'])
2035
2042
  end
2036
2043
 
2044
+ # Retrieve the Minutes per Year value
2045
+ #
2046
+ # @return Minutes per Year value
2047
+ def minutes_per_year
2048
+ get_integer_value(attribute_values['minutes_per_year'])
2049
+ end
2050
+
2037
2051
  # Retrieve the Move Completed Ends Back value
2038
2052
  #
2039
2053
  # @return Move Completed Ends Back value
@@ -2646,7 +2660,9 @@ module MPXJ
2646
2660
  'manager' => :string,
2647
2661
  'microsoft_project_server_url' => :boolean,
2648
2662
  'minutes_per_day' => :integer,
2663
+ 'minutes_per_month' => :integer,
2649
2664
  'minutes_per_week' => :integer,
2665
+ 'minutes_per_year' => :integer,
2650
2666
  'move_completed_ends_back' => :boolean,
2651
2667
  'move_completed_ends_forward' => :boolean,
2652
2668
  'move_remaining_starts_back' => :boolean,
data/lib/mpxj/reader.rb CHANGED
@@ -13,15 +13,16 @@ module MPXJ
13
13
  #
14
14
  # @param file_name [String] the name of the file to read
15
15
  # @param zone [ActiveSupport::TimeZone] an optional timezone
16
+ # @param time_units [Symbol] optional, specify the units for expressing durations. By default durations are in seconds, can pass :minutes, :hours, :days: weeks:, :months or :years
16
17
  # @return [Project] new Project instance
17
- def self.read(file_name, zone = nil)
18
+ def self.read(file_name, zone = nil, time_units = :seconds)
18
19
  project = nil
19
20
  json_file = Tempfile.new([File.basename(file_name, ".*"), '.json'])
20
21
  tz = zone || Time.zone || ActiveSupport::TimeZone["UTC"]
21
22
 
22
23
  begin
23
24
  classpath = "#{File.dirname(__FILE__)}/*"
24
- java_output = `java -cp \"#{classpath}\" #{jvm_args} net.sf.mpxj.sample.MpxjConvert \"#{file_name}\" \"#{json_file.path}\"`
25
+ java_output = `java -cp \"#{classpath}\" #{jvm_args} net.sf.mpxj.ruby.GenerateJson \"#{file_name}\" \"#{json_file.path}\" \"#{time_units}\"`
25
26
  if $?.exitstatus != 0
26
27
  report_error(java_output)
27
28
  end
@@ -1397,6 +1397,13 @@ module MPXJ
1397
1397
  attribute_values['board_status']
1398
1398
  end
1399
1399
 
1400
+ # Retrieve the Board Status ID value
1401
+ #
1402
+ # @return Board Status ID value
1403
+ def board_status_id
1404
+ get_integer_value(attribute_values['board_status_id'])
1405
+ end
1406
+
1400
1407
  # Retrieve the Budget Cost value
1401
1408
  #
1402
1409
  # @return Budget Cost value
@@ -7557,6 +7564,27 @@ module MPXJ
7557
7564
  attribute_values['sprint']
7558
7565
  end
7559
7566
 
7567
+ # Retrieve the Sprint Finish value
7568
+ #
7569
+ # @return Sprint Finish value
7570
+ def sprint_finish
7571
+ get_date_value(attribute_values['sprint_finish'])
7572
+ end
7573
+
7574
+ # Retrieve the Sprint ID value
7575
+ #
7576
+ # @return Sprint ID value
7577
+ def sprint_id
7578
+ get_integer_value(attribute_values['sprint_id'])
7579
+ end
7580
+
7581
+ # Retrieve the Sprint Start value
7582
+ #
7583
+ # @return Sprint Start value
7584
+ def sprint_start
7585
+ get_date_value(attribute_values['sprint_start'])
7586
+ end
7587
+
7560
7588
  # Retrieve the Start value
7561
7589
  #
7562
7590
  # @return Start value
@@ -7795,11 +7823,11 @@ module MPXJ
7795
7823
  get_boolean_value(attribute_values['task_mode'])
7796
7824
  end
7797
7825
 
7798
- # Retrieve the Task Summary value
7826
+ # Retrieve the Task Summary Name value
7799
7827
  #
7800
- # @return Task Summary value
7801
- def task_summary
7802
- attribute_values['task_summary']
7828
+ # @return Task Summary Name value
7829
+ def task_summary_name
7830
+ attribute_values['task_summary_name']
7803
7831
  end
7804
7832
 
7805
7833
  # Retrieve the TCPI value
@@ -8345,6 +8373,7 @@ module MPXJ
8345
8373
  'bcws' => :currency,
8346
8374
  'bid_item' => :string,
8347
8375
  'board_status' => :string,
8376
+ 'board_status_id' => :integer,
8348
8377
  'budget_cost' => :currency,
8349
8378
  'budget_work' => :work,
8350
8379
  'calendar' => :binary,
@@ -9225,6 +9254,9 @@ module MPXJ
9225
9254
  'spi' => :numeric,
9226
9255
  'splits' => :date_range_list,
9227
9256
  'sprint' => :string,
9257
+ 'sprint_finish' => :date,
9258
+ 'sprint_id' => :integer,
9259
+ 'sprint_start' => :date,
9228
9260
  'start' => :date,
9229
9261
  'start1' => :date,
9230
9262
  'start10' => :date,
@@ -9259,7 +9291,7 @@ module MPXJ
9259
9291
  'task_calendar' => :string,
9260
9292
  'task_calendar_guid' => :guid,
9261
9293
  'task_mode' => :boolean,
9262
- 'task_summary' => :string,
9294
+ 'task_summary_name' => :string,
9263
9295
  'tcpi' => :numeric,
9264
9296
  'teamstatus_pending' => :boolean,
9265
9297
  'text1' => :string,
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.6.0"
4
+ VERSION = "9.8.2"
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.6.0
4
+ version: 9.8.2
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-09-14 00:00:00.000000000 Z
11
+ date: 2021-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: ruby-duration
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: activesupport
85
71
  requirement: !ruby/object:Gem::Requirement