definition 0.8.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 655f6829758cc85e1efc33680f590a54006043b15c785f4ee35297bb8fcefc6b
4
- data.tar.gz: 4d0ee181accc4325fbf25da77bee5fe016faf4f2bbf8d68db92469edc054b88f
3
+ metadata.gz: 15e2253bb98a99bde3103531801d378523e9312e6e7154a611d0d08b985a4666
4
+ data.tar.gz: 465d7748ab7a2b842ff2b3cc80bffb826d46cd5d9f4e913ed15c95ef8c6955bd
5
5
  SHA512:
6
- metadata.gz: e9e5f6d19ca60ae2ffb0d00fb42045c1404bd24d90a001e4bc393732285571465b254efbc6532722825e4880093d30bf505859305fcab15d32898787d1a73799
7
- data.tar.gz: 8a544b9c0fc1623d621973c95e3b9a734e39648262b946046be3a33735762de51367ec1fc8f9aab05785a62e41daf55e4e2011e263cc147bdd16664d4a0f054c
6
+ metadata.gz: 38be013225e94cd3796a6562c0b8cb437f77d300a12f56ffe6ec8504d224ada53cfd29ed5e8443ad9ba37caa62e55ef46f45a12fccf77f1d38b1f6f66ae055e9
7
+ data.tar.gz: 3044a226fdc9f9ebec8d5ff5b2910d918f7e9e4ce322ba2e8d0d314320468dfa131d6a7a332efbf42868a5e83623cd48603406850c480ad55b0ac4577b983e5c
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: actions
3
+
4
+ on:
5
+ push:
6
+ branches: [ main, master ]
7
+ pull_request:
8
+ branches: [ main, master ]
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ test:
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby-version: ["2.7", "3.0", "3.1", "3.2", "jruby-9.3", "jruby-9.4"]
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ - uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby-version }}
25
+ bundler-cache: false
26
+ - run: bundle install
27
+ - run: bundle exec rspec
28
+ - run: bundle exec rubocop
data/Changelog.md CHANGED
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [1.0.0] - 2023-02-14
10
+ ### Removed
11
+ - Removed deprecated version of `GreaterThanEqual` definition that had a typo in it (GreaterThenEqual)
12
+ - Removed deprecated version of `GreaterThan` definition that had a typo in it (GreaterThen)
13
+ - Removed deprecated version of `LessThanEqual` definition that had a typo in it (LessThenEqual)
14
+ - Removed deprecated version of `LessThan` definition that had a typo in it (LessThen)
15
+
9
16
  ## [0.8.1] - 2022-10-05
10
17
  ### Fixed
11
18
  - Definition::Model#eql? returns true when comparing two models with the same content
data/Gemfile.lock CHANGED
@@ -1,18 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- definition (0.8.1)
4
+ definition (1.0.0)
5
5
  activesupport
6
6
  i18n
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.0.4)
11
+ activesupport (6.1.7.2)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 1.6, < 2)
14
14
  minitest (>= 5.1)
15
15
  tzinfo (~> 2.0)
16
+ zeitwerk (~> 2.3)
16
17
  approvals (0.0.26)
17
18
  json (~> 2.0)
18
19
  nokogiri (~> 1.8)
@@ -21,9 +22,10 @@ GEM
21
22
  awesome_print (1.9.2)
22
23
  benchmark-ips (2.10.0)
23
24
  coderay (1.1.3)
24
- concurrent-ruby (1.1.10)
25
+ concurrent-ruby (1.2.0)
25
26
  diff-lcs (1.5.0)
26
27
  ffi (1.15.5)
28
+ ffi (1.15.5-java)
27
29
  formatador (1.1.0)
28
30
  fuubar (2.5.1)
29
31
  rspec-core (~> 3.0)
@@ -44,54 +46,64 @@ GEM
44
46
  rspec (>= 2.99.0, < 4.0)
45
47
  i18n (1.12.0)
46
48
  concurrent-ruby (~> 1.0)
49
+ jar-dependencies (0.4.1)
47
50
  jaro_winkler (1.5.4)
48
- json (2.6.2)
49
- listen (3.7.1)
51
+ jaro_winkler (1.5.4-java)
52
+ json (2.6.3)
53
+ json (2.6.3-java)
54
+ listen (3.8.0)
50
55
  rb-fsevent (~> 0.10, >= 0.10.3)
51
56
  rb-inotify (~> 0.9, >= 0.9.10)
52
57
  lumberjack (1.2.8)
53
58
  method_source (1.0.0)
54
- mini_portile2 (2.8.0)
55
- minitest (5.16.3)
59
+ mini_portile2 (2.8.1)
60
+ minitest (5.17.0)
56
61
  nenv (0.3.0)
