splittable 0.0.5 → 0.0.7

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
  SHA256:
3
- metadata.gz: ad6faa4d272be234b860ea39ab7da30ec46b101ee1d53f3e452d332c13c13104
4
- data.tar.gz: af7cd7ea65c72c019fbaf543e371ad6ecc4a184707ce5cd73e2779166f69d519
3
+ metadata.gz: d1ce195bb6bf78672483d4823042006672922a3de448b313c3229c765e6acc54
4
+ data.tar.gz: 4d7dbcb92fc8345afcf92637741e68dc8a9cd349cc97e63f80fb66eb916c40da
5
5
  SHA512:
6
- metadata.gz: a9052a638a0e6295c13719d42356bbde2d1276da72d948fb728b9400fac254dc638680fda92f33ccc57b2f778318b9f1be8b3740b05af57a91005582281e906e
7
- data.tar.gz: 3d6fce296eefb776df9994d8c68beaca1d436e5b30840b785a82ac5e2e6579f420376f9f28d2cd1dff68cd3ec517348ccc0f62a7334659994d82caf5afa39ee5
6
+ metadata.gz: 33eb4933330ff1020bfc37e8a971273ec825bc6f17c64dbdf8d6825c056db25faeab0683aea256022887fabc524b07df19fe850d79e820df194dee3d37c61281
7
+ data.tar.gz: ec8f776bc35bb3c5abe8e887ccc6edd07da873d2f0eabbf9925bdbcf6732eba1188dcb5060f5912c6faedbea934879b4691d990338c3e7d22b38807acbf16a2a
@@ -6,17 +6,27 @@ on:
6
6
  - master
7
7
  tags:
8
8
  - v*
9
+
9
10
  jobs:
10
- build:
11
+ publish:
12
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
11
13
  runs-on: ubuntu-latest
12
14
 
13
15
  steps:
14
- - uses: actions/checkout@v1
16
+ - uses: actions/checkout@v3
17
+
18
+ - name: Set up Ruby version specified in `.ruby-version`
19
+ with:
20
+ ruby-version: .ruby-version
21
+ uses: ruby/setup-ruby@v1
22
+
23
+ - name: Install dependencies
24
+ run: bundle install --jobs 4 --retry 3
15
25
 
16
26
  - name: Release Gem
17
- if: contains(github.ref, 'refs/tags/v')
18
- uses: cadwallion/publish-rubygems-action@master
27
+ uses: m4rcelotoledo/publish-rubygems-action@master
19
28
  env:
20
- GITHUB_TOKEN: ${{secrets.BUNDLE_GITHUB__COM}}
21
29
  RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_RELEASE}}
30
+ GIT_EMAIL: automated_release@gmail.com
31
+ GIT_NAME: 'Automated Release'
22
32
  RELEASE_COMMAND: bundle exec rake release
@@ -12,15 +12,15 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  strategy:
14
14
  matrix:
15
- ruby: [ '2.5', '2.6', '2.7', '3.0' ]
15
+ ruby: [ '3.4.6' ]
16
16
 
17
17
  steps:
18
- - uses: actions/checkout@v2
18
+ - uses: actions/checkout@v3
19
19
 
20
20
  - name: Set up Ruby version specified in `.ruby-version`
21
21
  with:
22
- ruby-version: ${{ matrix.ruby }}
23
- uses: eregon/use-ruby-action@master
22
+ ruby-version: .ruby-version
23
+ uses: ruby/setup-ruby@v1
24
24
 
25
25
  - name: Install dependencies
26
26
  run: bundle install --jobs 4 --retry 3
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ splittable*.gem
18
18
  /spec/examples.txt
19
19
 
20
20
  .tool-versions
21
+ .env
data/.rubocop.yml CHANGED
@@ -1,11 +1,11 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-performance
3
3
  - rubocop-rake
4
4
  - rubocop-rspec
5
5
 
6
6
  AllCops:
7
7
  NewCops: enable
8
- TargetRubyVersion: 2.6.6
8
+ TargetRubyVersion: 3.4
9
9
  Exclude:
10
10
  - 'Rakefile'
11
11
  - 'bin/**/*'
@@ -18,17 +18,9 @@ Gemspec/RequiredRubyVersion:
18
18
  Layout/DotPosition:
19
19
  EnforcedStyle: trailing
20
20
 
21
- Layout/SpaceAroundMethodCallOperator:
22
- Enabled: true
23
-
24
- Lint/RaiseException:
25
- Enabled: true
26
-
27
- Lint/StructNewOverride:
28
- Enabled: true
29
-
30
21
  Metrics/BlockLength:
31
- IgnoredMethods: ['describe', 'context', 'feature', 'scenario', 'let']
22
+ Exclude:
23
+ - test/**/*
32
24
 
