roi_calculator 0.1.2 → 0.1.3

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: 7e290e6bc3925af025fe8725c0ab6bd573dde0c3
4
- data.tar.gz: db78febf3722059d1fbaf9a60bb920374ec83b73
3
+ metadata.gz: e73b59656bf600db2b639605f42b694918fca169
4
+ data.tar.gz: d78e7e9aa58647501726b443ce99100b465e29c2
5
5
  SHA512:
6
- metadata.gz: deded280631b0fa49cbf78771c0bffd2e8479db5a9537e78e356f4330b71b3233b7068e81c8f25fd78ecf3a580c8e5e02d88d257232ceb270c0ff0a0693e27b8
7
- data.tar.gz: 5f6d733d5e411c3f6c7240e342544a540856bdb1401ed2add769e5f07dd37ba5a4d6731f89d5c41462fbdf554ed79e9b4ca74d0f83b23373cea252a239df90d9
6
+ metadata.gz: 026adbada9d8225891cf493f8b0f76da51d84d09a22eeda126264759c6a7fedfec5791cd4c6cfdb45d0f7dc68c0881b74f790196a066b64e9722c05188248b6e
7
+ data.tar.gz: 280becd770e1e37fa76641dd42d3a639e3c61d550c8aab02603da944a0440aab44e0c889e0e350534f667aff624fac978aa94e81a0b5840f4df4f8a71469a712
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "math_util", git: 'https://github.com/abacha/math_util.git'
4
- gem "work_day", git: 'https://github.com/abacha/work_day.git'
5
-
6
3
  gemspec
data/Gemfile.lock CHANGED
@@ -1,34 +1,23 @@
1
- GIT
2
- remote: https://github.com/abacha/math_util.git
3
- revision: 1e4a8082af06cd5bb83a978eae9de50943844429
4
- specs:
5
- math_util (0.1.0)
6
-
7
- GIT
8
- remote: https://github.com/abacha/work_day.git
9
- revision: 1dd12e52dd894e4c169d1966bfaf9545452f4572
10
- specs:
11
- work_day (0.1.3)
12
- activesupport (~> 4.1)
13
-
14
1
  PATH
15
2
  remote: .
16
3
  specs:
17
4
  roi_calculator (0.1.2)
5
+ math_util (~> 0.1.0)
18
6
  memoist (~> 0.15)
7
+ work_day (~> 0.3.0)
19
8
 
20
9
  GEM
21
10
  remote: https://rubygems.org/
22
11
  specs:
23
- activesupport (4.2.7.1)
12
+ activesupport (5.0.2)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
24
14
  i18n (~> 0.7)
25
- json (~> 1.7, >= 1.7.7)
26
15
  minitest (~> 5.1)
27
- thread_safe (~> 0.3, >= 0.3.4)
28
16
  tzinfo (~> 1.1)
17
+ concurrent-ruby (1.0.5)
29
18
  diff-lcs (1.3)
30
- i18n (0.8.0)
31
- json (1.8.6)
19
+ i18n (0.8.1)
20
+ math_util (0.1.0)
32
21
  memoist (0.15.0)
33
22
  minitest (5.10.1)
34
23
  rspec (3.5.0)
@@ -44,19 +33,19 @@ GEM
44
33
  diff-lcs (>= 1.2.0, < 2.0)
45
34
  rspec-support (~> 3.5.0)
46
35
  rspec-support (3.5.0)
47
- thread_safe (0.3.5)
36
+ thread_safe (0.3.6)
48
37
  tzinfo (1.2.2)
49
38
  thread_safe (~> 0.1)
39
+ work_day (0.3.0)
40
+ activesupport (>= 4.0)
50
41
 
51
42
  PLATFORMS
52
43
  ruby
53
44
 
54
45
  DEPENDENCIES
55
46
  bundler (~> 1.13)
56
- math_util!
57
47
  roi_calculator!
58
48
  rspec (~> 3.0)
59
- work_day!
60
49
 
61
50
  BUNDLED WITH
62
- 1.14.3
51
+ 1.14.4
data/circle.yml ADDED
@@ -0,0 +1,3 @@
1
+ dependencies:
2
+ pre:
3
+ - gem install bundler
@@ -64,7 +64,7 @@ module ROI
64
64
  series = filtered.slice(low, days + 1)
65
65
  vol = MathUtil.volatility(series)
66
66
  date = dates_with_position.fetch(low + days) { dates_with_position.last }
67
- [date.to_time.to_i, vol] if date
67
+ [date.to_s(:db), vol] if date
68
68
  end
69
69
  end
70
70
 
data/lib/roi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ROI
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -20,4 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.add_development_dependency "bundler", "~> 1.13"
21
21
  spec.add_development_dependency "rspec", "~> 3.0"
22
22
  spec.add_runtime_dependency "memoist", "~> 0.15"
23
+ spec.add_runtime_dependency "math_util", "~> 0.1.0"
24
+ spec.add_runtime_dependency "work_day", "~> 0.3.0"
23
25
  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.1.2
4
+ version: 0.1.3
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-16 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.15'
55
+ - !ruby/object:Gem::Dependency
56
+ name: math_util
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.1.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.1.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: work_day
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.3.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.3.0
55
83
  description:
56
84
  email:
57
85
  - abacha@gmail.com
@@ -67,6 +95,7 @@ files:
67
95
  - Gemfile.lock
68
96
  - LICENSE.txt
69
97
  - README.md
98
+ - circle.yml
70
99
  - lib/roi.rb
71
100
  - lib/roi/financial_result.rb
72
101
  - lib/roi/rentability.rb