57
- nokogiri (1.13.8)
62
+ nokogiri (1.13.10)
58
63
  mini_portile2 (~> 2.8.0)
59
64
  racc (~> 1.4)
60
- nokogiri (1.13.8-x86_64-linux)
65
+ nokogiri (1.13.10-java)
61
66
  racc (~> 1.4)
62
67
  notiffany (0.1.3)
63
68
  nenv (~> 0.1)
64
69
  shellany (~> 0.0)
65
70
  parallel (1.22.1)
66
- parser (3.1.2.1)
71
+ parser (3.2.1.0)
67
72
  ast (~> 2.4.1)
68
- pry (0.14.1)
73
+ pry (0.14.2)
69
74
  coderay (~> 1.1)
70
75
  method_source (~> 1.0)
76
+ pry (0.14.2-java)
77
+ coderay (~> 1.1)
78
+ method_source (~> 1.0)
79
+ spoon (~> 0.0)
71
80
  psych (4.0.6)
72
81
  stringio
73
- racc (1.6.0)
82
+ psych (4.0.6-java)
83
+ jar-dependencies (>= 0.1.7)
84
+ racc (1.6.2)
85
+ racc (1.6.2-java)
74
86
  rainbow (3.1.1)
75
87
  rake (13.0.6)
76
88
  rb-fsevent (0.11.2)
77
89
  rb-inotify (0.10.1)
78
90
  ffi (~> 1.0)
79
- rspec (3.11.0)
80
- rspec-core (~> 3.11.0)
81
- rspec-expectations (~> 3.11.0)
82
- rspec-mocks (~> 3.11.0)
83
- rspec-core (3.11.0)
84
- rspec-support (~> 3.11.0)
85
- rspec-expectations (3.11.1)
91
+ rspec (3.12.0)
92
+ rspec-core (~> 3.12.0)
93
+ rspec-expectations (~> 3.12.0)
94
+ rspec-mocks (~> 3.12.0)
95
+ rspec-core (3.12.1)
96
+ rspec-support (~> 3.12.0)
97
+ rspec-expectations (3.12.2)
86
98
  diff-lcs (>= 1.2.0, < 2.0)
87
- rspec-support (~> 3.11.0)
99
+ rspec-support (~> 3.12.0)
88
100
  rspec-its (1.3.0)
89
101
  rspec-core (>= 3.0.0)
90
102
  rspec-expectations (>= 3.0.0)
91
- rspec-mocks (3.11.1)
103
+ rspec-mocks (3.12.3)
92
104
  diff-lcs (>= 1.2.0, < 2.0)
93
- rspec-support (~> 3.11.0)
94
- rspec-support (3.11.1)
105
+ rspec-support (~> 3.12.0)
106
+ rspec-support (3.12.0)
95
107
  rspec_junit_formatter (0.6.0)
96
108
  rspec-core (>= 2, < 4, != 2.12.0)
97
109
  rubocop (0.66.0)
@@ -104,19 +116,22 @@ GEM
104
116
  unicode-display_width (>= 1.4.0, < 1.6)
105
117
  rubocop-rspec (1.32.0)
106
118
  rubocop (>= 0.60.0)
107
- rubocop_runner (2.2.0)
119
+ rubocop_runner (2.2.1)
108
120
  ruby-progressbar (1.11.0)
109
121
  shellany (0.0.1)
110
- stringio (3.0.2)
122
+ spoon (0.0.6)
123
+ ffi
124
+ stringio (3.0.5)
111
125
  thor (1.2.1)
112
- timecop (0.9.5)
113
- tzinfo (2.0.5)
126
+ timecop (0.9.6)
127
+ tzinfo (2.0.6)
114
128
  concurrent-ruby (~> 1.0)
115
129
  unicode-display_width (1.5.0)
130
+ zeitwerk (2.6.7)
116
131
 
117
132
  PLATFORMS
118
133
  ruby
119
- x86_64-linux
134
+ universal-java-11
120
135
 
121
136
  DEPENDENCIES
122
137
  approvals (~> 0.0)
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # Definition
2
2
 
