validates_overlap 0.8.6 → 1.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 +5 -5
- data/CHANGELOG.md +30 -0
- data/CONTRIBUTORS.md +26 -0
- data/MIT-LICENSE +2 -1
- data/README.md +29 -18
- data/lib/validates_overlap/locale/ru.yml +4 -0
- data/lib/validates_overlap/overlap_validator.rb +3 -2
- data/lib/validates_overlap/version.rb +5 -0
- data/lib/validates_overlap.rb +2 -1
- metadata +56 -155
- data/.gitignore +0 -11
- data/.rspec +0 -2
- data/.rubocop.yml +0 -5
- data/.travis.yml +0 -10
- data/Gemfile +0 -3
- data/Gemfile.rails30 +0 -5
- data/Gemfile.rails32 +0 -5
- data/Gemfile.rails40 +0 -5
- data/Gemfile.rails41 +0 -5
- data/Gemfile.rails42 +0 -5
- data/Gemfile.rails50 +0 -5
- data/Rakefile +0 -39
- data/VERSION +0 -1
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/active_meeting.rb +0 -4
- data/spec/dummy/app/models/document_with_enum.rb +0 -26
- data/spec/dummy/app/models/end_overlap_meeting.rb +0 -3
- data/spec/dummy/app/models/meeting.rb +0 -3
- data/spec/dummy/app/models/position.rb +0 -9
- data/spec/dummy/app/models/secure_meeting.rb +0 -3
- data/spec/dummy/app/models/shift.rb +0 -3
- data/spec/dummy/app/models/start_end_overlap_meeting.rb +0 -3
- data/spec/dummy/app/models/start_overlap_meeting.rb +0 -3
- data/spec/dummy/app/models/time_slot.rb +0 -8
- data/spec/dummy/app/models/user.rb +0 -2
- data/spec/dummy/app/models/user_meeting.rb +0 -3
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config/application.rb +0 -45
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -22
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -25
- data/spec/dummy/config/environments/production.rb +0 -49
- data/spec/dummy/config/environments/test.rb +0 -35
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -10
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -58
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20110406082020_create_meetings.rb +0 -13
- data/spec/dummy/db/migrate/20110406082053_create_users.rb +0 -13
- data/spec/dummy/db/migrate/20110407060725_create_user_meetings.rb +0 -15
- data/spec/dummy/db/migrate/20120509130956_create_end_overlap_meetings.rb +0 -13
- data/spec/dummy/db/migrate/20120509131012_create_start_overlap_meetings.rb +0 -13
- data/spec/dummy/db/migrate/20120509131032_create_start_end_overlap_meetings.rb +0 -13
- data/spec/dummy/db/migrate/20121207162212_create_time_slot.rb +0 -20
- data/spec/dummy/db/migrate/20130826155107_create_active_meetings.rb +0 -14
- data/spec/dummy/db/migrate/20150707155107_create_secure_meetings.rb +0 -14
- data/spec/dummy/db/migrate/20151203153132_create_shifts.rb +0 -13
- data/spec/dummy/db/migrate/20170102162952_add_documents_with_enum.rb +0 -14
- data/spec/dummy/db/schema.rb +0 -101
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -26
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/javascripts/application.js +0 -2
- data/spec/dummy/public/javascripts/controls.js +0 -965
- data/spec/dummy/public/javascripts/dragdrop.js +0 -974
- data/spec/dummy/public/javascripts/effects.js +0 -1123
- data/spec/dummy/public/javascripts/prototype.js +0 -6001
- data/spec/dummy/public/javascripts/rails.js +0 -191
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy/spec/factories/active_meeting.rb +0 -7
- data/spec/dummy/spec/factories/document_with_enum.rb +0 -7
- data/spec/dummy/spec/factories/end_overlap_meeting.rb +0 -6
- data/spec/dummy/spec/factories/meeting.rb +0 -6
- data/spec/dummy/spec/factories/position.rb +0 -6
- data/spec/dummy/spec/factories/secure_meeting.rb +0 -6
- data/spec/dummy/spec/factories/shift.rb +0 -6
- data/spec/dummy/spec/factories/start_end_overlap_meeting.rb +0 -6
- data/spec/dummy/spec/factories/start_overlap_meeting.rb +0 -6
- data/spec/dummy/spec/factories/time_slot.rb +0 -6
- data/spec/dummy/spec/factories/user.rb +0 -5
- data/spec/dummy/spec/factories/user_meeting.rb +0 -13
- data/spec/dummy/spec/models/active_meetings_spec.rb +0 -11
- data/spec/dummy/spec/models/document_with_enum_spec.rb +0 -53
- data/spec/dummy/spec/models/end_overlap_meeting_spec.rb +0 -48
- data/spec/dummy/spec/models/meeting_spec.rb +0 -68
- data/spec/dummy/spec/models/position_spec.rb +0 -31
- data/spec/dummy/spec/models/secure_meeting_spec.rb +0 -14
- data/spec/dummy/spec/models/shift_spec.rb +0 -41
- data/spec/dummy/spec/models/start_end_overlap_meeting_spec.rb +0 -48
- data/spec/dummy/spec/models/start_overlap_meeting_spec.rb +0 -48
- data/spec/dummy/spec/models/time_slot_spec.rb +0 -38
- data/spec/dummy/spec/models/user_meeting_spec.rb +0 -34
- data/spec/dummy/spec/models/user_spec.rb +0 -9
- data/spec/dummy/spec/overlap_validator_spec.rb +0 -32
- data/spec/spec_helper.rb +0 -56
- data/validates_overlap.gemspec +0 -31
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: e43124f32b6ea56070aceb59e6149abff30b32a077150cee473e0142c75dbbcf
|
|
4
|
+
data.tar.gz: cd44ffa9dd62741e92cd0447df0da93680527535750b747cc298caeb284fbebb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee62420473abe259fd2259296637b30945de74fe4b3a09d11dbd61dd0042479867d47fca0916f2bbbad3f75335ea51d02ae0b6c283ee9a593e939cc883efa323
|
|
7
|
+
data.tar.gz: 16f7b1c95f79023a49e33ed568cfeb7a2ab6af1398129f43a1469d22e07a68b77b570c84676ad2ea72c94606ef8a5abac9d55dcfe436e5a808c36dd7d7f633e7
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# ValidatesOverlap 1.x Change Log
|
|
2
|
+
|
|
3
|
+
## 1.1.0 (2026-08-07)
|
|
4
|
+
|
|
5
|
+
RSpec tests: **81 → 85** (+4 tests)
|
|
6
|
+
|
|
7
|
+
First release under new maintainership — [Tilo Sloboda](https://github.com/tilo) took over maintenance from [Robin Bortlik](https://github.com/robinbortlik) in August 2026. Thank you, Robin, for creating this gem and maintaining it for many years! ❤️
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fixed [Issue #54](https://github.com/tilo/validates_overlap/issues/54): a scope naming an enum attribute as a symbol (e.g. `scope: [:kind]`) crashed with `NoMethodError`. Thanks to [Nujian Den Mark Meralpis](https://github.com/denmarkmeralpis) ([PR #55](https://github.com/tilo/validates_overlap/pull/55)); covered by a new regression test
|
|
12
|
+
|
|
13
|
+
### Improvements
|
|
14
|
+
|
|
15
|
+
- verified support for Rails 6.1, 7.0, 7.1, 7.2, 8.0, and 8.1 on Ruby 3.0–3.4 — an 18-cell GitHub Actions matrix now runs on every push (the first working CI since 2019)
|
|
16
|
+
- the gem now depends on `activerecord` instead of the full `rails` meta-gem, so it no longer pulls actionpack etc. into your bundle (version floor unchanged: `>= 6.0`)
|
|
17
|
+
- the gem package now ships only `lib/`, README, and license — previously the entire test app was packaged into the gem
|
|
18
|
+
- test suite modernized: migrated from the long-dead `factory_girl` to `factory_bot`, runs on current Ruby/Rails, SimpleCov added with 100% line coverage, new tests for nil scope values (`IS NULL` matching) and symbol enum scopes
|
|
19
|
+
- the gem version now lives in `ValidatesOverlap::VERSION` (`lib/validates_overlap/version.rb`); the `VERSION` file is gone
|
|
20
|
+
- README: badges, Ruby/Rails compatibility matrix, clearer description of what the gem does
|
|
21
|
+
|
|
22
|
+
## 1.0.0 (2019-11-17)
|
|
23
|
+
|
|
24
|
+
- Rails 6 support; support for Rails 3, 4, and 5 dropped — use version 0.8.6 for those. Thanks to [Robin Bortlik](https://github.com/robinbortlik)
|
|
25
|
+
- avoid implicit `scoped_model.all` delegation in the validation ([PR #52](https://github.com/tilo/validates_overlap/pull/52)). Thanks to [Ryuta Kamizono](https://github.com/kamipo)
|
|
26
|
+
- Russian validation error message ([PR #47](https://github.com/tilo/validates_overlap/pull/47)). Thanks to [Alexander Gornov](https://github.com/Zmokizmoghi)
|
|
27
|
+
|
|
28
|
+
## 0.8.6 (2017-11-20) and earlier
|
|
29
|
+
|
|
30
|
+
- releases from 2011 through 2017 by [Robin Bortlik](https://github.com/robinbortlik) and contributors were not tracked in a changelog; see the git history and [CONTRIBUTORS.md](CONTRIBUTORS.md)
|
data/CONTRIBUTORS.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# A Big Thank You to all 21 Contributors!!
|
|
2
|
+
|
|
3
|
+
`validates_overlap` was created in 2011 by [Robin Bortlik](https://github.com/robinbortlik), who designed it and maintained it, reviewing and merging every pull request below along the way. Thank you, Robin, for this gem and all the work you put into it! ❤️
|
|
4
|
+
|
|
5
|
+
A Big Thank you to everyone who filed issues, sent comments, and who contributed with pull requests:
|
|
6
|
+
|
|
7
|
+
* [Kyle Bolton](https://github.com/kb)
|
|
8
|
+
* [Jon Pascoe](https://github.com/pacso)
|
|
9
|
+
* [Mark Campbell](https://github.com/Nitrodist)
|
|
10
|
+
* [Thibaut Courouble](https://github.com/Thibaut)
|
|
11
|
+
* [Tawan Sierek](https://github.com/tawan)
|
|
12
|
+
* [Martin Lagrange](https://github.com/supertinou)
|
|
13
|
+
* [Geoff Harcourt](https://github.com/geoffharcourt)
|
|
14
|
+
* [Brenton 'B-Train' Fletcher](https://github.com/bloopletech)
|
|
15
|
+
* [Victor Hugo Bueno](https://github.com/victorbueno)
|
|
16
|
+
* [rmathew1992](https://github.com/rmathew1992)
|
|
17
|
+
* [Mikhail Dieterle](https://github.com/mikdiet)
|
|
18
|
+
* [Roberto Romero](https://github.com/sildur)
|
|
19
|
+
* [Patrick Smith](https://github.com/royalicing)
|
|
20
|
+
* [Rafał Trojanowski](https://github.com/rafaltrojanowski)
|
|
21
|
+
* [Szymon Rut](https://github.com/RutSzymon)
|
|
22
|
+
* [Alexander Gornov](https://github.com/Zmokizmoghi)
|
|
23
|
+
* [Ryuta Kamizono](https://github.com/kamipo)
|
|
24
|
+
* [Nujian Den Mark Meralpis](https://github.com/denmarkmeralpis)
|
|
25
|
+
* [ohenrik](https://github.com/ohenrik)
|
|
26
|
+
* [Jorge Santos](https://github.com/jsantos)
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
|
-
[](https://secure.travis-ci.org/robinbortlik/validates_overlap)
|
|
2
|
-
|
|
3
1
|
# ValidatesOverlap
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
#### This gem is compatible with Rails 3, 4, 5.
|
|
3
|
+
 [](https://github.com/tilo/validates_overlap/actions/workflows/ruby.yml) [](https://codecov.io/gh/tilo/validates_overlap) [](https://rubygems.org/gems/validates_overlap) [](https://rubygems.org/gems/validates_overlap) [](https://www.ruby-toolbox.com/projects/validates_overlap)
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
`validates_overlap` adds an overlap validation to ActiveRecord models.
|
|
10
6
|
Ideal solution for booking applications where you want to make sure, that one place can be booked only once in specific time period.
|
|
11
7
|
|
|
12
|
-
|
|
8
|
+
You name the two attributes that define a time range — for example starts_at and ends_at — and the validator checks with a single SQL query that no other record's range overlaps it. If one does, the record gets a normal validation error.
|
|
9
|
+
|
|
10
|
+
Typical uses: bookings, reservations, meetings, work shifts, rentals — anywhere a resource must not be double-booked for the same period.
|
|
11
|
+
|
|
12
|
+
The check runs entirely in the database, so no records are loaded to compare against. It supports scoping the comparison (per user, per room, …), open-ended ranges (a nil start or end counts as extending forever), ranges that may touch at the edges, required gaps between ranges, validating through associations, and loading the conflicting records when you want to show them to the user.
|
|
13
|
+
|
|
14
|
+
## Compatibility
|
|
15
|
+
|
|
16
|
+
Every combination below is verified on every push by the [CI matrix](https://github.com/tilo/validates_overlap/actions):
|
|
17
|
+
|
|
18
|
+
| Rails | Tested with Ruby |
|
|
19
|
+
|-------|--------------------|
|
|
20
|
+
| 8.1 | 3.2, 3.3, 3.4 |
|
|
21
|
+
| 8.0 | 3.2, 3.3, 3.4 |
|
|
22
|
+
| 7.2 | 3.1, 3.2, 3.3, 3.4 |
|
|
23
|
+
| 7.1 | 3.0, 3.1, 3.2, 3.3 |
|
|
24
|
+
| 7.0 | 3.0, 3.1, 3.2 |
|
|
25
|
+
| 6.1 | 3.0 |
|
|
26
|
+
|
|
27
|
+
The gemspec requires `activerecord >= 6.0`. Rails 6.0 is not part of the test matrix, but no incompatibilities are known. The previous version 0.8.6 was compatible with Rails 3, 4, and 5.
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
13
30
|
|
|
14
31
|
Add to your gemfile
|
|
15
32
|
|
|
@@ -62,7 +79,7 @@ class Position < ActiveRecord::Base
|
|
|
62
79
|
belongs_to :user
|
|
63
80
|
validates "time_slots.starts_at", "time_slots.ends_at",
|
|
64
81
|
:overlap => {
|
|
65
|
-
:query_options => {:
|
|
82
|
+
:query_options => {:joins => :time_slot},
|
|
66
83
|
:scope => { "positions.user_id" => proc{|position| position.user_id} }
|
|
67
84
|
}
|
|
68
85
|
end
|
|
@@ -91,17 +108,11 @@ end
|
|
|
91
108
|
|
|
92
109
|
```
|
|
93
110
|
|
|
94
|
-
##
|
|
111
|
+
## Maintainership
|
|
95
112
|
|
|
96
|
-
|
|
113
|
+
`validates_overlap` was created by [Robin Bortlik](https://github.com/robinbortlik), who built and maintained it starting 2011.
|
|
114
|
+
Since August 2026 the gem is maintained by [Tilo Sloboda](https://github.com/tilo).
|
|
97
115
|
|
|
98
|
-
|
|
99
|
-
{:overlap => {:query_options => {:active => true}}}
|
|
100
|
-
```
|
|
116
|
+
A big thank you to Robin for creating this awesome gem and for the years of work he put into it. ❤️
|
|
101
117
|
|
|
102
|
-
but this code is not longer working. Currently please change your code to
|
|
103
118
|
|
|
104
|
-
```ruby
|
|
105
|
-
{:overlap => {:query_options => {:active => nil}}}
|
|
106
|
-
```
|
|
107
|
-
Thanks @supertinou for discovering and fix of this bug.
|
|
@@ -40,7 +40,8 @@ class OverlapValidator < ActiveModel::EachValidator
|
|
|
40
40
|
protected
|
|
41
41
|
|
|
42
42
|
def initialize_query(record, options = {})
|
|
43
|
-
|
|
43
|
+
scoped_model = options[:scoped_model].present? ? options[:scoped_model].constantize : record.class
|
|
44
|
+
self.scoped_model = scoped_model.default_scoped
|
|
44
45
|
generate_overlap_sql_values(record)
|
|
45
46
|
generate_overlap_sql_conditions(record)
|
|
46
47
|
add_attributes(record, options[:scope]) if options && options[:scope].present?
|
|
@@ -181,7 +182,7 @@ class OverlapValidator < ActiveModel::EachValidator
|
|
|
181
182
|
value = record.read_attribute(attr_name)
|
|
182
183
|
|
|
183
184
|
if is_enum_attribute?(record, attr_name)
|
|
184
|
-
value = record.class.defined_enums[attr_name][value]
|
|
185
|
+
value = record.class.defined_enums[attr_name.to_s][value]
|
|
185
186
|
end
|
|
186
187
|
|
|
187
188
|
value
|
data/lib/validates_overlap.rb
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
require_relative 'validates_overlap/version'
|
|
2
|
+
require_relative 'validates_overlap/overlap_validator'
|
metadata
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: validates_overlap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robin Bortlik
|
|
8
|
-
|
|
8
|
+
- Tilo Sloboda
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: activerecord
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 6.0.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 6.0.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
@@ -39,49 +39,49 @@ dependencies:
|
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: database_cleaner
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- - "
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
47
|
+
version: '0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- - "
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
54
|
+
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: factory_bot_rails
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- - "
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
61
|
+
version: '0'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - "
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
68
|
+
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: pry
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '0'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- - "
|
|
80
|
+
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
82
|
+
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: rails
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
@@ -109,7 +109,7 @@ dependencies:
|
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
112
|
+
name: rspec-rails
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
@@ -137,7 +137,21 @@ dependencies:
|
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
140
|
+
name: simplecov
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '0'
|
|
146
|
+
type: :development
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ">="
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0'
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: sqlite3
|
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
|
142
156
|
requirements:
|
|
143
157
|
- - ">="
|
|
@@ -150,121 +164,35 @@ dependencies:
|
|
|
150
164
|
- - ">="
|
|
151
165
|
- !ruby/object:Gem::Version
|
|
152
166
|
version: '0'
|
|
153
|
-
description: It can be useful when you
|
|
154
|
-
|
|
155
|
-
email:
|
|
167
|
+
description: It can be useful when you are developing some app where you will work
|
|
168
|
+
with meetings, events etc.
|
|
169
|
+
email:
|
|
170
|
+
- robinbortlik@gmail.com
|
|
171
|
+
- tilo.sloboda@gmail.com
|
|
156
172
|
executables: []
|
|
157
173
|
extensions: []
|
|
158
174
|
extra_rdoc_files:
|
|
159
175
|
- README.md
|
|
160
176
|
files:
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
- ".rubocop.yml"
|
|
164
|
-
- ".travis.yml"
|
|
165
|
-
- Gemfile
|
|
166
|
-
- Gemfile.rails30
|
|
167
|
-
- Gemfile.rails32
|
|
168
|
-
- Gemfile.rails40
|
|
169
|
-
- Gemfile.rails41
|
|
170
|
-
- Gemfile.rails42
|
|
171
|
-
- Gemfile.rails50
|
|
177
|
+
- CHANGELOG.md
|
|
178
|
+
- CONTRIBUTORS.md
|
|
172
179
|
- MIT-LICENSE
|
|
173
180
|
- README.md
|
|
174
|
-
- Rakefile
|
|
175
|
-
- VERSION
|
|
176
181
|
- lib/validates_overlap.rb
|
|
177
182
|
- lib/validates_overlap/locale/en.yml
|
|
178
183
|
- lib/validates_overlap/locale/es.yml
|
|
179
184
|
- lib/validates_overlap/locale/pt-BR.yml
|
|
185
|
+
- lib/validates_overlap/locale/ru.yml
|
|
180
186
|
- lib/validates_overlap/overlap_validator.rb
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
- spec/dummy/app/helpers/application_helper.rb
|
|
184
|
-
- spec/dummy/app/models/active_meeting.rb
|
|
185
|
-
- spec/dummy/app/models/document_with_enum.rb
|
|
186
|
-
- spec/dummy/app/models/end_overlap_meeting.rb
|
|
187
|
-
- spec/dummy/app/models/meeting.rb
|
|
188
|
-
- spec/dummy/app/models/position.rb
|
|
189
|
-
- spec/dummy/app/models/secure_meeting.rb
|
|
190
|
-
- spec/dummy/app/models/shift.rb
|
|
191
|
-
- spec/dummy/app/models/start_end_overlap_meeting.rb
|
|
192
|
-
- spec/dummy/app/models/start_overlap_meeting.rb
|
|
193
|
-
- spec/dummy/app/models/time_slot.rb
|
|
194
|
-
- spec/dummy/app/models/user.rb
|
|
195
|
-
- spec/dummy/app/models/user_meeting.rb
|
|
196
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
|
197
|
-
- spec/dummy/config.ru
|
|
198
|
-
- spec/dummy/config/application.rb
|
|
199
|
-
- spec/dummy/config/boot.rb
|
|
200
|
-
- spec/dummy/config/database.yml
|
|
201
|
-
- spec/dummy/config/environment.rb
|
|
202
|
-
- spec/dummy/config/environments/development.rb
|
|
203
|
-
- spec/dummy/config/environments/production.rb
|
|
204
|
-
- spec/dummy/config/environments/test.rb
|
|
205
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
206
|
-
- spec/dummy/config/initializers/inflections.rb
|
|
207
|
-
- spec/dummy/config/initializers/mime_types.rb
|
|
208
|
-
- spec/dummy/config/initializers/secret_token.rb
|
|
209
|
-
- spec/dummy/config/initializers/session_store.rb
|
|
210
|
-
- spec/dummy/config/locales/en.yml
|
|
211
|
-
- spec/dummy/config/routes.rb
|
|
212
|
-
- spec/dummy/db/migrate/20110406082020_create_meetings.rb
|
|
213
|
-
- spec/dummy/db/migrate/20110406082053_create_users.rb
|
|
214
|
-
- spec/dummy/db/migrate/20110407060725_create_user_meetings.rb
|
|
215
|
-
- spec/dummy/db/migrate/20120509130956_create_end_overlap_meetings.rb
|
|
216
|
-
- spec/dummy/db/migrate/20120509131012_create_start_overlap_meetings.rb
|
|
217
|
-
- spec/dummy/db/migrate/20120509131032_create_start_end_overlap_meetings.rb
|
|
218
|
-
- spec/dummy/db/migrate/20121207162212_create_time_slot.rb
|
|
219
|
-
- spec/dummy/db/migrate/20130826155107_create_active_meetings.rb
|
|
220
|
-
- spec/dummy/db/migrate/20150707155107_create_secure_meetings.rb
|
|
221
|
-
- spec/dummy/db/migrate/20151203153132_create_shifts.rb
|
|
222
|
-
- spec/dummy/db/migrate/20170102162952_add_documents_with_enum.rb
|
|
223
|
-
- spec/dummy/db/schema.rb
|
|
224
|
-
- spec/dummy/public/404.html
|
|
225
|
-
- spec/dummy/public/422.html
|
|
226
|
-
- spec/dummy/public/500.html
|
|
227
|
-
- spec/dummy/public/favicon.ico
|
|
228
|
-
- spec/dummy/public/javascripts/application.js
|
|
229
|
-
- spec/dummy/public/javascripts/controls.js
|
|
230
|
-
- spec/dummy/public/javascripts/dragdrop.js
|
|
231
|
-
- spec/dummy/public/javascripts/effects.js
|
|
232
|
-
- spec/dummy/public/javascripts/prototype.js
|
|
233
|
-
- spec/dummy/public/javascripts/rails.js
|
|
234
|
-
- spec/dummy/public/stylesheets/.gitkeep
|
|
235
|
-
- spec/dummy/script/rails
|
|
236
|
-
- spec/dummy/spec/factories/active_meeting.rb
|
|
237
|
-
- spec/dummy/spec/factories/document_with_enum.rb
|
|
238
|
-
- spec/dummy/spec/factories/end_overlap_meeting.rb
|
|
239
|
-
- spec/dummy/spec/factories/meeting.rb
|
|
240
|
-
- spec/dummy/spec/factories/position.rb
|
|
241
|
-
- spec/dummy/spec/factories/secure_meeting.rb
|
|
242
|
-
- spec/dummy/spec/factories/shift.rb
|
|
243
|
-
- spec/dummy/spec/factories/start_end_overlap_meeting.rb
|
|
244
|
-
- spec/dummy/spec/factories/start_overlap_meeting.rb
|
|
245
|
-
- spec/dummy/spec/factories/time_slot.rb
|
|
246
|
-
- spec/dummy/spec/factories/user.rb
|
|
247
|
-
- spec/dummy/spec/factories/user_meeting.rb
|
|
248
|
-
- spec/dummy/spec/models/active_meetings_spec.rb
|
|
249
|
-
- spec/dummy/spec/models/document_with_enum_spec.rb
|
|
250
|
-
- spec/dummy/spec/models/end_overlap_meeting_spec.rb
|
|
251
|
-
- spec/dummy/spec/models/meeting_spec.rb
|
|
252
|
-
- spec/dummy/spec/models/position_spec.rb
|
|
253
|
-
- spec/dummy/spec/models/secure_meeting_spec.rb
|
|
254
|
-
- spec/dummy/spec/models/shift_spec.rb
|
|
255
|
-
- spec/dummy/spec/models/start_end_overlap_meeting_spec.rb
|
|
256
|
-
- spec/dummy/spec/models/start_overlap_meeting_spec.rb
|
|
257
|
-
- spec/dummy/spec/models/time_slot_spec.rb
|
|
258
|
-
- spec/dummy/spec/models/user_meeting_spec.rb
|
|
259
|
-
- spec/dummy/spec/models/user_spec.rb
|
|
260
|
-
- spec/dummy/spec/overlap_validator_spec.rb
|
|
261
|
-
- spec/spec_helper.rb
|
|
262
|
-
- validates_overlap.gemspec
|
|
263
|
-
homepage: http://github.com/robinbortlik/validates_overlap
|
|
187
|
+
- lib/validates_overlap/version.rb
|
|
188
|
+
homepage: https://github.com/tilo/validates_overlap
|
|
264
189
|
licenses:
|
|
265
190
|
- MIT
|
|
266
|
-
metadata:
|
|
267
|
-
|
|
191
|
+
metadata:
|
|
192
|
+
source_code_uri: https://github.com/tilo/validates_overlap/tree/v1.1.0
|
|
193
|
+
bug_tracker_uri: https://github.com/tilo/validates_overlap/issues
|
|
194
|
+
changelog_uri: https://github.com/tilo/validates_overlap/blob/main/CHANGELOG.md
|
|
195
|
+
rubygems_mfa_required: 'true'
|
|
268
196
|
rdoc_options: []
|
|
269
197
|
require_paths:
|
|
270
198
|
- lib
|
|
@@ -279,34 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
279
207
|
- !ruby/object:Gem::Version
|
|
280
208
|
version: '0'
|
|
281
209
|
requirements: []
|
|
282
|
-
|
|
283
|
-
rubygems_version: 2.6.8
|
|
284
|
-
signing_key:
|
|
210
|
+
rubygems_version: 4.0.17
|
|
285
211
|
specification_version: 4
|
|
286
212
|
summary: This gem helps validate records with time overlap.
|
|
287
|
-
test_files:
|
|
288
|
-
- spec/dummy/spec/factories/active_meeting.rb
|
|
289
|
-
- spec/dummy/spec/factories/document_with_enum.rb
|
|
290
|
-
- spec/dummy/spec/factories/end_overlap_meeting.rb
|
|
291
|
-
- spec/dummy/spec/factories/meeting.rb
|
|
292
|
-
- spec/dummy/spec/factories/position.rb
|
|
293
|
-
- spec/dummy/spec/factories/secure_meeting.rb
|
|
294
|
-
- spec/dummy/spec/factories/shift.rb
|
|
295
|
-
- spec/dummy/spec/factories/start_end_overlap_meeting.rb
|
|
296
|
-
- spec/dummy/spec/factories/start_overlap_meeting.rb
|
|
297
|
-
- spec/dummy/spec/factories/time_slot.rb
|
|
298
|
-
- spec/dummy/spec/factories/user.rb
|
|
299
|
-
- spec/dummy/spec/factories/user_meeting.rb
|
|
300
|
-
- spec/dummy/spec/models/active_meetings_spec.rb
|
|
301
|
-
- spec/dummy/spec/models/document_with_enum_spec.rb
|
|
302
|
-
- spec/dummy/spec/models/end_overlap_meeting_spec.rb
|
|
303
|
-
- spec/dummy/spec/models/meeting_spec.rb
|
|
304
|
-
- spec/dummy/spec/models/position_spec.rb
|
|
305
|
-
- spec/dummy/spec/models/secure_meeting_spec.rb
|
|
306
|
-
- spec/dummy/spec/models/shift_spec.rb
|
|
307
|
-
- spec/dummy/spec/models/start_end_overlap_meeting_spec.rb
|
|
308
|
-
- spec/dummy/spec/models/start_overlap_meeting_spec.rb
|
|
309
|
-
- spec/dummy/spec/models/time_slot_spec.rb
|
|
310
|
-
- spec/dummy/spec/models/user_meeting_spec.rb
|
|
311
|
-
- spec/dummy/spec/models/user_spec.rb
|
|
312
|
-
- spec/dummy/spec/overlap_validator_spec.rb
|
|
213
|
+
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Gemfile.rails30
DELETED
data/Gemfile.rails32
DELETED
data/Gemfile.rails40
DELETED
data/Gemfile.rails41
DELETED
data/Gemfile.rails42
DELETED
data/Gemfile.rails50
DELETED
data/Rakefile
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
|
-
require 'bundler'
|
|
3
|
-
require 'rake'
|
|
4
|
-
require 'rspec/core'
|
|
5
|
-
require 'rspec/core/rake_task'
|
|
6
|
-
require 'rdoc/task'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# Temporary fix of rake issue
|
|
10
|
-
# http://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11/35893941
|
|
11
|
-
module TempFixForRakeLastComment
|
|
12
|
-
def last_comment
|
|
13
|
-
last_description
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
Rake::Application.send :include, TempFixForRakeLastComment
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
begin
|
|
20
|
-
Bundler::GemHelper.install_tasks
|
|
21
|
-
Bundler.setup(:default, :development)
|
|
22
|
-
rescue Bundler::BundlerError => e
|
|
23
|
-
$stderr.puts e.message
|
|
24
|
-
$stderr.puts 'Run `bundle install` to install missing gems'
|
|
25
|
-
exit e.status_code
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
RSpec::Core::RakeTask.new(:spec)
|
|
30
|
-
|
|
31
|
-
task default: :spec
|
|
32
|
-
|
|
33
|
-
Rake::RDocTask.new do |rdoc|
|
|
34
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ''
|
|
35
|
-
rdoc.rdoc_dir = 'rdoc'
|
|
36
|
-
rdoc.title = "validates_overlap #{version}"
|
|
37
|
-
rdoc.rdoc_files.include('README*')
|
|
38
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
39
|
-
end
|
data/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.8.6
|
data/spec/dummy/Rakefile
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
2
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
3
|
-
|
|
4
|
-
require File.expand_path('../config/application', __FILE__)
|
|
5
|
-
require 'rake'
|
|
6
|
-
|
|
7
|
-
Dummy::Application.load_tasks
|