33
25
  RSpec/ExampleLength:
34
26
  Enabled: false
@@ -44,12 +36,3 @@ Style/Documentation:
44
36
 
45
37
  Style/ExponentialNotation:
46
38
  Enabled: false
47
-
48
- Style/HashEachMethods:
49
- Enabled: true
50
-
51
- Style/HashTransformKeys:
52
- Enabled: true
53
-
54
- Style/HashTransformValues:
55
- Enabled: true
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.4.6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## splittable 0.0.7 (Oct 14, 2025)
2
+
3
+ * Update repository
4
+ * Update Ruby and Gems versions
5
+
6
+ *Marcelo Toledo*
7
+
1
8
  ## splittable 0.0.5 (Feb 02, 2021)
2
9
 
3
10
  * Add precision parameter to division and normilize methods
data/Gemfile CHANGED
@@ -4,10 +4,10 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'bigdecimal', '~> 3.0'
8
- gem 'pry-byebug', '~> 3.9'
9
- gem 'rake', '~> 13.0.3'
10
- gem 'rspec', '~> 3.10'
7
+ gem 'bigdecimal'
8
+ gem 'pry-byebug'
9
+ gem 'rake'
10
+ gem 'rspec'
11
11
 
12
12
  group :development, :test do
13
13
  gem 'rubocop', require: false
data/Gemfile.lock CHANGED
@@ -1,80 +1,93 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- splittable (0.0.5)
4
+ splittable (0.0.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.2)
10
- bigdecimal (3.0.0)
11
- byebug (11.1.3)
9
+ ast (2.4.3)
10
+ bigdecimal (3.3.1)
11
+ byebug (12.0.0)
12
12
  coderay (1.1.3)
13
- diff-lcs (1.4.4)
14
- docile (1.3.5)
15
- method_source (1.0.0)
16
- parallel (1.20.1)
17
- parser (3.0.0.0)
13
+ diff-lcs (1.6.2)
14
+ docile (1.4.1)
15
+ json (2.15.1)
16
+ language_server-protocol (3.17.0.5)
17
+ lint_roller (1.1.0)
18
+ method_source (1.1.0)
19
+ parallel (1.27.0)
20
+ parser (3.3.9.0)
18
21
  ast (~> 2.4.1)
19
- pry (0.13.1)
22
+ racc
23
+ prism (1.5.2)
24
+ pry (0.15.2)
20
25
  coderay (~> 1.1)
21
26
  method_source (~> 1.0)
22
- pry-byebug (3.9.0)
23
- byebug (~> 11.0)
24
- pry (~> 0.13.0)
25
- rainbow (3.0.0)
26
- rake (13.0.3)
27
- regexp_parser (2.0.3)
28
- rexml (3.2.4)
29
- rspec (3.10.0)
30
- rspec-core (~> 3.10.0)
31
- rspec-expectations (~> 3.10.0)
32
- rspec-mocks (~> 3.10.0)
33
- rspec-core (3.10.1)
34
- rspec-support (~> 3.10.0)
35
- rspec-expectations (3.10.1)
27
+ pry-byebug (3.11.0)
28
+ byebug (~> 12.0)
29
+ pry (>= 0.13, < 0.16)
30
+ racc (1.8.1)
31
+ rainbow (3.1.1)
32
+ rake (13.3.0)
33
+ regexp_parser (2.11.3)
34
+ rspec (3.13.1)
35
+ rspec-core (~> 3.13.0)
36
+ rspec-expectations (~> 3.13.0)
37
+ rspec-mocks (~> 3.13.0)
38
+ rspec-core (3.13.5)
39
+ rspec-support (~> 3.13.0)
40
+ rspec-expectations (3.13.5)
36
41
  diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.10.0)
38
- rspec-mocks (3.10.2)
42
+ rspec-support (~> 3.13.0)
43
+ rspec-mocks (3.13.5)
39
44
  diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.10.0)
41
- rspec-support (3.10.2)
42
- rubocop (1.9.0)
45
+ rspec-support (~> 3.13.0)
46
+ rspec-support (3.13.6)
47
+ rubocop (1.81.1)
48
+ json (~> 2.3)
49
+ language_server-protocol (~> 3.17.0.2)
50
+ lint_roller (~> 1.1.0)
43
51
  parallel (~> 1.10)
44
- parser (>= 3.0.0.0)
52
+ parser (>= 3.3.0.2)
45
53
  rainbow (>= 2.2.2, < 4.0)
46
- regexp_parser (>= 1.8, < 3.0)
47
- rexml
48
- rubocop-ast (>= 1.2.0, < 2.0)
54
+ regexp_parser (>= 2.9.3, < 3.0)
55
+ rubocop-ast (>= 1.47.1, < 2.0)
49
56
  ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 3.0)
