measured 3.0.0 → 3.1.0
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.
Potentially problematic release.
This version of measured might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +20 -0
- data/.github/workflows/ci.yml +5 -5
- data/.github/workflows/dependabot_auto_merge.yml +93 -0
- data/CHANGELOG.md +5 -0
- data/cache/weight.json +230 -0
- data/gemfiles/rails-7.1.gemfile +6 -0
- data/lib/measured/units/weight.rb +2 -1
- data/lib/measured/version.rb +1 -1
- data/measured.gemspec +1 -1
- data/test/units/weight_test.rb +74 -1
- metadata +11 -10
- data/gemfiles/rails-6.0.gemfile +0 -6
- data/gemfiles/rails-6.1.gemfile +0 -6
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 3b304fbf20408beb13b8408d74c17747f00ccb991b586775b91249f2e90e9073
         | 
| 4 | 
            +
              data.tar.gz: d8df7e3a16743234d79b1d8375f2f6d83e69f18824fdd1ff95c530fdd333d3a3
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3f7e92b9cdc9165c11dca6857ae9bbc141b938eb071e89f56ca1e13198fc6d281bde0abe4d3436d2f102d869057c5b1f60562bdcb2f9376739a4927b11ccb248
         | 
| 7 | 
            +
              data.tar.gz: 4b3d830a1814b6b64dd9123a40e444918adf3a546b925bb57088bc2c4324da0ccd7040253a838d24f0c53ea1c749cbade548dee29f2995678be903f87af04dcf
         | 
| @@ -0,0 +1,20 @@ | |
| 1 | 
            +
            version: 2
         | 
| 2 | 
            +
            registries:
         | 
| 3 | 
            +
              ruby-shopify:
         | 
| 4 | 
            +
                type: rubygems-server
         | 
| 5 | 
            +
                url: https://pkgs.shopify.io/basic/gems/ruby
         | 
| 6 | 
            +
                username: ${{secrets.RUBYGEMS_SERVER_PKGS_SHOPIFY_IO_USERNAME}}
         | 
| 7 | 
            +
                password: ${{secrets.RUBYGEMS_SERVER_PKGS_SHOPIFY_IO_PASSWORD}}
         | 
| 8 | 
            +
              github-com:
         | 
| 9 | 
            +
                type: git
         | 
| 10 | 
            +
                url: https://github.com
         | 
| 11 | 
            +
                username: ${{secrets.DEPENDENCIES_GITHUB_USER}}
         | 
| 12 | 
            +
                password: ${{secrets.DEPENDENCIES_GITHUB_TOKEN}}
         | 
| 13 | 
            +
            updates:
         | 
| 14 | 
            +
              - package-ecosystem: bundler
         | 
| 15 | 
            +
                directory: "/"
         | 
| 16 | 
            +
                schedule:
         | 
| 17 | 
            +
                  interval: weekly
         | 
| 18 | 
            +
                open-pull-requests-limit: 100
         | 
| 19 | 
            +
                insecure-external-code-execution: allow
         | 
| 20 | 
            +
                registries: "*"
         | 
    
        data/.github/workflows/ci.yml
    CHANGED
    
    | @@ -10,18 +10,18 @@ jobs: | |
| 10 10 | 
             
                strategy:
         | 
| 11 11 | 
             
                  matrix:
         | 
| 12 12 | 
             
                    ruby:
         | 
| 13 | 
            -
                      - '3.0'
         | 
| 14 13 | 
             
                      - '3.1'
         | 
| 15 14 | 
             
                      - '3.2'
         | 
| 15 | 
            +
                      - '3.3'
         | 
| 16 16 | 
             
                    gemfile:
         | 
| 17 17 | 
             
                      - Gemfile
         | 
| 18 | 
            -
                      - gemfiles/rails-6.0.gemfile
         | 
| 19 | 
            -
                      - gemfiles/rails-6.1.gemfile
         | 
| 20 18 | 
             
                      - gemfiles/rails-7.0.gemfile
         | 
| 19 | 
            +
                      - gemfiles/rails-7.1.gemfile
         | 
| 21 20 | 
             
                      - gemfiles/rails-edge.gemfile
         | 
| 22 21 | 
             
                    exclude:
         | 
| 23 | 
            -
                       | 
| 24 | 
            -
             | 
| 22 | 
            +
                      - ruby: '3.1'
         | 
| 23 | 
            +
                        gemfile: gemfiles/rails-edge.gemfile
         | 
| 24 | 
            +
                      - ruby: '3.2'
         | 
| 25 25 | 
             
                        gemfile: gemfiles/rails-edge.gemfile
         | 
| 26 26 |  | 
| 27 27 | 
             
                name: Ruby ${{ matrix.ruby }} ${{ matrix.gemfile }}
         | 
| @@ -0,0 +1,93 @@ | |
| 1 | 
            +
            name: Dependabot auto-merge
         | 
| 2 | 
            +
            on: pull_request_target
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            jobs:
         | 
| 5 | 
            +
              dependabot:
         | 
| 6 | 
            +
                runs-on: shopify-ubuntu-latest
         | 
| 7 | 
            +
                if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
         | 
| 8 | 
            +
                steps:
         | 
| 9 | 
            +
                  - name: Dependabot metadata
         | 
| 10 | 
            +
                    id: metadata
         | 
| 11 | 
            +
                    uses: dependabot/fetch-metadata@v1.6.0
         | 
| 12 | 
            +
                    with:
         | 
| 13 | 
            +
                      github-token: "${{ secrets.GITHUB_TOKEN }}"
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                  - name: Waiting for CI to finish
         | 
| 16 | 
            +
                    id: check_ci_failure
         | 
| 17 | 
            +
                    continue-on-error: true
         | 
| 18 | 
            +
                    if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.dependency-group == 'auto_merge' }}
         | 
| 19 | 
            +
                    uses: actions/github-script@v6
         | 
| 20 | 
            +
                    with:
         | 
| 21 | 
            +
                      script: |
         | 
| 22 | 
            +
                        function sleep(ms) {
         | 
| 23 | 
            +
                          return new Promise(resolve => setTimeout(resolve, ms))
         | 
| 24 | 
            +
                        }
         | 
| 25 | 
            +
                        const query = `query ($org: String!, $repo: String!, $pullRequestNumber: Int!) {
         | 
| 26 | 
            +
                                        organization(login: $org) {
         | 
| 27 | 
            +
                                          repository(name: $repo) {
         | 
| 28 | 
            +
                                            pullRequest(number: $pullRequestNumber) {
         | 
| 29 | 
            +
                                              commits(last: 1) {
         | 
| 30 | 
            +
                                                nodes {
         | 
| 31 | 
            +
                                                  commit {
         | 
| 32 | 
            +
                                                    status {
         | 
| 33 | 
            +
                                                      state
         | 
| 34 | 
            +
                                                    }
         | 
| 35 | 
            +
                                                  }
         | 
| 36 | 
            +
                                                }
         | 
| 37 | 
            +
                                              }
         | 
| 38 | 
            +
                                            }
         | 
| 39 | 
            +
                                          }
         | 
| 40 | 
            +
                                        }
         | 
| 41 | 
            +
                                      }`;
         | 
