ruby-units 2.3.0 → 2.4.1

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
2
  SHA256:
3
- metadata.gz: 1a7f0ef586984958760da336474f343c66b598b063991b55c7b1cbedda49d630
4
- data.tar.gz: 71831000f4bcdd187ea834ca7e227c40eb2e143f8ccdddef4c0b3e4c0d3c385d
3
+ metadata.gz: cef2eee9d07cdfbb9761babe05cf20dcd2d64fcd8b1c72e1c82f0c7120f0aafe
4
+ data.tar.gz: 3b7f5ecd1dff12af14de4f9c6eb5109a7a09f0fa3223f5880befbb99a556237b
5
5
  SHA512:
6
- metadata.gz: bdab6e591cc0aaa668382d49d9e8a01846da31f46f2a3330f66a7b66445b5f649287d21943b1bd75648de3cce44b64e7f06070e00a070f50e8f1794451675511
7
- data.tar.gz: 55723037f57f90d181643792f47452a8bd4c5150ae6ddc4038d998a4f30b9331aa73e331d3fc090776fdf3a0424032975cd0a5fb56c85d289b545f0c2ff682af
6
+ metadata.gz: 44f63528e99535c8d5dd56ce7a2ca4f2a1fe800ace101495be272c5fa9e6c25b6abd3d1f35c695cf69ec848b333c8b9147f044e275122124bf08b1acee432bcb
7
+ data.tar.gz: cb72ea094586f7750524527c605f151431b0c96d3d3350337eceed2f7fb29d30568f14f0c2f9ee2179b0f8ca638b1cfef580c8929c2551ff9085107bd6d7cd8f
data/.codeclimate.yml ADDED
@@ -0,0 +1,32 @@
1
+ version: "2" # required to adjust maintainability checks
2
+ checks:
3
+ argument-count:
4
+ config:
5
+ threshold: 4
6
+ complex-logic:
7
+ config:
8
+ threshold: 4
9
+ file-lines:
10
+ config:
11
+ threshold: 250
12
+ method-complexity:
13
+ config:
14
+ threshold: 5
15
+ method-count:
16
+ config:
17
+ threshold: 20
18
+ method-lines:
19
+ config:
20
+ threshold: 25
21
+ nested-control-flow:
22
+ config:
23
+ threshold: 4
24
+ return-statements:
25
+ config:
26
+ threshold: 4
27
+ similar-code:
28
+ config:
29
+ threshold: # language-specific defaults. an override will affect all languages.
30
+ identical-code:
31
+ config:
32
+ threshold: # language-specific defaults. an override will affect all languages.
data/.csslintrc ADDED
@@ -0,0 +1,2 @@
1
+ --exclude-exts=.min.css
2
+ --ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
data/.eslintignore ADDED
@@ -0,0 +1 @@
1
+ **/*{.,-}min.js
data/.eslintrc ADDED
@@ -0,0 +1,213 @@
1
+ ecmaFeatures:
2
+ modules: true
3
+ jsx: true
4
+
5
+ env:
6
+ amd: true
7
+ browser: true
8
+ es6: true
9
+ jquery: true
10
+ node: true
11
+
12
+ # http://eslint.org/docs/rules/
13
+ rules:
14
+ # Possible Errors
15
+ comma-dangle: [2, never]
16
+ no-cond-assign: 2
17
+ no-console: 0
18
+ no-constant-condition: 2
19
+ no-control-regex: 2
20
+ no-debugger: 2
21
+ no-dupe-args: 2
22
+ no-dupe-keys: 2
23
+ no-duplicate-case: 2
24
+ no-empty: 2
25
+ no-empty-character-class: 2
26
+ no-ex-assign: 2
27
+ no-extra-boolean-cast: 2
28
+ no-extra-parens: 0
29
+ no-extra-semi: 2
30
+ no-func-assign: 2
31
+ no-inner-declarations: [2, functions]
32
+ no-invalid-regexp: 2
33
+ no-irregular-whitespace: 2
34
+ no-negated-in-lhs: 2
35
+ no-obj-calls: 2
36
+ no-regex-spaces: 2
37
+ no-sparse-arrays: 2
38
+ no-unexpected-multiline: 2
39
+ no-unreachable: 2
40
+ use-isnan: 2
41
+ valid-jsdoc: 0
42
+ valid-typeof: 2
43
+
44
+ # Best Practices
45
+ accessor-pairs: 2
46
+ block-scoped-var: 0
47
+ complexity: [2, 6]
48
+ consistent-return: 0
49
+ curly: 0
50
+ default-case: 0
51
+ dot-location: 0
52
+ dot-notation: 0
53
+ eqeqeq: 2
54
+ guard-for-in: 2
55
+ no-alert: 2
56
+ no-caller: 2
57
+ no-case-declarations: 2
58
+ no-div-regex: 2
59
+ no-else-return: 0
60
+ no-empty-label: 2
61
+ no-empty-pattern: 2
62
+ no-eq-null: 2
63
+ no-eval: 2
64
+ no-extend-native: 2
65
+ no-extra-bind: 2
66
+ no-fallthrough: 2
67
+ no-floating-decimal: 0
68
+ no-implicit-coercion: 0
69
+ no-implied-eval: 2
70
+ no-invalid-this: 0
71
+ no-iterator: 2
72
+ no-labels: 0
73
+ no-lone-blocks: 2
74
+ no-loop-func: 2
75
+ no-magic-number: 0
76
+ no-multi-spaces: 0
77
+ no-multi-str: 0
78
+ no-native-reassign: 2
79
+ no-new-func: 2
80
+ no-new-wrappers: 2
81
+ no-new: 2
82
+ no-octal-escape: 2
83
+ no-octal: 2
84
+ no-proto: 2
85
+ no-redeclare: 2
86
+ no-return-assign: 2
87
+ no-script-url: 2
88
+ no-self-compare: 2
89
+ no-sequences: 0
90
+ no-throw-literal: 0
91
+ no-unused-expressions: 2
92
+ no-useless-call: 2
93
+ no-useless-concat: 2
94
+ no-void: 2
95
+ no-warning-comments: 0
96
+ no-with: 2
97
+ radix: 2
98
+ vars-on-top: 0
99
+ wrap-iife: 2
100
+ yoda: 0
101
+
102
+ # Strict
103
+ strict: 0
104
+
105
+ # Variables
106
+ init-declarations: 0
107
+ no-catch-shadow: 2
108
+ no-delete-var: 2
109
+ no-label-var: 2
110
+ no-shadow-restricted-names: 2
111
+ no-shadow: 0
112
+ no-undef-init: 2
113
+ no-undef: 0
114
+ no-undefined: 0
115
+ no-unused-vars: 0
116
+ no-use-before-define: 0
117
+
118
+ # Node.js and CommonJS
119
+ callback-return: 2
120
+ global-require: 2
121
+ handle-callback-err: 2
122
+ no-mixed-requires: 0
123
+ no-new-require: 0
124
+ no-path-concat: 2
125
+ no-process-exit: 2
126
+ no-restricted-modules: 0
127
+ no-sync: 0
128
+
129
+ # Stylistic Issues
130
+ array-bracket-spacing: 0
131
+ block-spacing: 0
132
+ brace-style: 0
133
+ camelcase: 0
134
+ comma-spacing: 0
135
+ comma-style: 0
136
+ computed-property-spacing: 0
137
+ consistent-this: 0
138
+ eol-last: 0
139
+ func-names: 0
140
+ func-style: 0
141
+ id-length: 0
142
+ id-match: 0
143
+ indent: 0
144
+ jsx-quotes: 0
145
+ key-spacing: 0
146
+ linebreak-style: 0
147
+ lines-around-comment: 0
148
+ max-depth: 0
149
+ max-len: 0
150
+ max-nested-callbacks: 0
151
+ max-params: 0
152
+ max-statements: [2, 30]
153
+ new-cap: 0
154
+ new-parens: 0
155
+ newline-after-var: 0
156
+ no-array-constructor: 0
157
+ no-bitwise: 0
158
+ no-continue: 0
159
+ no-inline-comments: 0
160
+ no-lonely-if: 0
161
+ no-mixed-spaces-and-tabs: 0
162
+ no-multiple-empty-lines: 0
163
+ no-negated-condition: 0
164
+ no-nested-ternary: 0
165
+ no-new-object: 0
166
+ no-plusplus: 0
167
+ no-restricted-syntax: 0
168
+ no-spaced-func: 0
169
+ no-ternary: 0
170
+ no-trailing-spaces: 0
171
+ no-underscore-dangle: 0
172
+ no-unneeded-ternary: 0
173
+ object-curly-spacing: 0
174
+ one-var: 0
175
+ operator-assignment: 0
176
+ operator-linebreak: 0
177
+ padded-blocks: 0
178
+ quote-props: 0
179
+ quotes: 0
180
+ require-jsdoc: 0
181
+ semi-spacing: 0
182
+ semi: 0
183
+ sort-vars: 0
184
+ space-after-keywords: 0
185
+ space-before-blocks: 0
186
+ space-before-function-paren: 0
187
+ space-before-keywords: 0
188
+ space-in-parens: 0
189
+ space-infix-ops: 0
190
+ space-return-throw-case: 0
191
+ space-unary-ops: 0
192
+ spaced-comment: 0
193
+ wrap-regex: 0
194
+
195
+ # ECMAScript 6
196
+ arrow-body-style: 0
197
+ arrow-parens: 0
198
+ arrow-spacing: 0
199
+ constructor-super: 0
200
+ generator-star-spacing: 0
201
+ no-arrow-condition: 0
202
+ no-class-assign: 0
203
+ no-const-assign: 0
204
+ no-dupe-class-members: 0
205
+ no-this-before-super: 0
206
+ no-var: 0
207
+ object-shorthand: 0
208
+ prefer-arrow-callback: 0
209
+ prefer-const: 0
210
+ prefer-reflect: 0
211
+ prefer-spread: 0
212
+ prefer-template: 0
213
+ require-yield: 0
@@ -0,0 +1,16 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "10:00"
8
+ open-pull-requests-limit: 10
9
+ ignore:
10
+ - dependency-name: solargraph
11
+ versions:
12
+ - 0.40.2
13
+ - 0.40.3
14
+ - dependency-name: nokogiri
15
+ versions:
16
+ - 1.11.1
@@ -0,0 +1,70 @@
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: '15 17 * * 6'
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://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v2
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v1
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
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v1
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v1
@@ -0,0 +1,49 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+ workflow_dispatch:
9
+ schedule:
10
+ # 00:00 on the 1st of every month
11
+ - cron: '0 0 1 * *'
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ ruby: ['2.6', '2.7', '3.0', '3.1', 'jruby-9.3']
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ bundler-cache: true
25
+ - name: Tests for Ruby ${{ matrix.ruby }}
26
+ run: bundle exec rake
27
+ coverage:
28
+ needs: test
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v2
32
+ - uses: ruby/setup-ruby@v1
33
+ with:
34
+ bundler-cache: true
35
+ - name: Publish code coverage
36
+ uses: paambaati/codeclimate-action@v2.7.5
37
+ env:
38
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
39
+ with:
40
+ coverageCommand: bundle exec rake
41
+ yard:
42
+ runs-on: ubuntu-latest
43
+ steps:
44
+ - uses: actions/checkout@v2
45
+ - uses: ruby/setup-ruby@v1
46
+ with:
47
+ bundler-cache: true
48
+ - name: Build YARD docs
49
+ run: bundle exec yard doc --fail-on-warning
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ /bin/
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,24 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ NewCops: enable
7
+ Exclude:
8
+ - ruby-units.gemspec
9
+ - bin/*
10
+ Style/CaseEquality:
11
+ Enabled: false
12
+ Style/FrozenStringLiteralComment:
13
+ Enabled: false
14
+ Layout/LineLength:
15
+ Enabled: false
16
+ Style/SingleLineBlockParams:
17
+ Enabled: false
18
+ Naming/FileName:
19
+ Exclude:
20
+ - 'lib/ruby-units.rb'
21
+ Style/FormatString:
22
+ Enabled: false
23
+ Style/DateTime:
24
+ Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.10
data/.solargraph.yml ADDED
@@ -0,0 +1,16 @@
1
+ ---
2
+ include:
3
+ - "**/*.rb"
4
+ exclude:
5
+ - spec/**/*
6
+ - test/**/*
7
+ - vendor/**/*
8
+ - ".bundle/**/*"
9
+ require: []
10
+ domains: []
11
+ reporters:
12
+ - rubocop
13
+ - require_not_found
14
+ require_paths: []
15
+ plugins: []
16
+ max_files: 5000
data/CHANGELOG.txt CHANGED
@@ -1,5 +1,11 @@
1
1
  Change Log for Ruby-units
2
2
  =========================
3
+ see Github releases (https://github.com/olbrich/ruby-units/releases)
4
+
5
+ 2020-12-29 2.3.2 * Remove Jeweler (see #178) also adds Code of Conduct
6
+ * Fix specs related to Complex comparisons (see #213)
7
+ * Add support for Ruby 3.0 (also drop support for 2.3 and 2.4) (see #211)
8
+ 2018-09-26 2.3.1 * Addition and subtraction of unitless values. (see #175)
3
9
  2018-03-06 2.3.0 * Fix add (+) and subtract (-) for BigDecimal scalars. (see #167)
4
10
  * Update ruby versions (#163)
5
11
  * fix: temperature converting rational issue (#164)
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at kevin.olbrich@mckesson.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development do
4
+ gem 'debug', '>= 1.0.0', platform: :mri
5
+ gem 'redcarpet', platform: :mri # redcarpet doesn't support jruby
6
+ gem 'ruby-maven', platform: :jruby
7
+ gem 'ruby-prof', platform: :mri
8
+ end
9
+
10
+ gemspec