finrb 0.1.0 → 0.1.2

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.
data/lib/finrb.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "active_support/configurable"
4
- require "finrb/config"
5
- require "finrb/decimal"
6
- require "finrb/cashflows"
7
- require "finrb/utils"
3
+ require 'active_support/configurable'
4
+ require 'finrb/cashflows'
5
+ require 'finrb/config'
6
+ require 'finrb/decimal'
7
+ require 'finrb/utils'
8
8
 
9
9
  class FinrbError < StandardError; end
10
10
 
@@ -16,8 +16,8 @@ class FinrbError < StandardError; end
16
16
  # * *principal* represents the outstanding balance of a loan or annuity.
17
17
  # * *rate* represents the interest rate _per period_.
18
18
  module Finrb
19
- autoload :Amortization, "finrb/amortization"
20
- autoload :Rate, "finrb/rates"
21
- autoload :Transaction, "finrb/transaction"
22
- autoload :Utils, "finrb/utils"
19
+ autoload :Amortization, 'finrb/amortization'
20
+ autoload :Rate, 'finrb/rates'
21
+ autoload :Transaction, 'finrb/transaction'
22
+ autoload :Utils, 'finrb/utils'
23
23
  end
metadata CHANGED
@@ -1,16 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finrb
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
  - Nadir Cohen
8
- - Martin Bjeldbak Madsen
9
- - Bill Kranec
10
- autorequire:
8
+ autorequire:
11
9
  bindir: bin
12
10
  cert_chain: []
13
- date: 2022-08-09 00:00:00.000000000 Z
11
+ date: 2023-03-25 00:00:00.000000000 Z
14
12
  dependencies:
15
13
  - !ruby/object:Gem::Dependency
16
14
  name: activesupport
@@ -27,21 +25,21 @@ dependencies:
27
25
  - !ruby/object:Gem::Version
28
26
  version: '0'
29
27
  - !ruby/object:Gem::Dependency
30
- name: business_time
28
+ name: bigdecimal
31
29
  requirement: !ruby/object:Gem::Requirement
32
30
  requirements:
33
31
  - - ">="
34
32
  - !ruby/object:Gem::Version
35
- version: '0'
33
+ version: 3.1.2
36
34
  type: :runtime
37
35
  prerelease: false
38
36
  version_requirements: !ruby/object:Gem::Requirement
39
37
  requirements:
40
38
  - - ">="
41
39
  - !ruby/object:Gem::Version
42
- version: '0'
40
+ version: 3.1.2
43
41
  - !ruby/object:Gem::Dependency
44
- name: flt
42
+ name: business_time
45
43
  requirement: !ruby/object:Gem::Requirement
46
44
  requirements:
47
45
  - - ">="
@@ -55,13 +53,13 @@ dependencies:
55
53
  - !ruby/object:Gem::Version
56
54
  version: '0'
57
55
  - !ruby/object:Gem::Dependency
58
- name: minitest
56
+ name: flt
59
57
  requirement: !ruby/object:Gem::Requirement
60
58
  requirements:
61
59
  - - ">="
62
60
  - !ruby/object:Gem::Version
63
61
  version: '0'
64
- type: :development
62
+ type: :runtime
65
63
  prerelease: false
66
64
  version_requirements: !ruby/object:Gem::Requirement
67
65
  requirements:
@@ -97,7 +95,7 @@ dependencies:
97
95
  - !ruby/object:Gem::Version
98
96
  version: '0'
99
97
  - !ruby/object:Gem::Dependency
100
- name: rubocop
98
+ name: rspec
101
99
  requirement: !ruby/object:Gem::Requirement
102
100
  requirements:
103
101
  - - ">="
@@ -111,7 +109,7 @@ dependencies:
111
109
  - !ruby/object:Gem::Version
112
110
  version: '0'
113
111
  - !ruby/object:Gem::Dependency
114
- name: rubocop-minitest
112
+ name: rubocop
115
113
  requirement: !ruby/object:Gem::Requirement
116
114
  requirements:
117
115
  - - ">="
@@ -125,7 +123,7 @@ dependencies:
125
123
  - !ruby/object:Gem::Version
126
124
  version: '0'
127
125
  - !ruby/object:Gem::Dependency
128
- name: rubocop-performance
126
+ name: rubocop-packaging
129
127
  requirement: !ruby/object:Gem::Requirement
130
128
  requirements:
131
129
  - - ">="
@@ -139,7 +137,7 @@ dependencies:
139
137
  - !ruby/object:Gem::Version
140
138
  version: '0'