| 42 | 
            +
                        const variables = {
         | 
| 43 | 
            +
                          org: context.repo.owner,
         | 
| 44 | 
            +
                          repo: context.repo.repo,
         | 
| 45 | 
            +
                          pullRequestNumber: context.issue.number
         | 
| 46 | 
            +
                        }
         | 
| 47 | 
            +
                        // Try for 30 minutes
         | 
| 48 | 
            +
                        let attempts = 30
         | 
| 49 | 
            +
                        let ci_state = false
         | 
| 50 | 
            +
                        for (let i = 1; i <= attempts; i++) {
         | 
| 51 | 
            +
                          console.log(`Sleeping for 60 seconds`)
         | 
| 52 | 
            +
                          await sleep(60000)
         | 
| 53 | 
            +
                          const result = await github.graphql(query, variables)
         | 
| 54 | 
            +
                          const state = result["organization"]["repository"]["pullRequest"]["commits"]["nodes"][0]["commit"]["status"]["state"]
         | 
| 55 | 
            +
                          console.log(`Status is ${state} after ${i} attempts`)
         | 
| 56 | 
            +
                          if (state === "SUCCESS") {
         | 
| 57 | 
            +
                            ci_state = true
         | 
| 58 | 
            +
                            console.log("Proceeding with workflow as CI succeed")
         | 
| 59 | 
            +
                            break
         | 
| 60 | 
            +
                          }
         | 
| 61 | 
            +
                        }
         | 
| 62 | 
            +
                        core.setOutput("ci_state", ci_state)
         | 
| 63 | 
            +
                  - name: Send Slack notification if auto-merge failed
         | 
| 64 | 
            +
                    if: ${{ steps.check_ci_failure.outputs.ci_state == 'false' }}
         | 
| 65 | 
            +
                    uses: ruby/action-slack@v3.0.0
         | 
| 66 | 
            +
                    with:
         | 
| 67 | 
            +
                      payload: |
         | 
| 68 | 
            +
                        {
         | 
| 69 | 
            +
                          "attachments": [{
         | 
| 70 | 
            +
                              "text": "Auto-merge failed for pull request <${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }}> in repository ${{ github.repository }}",
         | 
| 71 | 
            +
                              "color": "danger"
         | 
| 72 | 
            +
                            }
         | 
| 73 | 
            +
                          ]
         | 
| 74 | 
            +
                        }
         | 
| 75 | 
            +
                    env:
         | 
| 76 | 
            +
                      SLACK_WEBHOOK_URL: ${{ secrets.METRICS_SLACK_WEBHOOK_URL }}
         | 
| 77 | 
            +
             | 
| 78 | 
            +
                  - name: Approve and merge
         | 
| 79 | 
            +
                    if: ${{ steps.check_ci_failure.outputs.ci_state == 'true' && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.dependency-group == 'auto_merge') }}
         | 
| 80 | 
            +
                    uses: actions/github-script@v6
         | 
| 81 | 
            +
                    with:
         | 
| 82 | 
            +
                      script: |
         | 
| 83 | 
            +
                        await github.rest.pulls.createReview({
         | 
| 84 | 
            +
                          pull_number: context.issue.number,
         | 
| 85 | 
            +
                          owner: context.repo.owner,
         | 
| 86 | 
            +
                          repo: context.repo.repo,
         | 
| 87 | 
            +
                          event: 'APPROVE',
         | 
| 88 | 
            +
                        })
         | 
| 89 | 
            +
                        await github.rest.pulls.merge({
         | 
| 90 | 
            +
                          owner: context.repo.owner,
         | 
| 91 | 
            +
                          repo: context.repo.repo,
         | 
| 92 | 
            +
                          issue_number: context.issue.number,
         | 
| 93 | 
            +
                        })
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/cache/weight.json
    CHANGED
    
    | @@ -89,6 +89,10 @@ | |
| 89 89 | 
             
                  "numerator": 1,
         | 
| 90 90 | 
             
                  "denominator": 1000000
         | 
| 91 91 | 
             
                },
         | 
| 92 | 
            +
                "q": {
         | 
| 93 | 
            +
                  "numerator": 1,
         | 
| 94 | 
            +
                  "denominator": 100000
         | 
| 95 | 
            +
                },
         | 
| 92 96 | 
             
                "slug": {
         | 
| 93 97 | 
             
                  "numerator": 1000,
         | 
| 94 98 | 
             
                  "denominator": 14593903
         | 
| @@ -203,6 +207,10 @@ | |
| 203 207 | 
             
                  "numerator": 1,
         | 
| 204 208 | 
             
                  "denominator": 1000000000000000000000000000000
         | 
| 205 209 | 
             
                },
         | 
| 210 | 
            +
                "q": {
         | 
| 211 | 
            +
                  "numerator": 1,
         | 
| 212 | 
            +
                  "denominator": 100000000000000000000000000000
         | 
| 213 | 
            +
                },
         | 
| 206 214 | 
             
                "slug": {
         | 
| 207 215 | 
             
                  "numerator": 1,
         | 
| 208 216 | 
             
                  "denominator": 14593903000000000000000000000
         | 
| @@ -317,6 +325,10 @@ | |
| 317 325 | 
             
                  "numerator": 1,
         | 
| 318 326 | 
             
                  "denominator": 1000000000000000000000000000
         | 
| 319 327 | 
             
                },
         | 
| 328 | 
            +
                "q": {
         | 
| 329 | 
            +
                  "numerator": 1,
         | 
| 330 | 
            +
                  "denominator": 100000000000000000000000000
         | 
| 331 | 
            +
                },
         | 
| 320 332 | 
             
                "slug": {
         | 
| 321 333 | 
             
                  "numerator": 1,
         | 
| 322 334 | 
             
                  "denominator": 14593903000000000000000000
         | 
| @@ -431,6 +443,10 @@ | |
| 431 443 | 
             
                  "numerator": 1,
         | 
| 432 444 | 
             
                  "denominator": 1000000000000000000000000
         | 
| 433 445 | 
             
                },
         | 
| 446 | 
            +
                "q": {
         | 
| 447 | 
            +
                  "numerator": 1,
         | 
| 448 | 
            +
                  "denominator": 100000000000000000000000
         | 
| 449 | 
            +
                },
         | 
