roi_calculator 0.2.0 → 0.3.0

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
- SHA1:
3
- metadata.gz: 16bd4ca3ba06d4e40dae6588b1cf9af5aaef6b8d
4
- data.tar.gz: 44bf9cd2cad6675cd2e8c018bde42d89ea321668
2
+ SHA256:
3
+ metadata.gz: 6a7a0e73a94faee6f8d2baec965a619a1d662d50e86309b2a0bbb033d1e3b894
4
+ data.tar.gz: 87dae151a9665f8bb89e0072c0c78ce3eb5ec131edf2c4eb0542d7748e099985
5
5
  SHA512:
6
- metadata.gz: b6b3a1624bf312a509c342496cdf5b1c39aa7abf3f2271d1b16c720c8260174dc02c39e5b78cadc3e1d442e4b7606f731515f4b4c9758e74f0988da942d138a1
7
- data.tar.gz: a823c2daa89b7d1ca93070ec6a3d5b7ace8949027d2873b68ad4ec6206a7c5adb4edf54f715d7f857fdf851747ee82c0634cc4bf7279e1ca1f73f2eb371338fb
6
+ metadata.gz: '009d852e1d6ac38aa486eba44a6751ecbd5cfec106bc5c829be44e9d7ee82fc2ab443cfd88c07f9a6c0a3be299fc8f66ff88f3d7712a3bd33be43f350ca9dbd5'
7
+ data.tar.gz: 8355d8b7edc808d6d5d674ce54500139897b7bd94bcd23c8fdc8c99f5a411e4522e24acfb4d9203f7fd40c9a74bd36cbeeb94b54f850eb31b81b056f89751a23
@@ -71,7 +71,7 @@ module ROI
71
71
  def to_a
72
72
  dates_with_position.map do |date|
73
73
  if @rentabilities[date]
74
- [date.strftime("%Y-%m-%d"), @rentabilities[date].share - 1]
74
+ [date.to_time.to_i, @rentabilities[date].share]
75
75
  end
76
76
  end.compact
77
77
  end
@@ -13,8 +13,8 @@ module ROI
13
13
  end
14
14
 
15
15
  def months(amount, date = end_date)
16
- scoped_start = WorkDay.last_until((date - amount.month).end_of_month)
17
- scoped_end = adjust_end_date(date)
16
+ scoped_start = WorkDay.last_until((date - (amount+1).month).end_of_month)
17
+ scoped_end = adjust_end_date((date - 1.month).end_of_month)
18
18
  check_gaps_and_format(scoped_start, scoped_end)
19
19
  end
20
20
 
@@ -1,3 +1,3 @@
1
1
  module ROI
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roi_calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adriano Bacha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-30 00:00:00.000000000 Z
11
+ date: 2020-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -123,8 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.4.8
126
+ rubygems_version: 3.0.8
128
127
  signing_key:
129
128
  specification_version: 4
130
129
  summary: Rentability and financial calculations