3
- [![Build Status](https://circleci.com/gh/Goltergaul/definition.svg?style=svg)][circleci]
4
3
  [![Gem Version](https://badge.fury.io/rb/definition.svg)][rubygems]
5
4
 
6
5
  Simple and composable validation and coercion of data structures. It also includes a ValueObject for convenience.
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "definition/v1_deprecator"
4
-
5
3
  module Definition
6
4
  module Dsl
7
5
  module Comparators
@@ -44,8 +42,6 @@ module Definition
44
42
  conform_with(value) if value.is_a?(Numeric) && value > min_value
45
43
  end
46
44
  end
47
- alias GreaterThen GreaterThan
48
- deprecate :GreaterThen, deprecator: V1Deprecator
49
45
 
50
46
  # Example:
51
47
  # GreaterThanEqual(5)
@@ -54,8 +50,6 @@ module Definition
54
50
  conform_with(value) if value.is_a?(Numeric) && value >= min_value
55
51
  end
56
52
  end
57
- alias GreaterThenEqual GreaterThanEqual
58
- deprecate :GreaterThenEqual, deprecator: V1Deprecator
59
53
 
60
54
  # Example:
61
55
  # LessThan(5)
@@ -64,8 +58,6 @@ module Definition
64
58
  conform_with(value) if value.is_a?(Numeric) && value < max_value
65
59
  end
66
60
  end
67
- alias LessThen LessThan
68
- deprecate :LessThen, deprecator: V1Deprecator
69
61
 
70
62
  # Example:
71
63
  # LessThanEqual(5)
@@ -74,8 +66,6 @@ module Definition
74
66
  conform_with(value) if value.is_a?(Numeric) && value <= max_value
75
67
  end
76
68
  end
77
- alias LessThenEqual LessThanEqual
78
- deprecate :LessThenEqual, deprecator: V1Deprecator
79
69
 
80
70
  # Example:
81
71
  # Equal("value")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Definition
4
- VERSION = "0.8.1"
4
+ VERSION = "1.0.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: definition
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Goltermann
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-06 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -248,14 +248,14 @@ dependencies:
248
248
  - - ">="
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0'
251
- description:
251
+ description:
252
252
  email:
253
253
  - dominik@goltermann.cc
254
254
  executables: []
255
255
  extensions: []
256
256
  extra_rdoc_files: []
257
257
  files:
258
- - ".circleci/config.yml"
258
+ - ".github/workflows/actions.yml"
259
259
  - ".gitignore"
260
260
  - ".rspec"
261
261
  - ".rubocop.yml"
@@ -298,14 +298,13 @@ files:
298
298
  - lib/definition/types/lambda.rb
299
299
  - lib/definition/types/or.rb
300
300
  - lib/definition/types/type.rb
301
- - lib/definition/v1_deprecator.rb
302
301
  - lib/definition/value_object.rb
303
302
  - lib/definition/version.rb
304
303
  homepage: https://github.com/Goltergaul/definition
305
304
  licenses:
306
305
  - MIT
307
306
  metadata: {}
308
- post_install_message:
307
+ post_install_message:
309
308
  rdoc_options: []
310
309
  require_paths:
311
310
  - lib
@@ -320,8 +319,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
320
319
  - !ruby/object:Gem::Version
321
320
  version: '0'
322
321
  requirements: []
323
- rubygems_version: 3.3.7
324
- signing_key:
322
+ rubygems_version: 3.3.23
323
+ signing_key:
325
324
  specification_version: 4
326
325
  summary: Simple and composable validation and coercion of data structures inspired
327
326
  by clojure specs
data/.circleci/config.yml DELETED
@@ -1,53 +0,0 @@
1
- # Use the latest 2.1 version of CircleCI pipeline process engine.
2
- # See: https://circleci.com/docs/2.0/configuration-reference
3
- version: 2.1
4
-
5
- # Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
6
- # See: https://circleci.com/docs/2.0/orb-intro/
7
- orbs:
8
- ruby: circleci/ruby@1.4.0
9
-
10
- # Define a job to be invoked later in a workflow.
11
- # See: https://circleci.com/docs/2.0/configuration-reference/#jobs
12
- jobs:
13
- test:
14
- parameters:
15
- ruby_version:
16
- type: string
17
- docker:
18
- - image: cimg/base:stable
19
- steps:
20
- - ruby/install:
21
- version: << parameters.ruby_version >>
22
- - checkout
23
- - run: rm Gemfile.lock
24
- - run: gem install bundler
25
- - run: bundle install
26
- - ruby/rspec-test
27
- linting:
28
- docker:
29
- - image: 'cimg/base:stable'
30
- steps:
31
- - checkout
32
- - ruby/install:
33
- version: "3.0"
34
- - ruby/install-deps
35
- - ruby/rubocop-check:
36
- format: progress
37
- label: Inspecting with Rubocop
38
-
39
- # Invoke jobs via workflows
40
- # See: https://circleci.com/docs/2.0/configuration-reference/#workflows
41
- workflows:
42
- test: # This is the name of the workflow, feel free to change it to better match your workflow.
43
- # Inside the workflow, you define the jobs you want to run.
44
- jobs:
45
- - test:
46
- matrix:
47
- parameters:
48
- ruby_version:
49
- - "2.6"
50
- - "2.7"
51
- - "3.0"
52
- - "jruby-9.3.3.0"
53
- - linting
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "active_support/deprecation"
4
-
5
- module Definition
6
- V1Deprecator = ActiveSupport::Deprecation.new("1.0", "Definition")
7
- end