| 434 450 | 
             
                "slug": {
         | 
| 435 451 | 
             
                  "numerator": 1,
         | 
| 436 452 | 
             
                  "denominator": 14593903000000000000000
         | 
| @@ -545,6 +561,10 @@ | |
| 545 561 | 
             
                  "numerator": 1,
         | 
| 546 562 | 
             
                  "denominator": 1000000000000000000000
         | 
| 547 563 | 
             
                },
         | 
| 564 | 
            +
                "q": {
         | 
| 565 | 
            +
                  "numerator": 1,
         | 
| 566 | 
            +
                  "denominator": 100000000000000000000
         | 
| 567 | 
            +
                },
         | 
| 548 568 | 
             
                "slug": {
         | 
| 549 569 | 
             
                  "numerator": 1,
         | 
| 550 570 | 
             
                  "denominator": 14593903000000000000
         | 
| @@ -659,6 +679,10 @@ | |
| 659 679 | 
             
                  "numerator": 1,
         | 
| 660 680 | 
             
                  "denominator": 1000000000000000000
         | 
| 661 681 | 
             
                },
         | 
| 682 | 
            +
                "q": {
         | 
| 683 | 
            +
                  "numerator": 1,
         | 
| 684 | 
            +
                  "denominator": 100000000000000000
         | 
| 685 | 
            +
                },
         | 
| 662 686 | 
             
                "slug": {
         | 
| 663 687 | 
             
                  "numerator": 1,
         | 
| 664 688 | 
             
                  "denominator": 14593903000000000
         | 
| @@ -773,6 +797,10 @@ | |
| 773 797 | 
             
                  "numerator": 1,
         | 
| 774 798 | 
             
                  "denominator": 1000000000000000
         | 
| 775 799 | 
             
                },
         | 
| 800 | 
            +
                "q": {
         | 
| 801 | 
            +
                  "numerator": 1,
         | 
| 802 | 
            +
                  "denominator": 100000000000000
         | 
| 803 | 
            +
                },
         | 
| 776 804 | 
             
                "slug": {
         | 
| 777 805 | 
             
                  "numerator": 1,
         | 
| 778 806 | 
             
                  "denominator": 14593903000000
         | 
| @@ -887,6 +915,10 @@ | |
| 887 915 | 
             
                  "numerator": 1,
         | 
| 888 916 | 
             
                  "denominator": 1000000000000
         | 
| 889 917 | 
             
                },
         | 
| 918 | 
            +
                "q": {
         | 
| 919 | 
            +
                  "numerator": 1,
         | 
| 920 | 
            +
                  "denominator": 100000000000
         | 
| 921 | 
            +
                },
         | 
| 890 922 | 
             
                "slug": {
         | 
| 891 923 | 
             
                  "numerator": 1,
         | 
| 892 924 | 
             
                  "denominator": 14593903000
         | 
| @@ -1001,6 +1033,10 @@ | |
| 1001 1033 | 
             
                  "numerator": 1,
         | 
| 1002 1034 | 
             
                  "denominator": 1000000000
         | 
| 1003 1035 | 
             
                },
         | 
| 1036 | 
            +
                "q": {
         | 
| 1037 | 
            +
                  "numerator": 1,
         | 
| 1038 | 
            +
                  "denominator": 100000000
         | 
| 1039 | 
            +
                },
         | 
| 1004 1040 | 
             
                "slug": {
         | 
| 1005 1041 | 
             
                  "numerator": 1,
         | 
| 1006 1042 | 
             
                  "denominator": 14593903
         | 
| @@ -1115,6 +1151,10 @@ | |
| 1115 1151 | 
             
                  "numerator": 1,
         | 
| 1116 1152 | 
             
                  "denominator": 100000000
         | 
| 1117 1153 | 
             
                },
         | 
| 1154 | 
            +
                "q": {
         | 
| 1155 | 
            +
                  "numerator": 1,
         | 
| 1156 | 
            +
                  "denominator": 10000000
         | 
| 1157 | 
            +
                },
         | 
| 1118 1158 | 
             
                "slug": {
         | 
| 1119 1159 | 
             
                  "numerator": 10,
         | 
| 1120 1160 | 
             
                  "denominator": 14593903
         | 
| @@ -1229,6 +1269,10 @@ | |
| 1229 1269 | 
             
                  "numerator": 1,
         | 
| 1230 1270 | 
             
                  "denominator": 10000000
         | 
| 1231 1271 | 
             
                },
         | 
| 1272 | 
            +
                "q": {
         | 
| 1273 | 
            +
                  "numerator": 1,
         | 
| 1274 | 
            +
                  "denominator": 1000000
         | 
| 1275 | 
            +
                },
         | 
| 1232 1276 | 
             
                "slug": {
         | 
| 1233 1277 | 
             
                  "numerator": 100,
         | 
| 1234 1278 | 
             
                  "denominator": 14593903
         | 
| @@ -1343,6 +1387,10 @@ | |
| 1343 1387 | 
             
                  "numerator": 1,
         | 
| 1344 1388 | 
             
                  "denominator": 100000
         | 
| 1345 1389 | 
             
                },
         | 
| 1390 | 
            +
                "q": {
         | 
| 1391 | 
            +
                  "numerator": 1,
         | 
| 1392 | 
            +
                  "denominator": 10000
         | 
| 1393 | 
            +
                },
         | 
| 1346 1394 | 
             
                "slug": {
         | 
| 1347 1395 | 
             
                  "numerator": 10000,
         | 
| 1348 1396 | 
             
                  "denominator": 14593903
         | 
| @@ -1457,6 +1505,10 @@ | |
| 1457 1505 | 
             
                  "numerator": 1,
         | 
| 1458 1506 | 
             
                  "denominator": 10000
         | 
| 1459 1507 | 
             
                },
         | 
| 1508 | 
            +
                "q": {
         | 
| 1509 | 
            +
                  "numerator": 1,
         | 
| 1510 | 
            +
                  "denominator": 1000
         | 
| 1511 | 
            +
                },
         | 
| 1460 1512 | 
             
                "slug": {
         | 
| 1461 1513 | 
             
                  "numerator": 100000,
         | 
| 1462 1514 | 
             
                  "denominator": 14593903
         | 
| @@ -1571,6 +1623,10 @@ | |
| 1571 1623 | 
             
                  "numerator": 1,
         | 
| 1572 1624 | 
             
                  "denominator": 1000
         | 
| 1573 1625 | 
             
                },
         | 
| 1626 | 
            +
                "q": {
         | 
| 1627 | 
            +
                  "numerator": 1,
         | 
| 1628 | 
            +
                  "denominator": 100
         | 
| 1629 | 
            +
                },
         | 