51
- rubocop-ast (1.4.1)
52
- parser (>= 2.7.1.5)
53
- rubocop-performance (1.9.2)
54
- rubocop (>= 0.90.0, < 2.0)
55
- rubocop-ast (>= 0.4.0)
56
- rubocop-rake (0.5.1)
57
- rubocop
58
- rubocop-rspec (2.1.0)
59
- rubocop (~> 1.0)
60
- rubocop-ast (>= 1.1.0)
61
- ruby-progressbar (1.11.0)
62
- simplecov (0.21.2)
57
+ unicode-display_width (>= 2.4.0, < 4.0)
58
+ rubocop-ast (1.47.1)
59
+ parser (>= 3.3.7.2)
60
+ prism (~> 1.4)
61
+ rubocop-performance (1.26.0)
62
+ lint_roller (~> 1.1)
63
+ rubocop (>= 1.75.0, < 2.0)
64
+ rubocop-ast (>= 1.44.0, < 2.0)
65
+ rubocop-rake (0.7.1)
66
+ lint_roller (~> 1.1)
67
+ rubocop (>= 1.72.1)
68
+ rubocop-rspec (3.7.0)
69
+ lint_roller (~> 1.1)
70
+ rubocop (~> 1.72, >= 1.72.1)
71
+ ruby-progressbar (1.13.0)
72
+ simplecov (0.22.0)
63
73
  docile (~> 1.1)
64
74
  simplecov-html (~> 0.11)
65
75
  simplecov_json_formatter (~> 0.1)
66
- simplecov-html (0.12.3)
67
- simplecov_json_formatter (0.1.2)
68
- unicode-display_width (2.0.0)
76
+ simplecov-html (0.13.2)
77
+ simplecov_json_formatter (0.1.4)
78
+ unicode-display_width (3.2.0)
79
+ unicode-emoji (~> 4.1)
80
+ unicode-emoji (4.1.0)
69
81
 
70
82
  PLATFORMS
71
83
  ruby
84
+ x86_64-linux
72
85
 
73
86
  DEPENDENCIES
74
- bigdecimal (~> 3.0)
75
- pry-byebug (~> 3.9)
76
- rake (~> 13.0.3)
77
- rspec (~> 3.10)
87
+ bigdecimal
88
+ pry-byebug
89
+ rake
90
+ rspec
78
91
  rubocop
79
92
  rubocop-performance
80
93
  rubocop-rake
@@ -83,4 +96,4 @@ DEPENDENCIES
83
96
  splittable!
84
97
 
85
98
  BUNDLED WITH
