pdground 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
  SHA256:
3
- metadata.gz: a4393e80c8d15881163b1a9641d775b9c868179f6517d0d38befbb1cd41c4046
4
- data.tar.gz: 8fac7814e10de42d74d5e5ed268b5749085cadf2662235c2ade6759f371d8ab9
3
+ metadata.gz: cf18f37df086e1af11178ee44765815faf2e3918ccf61dfceca9c782541351eb
4
+ data.tar.gz: 20d3d5df1007722dfa7f546f190e9381c6b9b3c6c6dbc880e2c0a4bf2cfba636
5
5
  SHA512:
6
- metadata.gz: 67172846a505c159257b9e8d929d10f2edb9d50505e61dd1ec08b805b6a0490e34eb007f2db2994c22e874a9ec56cf3a2376707da9aaf48383620d41ae77a239
7
- data.tar.gz: 1b50758b3ae520302723a2d5b090b1fda6dacae054b80b9f5b4868c7fabc4093cfce565e9876b53497d4ae858c6ac2ffa70baa124923dae59939c8e19d6e0690
6
+ metadata.gz: 3092e462e7af2b3f69e3071bce8206e04b6265bc424992b844ac422e1e4cef6c07af9bb0fe21a57fa538777c851c7ad9c76a08eded2eec7d4a62d37c40ef8cb8
7
+ data.tar.gz: a092face125761256d2afb30c5219d272d4763bc356e69b2b057f82b208fddfb1df377f097747098d4d9a95afff68d5904ebcbbea95c1e2b0af40306313b18b9
@@ -1,4 +1,13 @@
1
1
  Metrics/AbcSize:
2
2
  Max: 20
3
3
  AllCops:
4
- TargetRubyVersion: 2.4
4
+ TargetRubyVersion: 2.4
5
+ Style/BlockLength:
6
+ Exclude:
7
+ - 'Rakefile'
8
+ - '**/*.rake'
9
+ - 'spec/**/*_spec.rb'
10
+ Style/NumericLiterals:
11
+ Enabled: false
12
+ Metrics/LineLength:
13
+ Max: 100
data/README.md CHANGED
@@ -43,6 +43,7 @@ puts "Rounded error: #{result[1]}"
43
43
 
44
44
  ## Contributing
45
45
 
46
+ Contributions to this project are only accepted in its [GitLab repo](https://gitlab.com/jparaque/pdground)
46
47
  If you want to contribute to improve this gem with any bug fix or new feature:
47
48
  * First open an issue to discuss the bug or feature
48
49
  * Place a merge request referring to the issue once agreed to include it
@@ -13,3 +13,14 @@ class Float
13
13
  format("%.#{digits - 1}e", self).split('e')[0].delete('.')
14
14
  end
15
15
  end
16
+
17
+ # Redefine Integer class to include the same methods as Float
18
+ class Integer
19
+ def sigfig(digits)
20
+ to_f.sigfig(digits)
21
+ end
22
+
23
+ def hisigfig(digits)
24
+ to_f.hisigfig(digits)
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pdground
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
@@ -11,9 +11,11 @@ Gem::Specification.new do |spec|
11
11
  spec.authors = ['J.P. Araque']
12
12
  spec.email = ['erjuanpea@gmail.com']
13
13
 
14
- spec.summary = 'Round numbers using the PDGRound rounding rules'
15
- spec.description = 'Provides an easy to use function to round any value
16
- with a given uncertainty following PDG rounding rules'
14
+ spec.summary = 'Round numbers using the PDG rounding rules'
15
+ spec.description = 'Provides an easy way to round any value
16
+ with a given uncertainty following PDG rounding rules. Mainly consists of a
17
+ Pdground module witha round method which will round the central value and
18
+ uncertainty.'
17
19
  spec.homepage = 'https://gitlab.com/jparaque/pdground'
18
20
  spec.license = 'MIT'
19
21
 
@@ -27,7 +29,7 @@ with a given uncertainty following PDG rounding rules'
27
29
  spec.add_development_dependency 'bundler', '~> 1.16'
28
30
  spec.add_development_dependency 'rake', '~> 10.0'
29
31
  spec.add_development_dependency 'rspec', '~> 3.0'
30
- spec.add_development_dependency 'rubocop', '~> 0'
32
+ spec.add_development_dependency 'rubocop', '~> 0.50'
31
33
  spec.add_development_dependency 'simplecov', '~> 0'
32
34
 
33
35
  spec.required_ruby_version = '~> 2.4'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdground
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
  - J.P. Araque
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '0.50'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '0.50'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,8 +81,10 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: |-
84
- Provides an easy to use function to round any value
85
- with a given uncertainty following PDG rounding rules
84
+ Provides an easy way to round any value
85
+ with a given uncertainty following PDG rounding rules. Mainly consists of a
86
+ Pdground module witha round method which will round the central value and
87
+ uncertainty.
86
88
  email:
87
89
  - erjuanpea@gmail.com
88
90
  executables:
@@ -129,5 +131,5 @@ rubyforge_project:
129
131
  rubygems_version: 2.7.4
130
132
  signing_key:
131
133
  specification_version: 4
132
- summary: Round numbers using the PDGRound rounding rules
134
+ summary: Round numbers using the PDG rounding rules
133
135
  test_files: []