| 1574 1630 | 
             
                "slug": {
         | 
| 1575 1631 | 
             
                  "numerator": 1000000,
         | 
| 1576 1632 | 
             
                  "denominator": 14593903
         | 
| @@ -1685,6 +1741,10 @@ | |
| 1685 1741 | 
             
                  "numerator": 1,
         | 
| 1686 1742 | 
             
                  "denominator": 1
         | 
| 1687 1743 | 
             
                },
         | 
| 1744 | 
            +
                "q": {
         | 
| 1745 | 
            +
                  "numerator": 10,
         | 
| 1746 | 
            +
                  "denominator": 1
         | 
| 1747 | 
            +
                },
         | 
| 1688 1748 | 
             
                "slug": {
         | 
| 1689 1749 | 
             
                  "numerator": 1000000000,
         | 
| 1690 1750 | 
             
                  "denominator": 14593903
         | 
| @@ -1799,6 +1859,10 @@ | |
| 1799 1859 | 
             
                  "numerator": 1000,
         | 
| 1800 1860 | 
             
                  "denominator": 1
         | 
| 1801 1861 | 
             
                },
         | 
| 1862 | 
            +
                "q": {
         | 
| 1863 | 
            +
                  "numerator": 10000,
         | 
| 1864 | 
            +
                  "denominator": 1
         | 
| 1865 | 
            +
                },
         | 
| 1802 1866 | 
             
                "slug": {
         | 
| 1803 1867 | 
             
                  "numerator": 1000000000000,
         | 
| 1804 1868 | 
             
                  "denominator": 14593903
         | 
| @@ -1913,6 +1977,10 @@ | |
| 1913 1977 | 
             
                  "numerator": 1000000,
         | 
| 1914 1978 | 
             
                  "denominator": 1
         | 
| 1915 1979 | 
             
                },
         | 
| 1980 | 
            +
                "q": {
         | 
| 1981 | 
            +
                  "numerator": 10000000,
         | 
| 1982 | 
            +
                  "denominator": 1
         | 
| 1983 | 
            +
                },
         | 
| 1916 1984 | 
             
                "slug": {
         | 
| 1917 1985 | 
             
                  "numerator": 1000000000000000,
         | 
| 1918 1986 | 
             
                  "denominator": 14593903
         | 
| @@ -2027,6 +2095,10 @@ | |
| 2027 2095 | 
             
                  "numerator": 1000000000,
         | 
| 2028 2096 | 
             
                  "denominator": 1
         | 
| 2029 2097 | 
             
                },
         | 
| 2098 | 
            +
                "q": {
         | 
| 2099 | 
            +
                  "numerator": 10000000000,
         | 
| 2100 | 
            +
                  "denominator": 1
         | 
| 2101 | 
            +
                },
         | 
| 2030 2102 | 
             
                "slug": {
         | 
| 2031 2103 | 
             
                  "numerator": 1000000000000000000,
         | 
| 2032 2104 | 
             
                  "denominator": 14593903
         | 
| @@ -2141,6 +2213,10 @@ | |
| 2141 2213 | 
             
                  "numerator": 1000000000000,
         | 
| 2142 2214 | 
             
                  "denominator": 1
         | 
| 2143 2215 | 
             
                },
         | 
| 2216 | 
            +
                "q": {
         | 
| 2217 | 
            +
                  "numerator": 10000000000000,
         | 
| 2218 | 
            +
                  "denominator": 1
         | 
| 2219 | 
            +
                },
         | 
| 2144 2220 | 
             
                "slug": {
         | 
| 2145 2221 | 
             
                  "numerator": 1000000000000000000000,
         | 
| 2146 2222 | 
             
                  "denominator": 14593903
         | 
| @@ -2255,6 +2331,10 @@ | |
| 2255 2331 | 
             
                  "numerator": 1000000000000000,
         | 
| 2256 2332 | 
             
                  "denominator": 1
         | 
| 2257 2333 | 
             
                },
         | 
| 2334 | 
            +
                "q": {
         | 
| 2335 | 
            +
                  "numerator": 10000000000000000,
         | 
| 2336 | 
            +
                  "denominator": 1
         | 
| 2337 | 
            +
                },
         | 
| 2258 2338 | 
             
                "slug": {
         | 
| 2259 2339 | 
             
                  "numerator": 1000000000000000000000000,
         | 
| 2260 2340 | 
             
                  "denominator": 14593903
         | 
| @@ -2369,6 +2449,10 @@ | |
| 2369 2449 | 
             
                  "numerator": 1000000000000000000,
         | 
| 2370 2450 | 
             
                  "denominator": 1
         | 
| 2371 2451 | 
             
                },
         | 
| 2452 | 
            +
                "q": {
         | 
| 2453 | 
            +
                  "numerator": 10000000000000000000,
         | 
| 2454 | 
            +
                  "denominator": 1
         | 
| 2455 | 
            +
                },
         | 
| 2372 2456 | 
             
                "slug": {
         | 
| 2373 2457 | 
             
                  "numerator": 1000000000000000000000000000,
         | 
| 2374 2458 | 
             
                  "denominator": 14593903
         | 
| @@ -2483,6 +2567,10 @@ | |
| 2483 2567 | 
             
                  "numerator": 1,
         | 
| 2484 2568 | 
             
                  "denominator": 1000000000000000000
         | 
| 2485 2569 | 
             
                },
         | 
| 2570 | 
            +
                "q": {
         | 
| 2571 | 
            +
                  "numerator": 10,
         | 
| 2572 | 
            +
                  "denominator": 1
         | 
| 2573 | 
            +
                },
         | 
| 2486 2574 | 
             
                "slug": {
         | 
| 2487 2575 | 
             
                  "numerator": 1000000000,
         | 
| 2488 2576 | 
             
                  "denominator": 14593903
         | 
| @@ -2508,6 +2596,124 @@ | |
| 2508 2596 | 
             
                  "denominator": 45359237
         | 
| 2509 2597 | 
             
                }
         | 
| 2510 2598 | 
             
              },
         | 
