unit_measurements-rails 0.1.0 → 0.2.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 +4 -4
- data/.github/workflows/main.yml +10 -3
- data/CHANGELOG.md +9 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +135 -14
- data/README.md +1 -1
- data/Rakefile +2 -0
- data/gemfiles/rails-7.0.gemfile +9 -0
- data/gemfiles/rails-7.1.gemfile +9 -0
- data/gemfiles/rails-edge.gemfile +9 -0
- data/lib/unit_measurements/rails/base.rb +13 -0
- data/lib/unit_measurements/{rails.rb → rails/railtie.rb} +2 -3
- data/lib/unit_measurements/rails/version.rb +1 -1
- data/lib/unit_measurements-rails.rb +5 -0
- data/unit_measurements-rails.gemspec +7 -1
- metadata +64 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 248b4aa4b1db413cbd85b1625a3f074eaa19f6c36d1c3f85496b3b2192a61f22
|
4
|
+
data.tar.gz: d5038145522b4dc4041306c9a8b48191febd110aa039bb94e6da9a13f1e4315f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1a7a08872179ea42aa5bc681910dc829b89c22d0a2981ed8888ce8b89a7ac5a239cb6ba78fa057e0566fd1b21b7d487d27eaa5a2d11af7a9ffb349019624f4c
|
7
|
+
data.tar.gz: 16058395f0b28050dc01d773938af2188594f386d650e8a3ce856aec9b1d723bfc8c5efe09093d3482d8d38ece676243a01c7eac4fc790dd976ff0451e4f1e4e
|
data/.github/workflows/main.yml
CHANGED
@@ -8,19 +8,26 @@ on:
|
|
8
8
|
- main
|
9
9
|
jobs:
|
10
10
|
build:
|
11
|
-
name: Ruby ${{ matrix.ruby }}
|
12
11
|
runs-on: ubuntu-latest
|
13
12
|
env:
|
14
13
|
RAILS_ENV: test
|
15
14
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
15
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
16
16
|
strategy:
|
17
|
+
fail-fast: false
|
17
18
|
matrix:
|
18
19
|
ruby:
|
19
|
-
- "3.2
|
20
|
+
- "3.2"
|
21
|
+
gemfile:
|
22
|
+
- Gemfile
|
23
|
+
- gemfiles/rails-7.0.gemfile
|
24
|
+
- gemfiles/rails-7.1.gemfile
|
25
|
+
- gemfiles/rails-edge.gemfile
|
26
|
+
name: Ruby ${{ matrix.ruby }} ${{ matrix.gemfile }}
|
20
27
|
steps:
|
21
28
|
- name: Checkout Repository
|
22
29
|
uses: actions/checkout@v3
|
23
|
-
- name: Set up Ruby
|
30
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
24
31
|
uses: ruby/setup-ruby@v1
|
25
32
|
with:
|
26
33
|
ruby-version: ${{ matrix.ruby }}
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [0.2.0](https://github.com/shivam091/unit_measurements-rails/compare/v0.1.0...v0.2.0) - 2023-11-12
|
2
|
+
|
3
|
+
### What's new
|
4
|
+
|
5
|
+
- Added gem skeleton and updated dependencies.
|
6
|
+
- Added test schema to prepare the database.
|
7
|
+
|
8
|
+
-----------
|
9
|
+
|
1
10
|
## 0.1.0 - 2023-11-08
|
2
11
|
|
3
12
|
### Initial release
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,35 +1,148 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
unit_measurements-rails (0.
|
4
|
+
unit_measurements-rails (0.2.0)
|
5
|
+
activemodel (>= 7)
|
6
|
+
activerecord (>= 7)
|
7
|
+
railties (>= 7)
|
5
8
|
unit_measurements (~> 5)
|
6
9
|
|
7
10
|
GEM
|
8
11
|
remote: https://rubygems.org/
|
9
12
|
specs:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
actioncable (7.0.8)
|
14
|
+
actionpack (= 7.0.8)
|
15
|
+
activesupport (= 7.0.8)
|
16
|
+
nio4r (~> 2.0)
|
17
|
+
websocket-driver (>= 0.6.1)
|
18
|
+
actionmailbox (7.0.8)
|
19
|
+
actionpack (= 7.0.8)
|
20
|
+
activejob (= 7.0.8)
|
21
|
+
activerecord (= 7.0.8)
|
22
|
+
activestorage (= 7.0.8)
|
23
|
+
activesupport (= 7.0.8)
|
24
|
+
mail (>= 2.7.1)
|
25
|
+
net-imap
|
26
|
+
net-pop
|
27
|
+
net-smtp
|
28
|
+
actionmailer (7.0.8)
|
29
|
+
actionpack (= 7.0.8)
|
30
|
+
actionview (= 7.0.8)
|
31
|
+
activejob (= 7.0.8)
|
32
|
+
activesupport (= 7.0.8)
|
33
|
+
mail (~> 2.5, >= 2.5.4)
|
34
|
+
net-imap
|
35
|
+
net-pop
|
36
|
+
net-smtp
|
37
|
+
rails-dom-testing (~> 2.0)
|
38
|
+
actionpack (7.0.8)
|
39
|
+
actionview (= 7.0.8)
|
40
|
+
activesupport (= 7.0.8)
|
41
|
+
rack (~> 2.0, >= 2.2.4)
|
42
|
+
rack-test (>= 0.6.3)
|
43
|
+
rails-dom-testing (~> 2.0)
|
44
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
45
|
+
actiontext (7.0.8)
|
46
|
+
actionpack (= 7.0.8)
|
47
|
+
activerecord (= 7.0.8)
|
48
|
+
activestorage (= 7.0.8)
|
49
|
+
activesupport (= 7.0.8)
|
50
|
+
globalid (>= 0.6.0)
|
51
|
+
nokogiri (>= 1.8.5)
|
52
|
+
actionview (7.0.8)
|
53
|
+
activesupport (= 7.0.8)
|
54
|
+
builder (~> 3.1)
|
55
|
+
erubi (~> 1.4)
|
56
|
+
rails-dom-testing (~> 2.0)
|
57
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
58
|
+
activejob (7.0.8)
|
59
|
+
activesupport (= 7.0.8)
|
60
|
+
globalid (>= 0.3.6)
|
61
|
+
activemodel (7.0.8)
|
62
|
+
activesupport (= 7.0.8)
|
63
|
+
activerecord (7.0.8)
|
64
|
+
activemodel (= 7.0.8)
|
65
|
+
activesupport (= 7.0.8)
|
66
|
+
activestorage (7.0.8)
|
67
|
+
actionpack (= 7.0.8)
|
68
|
+
activejob (= 7.0.8)
|
69
|
+
activerecord (= 7.0.8)
|
70
|
+
activesupport (= 7.0.8)
|
71
|
+
marcel (~> 1.0)
|
72
|
+
mini_mime (>= 1.1.0)
|
73
|
+
activesupport (7.0.8)
|
13
74
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
connection_pool (>= 2.2.5)
|
15
|
-
drb
|
16
75
|
i18n (>= 1.6, < 2)
|
17
76
|
minitest (>= 5.1)
|
18
|
-
mutex_m
|
19
77
|
tzinfo (~> 2.0)
|
20
|
-
|
21
|
-
bigdecimal (3.1.4)
|
78
|
+
builder (3.2.4)
|
22
79
|
byebug (11.1.3)
|
23
80
|
concurrent-ruby (1.2.2)
|
24
|
-
|
81
|
+
crass (1.0.6)
|
82
|
+
date (3.3.4)
|
25
83
|
diff-lcs (1.5.0)
|
26
84
|
docile (1.4.0)
|
27
|
-
|
28
|
-
|
85
|
+
erubi (1.12.0)
|
86
|
+
globalid (1.2.1)
|
87
|
+
activesupport (>= 6.1)
|
29
88
|
i18n (1.14.1)
|
30
89
|
concurrent-ruby (~> 1.0)
|
90
|
+
loofah (2.21.4)
|
91
|
+
crass (~> 1.0.2)
|
92
|
+
nokogiri (>= 1.12.0)
|
93
|
+
mail (2.8.1)
|
94
|
+
mini_mime (>= 0.1.1)
|
95
|
+
net-imap
|
96
|
+
net-pop
|
97
|
+
net-smtp
|
98
|
+
marcel (1.0.2)
|
99
|
+
method_source (1.0.0)
|
100
|
+
mini_mime (1.1.5)
|
31
101
|
minitest (5.20.0)
|
32
|
-
|
102
|
+
net-imap (0.4.4)
|
103
|
+
date
|
104
|
+
net-protocol
|
105
|
+
net-pop (0.1.2)
|
106
|
+
net-protocol
|
107
|
+
net-protocol (0.2.2)
|
108
|
+
timeout
|
109
|
+
net-smtp (0.4.0)
|
110
|
+
net-protocol
|
111
|
+
nio4r (2.5.9)
|
112
|
+
nokogiri (1.15.4-x86_64-linux)
|
113
|
+
racc (~> 1.4)
|
114
|
+
racc (1.7.3)
|
115
|
+
rack (2.2.8)
|
116
|
+
rack-test (2.1.0)
|
117
|
+
rack (>= 1.3)
|
118
|
+
rails (7.0.8)
|
119
|
+
actioncable (= 7.0.8)
|
120
|
+
actionmailbox (= 7.0.8)
|
121
|
+
actionmailer (= 7.0.8)
|
122
|
+
actionpack (= 7.0.8)
|
123
|
+
actiontext (= 7.0.8)
|
124
|
+
actionview (= 7.0.8)
|
125
|
+
activejob (= 7.0.8)
|
126
|
+
activemodel (= 7.0.8)
|
127
|
+
activerecord (= 7.0.8)
|
128
|
+
activestorage (= 7.0.8)
|
129
|
+
activesupport (= 7.0.8)
|
130
|
+
bundler (>= 1.15.0)
|
131
|
+
railties (= 7.0.8)
|
132
|
+
rails-dom-testing (2.2.0)
|
133
|
+
activesupport (>= 5.0.0)
|
134
|
+
minitest
|
135
|
+
nokogiri (>= 1.6)
|
136
|
+
rails-html-sanitizer (1.6.0)
|
137
|
+
loofah (~> 2.21)
|
138
|
+
nokogiri (~> 1.14)
|
139
|
+
railties (7.0.8)
|
140
|
+
actionpack (= 7.0.8)
|
141
|
+
activesupport (= 7.0.8)
|
142
|
+
method_source
|
143
|
+
rake (>= 12.2)
|
144
|
+
thor (~> 1.0)
|
145
|
+
zeitwerk (~> 2.5)
|
33
146
|
rake (13.1.0)
|
34
147
|
rspec (3.12.0)
|
35
148
|
rspec-core (~> 3.12.0)
|
@@ -44,26 +157,34 @@ GEM
|
|
44
157
|
diff-lcs (>= 1.2.0, < 2.0)
|
45
158
|
rspec-support (~> 3.12.0)
|
46
159
|
rspec-support (3.12.1)
|
47
|
-
ruby2_keywords (0.0.5)
|
48
160
|
simplecov (0.22.0)
|
49
161
|
docile (~> 1.1)
|
50
162
|
simplecov-html (~> 0.11)
|
51
163
|
simplecov_json_formatter (~> 0.1)
|
52
164
|
simplecov-html (0.12.3)
|
53
165
|
simplecov_json_formatter (0.1.4)
|
166
|
+
sqlite3 (1.6.8-x86_64-linux)
|
167
|
+
thor (1.3.0)
|
168
|
+
timeout (0.4.1)
|
54
169
|
tzinfo (2.0.6)
|
55
170
|
concurrent-ruby (~> 1.0)
|
56
171
|
unit_measurements (5.8.0)
|
57
172
|
activesupport (~> 7.0)
|
173
|
+
websocket-driver (0.7.6)
|
174
|
+
websocket-extensions (>= 0.1.0)
|
175
|
+
websocket-extensions (0.1.5)
|
176
|
+
zeitwerk (2.6.12)
|
58
177
|
|
59
178
|
PLATFORMS
|
60
179
|
x86_64-linux
|
61
180
|
|
62
181
|
DEPENDENCIES
|
63
182
|
byebug (~> 11)
|
183
|
+
rails
|
64
184
|
rake (~> 13.0)
|
65
185
|
rspec (~> 3.0)
|
66
186
|
simplecov (~> 0.21, >= 0.21.2)
|
187
|
+
sqlite3 (~> 1.6)
|
67
188
|
unit_measurements-rails!
|
68
189
|
|
69
190
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ It provides ActiveRecord adapter for persisting and retrieving measurements with
|
|
18
18
|
|
19
19
|
## Minimum Requirements
|
20
20
|
|
21
|
-
* Ruby 3.2
|
21
|
+
* Ruby 3.2+ (https://www.ruby-lang.org/en/downloads/branches/)
|
22
22
|
* Rails 7.0.0+ (https://rubygems.org/gems/rails/versions)
|
23
23
|
|
24
24
|
## Installation
|
data/Rakefile
CHANGED
@@ -4,3 +4,16 @@
|
|
4
4
|
|
5
5
|
require "unit_measurements/rails/version"
|
6
6
|
require "unit_measurements"
|
7
|
+
|
8
|
+
require "active_support/all"
|
9
|
+
require "active_record"
|
10
|
+
require "active_model"
|
11
|
+
require "active_model/validations"
|
12
|
+
|
13
|
+
module UnitMeasurements
|
14
|
+
module Rails
|
15
|
+
class BaseError < StandardError; end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
require "unit_measurements/rails/railtie" if defined?(Rails)
|
@@ -17,7 +17,6 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.summary = "Rails adaptor for unit_measurements"
|
18
18
|
spec.homepage = "https://github.com/shivam091/unit_measurements-rails"
|
19
19
|
spec.license = "MIT"
|
20
|
-
spec.required_ruby_version = ">= 3.2.2"
|
21
20
|
|
22
21
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
23
22
|
|
@@ -34,10 +33,17 @@ Gem::Specification.new do |spec|
|
|
34
33
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
35
34
|
spec.require_paths = ["lib"]
|
36
35
|
|
36
|
+
spec.add_runtime_dependency "railties", ">= 7"
|
37
|
+
spec.add_runtime_dependency "activemodel", ">= 7"
|
38
|
+
spec.add_runtime_dependency "activerecord", ">= 7"
|
39
|
+
|
37
40
|
spec.add_runtime_dependency "unit_measurements", "~> 5"
|
38
41
|
|
39
42
|
spec.add_development_dependency "rake", "~> 13.0"
|
40
43
|
spec.add_development_dependency "rspec", "~> 3.0"
|
41
44
|
spec.add_development_dependency "simplecov", "~> 0.21", ">= 0.21.2"
|
42
45
|
spec.add_development_dependency "byebug", "~> 11"
|
46
|
+
spec.add_development_dependency "sqlite3", "~> 1.6"
|
47
|
+
|
48
|
+
spec.required_ruby_version = ">= 3.2"
|
43
49
|
end
|
metadata
CHANGED
@@ -1,15 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unit_measurements-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harshal LADHE
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: railties
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activemodel
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '7'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activerecord
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '7'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '7'
|
13
55
|
- !ruby/object:Gem::Dependency
|
14
56
|
name: unit_measurements
|
15
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +128,20 @@ dependencies:
|
|
86
128
|
- - "~>"
|
87
129
|
- !ruby/object:Gem::Version
|
88
130
|
version: '11'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: sqlite3
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '1.6'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '1.6'
|
89
145
|
description: A Rails adaptor that encapsulate measurements and their units in Ruby
|
90
146
|
on Rails.
|
91
147
|
email:
|
@@ -105,8 +161,12 @@ files:
|
|
105
161
|
- LICENSE.md
|
106
162
|
- README.md
|
107
163
|
- Rakefile
|
108
|
-
-
|
164
|
+
- gemfiles/rails-7.0.gemfile
|
165
|
+
- gemfiles/rails-7.1.gemfile
|
166
|
+
- gemfiles/rails-edge.gemfile
|
167
|
+
- lib/unit_measurements-rails.rb
|
109
168
|
- lib/unit_measurements/rails/base.rb
|
169
|
+
- lib/unit_measurements/rails/railtie.rb
|
110
170
|
- lib/unit_measurements/rails/version.rb
|
111
171
|
- unit_measurements-rails.gemspec
|
112
172
|
homepage: https://github.com/shivam091/unit_measurements-rails
|
@@ -127,7 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
187
|
requirements:
|
128
188
|
- - ">="
|
129
189
|
- !ruby/object:Gem::Version
|
130
|
-
version: 3.2
|
190
|
+
version: '3.2'
|
131
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
192
|
requirements:
|
133
193
|
- - ">="
|