composite_unit_measurements 0.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7e212c20da9787a853fef2791d5f95d0004e5e45225c3809088205a1375b600c
4
+ data.tar.gz: 8b2c03cfdfba50cc0e13088bbfb8910afd249b98ec4048280441131f47a310f5
5
+ SHA512:
6
+ metadata.gz: c1a6c264037d7db78d70676137d60a1085bb7126034674c6156de7806ef9c76263a8acd8bd4125fa3655d1c6c64c1ccec3bdd04d004dcc93dbd0e4ad6e056c86
7
+ data.tar.gz: 394309d1a68c9eed5548f446fe3816ae467c7f2f6c4e66428d9957ae1ca5ed376659e4c7ff4fe1adc731cee85a8ea340577d120c65038b312398cf8f10dde6af
@@ -0,0 +1,31 @@
1
+ name: Ruby
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ jobs:
10
+ build:
11
+ name: Ruby ${{ matrix.ruby }}
12
+ runs-on: ubuntu-latest
13
+ env:
14
+ RAILS_ENV: test
15
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
16
+ strategy:
17
+ matrix:
18
+ ruby:
19
+ - "3.2.2"
20
+ steps:
21
+ - name: Checkout Repository
22
+ uses: actions/checkout@v3
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ bundler-cache: true
28
+ - name: Run test cases
29
+ run: bundle exec rake
30
+ - name: Publish code coverage
31
+ uses: paambaati/codeclimate-action@v5.0.0
@@ -0,0 +1,31 @@
1
+ name: Publish Documentation to GitHub Pages
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ jobs:
7
+ build:
8
+ name: Publish Documentation to GitHub Pages ${{ matrix.ruby }}
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write
12
+ strategy:
13
+ matrix:
14
+ ruby:
15
+ - "3.2.2"
16
+ steps:
17
+ - name: Checkout Repository
18
+ uses: actions/checkout@v3
19
+ - name: Set Up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby }}
23
+ - name: Install Dependencies
24
+ run: gem install yard
25
+ - name: Generate Documentation
26
+ run: yardoc
27
+ - name: Deploy to GitHub Pages
28
+ uses: peaceiris/actions-gh-pages@v3.9.3
29
+ with:
30
+ github_token: ${{ secrets.GITHUB_TOKEN }}
31
+ publish_dir: ./doc
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
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --private
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ ## 0.1.0 - 2023-11-09
2
+
3
+ ### Initial release
4
+
5
+ -----------
6
+
7
+ ### Unreleased
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ source "https://rubygems.org"
6
+
7
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,71 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ composite_unit_measurements (0.1.0)
5
+ activesupport (~> 7.0)
6
+ unit_measurements (~> 5)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (7.1.1)
12
+ base64
13
+ bigdecimal
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ connection_pool (>= 2.2.5)
16
+ drb
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ mutex_m
20
+ tzinfo (~> 2.0)
21
+ base64 (0.2.0)
22
+ bigdecimal (3.1.4)
23
+ byebug (11.1.3)
24
+ concurrent-ruby (1.2.2)
25
+ connection_pool (2.4.1)
26
+ diff-lcs (1.5.0)
27
+ docile (1.4.0)
28
+ drb (2.2.0)
29
+ ruby2_keywords
30
+ i18n (1.14.1)
31
+ concurrent-ruby (~> 1.0)
32
+ minitest (5.20.0)
33
+ mutex_m (0.2.0)
34
+ rake (13.1.0)
35
+ rspec (3.12.0)
36
+ rspec-core (~> 3.12.0)
37
+ rspec-expectations (~> 3.12.0)
38
+ rspec-mocks (~> 3.12.0)
39
+ rspec-core (3.12.2)
40
+ rspec-support (~> 3.12.0)
41
+ rspec-expectations (3.12.3)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.12.0)
44
+ rspec-mocks (3.12.6)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.12.0)
47
+ rspec-support (3.12.1)
48
+ ruby2_keywords (0.0.5)
49
+ simplecov (0.22.0)
50
+ docile (~> 1.1)
51
+ simplecov-html (~> 0.11)
52
+ simplecov_json_formatter (~> 0.1)
53
+ simplecov-html (0.12.3)
54
+ simplecov_json_formatter (0.1.4)
55
+ tzinfo (2.0.6)
56
+ concurrent-ruby (~> 1.0)
57
+ unit_measurements (5.8.0)
58
+ activesupport (~> 7.0)
59
+
60
+ PLATFORMS
61
+ x86_64-linux
62
+
63
+ DEPENDENCIES
64
+ byebug (~> 11)
65
+ composite_unit_measurements!
66
+ rake (~> 13.0)
67
+ rspec (~> 3.0)
68
+ simplecov (~> 0.21, >= 0.21.2)
69
+
70
+ BUNDLED WITH
71
+ 2.4.10
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ **Copyright (c) 2023 Harshal LADHE**
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # Composite Unit Measurements
2
+
3
+ A set of specialized parsers for dealing with composite measurement strings.
4
+
5
+ [![Ruby](https://github.com/shivam091/composite_unit_measurements/actions/workflows/main.yml/badge.svg)](https://github.com/shivam091/composite_unit_measurements/actions/workflows/main.yml)
6
+ [![Gem Version](https://badge.fury.io/rb/composite_unit_measurements.svg)](https://badge.fury.io/rb/composite_unit_measurements)
7
+ [![Gem Downloads](https://img.shields.io/gem/dt/composite_unit_measurements.svg)](http://rubygems.org/gems/composite_unit_measurements)
8
+ [![Maintainability](https://api.codeclimate.com/v1/badges/94e13b43cdd19e6c462c/maintainability)](https://codeclimate.com/github/shivam091/composite_unit_measurements/maintainability)
9
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/94e13b43cdd19e6c462c/test_coverage)](https://codeclimate.com/github/shivam091/composite_unit_measurements/test_coverage)
10
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/shivam091/composite_unit_measurements/blob/main/LICENSE)
11
+
12
+ **Harshal V. Ladhe, M.Sc. Computer Science.**
13
+
14
+ ## Introduction
15
+
16
+ The `CompositeUnitMeasurements` gem is a versatile solution tailored for parsing
17
+ composite measurement strings. By harnessing the capabilities of the `unit_measurements`
18
+ gem, it empowers you to seamlessly handle composite measurements in various units.
19
+
20
+ ## Minimum Requirements
21
+
22
+ * Ruby 3.2.2+ (https://www.ruby-lang.org/en/downloads/branches/)
23
+
24
+ ## Installation
25
+
26
+ If using bundler, first add this line to your application's Gemfile:
27
+
28
+ ```ruby
29
+ gem "composite_unit_measurements"
30
+ ```
31
+
32
+ And then execute:
33
+
34
+ `$ bundle install`
35
+
36
+ Or otherwise simply install it yourself as:
37
+
38
+ `$ gem install composite_unit_measurements`
39
+
40
+ ## Contributing
41
+
42
+ 1. Fork it
43
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
44
+ 3. Commit your changes (`git commit -am "Add some feature"`)
45
+ 4. Push to the branch (`git push origin my-new-feature`)
46
+ 5. Create new Pull Request
47
+
48
+ ## License
49
+
50
+ Copyright 2023 [Harshal V. LADHE]((https://shivam091.github.io)), Released under the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ require "bundler/gem_tasks"
6
+ require "rspec/core/rake_task"
7
+
8
+ RSpec::Core::RakeTask.new(:spec)
9
+
10
+ task default: :spec
@@ -0,0 +1,44 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ lib = File.expand_path("../lib", __FILE__)
6
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
+
8
+ require "composite_unit_measurements/version"
9
+
10
+ Gem::Specification.new do |spec|
11
+ spec.name = "composite_unit_measurements"
12
+ spec.version = CompositeUnitMeasurements::VERSION
13
+ spec.authors = ["Harshal LADHE"]
14
+ spec.email = ["harshal.ladhe.1@gmail.com"]
15
+
16
+ spec.summary = "A set of specialized parsers for dealing with composite measurement strings."
17
+ spec.description = spec.summary
18
+ spec.homepage = "https://github.com/shivam091/composite_unit_measurements"
19
+ spec.license = "MIT"
20
+ spec.required_ruby_version = ">= 3.2.2"
21
+
22
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
23
+
24
+ spec.metadata["homepage_uri"] = spec.homepage
25
+ spec.metadata["source_code_uri"] = "https://github.com/shivam091/composite_unit_measurements"
26
+ spec.metadata["changelog_uri"] = "https://github.com/shivam091/composite_unit_measurements/blob/main/CHANGELOG.md"
27
+ spec.metadata["documentation_uri"] = "https://shivam091.github.io/composite_unit_measurements"
28
+ spec.metadata["bug_tracker_uri"] = "https://github.com/shivam091/composite_unit_measurements/issues"
29
+
30
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
31
+ f.match(%r{^(test|spec|features)/})
32
+ end
33
+ spec.bindir = "exe"
34
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
35
+ spec.require_paths = ["lib"]
36
+
37
+ spec.add_runtime_dependency "activesupport", "~> 7.0"
38
+ spec.add_runtime_dependency "unit_measurements", "~> 5"
39
+
40
+ spec.add_development_dependency "rake", "~> 13.0"
41
+ spec.add_development_dependency "rspec", "~> 3.0"
42
+ spec.add_development_dependency "simplecov", "~> 0.21", ">= 0.21.2"
43
+ spec.add_development_dependency "byebug", "~> 11"
44
+ end
@@ -0,0 +1,7 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ require "unit_measurements/base"
6
+
7
+ require "composite_unit_measurements/version"
@@ -0,0 +1,7 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ module CompositeUnitMeasurements
6
+ VERSION = "0.1.0"
7
+ end
@@ -0,0 +1,9 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # -*- frozen_string_literal: true -*-
3
+ # -*- warn_indent: true -*-
4
+
5
+ require "composite_unit_measurements/version"
6
+
7
+ module CompositeUnitMeasurements
8
+ class Error < StandardError; end
9
+ end
metadata ADDED
@@ -0,0 +1,154 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: composite_unit_measurements
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Harshal LADHE
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-11-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '7.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '7.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: unit_measurements
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.21'
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 0.21.2
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '0.21'
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 0.21.2
89
+ - !ruby/object:Gem::Dependency
90
+ name: byebug
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '11'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '11'
103
+ description: A set of specialized parsers for dealing with composite measurement strings.
104
+ email:
105
+ - harshal.ladhe.1@gmail.com
106
+ executables: []
107
+ extensions: []
108
+ extra_rdoc_files: []
109
+ files:
110
+ - ".github/workflows/main.yml"
111
+ - ".github/workflows/pages.yml"
112
+ - ".gitignore"
113
+ - ".rspec"
114
+ - ".yardopts"
115
+ - CHANGELOG.md
116
+ - Gemfile
117
+ - Gemfile.lock
118
+ - LICENSE.md
119
+ - README.md
120
+ - Rakefile
121
+ - composite_unit_measurements.gemspec
122
+ - lib/composite_unit_measurements.rb
123
+ - lib/composite_unit_measurements/base.rb
124
+ - lib/composite_unit_measurements/version.rb
125
+ homepage: https://github.com/shivam091/composite_unit_measurements
126
+ licenses:
127
+ - MIT
128
+ metadata:
129
+ allowed_push_host: https://rubygems.org
130
+ homepage_uri: https://github.com/shivam091/composite_unit_measurements
131
+ source_code_uri: https://github.com/shivam091/composite_unit_measurements
132
+ changelog_uri: https://github.com/shivam091/composite_unit_measurements/blob/main/CHANGELOG.md
133
+ documentation_uri: https://shivam091.github.io/composite_unit_measurements
134
+ bug_tracker_uri: https://github.com/shivam091/composite_unit_measurements/issues
135
+ post_install_message:
136
+ rdoc_options: []
137
+ require_paths:
138
+ - lib
139
+ required_ruby_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: 3.2.2
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ requirements: []
150
+ rubygems_version: 3.4.10
151
+ signing_key:
152
+ specification_version: 4
153
+ summary: A set of specialized parsers for dealing with composite measurement strings.
154
+ test_files: []