141
139
  - !ruby/object:Gem::Dependency
142
- name: rubocop-packaging
140
+ name: rubocop-performance
143
141
  requirement: !ruby/object:Gem::Requirement
144
142
  requirements:
145
143
  - - ">="
@@ -167,7 +165,7 @@ dependencies:
167
165
  - !ruby/object:Gem::Version
168
166
  version: '0'
169
167
  - !ruby/object:Gem::Dependency
170
- name: semver
168
+ name: rubocop-rspec
171
169
  requirement: !ruby/object:Gem::Requirement
172
170
  requirements:
173
171
  - - ">="
@@ -181,7 +179,7 @@ dependencies:
181
179
  - !ruby/object:Gem::Version
182
180
  version: '0'
183
181
  - !ruby/object:Gem::Dependency
184
- name: solargraph
182
+ name: semver
185
183
  requirement: !ruby/object:Gem::Requirement
186
184
  requirements:
187
185
  - - ">="
@@ -199,8 +197,6 @@ description: "The finrb library (forked from the finance gem) provides a Ruby in
199
197
  Cashflows (NPV, IRR, etc.) and other basic utilities.\n\n"
200
198
  email:
201
199
  - nadircs11@gmail.com
202
- - me@martinbjeldbak.com
203
- - wkranec@gmail.com
204
200
  executables: []
205
201
  extensions: []
206
202
  extra_rdoc_files:
@@ -209,30 +205,10 @@ extra_rdoc_files:
209
205
  - COPYING.LESSER
210
206
  - CHANGELOG.md
211
207
  files:
212
- - ".dockerignore"
213
- - ".gitattributes"
214
- - ".github/dependabot.yml"
215
- - ".github/issue_template.md"
216
- - ".github/pull_request_template.md"
217
- - ".github/workflows/ci.yml"
218
- - ".github/workflows/codeql.yml"
219
- - ".github/workflows/rubocop.yml"
220
- - ".gitignore"
221
- - ".rubocop.yml"
222
- - ".ruby-version"
223
- - ".semver"
224
- - ".yardopts"
225
208
  - CHANGELOG.md
226
209
  - COPYING
227
210
  - COPYING.LESSER
228
- - Dockerfile
229
- - Gemfile
230
- - Gemfile.lock
231
211
  - README.md
232
- - Rakefile
233
- - docs/.gitkeep
234
- - docs/api.md
235
- - finrb.gemspec
236
212
  - lib/finrb.rb
237
213
  - lib/finrb/amortization.rb
238
214
  - lib/finrb/cashflows.rb
@@ -246,7 +222,7 @@ licenses:
246
222
  - LGPL-3.0
247
223
  metadata:
248
224
  rubygems_mfa_required: 'true'
249
- post_install_message:
225
+ post_install_message:
250
226
  rdoc_options: []
251
227
  require_paths:
252
228
  - lib
@@ -261,8 +237,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
237
  - !ruby/object:Gem::Version
262
238
  version: '0'
263
239
  requirements: []
264
- rubygems_version: 3.3.7
265
- signing_key:
240
+ rubygems_version: 3.4.6
241
+ signing_key:
266
242
  specification_version: 4
267
243
  summary: Ruby gem for financial calculations/modeling
268
244
  test_files: []