86
- 2.2.7
99
+ 2.7.2
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Splittable
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/splittable.svg)](https://badge.fury.io/rb/splittable)
4
- [![Ruby](https://github.com/Pagnet/splittable/workflows/Ruby/badge.svg?branch=master)](https://github.com/Pagnet/splittable/actions?query=workflow%3ARuby)
4
+ [![Ruby](https://github.com/m4rcelotoledo/splittable/workflows/Ruby/badge.svg?branch=master)](https://github.com/m4rcelotoledo/splittable/actions?query=workflow%3ARuby)
5
5
 
6
6
  ## Goal
7
7
 
@@ -36,13 +36,13 @@ Result: the total truncated value was divided by the number of plots informed an
36
36
  ```ruby
37
37
  => [0.5e-1, 0.3e-1, 0.3e-1] # => [0.05, 0.03, 0.03]
38
38
  ```
39
- Default precision is 2 decimal places, but, you can customize this with precision parameter:
39
+ Default precision is 2 decimal places, but, you can customize this with precision parameter:
40
40
 
41
41
  ``` ruby
42
42
  Splittable.division(value: 10, quantity: 3, precision: 3)
43
43
  ```
44
44
 
45
- Result:
45
+ Result:
46
46
  ```ruby
47
47
  => [0.3334e1, 0.3333e1, 0.3333e1] # => [0.334, 0.333, 0.333]
48
48
  ```
@@ -60,12 +60,12 @@ Result: all values are truncated and them the difference is attributed in the fi
60
60
  => [0.3524e2, 0.2143e2, 0.4333e2] # => [35.24, 21.43, 43.33]
61
61
  ```
62
62
 
63
- In this method, you have the same optional precision parameter:
63
+ In this method, you have the same optional precision parameter:
64
64
  ```ruby
65
65
  Splittable.normalize(value: 100, installments: [33.33333333, 33.33333333, 33.33333333], precision: 3)
66
66
  ```
67
67
 
68
- Result:
68
+ Result:
69
69
  ```ruby
70
70
  => [0.33334e2, 0.33333e2, 0.33333e2] # => [33.334, 33.333, 33.333]
71
71
  ```
@@ -74,12 +74,20 @@ Result:
74
74
 
75
75
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
76
76
 
77
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
77
+ To install this gem onto your local machine, run `bundle exec rake install`.
78
+
79
+ ## To Release
80
+
81
+ Fill the `CHANGELOG.md` with relevants update.
82
+
83
+ To automatic release a new version, update the version number in `lib/splittable/version.rb` and merge it to `master` branch.
84
+
85
+ To manual release update the version and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
78
86
 
79
87
  ## Contributing
80
88
 
81
- Bug reports and pull requests are welcome on GitHub at https://github.com/Pagnet/splittable/blob/master/CONTRIBUTING.md.
89
+ Bug reports and pull requests are welcome on GitHub at https://github.com/m4rcelotoledo/splittable/blob/master/CONTRIBUTING.md.
82
90
 
83
91
  ## Code of Conduct
84
92
 
85
- Welcome on GitHub at https://github.com/Pagnet/splittable/blob/master/CODE_OF_CONDUCT.md.
93
+ Welcome on GitHub at https://github.com/m4rcelotoledo/splittable/blob/master/CODE_OF_CONDUCT.md.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Splittable
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.7'
5
5
  end
data/splittable.gemspec CHANGED
@@ -15,12 +15,13 @@ Gem::Specification.new do |spec|
15
15
  where the result must be presented in cents, that is converting the
16
16
  division result to only two decimal places and the difference is
17
17
  attributed to the first plot.'
18
- spec.homepage = 'https://github.com/Pagnet/splittable'
19
- spec.required_ruby_version = Gem::Requirement.new('>= 2.5.3')
18
+ spec.homepage = 'https://github.com/m4rcelotoledo/splittable'
19
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.4.6')
20
20
 
21
21
  spec.metadata['homepage_uri'] = spec.homepage
22
- spec.metadata['source_code_uri'] = 'https://github.com/Pagnet/splittable'
23
- spec.metadata['changelog_uri'] = 'https://github.com/Pagnet/splittable/blob/master/CHANGELOG.md'
22
+ spec.metadata['source_code_uri'] = 'https://github.com/m4rcelotoledo/splittable'
23
+ spec.metadata['changelog_uri'] = 'https://github.com/m4rcelotoledo/splittable/blob/master/CHANGELOG.md'
24
+ spec.metadata['rubygems_mfa_required'] = 'true'
24
25
 
25
26
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
27
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splittable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Brandão
8
8
  - Marcelo Toledo
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2021-02-02 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: |-
15
14
  This gem solves the problem of several decimal places in divisions
@@ -47,16 +46,15 @@ files:
47
46
  - lib/splittable/division.rb
48
47
  - lib/splittable/normalize.rb
49
48
  - lib/splittable/version.rb
50
- - sonar-project.properties
51
49
  - splittable.gemspec
52
- homepage: https://github.com/Pagnet/splittable
50
+ homepage: https://github.com/m4rcelotoledo/splittable
53
51
  licenses:
54
52
  - MIT
55
53
  metadata:
56
- homepage_uri: https://github.com/Pagnet/splittable
57
- source_code_uri: https://github.com/Pagnet/splittable
58
- changelog_uri: https://github.com/Pagnet/splittable/blob/master/CHANGELOG.md
59
- post_install_message:
54
+ homepage_uri: https://github.com/m4rcelotoledo/splittable
55
+ source_code_uri: https://github.com/m4rcelotoledo/splittable
56
+ changelog_uri: https://github.com/m4rcelotoledo/splittable/blob/master/CHANGELOG.md
57
+ rubygems_mfa_required: 'true'
60
58
  rdoc_options: []
61
59
  require_paths:
62
60
  - lib
@@ -64,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
62
  requirements:
65
63
  - - ">="
66
64
  - !ruby/object:Gem::Version
67
- version: 2.5.3
65
+ version: 3.4.6
68
66
  required_rubygems_version: !ruby/object:Gem::Requirement
69
67
  requirements:
70
68
  - - ">="
71
69
  - !ruby/object:Gem::Version
72
70
  version: '0'
73
71
  requirements: []
74
- rubygems_version: 3.2.3
75
- signing_key:
72
+ rubygems_version: 3.6.9
76
73
  specification_version: 4
77
74
  summary: Calculate division and normalize parcels to use just cents.
78
75
  test_files: []
@@ -1,7 +0,0 @@
1
- sonar.projectKey=Pagnet_splittable
2
- sonar.organization=pagnet
3
- sonar.ruby.coverage.reportPaths=./coverage/.resultset.json
4
- sonar.sources=app
5
- sonar.coverage.exclusions=**/concerns/*.rb
6
- sonar.exclusions=**/*.scss,**/*.java
7
- sonar.sourceEncoding=UTF-8