ruby-units 2.3.1 → 2.3.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: 19bfae0dcf246cead7fffec58cbe413c2fdbd01e
4
- data.tar.gz: 8fb923f68a8ba4134705703c7e77ecfe168f77fd
2
+ SHA256:
3
+ metadata.gz: fb1ccadd6b955b26c4853ecba154e78c4313ef1baa953d9bac365aeccf152912
4
+ data.tar.gz: 6c88b7f180d6b30f216dca3a6e990d2a5a4406dd515cc3e756d9f3cb5a5df2c6
5
5
  SHA512:
6
- metadata.gz: a8251aeeee0cdcb8231f7a465cf08ee551bb966a66586d4fe65d9f53190ab1a6496920e917a250d067a1418f121f680ec2886b451d1b3da0bf26f4894fba739d
7
- data.tar.gz: 23a5d68881dd1a8df5664a4cc351b924fee950b085c9b8ab73bc796f1a473b34f3178f58533c5b7b56a787bfd037fc494d1987315bd47509d4c96ddde4eb7dcc
6
+ metadata.gz: 060c9895cc09a6a0de5f6e3a4c28e9c780f8a7b81ac1f73e8e5601f895edb00a6289cfacac4822d6d4bdb6f933985192e8791edb1a33f858b33d0ad75d1f55e4
7
+ data.tar.gz: 51b19481a8fbb8fce5a4f37c20ecffb2f5869853f261908a95339ff1b8c8504f2183ab48d26a0981f0e87e63f7c5eac104234eaa5086eb92fb84ca49e38bfa08
@@ -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.
@@ -0,0 +1,2 @@
1
+ --exclude-exts=.min.css
2
+ --ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
@@ -0,0 +1 @@
1
+ **/*{.,-}min.js
@@ -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,40 @@
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.5', '2.6', '2.7', '3.0', 'jruby-9.2']
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
@@ -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
@@ -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
@@ -0,0 +1 @@
1
+ 2.5.8
@@ -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
@@ -1,5 +1,9 @@
1
1
  Change Log for Ruby-units
2
2
  =========================
3
+ 2020-12-29 2.3.2 * Remove Jeweler (see #178) also adds Code of Conduct
4
+ * Fix specs related to Complex comparisons (see #213)
5
+ * Add support for Ruby 3.0 (also drop support for 2.3 and 2.4) (see #211)
6
+ 2018-09-26 2.3.1 * Addition and subtraction of unitless values. (see #175)
3
7
  2018-03-06 2.3.0 * Fix add (+) and subtract (-) for BigDecimal scalars. (see #167)
4
8
  * Update ruby versions (#163)
5
9
  * 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/