data/.dockerignore DELETED
@@ -1,2 +0,0 @@
1
- .dockerignore
2
- Dockerfile
data/.gitattributes DELETED
@@ -1,83 +0,0 @@
1
- # Common settings that generally should always be used with your language specific settings
2
-
3
- # Auto detect text files and perform LF normalization
4
- * text=auto
5
-
6
- #
7
- # The above will handle all files NOT found below
8
- #
9
-
10
- # Documents
11
- *.bibtex text diff=bibtex
12
- *.doc diff=astextplain
13
- *.DOC diff=astextplain
14
- *.docx diff=astextplain
15
- *.DOCX diff=astextplain
16
- *.dot diff=astextplain
17
- *.DOT diff=astextplain
18
- *.pdf diff=astextplain
19
- *.PDF diff=astextplain
20
- *.rtf diff=astextplain
21
- *.RTF diff=astextplain
22
- *.md text diff=markdown
23
- *.mdx text diff=markdown
24
- *.tex text diff=tex
25
- *.adoc text
26
- *.textile text
27
- *.mustache text
28
- *.csv text
29
- *.tab text
30
- *.tsv text
31
- *.txt text
32
- *.sql text
33
- *.epub diff=astextplain
34
-
35
- # Graphics
36
- *.png binary
37
- *.jpg binary
38
- *.jpeg binary
39
- *.gif binary
40
- *.tif binary
41
- *.tiff binary
42
- *.ico binary
43
- # SVG treated as text by default.
44
- *.svg text
45
- # If you want to treat it as binary,
46
- # use the following line instead.
47
- # *.svg binary
48
- *.eps binary
49
-
50
- # Scripts
51
- *.bash text eol=lf
52
- *.fish text eol=lf
53
- *.sh text eol=lf
54
- *.zsh text eol=lf
55
- # These are explicitly windows files and should use crlf
56
- *.bat text eol=crlf
57
- *.cmd text eol=crlf
58
- *.ps1 text eol=crlf
59
-
60
- # Serialisation
61
- *.json text
62
- *.toml text
63
- *.xml text
64
- *.yaml text
65
- *.yml text
66
-
67
- # Archives
68
- *.7z binary
69
- *.gz binary
70
- *.tar binary
71
- *.tgz binary
72
- *.zip binary
73
-
74
- # Text files where line endings should be preserved
75
- *.patch -text
76
-
77
- #
78
- # Exclude files from exporting
79
- #
80
-
81
- .gitattributes export-ignore
82
- .gitignore export-ignore
83
- .gitkeep export-ignore
@@ -1,7 +0,0 @@
1
-
2
- version: 2
3
- updates:
4
- - package-ecosystem: "bundler" # See documentation for possible values
5
- directory: "/" # Location of package manifests
6
- schedule:
7
- interval: "weekly"
@@ -1,15 +0,0 @@
1
- ### Steps to reproduce
2
-
3
- ```ruby
4
- # Your reproduction script goes here
5
- ```
6
-
7
- ### Expected behavior
8
- <!-- Tell us what should happen -->
9
-
10
- ### Actual behavior
11
- <!-- Tell us what happens instead -->
12
-
13
- ### System configuration
14
-
15
- **Ruby version**:
@@ -1,17 +0,0 @@
1
- ### Summary
2
-
3
- <!-- Provide a general description of the code changes in your pull
4
- request... were there any bugs you had fixed? If so, mention them. If
5
- these bugs have open GitHub issues, be sure to tag them here as well,
6
- to keep the conversation linked together. -->
7
-
8
- ### Other Information
9
-
10
- <!-- If there's anything else that's important and relevant to your pull
11
- request, mention that information here. This could include
12
- benchmarks, or other information.
13
-
14
- If you are updating any of the CHANGELOG files or are asked to update the
15
- CHANGELOG files by reviewers, please add the CHANGELOG entry at the top of the file.
16
-
17
- Thanks for contributing to finrb! -->
@@ -1,21 +0,0 @@
1
- name: CI
2
-
3
- on: [push, pull_request]
4
-
5
- jobs:
6
- test:
7
- strategy:
8
- fail-fast: false
9
- matrix:
10
- ruby_version: ["3.0", "3.1"]
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v2
14
- - name: Set up Ruby
15
- uses: ruby/setup-ruby@v1
16
- with:
17
- ruby-version: ${{ matrix.ruby_version }}
18
- - name: Install dependencies
19
- run: bundle install --jobs 4 --retry 3
20
- - name: Run tests
21
- run: bundle exec rake
@@ -1,72 +0,0 @@
1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
- name: "CodeQL"
13
-
14
- on:
15
- push:
16
- branches: [ "master" ]
17
- pull_request:
18
- # The branches below must be a subset of the branches above
19
- branches: [ "master" ]
20
- schedule:
21
- - cron: '34 2 * * 3'
22
-
23
- jobs:
24
- analyze:
25
- name: Analyze
26
- runs-on: ubuntu-latest
27
- permissions:
28
- actions: read
29
- contents: read
30
- security-events: write
31
-
32
- strategy:
33
- fail-fast: false
34
- matrix:
35
- language: [ 'ruby' ]
36
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
-
39
- steps:
40
- - name: Checkout repository
41
- uses: actions/checkout@v3
42
-
43
- # Initializes the CodeQL tools for scanning.
44
- - name: Initialize CodeQL
45
- uses: github/codeql-action/init@v2
46
- with:
47
- languages: ${{ matrix.language }}
48
- # If you wish to specify custom queries, you can do so here or in a config file.
49
- # By default, queries listed here will override any specified in a config file.
50
- # Prefix the list here with "+" to use these queries and those in the config file.
51
-
52
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
- # queries: security-extended,security-and-quality
54
-
55
-
56
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57
- # If this step fails, then you should remove it and run the build manually (see below)
58
- - name: Autobuild
59
- uses: github/codeql-action/autobuild@v2
60
-
61
- # ℹ️ Command-line programs to run using the OS shell.
62
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
-
64
- # If the Autobuild fails above, remove it and uncomment the following three lines.
65
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66
-
67
- # - run: |
68
- # echo "Run, Build Application using script"
69
- # ./location_of_script_within_repo/buildscript.sh
70
-
71
- - name: Perform CodeQL Analysis
72
- uses: github/codeql-action/analyze@v2
@@ -1,24 +0,0 @@
1
- name: RuboCop
2
-
3
- on: [push, pull_request]
4
-
5
- permissions:
6
- contents: read
7
-
8
- jobs:
9
- build:
10
- runs-on: ubuntu-latest
11
- strategy:
12
- fail-fast: false
13
-
14
- steps:
15
- - uses: actions/checkout@v3
16
-
17
- - name: Set up Ruby 3.1
18
- uses: ruby/setup-ruby@v1
19
- with:
20
- ruby-version: 3.1
21
- bundler-cache: true
22
-
23
- - name: Run RuboCop
24
- run: bundle exec rubocop
data/.gitignore DELETED
@@ -1,114 +0,0 @@
1
- # Used by dotenv library to load environment variables.
2
- # .env
3
-
4
- # Ignore Byebug command history file.
5
- .byebug_history
6
-
7
- ## Specific to RubyMotion:
8
- .dat*
9
- .repl_history
10
- build/
11
- *.bridgesupport
12
- build-iPhoneOS/
13
- build-iPhoneSimulator/
14
-
15
- ## Specific to RubyMotion (use of CocoaPods):
16
- #
17
- # We recommend against adding the Pods directory to your .gitignore. However
18
- # you should judge for yourself, the pros and cons are mentioned at:
19
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
20
- #
21
- # vendor/Pods/
22
-
23
- ## Documentation cache and generated files:
24
- /.yardoc/
25
- /_yardoc/
26
- /doc/
27
- /rdoc/
28
-
29
- ## Environment normalization:
30
- /.bundle/
31
- /vendor/bundle
32
- /lib/bundler/man/
33
-
34
- # for a library or gem, you might want to ignore these files since the code is
35
- # intended to run in multiple environments; otherwise, check them in:
36
- # Gemfile.lock
37
- # .ruby-version
38
- # .ruby-gemset
39
-
40
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
41
- .rvmrc
42
-
43
- # Used by RuboCop. Remote config files pulled in from inherit_from directive.
44
- # .rubocop-https?--*
45
-
46
- *.rbc
47
- capybara-*.html
48
- .rspec
49
- /db/*.sqlite3
50
- /db/*.sqlite3-journal
51
- /db/*.sqlite3-[0-9]*
52
- /public/system
53
- /coverage/
54
- /spec/tmp
55
- *.orig
56
- rerun.txt
57
- pickle-email-*.html
58
-
59
- # Ignore all logfiles and tempfiles.
60
- /log/*
61
- /tmp/*
62
- !/log/.keep
63
- !/tmp/.keep
64
-
65
- # TODO Comment out this rule if you are OK with secrets being uploaded to the repo
66
- config/initializers/secret_token.rb
67
- config/master.key
68
-
69
- # Only include if you have production secrets in this file, which is no longer a Rails default
70
- # config/secrets.yml
71
-
72
- # dotenv, dotenv-rails
73
- # TODO Comment out these rules if environment variables can be committed
74
- .env
75
- .env*.local
76
-
77
- ## Environment normalization:
78
- /.bundle
79
- /vendor/bundle
80
-
81
- # these should all be checked in to normalize the environment:
82
- # Gemfile.lock, .ruby-version, .ruby-gemset
83
-
84
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
85
- .rvmrc
86
-
87
- # if using bower-rails ignore default bower_components path bower.json files
88
- /vendor/assets/bower_components
89
- *.bowerrc
90
- bower.json
91
-
92
- # Ignore pow environment settings
93
- .powenv
94
-
95
- # Ignore Byebug command history file.
96
- .byebug_history
97
-
98
- # Ignore node_modules
99
- node_modules/
100
-
101
- # Ignore precompiled javascript packs
102
- /public/packs
103
- /public/packs-test
104
- /public/assets
105
-
106
- # Ignore yarn files
107
- /yarn-error.log
108
- yarn-debug.log*
109
- .yarn-integrity
110
-
111
- # Ignore uploaded files in development
112
- /storage/*
113
- !/storage/.keep
114
- /public/uploads