| 2599 | 
            +
              "q": {
         | 
| 2600 | 
            +
                "q": {
         | 
| 2601 | 
            +
                  "numerator": 1,
         | 
| 2602 | 
            +
                  "denominator": 1
         | 
| 2603 | 
            +
                },
         | 
| 2604 | 
            +
                "g": {
         | 
| 2605 | 
            +
                  "numerator": 100000,
         | 
| 2606 | 
            +
                  "denominator": 1
         | 
| 2607 | 
            +
                },
         | 
| 2608 | 
            +
                "yg": {
         | 
| 2609 | 
            +
                  "numerator": 100000000000000000000000000000,
         | 
| 2610 | 
            +
                  "denominator": 1
         | 
| 2611 | 
            +
                },
         | 
| 2612 | 
            +
                "zg": {
         | 
| 2613 | 
            +
                  "numerator": 100000000000000000000000000,
         | 
| 2614 | 
            +
                  "denominator": 1
         | 
| 2615 | 
            +
                },
         | 
| 2616 | 
            +
                "ag": {
         | 
| 2617 | 
            +
                  "numerator": 100000000000000000000000,
         | 
| 2618 | 
            +
                  "denominator": 1
         | 
| 2619 | 
            +
                },
         | 
| 2620 | 
            +
                "fg": {
         | 
| 2621 | 
            +
                  "numerator": 100000000000000000000,
         | 
| 2622 | 
            +
                  "denominator": 1
         | 
| 2623 | 
            +
                },
         | 
| 2624 | 
            +
                "pg": {
         | 
| 2625 | 
            +
                  "numerator": 100000000000000000,
         | 
| 2626 | 
            +
                  "denominator": 1
         | 
| 2627 | 
            +
                },
         | 
| 2628 | 
            +
                "ng": {
         | 
| 2629 | 
            +
                  "numerator": 100000000000000,
         | 
| 2630 | 
            +
                  "denominator": 1
         | 
| 2631 | 
            +
                },
         | 
| 2632 | 
            +
                "μg": {
         | 
| 2633 | 
            +
                  "numerator": 100000000000,
         | 
| 2634 | 
            +
                  "denominator": 1
         | 
| 2635 | 
            +
                },
         | 
| 2636 | 
            +
                "mg": {
         | 
| 2637 | 
            +
                  "numerator": 100000000,
         | 
| 2638 | 
            +
                  "denominator": 1
         | 
| 2639 | 
            +
                },
         | 
| 2640 | 
            +
                "cg": {
         | 
| 2641 | 
            +
                  "numerator": 10000000,
         | 
| 2642 | 
            +
                  "denominator": 1
         | 
| 2643 | 
            +
                },
         | 
| 2644 | 
            +
                "dg": {
         | 
| 2645 | 
            +
                  "numerator": 1000000,
         | 
| 2646 | 
            +
                  "denominator": 1
         | 
| 2647 | 
            +
                },
         | 
| 2648 | 
            +
                "dag": {
         | 
| 2649 | 
            +
                  "numerator": 10000,
         | 
| 2650 | 
            +
                  "denominator": 1
         | 
| 2651 | 
            +
                },
         | 
| 2652 | 
            +
                "hg": {
         | 
| 2653 | 
            +
                  "numerator": 1000,
         | 
| 2654 | 
            +
                  "denominator": 1
         | 
| 2655 | 
            +
                },
         | 
| 2656 | 
            +
                "kg": {
         | 
| 2657 | 
            +
                  "numerator": 100,
         | 
| 2658 | 
            +
                  "denominator": 1
         | 
| 2659 | 
            +
                },
         | 
| 2660 | 
            +
                "Mg": {
         | 
| 2661 | 
            +
                  "numerator": 1,
         | 
| 2662 | 
            +
                  "denominator": 10
         | 
| 2663 | 
            +
                },
         | 
| 2664 | 
            +
                "Gg": {
         | 
| 2665 | 
            +
                  "numerator": 1,
         | 
| 2666 | 
            +
                  "denominator": 10000
         | 
| 2667 | 
            +
                },
         | 
| 2668 | 
            +
                "Tg": {
         | 
| 2669 | 
            +
                  "numerator": 1,
         | 
| 2670 | 
            +
                  "denominator": 10000000
         | 
| 2671 | 
            +
                },
         | 
| 2672 | 
            +
                "Pg": {
         | 
| 2673 | 
            +
                  "numerator": 1,
         | 
| 2674 | 
            +
                  "denominator": 10000000000
         | 
| 2675 | 
            +
                },
         | 
| 2676 | 
            +
                "Eg": {
         | 
| 2677 | 
            +
                  "numerator": 1,
         | 
| 2678 | 
            +
                  "denominator": 10000000000000
         | 
| 2679 | 
            +
                },
         | 
| 2680 | 
            +
                "Zg": {
         | 
| 2681 | 
            +
                  "numerator": 1,
         | 
| 2682 | 
            +
                  "denominator": 10000000000000000
         | 
| 2683 | 
            +
                },
         | 
| 2684 | 
            +
                "Yg": {
         | 
| 2685 | 
            +
                  "numerator": 1,
         | 
| 2686 | 
            +
                  "denominator": 10000000000000000000
         | 
| 2687 | 
            +
                },
         | 
| 2688 | 
            +
                "t": {
         | 
| 2689 | 
            +
                  "numerator": 1,
         | 
| 2690 | 
            +
                  "denominator": 10
         | 
| 2691 | 
            +
                },
         | 
| 2692 | 
            +
                "slug": {
         | 
| 2693 | 
            +
                  "numerator": 100000000,
         | 
| 2694 | 
            +
                  "denominator": 14593903
         | 
| 2695 | 
            +
                },
         | 
| 2696 | 
            +
                "N": {
         | 
| 2697 | 
            +
                  "numerator": 10000000000000000000,
         | 
| 2698 | 
            +
                  "denominator": 10197162129779283
         | 
| 2699 | 
            +
                },
         | 
| 2700 | 
            +
                "long_ton": {
         | 
| 2701 | 
            +
                  "numerator": 31250000,
         | 
| 2702 | 
            +
                  "denominator": 317514659
         | 
| 2703 | 
            +
                },
         | 
| 2704 | 
            +
                "short_ton": {
         | 
| 2705 | 
            +
                  "numerator": 5000000,
         | 
| 2706 | 
            +
                  "denominator": 45359237
         | 
| 2707 | 
            +
                },
         | 
| 2708 | 
            +
                "lb": {
         | 
| 2709 | 
            +
                  "numerator": 10000000000,
         | 
| 2710 | 
            +
                  "denominator": 45359237
         | 
| 2711 | 
            +
                },
         | 
| 2712 | 
            +
                "oz": {
         | 
| 2713 | 
            +
                  "numerator": 160000000000,
         | 
| 2714 | 
            +
                  "denominator": 45359237
         | 
| 2715 | 
            +
                }
         | 
| 2716 | 
            +
              },
         | 
