math_util 0.1.0 → 0.1.2

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: edef2025ee4ab11281f6101ccf1c20962db426a7
4
- data.tar.gz: 948fab3eb02496ed167f2fdd4d04191dad491fa2
2
+ SHA256:
3
+ metadata.gz: 859ecf8bf08a1c44d0359c9f9f506ff2a23e12a1c3d188e8d780c68e93c77432
4
+ data.tar.gz: d01d16548a3a54c03a9b98785ac90a85982cd5ef8e47a7cfd6803035874ff5da
5
5
  SHA512:
6
- metadata.gz: bbcd808635fde2d352e28c20c6185f30b514bf6d82ed62e806b8e4bd6cdf9ac3d0c2d2cc5934d7cf7dd26f37fb26d36fc3dc3039a1621e8fe0037b08a3c1e2d9
7
- data.tar.gz: 77312d4a3f4e0692477107067f7e8d08f0dc357e2738b3ccbf115abbae23aa2286033ecdc4d870e1d8da157da53334d72cbd9e39635eee1a55ad2581f22149d3
6
+ metadata.gz: 57d6ca6a9ba702817ed636255675de211e1efa8a45c92645e69c4b322a5ce2818f42b27efb2101d5e5e61e4b8c59320226ff39b873e61f658f896805728bc1b0
7
+ data.tar.gz: b79bc115359c1538e6191a0c805ca84da0e9625d5479e619758a98a725267a1e3f8a085a432a87bde7951ad70eaa27c07bf0f671604758de661b30dfa055a288
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.1] - 2019-01-10
10
+ ### Fixed
11
+ - Removed unnecessary puts at sharpe method
12
+
@@ -0,0 +1,20 @@
1
+ image: ruby:2.4.1
2
+
3
+ pipelines:
4
+ default:
5
+ - step:
6
+ script:
7
+ - git archive --remote=git@bitbucket.org:guideinvestimentos/rails_defaults.git HEAD .rubocop.yml | tar -x
8
+ - bundle install
9
+ - gem install rubocop
10
+ - rspec -fdoc
11
+ - rubocop .
12
+
13
+ branches:
14
+ master:
15
+ - step:
16
+ script:
17
+ - gem build math_util.gemspec
18
+ - curl -u $RUBYGEMS_USERNAME:$RUBYGEMS_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
19
+ - chmod 0600 ~/.gem/credentials
20
+ - gem push $(ls *.gem)
@@ -1,3 +1,3 @@
1
1
  module MathUtil
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/math_util.rb CHANGED
@@ -23,11 +23,10 @@ module MathUtil
23
23
  sharpe = 100 * (
24
24
  ((1 + mean(fund)) ** 252 - 1) -
25
25
  ((1 + mean(bmark)) ** 252 - 1)) / volatility
26
- puts sharpe
27
26
  sharpe.round(4) if sharpe > 0
28
27
  end
29
28
 
30
29
  def self.annual_tax_day_equivalent(annual_tax)
31
- BigDecimal.new((1 + annual_tax) ** (1/252.0) - 1, 16) if annual_tax
30
+ BigDecimal((1 + annual_tax) ** (1/252.0) - 1, 16) if annual_tax
32
31
  end
33
32
  end
data/math_util.gemspec CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
20
20
  end
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.13"
23
+ spec.add_development_dependency "bundler", "~> 2.4"
24
24
  spec.add_development_dependency "rspec", "~> 3.0"
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: math_util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
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: 2023-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: '2.4'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.13'
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -48,9 +48,11 @@ files:
48
48
  - ".gitignore"
49
49
  - ".rspec"
50
50
  - ".travis.yml"
51
+ - CHANGELOG.md
51
52
  - Gemfile
52
53
  - LICENSE.txt
53
54
  - README.md
55
+ - bitbucket-pipelines.yml
54
56
  - lib/math_util.rb
55
57
  - lib/math_util/version.rb
56
58
  - math_util.gemspec
@@ -73,8 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
75
  - !ruby/object:Gem::Version
74
76
  version: '0'
75
77
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.6.10
78
+ rubygems_version: 3.4.10
78
79
  signing_key:
79
80
  specification_version: 4
80
81
  summary: Math functions