| 2511 2717 | 
             
              "slug": {
         | 
| 2512 2718 | 
             
                "slug": {
         | 
| 2513 2719 | 
             
                  "numerator": 1,
         | 
| @@ -2601,6 +2807,10 @@ | |
| 2601 2807 | 
             
                  "numerator": 14593903,
         | 
| 2602 2808 | 
             
                  "denominator": 1000000000
         | 
| 2603 2809 | 
             
                },
         | 
| 2810 | 
            +
                "q": {
         | 
| 2811 | 
            +
                  "numerator": 14593903,
         | 
| 2812 | 
            +
                  "denominator": 100000000
         | 
| 2813 | 
            +
                },
         | 
| 2604 2814 | 
             
                "N": {
         | 
| 2605 2815 | 
             
                  "numerator": 1459390300000000000,
         | 
| 2606 2816 | 
             
                  "denominator": 10197162129779283
         | 
| @@ -2715,6 +2925,10 @@ | |
| 2715 2925 | 
             
                  "numerator": 10197162129779283,
         | 
| 2716 2926 | 
             
                  "denominator": 100000000000000000000
         | 
| 2717 2927 | 
             
                },
         | 
| 2928 | 
            +
                "q": {
         | 
| 2929 | 
            +
                  "numerator": 10197162129779283,
         | 
| 2930 | 
            +
                  "denominator": 10000000000000000000
         | 
| 2931 | 
            +
                },
         | 
| 2718 2932 | 
             
                "slug": {
         | 
| 2719 2933 | 
             
                  "numerator": 10197162129779283,
         | 
| 2720 2934 | 
             
                  "denominator": 1459390300000000000
         | 
| @@ -2829,6 +3043,10 @@ | |
| 2829 3043 | 
             
                  "numerator": 317514659,
         | 
| 2830 3044 | 
             
                  "denominator": 312500000
         | 
| 2831 3045 | 
             
                },
         | 
| 3046 | 
            +
                "q": {
         | 
| 3047 | 
            +
                  "numerator": 317514659,
         | 
| 3048 | 
            +
                  "denominator": 31250000
         | 
| 3049 | 
            +
                },
         | 
| 2832 3050 | 
             
                "slug": {
         | 
| 2833 3051 | 
             
                  "numerator": 5080234544,
         | 
| 2834 3052 | 
             
                  "denominator": 72969515
         | 
| @@ -2943,6 +3161,10 @@ | |
| 2943 3161 | 
             
                  "numerator": 45359237,
         | 
| 2944 3162 | 
             
                  "denominator": 50000000
         | 
| 2945 3163 | 
             
                },
         | 
| 3164 | 
            +
                "q": {
         | 
| 3165 | 
            +
                  "numerator": 45359237,
         | 
| 3166 | 
            +
                  "denominator": 5000000
         | 
| 3167 | 
            +
                },
         | 
| 2946 3168 | 
             
                "slug": {
         | 
| 2947 3169 | 
             
                  "numerator": 907184740,
         | 
| 2948 3170 | 
             
                  "denominator": 14593903
         | 
| @@ -3057,6 +3279,10 @@ | |
| 3057 3279 | 
             
                  "numerator": 45359237,
         | 
| 3058 3280 | 
             
                  "denominator": 100000000000
         | 
| 3059 3281 | 
             
                },
         | 
| 3282 | 
            +
                "q": {
         | 
| 3283 | 
            +
                  "numerator": 45359237,
         | 
| 3284 | 
            +
                  "denominator": 10000000000
         | 
| 3285 | 
            +
                },
         | 
| 3060 3286 | 
             
                "slug": {
         | 
| 3061 3287 | 
             
                  "numerator": 45359237,
         | 
| 3062 3288 | 
             
                  "denominator": 1459390300
         | 
| @@ -3171,6 +3397,10 @@ | |
| 3171 3397 | 
             
                  "numerator": 45359237,
         | 
| 3172 3398 | 
             
                  "denominator": 1600000000000
         | 
| 3173 3399 | 
             
                },
         | 
| 3400 | 
            +
                "q": {
         | 
| 3401 | 
            +
                  "numerator": 45359237,
         | 
| 3402 | 
            +
                  "denominator": 160000000000
         | 
| 3403 | 
            +
                },
         | 
| 3174 3404 | 
             
                "slug": {
         | 
| 3175 3405 | 
             
                  "numerator": 45359237,
         | 
| 3176 3406 | 
             
                  "denominator": 23350244800
         | 
| @@ -2,7 +2,8 @@ | |
| 2 2 | 
             
            Measured::Weight = Measured.build do
         | 
| 3 3 | 
             
              si_unit :g, aliases: [:gram, :grams, :gm, :gms]
         | 
| 4 4 |  | 
| 5 | 
            -
              unit :t, value: "1000 kg", aliases: [:metric_ton, :metric_tons]
         | 
| 5 | 
            +
              unit :t, value: "1000 kg", aliases: [:metric_ton, :metric_tons, :tonne, :tonnes]
         | 
| 6 | 
            +
              unit :q, value: "100 kg", aliases: [:quintal, :quintals]
         | 
| 6 7 | 
             
              unit :slug, value: "14.593903 kg", aliases: [:slugs]
         | 
| 7 8 | 
             
              unit :N, value: "0.10197162129779283 kg", aliases: [:newtons, :newton]
         | 
| 8 9 | 
             
              unit :long_ton, value: "2240 lb", aliases: [:long_tons, :weight_ton, :weight_tons, 'W/T', :imperial_ton, :imperial_tons, :displacement_ton, :displacement_tons]
         | 
    
        data/lib/measured/version.rb
    CHANGED
    
    
    
        data/measured.gemspec
    CHANGED
    
    | @@ -36,6 +36,6 @@ Gem::Specification.new do |spec| | |
| 36 36 | 
             
              spec.add_development_dependency "mocha", ">= 1.4.0"
         | 
| 37 37 | 
             
              spec.add_development_dependency "pry"
         | 
| 38 38 | 
             
              spec.add_development_dependency "combustion"
         | 
| 39 | 
            -
              spec.add_development_dependency "sqlite3", " | 
| 39 | 
            +
              spec.add_development_dependency "sqlite3", "> 1.4"
         | 
| 40 40 | 
             
              spec.add_development_dependency "tapioca"
         | 
| 41 41 | 
             
            end
         | 
    
        data/test/units/weight_test.rb
    CHANGED
    
    | @@ -25,6 +25,11 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 25 25 | 
             
                  long_tons
         | 
| 26 26 | 
             
                  metric_ton
         | 
| 27 27 | 
             
                  metric_tons
         | 
| 28 | 
            +
                  tonne
         | 
| 29 | 
            +
                  tonnes
         | 
| 30 | 
            +
                  q
         | 
| 31 | 
            +
                  quintal
         | 
| 32 | 
            +
                  quintals
         | 
| 28 33 | 
             
                  newton
         | 
| 29 34 | 
             
                  newtons
         | 
| 30 35 | 
             
                  ounce
         | 
| @@ -48,7 +53,7 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 48 53 | 
             
              end
         | 
| 49 54 |  | 
| 50 55 | 
             
              test ".unit_names should be the list of base unit names" do
         | 
| 51 | 
            -
                expected_units = %w(N g lb long_ton oz short_ton slug t)
         | 
| 56 | 
            +
                expected_units = %w(N g lb long_ton oz short_ton slug t q)
         | 
| 52 57 | 
             
                expected_units += Measured::UnitSystemBuilder::SI_PREFIXES.map { |short, _, _| "#{short}g" }
         | 
| 53 58 | 
             
                assert_equal expected_units.sort, Measured::Weight.unit_names
         | 
| 54 59 | 
             
              end
         | 
| @@ -98,6 +103,10 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 98 103 | 
             
                assert_exact_conversion Measured::Weight, "2000 g", "0.002 t"
         | 
| 99 104 | 
             
              end
         | 
| 100 105 |  | 
| 106 | 
            +
              test ".convert_to from g to q" do
         | 
| 107 | 
            +
                assert_exact_conversion Measured::Weight, "2000 g", "0.02 q"
         | 
| 108 | 
            +
              end
         | 
| 109 | 
            +
             | 
| 101 110 | 
             
              test ".convert_to from kg to g" do
         | 
| 102 111 | 
             
                assert_exact_conversion Measured::Weight, "2000 kg", "2000000 g"
         | 
| 103 112 | 
             
              end
         | 
| @@ -134,6 +143,10 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 134 143 | 
             
                assert_exact_conversion Measured::Weight, "2000 kg", "2 t"
         | 
| 135 144 | 
             
              end
         | 
| 136 145 |  | 
| 146 | 
            +
              test ".convert_to from kg to q" do
         | 
| 147 | 
            +
                assert_exact_conversion Measured::Weight, "2000 kg", "20 q"
         | 
| 148 | 
            +
              end
         | 
| 149 | 
            +
             | 
| 137 150 | 
             
              test ".convert_to from lb to g" do
         | 
| 138 151 | 
             
                assert_exact_conversion Measured::Weight, "2000 lb", "907184.74 g"
         | 
| 139 152 | 
             
              end
         | 
| @@ -170,6 +183,10 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 170 183 | 
             
                assert_conversion Measured::Weight, "2000 lb", "0.90718474 t"
         | 
| 171 184 | 
             
              end
         | 
| 172 185 |  | 
| 186 | 
            +
              test ".convert_to from lb to q" do
         | 
| 187 | 
            +
                assert_conversion Measured::Weight, "2000 lb", "9.0718474 q"
         | 
| 188 | 
            +
              end
         | 
| 189 | 
            +
             | 
| 173 190 | 
             
              test ".convert_to from oz to g" do
         | 
| 174 191 | 
             
                assert_conversion Measured::Weight, "2000 oz", "56699.04625 g"
         | 
| 175 192 | 
             
              end
         | 
| @@ -206,6 +223,10 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 206 223 | 
             
                assert_conversion Measured::Weight, "2000 oz", "0.05669904625 t"
         | 
| 207 224 | 
             
              end
         | 
| 208 225 |  | 
| 226 | 
            +
              test ".convert_to from oz to q" do
         | 
| 227 | 
            +
                assert_conversion Measured::Weight, "2000 oz", "0.5669904625 q"
         | 
| 228 | 
            +
              end
         | 
| 229 | 
            +
             | 
| 209 230 | 
             
              test ".convert_to from slug to g" do
         | 
| 210 231 | 
             
                assert_conversion Measured::Weight, "2000 slug", "29187806 g"
         | 
| 211 232 | 
             
              end
         | 
| @@ -242,6 +263,10 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 242 263 | 
             
                assert_conversion Measured::Weight, "2000 slug", "29.187806 t"
         | 
| 243 264 | 
             
              end
         | 
| 244 265 |  | 
| 266 | 
            +
              test ".convert_to from slug to q" do
         | 
| 267 | 
            +
                assert_conversion Measured::Weight, "2000 slug", "291.87806 q"
         | 
| 268 | 
            +
              end
         | 
| 269 | 
            +
             | 
| 245 270 | 
             
              test ".convert_to from short_ton to g" do
         | 
| 246 271 | 
             
                assert_conversion Measured::Weight, "2000 short_ton", "1814369480 g"
         | 
| 247 272 | 
             
              end
         | 
| @@ -278,6 +303,10 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 278 303 | 
             
                assert_conversion Measured::Weight, "2000 short_ton", "1814.36948 t"
         | 
| 279 304 | 
             
              end
         | 
| 280 305 |  | 
| 306 | 
            +
              test ".convert_to from short_ton to q" do
         | 
| 307 | 
            +
                assert_conversion Measured::Weight, "2000 short_ton", "18143.6948 q"
         | 
| 308 | 
            +
              end
         | 
| 309 | 
            +
             | 
| 281 310 | 
             
              test ".convert_to from long_ton to g" do
         | 
| 282 311 | 
             
                assert_conversion Measured::Weight, "2000 long_ton", "2032093817.6 g"
         | 
| 283 312 | 
             
              end
         | 
| @@ -314,6 +343,10 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 314 343 | 
             
                assert_conversion Measured::Weight, "2000 long_ton", "2032.0938176 t"
         | 
| 315 344 | 
             
              end
         | 
| 316 345 |  | 
| 346 | 
            +
              test ".convert_to from long_ton to q" do
         | 
| 347 | 
            +
                assert_conversion Measured::Weight, "2000 long_ton", "20320.938176 q"
         | 
| 348 | 
            +
              end
         | 
| 349 | 
            +
             | 
| 317 350 | 
             
              test ".convert_to from N to g" do
         | 
| 318 351 | 
             
                assert_conversion Measured::Weight, "2000 N", "203943.24259558567 g"
         | 
| 319 352 | 
             
              end
         | 
| @@ -350,6 +383,10 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 350 383 | 
             
                assert_conversion Measured::Weight, "2000 N", "0.2039432425955857 t"
         | 
| 351 384 | 
             
              end
         | 
| 352 385 |  | 
| 386 | 
            +
              test ".convert_to from N to q" do
         | 
| 387 | 
            +
                assert_conversion Measured::Weight, "2000 N", "2.039432425955857 q"
         | 
| 388 | 
            +
              end
         | 
| 389 | 
            +
             | 
| 353 390 | 
             
              test ".convert_to from t to g" do
         | 
| 354 391 | 
             
                assert_exact_conversion Measured::Weight, "2000 t", "2000000000 g"
         | 
| 355 392 | 
             
              end
         | 
| @@ -377,4 +414,40 @@ class Measured::WeightTest < ActiveSupport::TestCase | |
| 377 414 | 
             
              test ".convert_to from t to t" do
         | 
| 378 415 | 
             
                assert_conversion Measured::Weight, "2000 t", "2000 t"
         | 
| 379 416 | 
             
              end
         | 
| 417 | 
            +
             | 
| 418 | 
            +
              test ".convert_to from t to q" do
         | 
| 419 | 
            +
                assert_conversion Measured::Weight, "2000 t", "20000 q"
         | 
| 420 | 
            +
              end
         | 
| 421 | 
            +
             | 
| 422 | 
            +
              test ".convert_to from q to g" do
         | 
| 423 | 
            +
                assert_exact_conversion Measured::Weight, "2000 q", "200000000 g"
         | 
| 424 | 
            +
              end
         | 
| 425 | 
            +
             | 
| 426 | 
            +
              test ".convert_to from q to kg" do
         | 
| 427 | 
            +
                assert_exact_conversion Measured::Weight, "2000 q", "200000 kg"
         | 
| 428 | 
            +
              end
         | 
| 429 | 
            +
             | 
| 430 | 
            +
              test ".convert_to from q to lb" do
         | 
| 431 | 
            +
                assert_conversion Measured::Weight, "2000 q", "440924.5243697552 lb"
         | 
| 432 | 
            +
              end
         | 
| 433 | 
            +
             | 
| 434 | 
            +
              test ".convert_to from q to oz" do
         | 
| 435 | 
            +
                assert_conversion Measured::Weight, "2000 q", "7054792.389916082 oz"
         | 
| 436 | 
            +
              end
         | 
| 437 | 
            +
             | 
| 438 | 
            +
              test ".convert_to from q to slug" do
         | 
| 439 | 
            +
                assert_conversion Measured::Weight, "2000 q", "13704.35311239221 slug"
         | 
| 440 | 
            +
              end
         | 
| 441 | 
            +
             | 
| 442 | 
            +
              test ".convert_to from q to short_ton" do
         | 
| 443 | 
            +
                assert_conversion Measured::Weight, "2000 q", "220.4622621848 short_ton"
         | 
| 444 | 
            +
              end
         | 
| 445 | 
            +
             | 
| 446 | 
            +
              test ".convert_to from q to t" do
         | 
| 447 | 
            +
                assert_conversion Measured::Weight, "2000 q", "200 t"
         | 
| 448 | 
            +
              end
         | 
| 449 | 
            +
             | 
| 450 | 
            +
              test ".convert_to from q to q" do
         | 
| 451 | 
            +
                assert_conversion Measured::Weight, "2000 q", "2000 q"
         | 
| 452 | 
            +
              end
         | 
| 380 453 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,16 +1,16 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: measured
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3. | 
| 4 | 
            +
              version: 3.1.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Kevin McPhillips
         | 
| 8 8 | 
             
            - Jason Gedge
         | 
| 9 9 | 
             
            - Javier Honduvilla Coto
         | 
| 10 | 
            -
            autorequire: | 
| 10 | 
            +
            autorequire:
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date: 2024- | 
| 13 | 
            +
            date: 2024-10-03 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: activesupport
         | 
| @@ -114,14 +114,14 @@ dependencies: | |
| 114 114 | 
             
              name: sqlite3
         | 
| 115 115 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 116 116 | 
             
                requirements:
         | 
| 117 | 
            -
                - - " | 
| 117 | 
            +
                - - ">"
         | 
| 118 118 | 
             
                  - !ruby/object:Gem::Version
         | 
| 119 119 | 
             
                    version: '1.4'
         | 
| 120 120 | 
             
              type: :development
         | 
| 121 121 | 
             
              prerelease: false
         | 
| 122 122 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 123 123 | 
             
                requirements:
         | 
| 124 | 
            -
                - - " | 
| 124 | 
            +
                - - ">"
         | 
| 125 125 | 
             
                  - !ruby/object:Gem::Version
         | 
| 126 126 | 
             
                    version: '1.4'
         | 
| 127 127 | 
             
            - !ruby/object:Gem::Dependency
         | 
| @@ -146,8 +146,10 @@ executables: [] | |
| 146 146 | 
             
            extensions: []
         | 
| 147 147 | 
             
            extra_rdoc_files: []
         | 
| 148 148 | 
             
            files:
         | 
| 149 | 
            +
            - ".github/dependabot.yml"
         | 
| 149 150 | 
             
            - ".github/workflows/ci.yml"
         | 
| 150 151 | 
             
            - ".github/workflows/cla.yml"
         | 
| 152 | 
            +
            - ".github/workflows/dependabot_auto_merge.yml"
         | 
| 151 153 | 
             
            - ".gitignore"
         | 
| 152 154 | 
             
            - ".ruby-version"
         | 
| 153 155 | 
             
            - CHANGELOG.md
         | 
| @@ -160,9 +162,8 @@ files: | |
| 160 162 | 
             
            - cache/volume.json
         | 
| 161 163 | 
             
            - cache/weight.json
         | 
| 162 164 | 
             
            - dev.yml
         | 
| 163 | 
            -
            - gemfiles/rails-6.0.gemfile
         | 
| 164 | 
            -
            - gemfiles/rails-6.1.gemfile
         | 
| 165 165 | 
             
            - gemfiles/rails-7.0.gemfile
         | 
| 166 | 
            +
            - gemfiles/rails-7.1.gemfile
         | 
| 166 167 | 
             
            - gemfiles/rails-edge.gemfile
         | 
| 167 168 | 
             
            - lib/measured.rb
         | 
| 168 169 | 
             
            - lib/measured/arithmetic.rb
         | 
| @@ -226,7 +227,7 @@ licenses: | |
| 226 227 | 
             
            - MIT
         | 
| 227 228 | 
             
            metadata:
         | 
| 228 229 | 
             
              allowed_push_host: https://rubygems.org
         | 
| 229 | 
            -
            post_install_message: | 
| 230 | 
            +
            post_install_message:
         | 
| 230 231 | 
             
            rdoc_options: []
         | 
| 231 232 | 
             
            require_paths:
         | 
| 232 233 | 
             
            - lib
         | 
| @@ -241,8 +242,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 241 242 | 
             
                - !ruby/object:Gem::Version
         | 
| 242 243 | 
             
                  version: '0'
         | 
| 243 244 | 
             
            requirements: []
         | 
| 244 | 
            -
            rubygems_version: 3.5. | 
| 245 | 
            -
            signing_key: | 
| 245 | 
            +
            rubygems_version: 3.5.20
         | 
| 246 | 
            +
            signing_key:
         | 
| 246 247 | 
             
            specification_version: 4
         | 
| 247 248 | 
             
            summary: Encapsulate measurements with their units in Ruby
         | 
| 248 249 | 
             
            test_files:
         | 
    
        data/gemfiles/rails-6.0.gemfile
    DELETED