validates_timeliness-mongoid 0.1.0 → 5.0.0.pre.814042540

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
- SHA1:
3
- metadata.gz: 568af6e90da0a69d4f7258fcc2b29fa368716ff0
4
- data.tar.gz: 25eb5c98b03d0a17275a986b884ddf015eebea78
2
+ SHA256:
3
+ metadata.gz: 3a6e9e9cbe09fa4e3afc672368828181b71da2767263f334fb658c3b0de3330b
4
+ data.tar.gz: ed2abdd37c6983a50bbc53aa957383530fc688c29ae85cbc35dafde091984f2e
5
5
  SHA512:
6
- metadata.gz: 01b4ba294051ebe03ffe44e15d9c78b4e93ddda89caaab03f37780422c2ba72e8dfddd037e7bc18cee3b4de89bf8280c336f267e92052b4165590b3fdc9dcfa2
7
- data.tar.gz: ca2ac86a20ab7ce8a803b0c3cd2109e63d208126c630ee0da230275ac1440bf604e8404c3fae6a02b10e8ee3174a1c9b21e8fa66d2c9c972a4e8f175f5159258
6
+ metadata.gz: e602bf843b9c31b9b31f12c5032c7facc15d969465f1a93d4fc63a7756155966c46291968b8979053d03addbc588c53faab0d50c66606b22d932780e9793200f
7
+ data.tar.gz: bf51302da25c11cb4ebf5eb44b306c8c94add0ee4ad1ed99113441463ad8a2e4b2ba02c91261f8f601181c8be6fc8fcd9a1796ea7f833861b7651abbfcb63abd
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
5
+ # Specify your gem's dependencies in validates_timeliness-mongoid.gemspec
3
6
  gemspec
4
-
5
- gem 'mongoid', '>= 3.0'
6
- gem 'bson_ext'
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Dazzl
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,11 +1,14 @@
1
1
  # ValidatesTimeliness::Mongoid
2
+ [![RSpec](https://github.com/dazzl-tv/validates_timeliness-mongoid/actions/workflows/rspec.yml/badge.svg?branch=develop&event=pull_request)](https://github.com/dazzl-tv/validates_timeliness-mongoid/actions/workflows/rspec.yml)
3
+ [![Linter](https://github.com/dazzl-tv/validates_timeliness-mongoid/actions/workflows/linter.yml/badge.svg)](https://github.com/dazzl-tv/validates_timeliness-mongoid/actions/workflows/linter.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/validates_timeliness-mongoid.svg)](https://badge.fury.io/rb/validates_timeliness-mongoid)
5
+ [![Docs](https://inch-ci.org/github/dazzl-tv/validates_timeliness-mongoid.svg)](https://inch-ci.org/github/dazzl-tv/validates_timeliness-mongoid)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/373d915e95eb09adbf87/maintainability)](https://codeclimate.com/github/dazzl-tv/validates_timeliness-mongoid/maintainability)
7
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/373d915e95eb09adbf87/test_coverage)](https://codeclimate.com/github/dazzl-tv/validates_timeliness-mongoid/test_coverage)
8
+ [![Known Vulnerabilities](https://snyk.io/test/github/dazzl-tv/validates_timeliness-mongoid/badge.svg)](https://snyk.io/test/github/dazzl-tv/validates_timeliness-mongoid)
2
9
 
3
10
  This the extracted mongoid adapter code from the validates_timeliness gem.
4
11
 
5
- WARNING: The specs are not wired up properly and may not run. I will not be supporting this gem.
6
-
7
- REQUEST: Someone who wants mongoid support is welcome to take over ownership of this gem.
8
-
9
12
  ## Installation
10
13
 
11
14
  Add this line to your application's Gemfile:
@@ -16,11 +19,15 @@ gem 'validates_timeliness-mongoid'
16
19
 
17
20
  And then execute:
18
21
 
19
- $ bundle
22
+ ```
23
+ $ bundle
24
+ ```
20
25
 
21
26
  Or install it yourself as:
22
27
 
23
- $ gem install validates_timeliness-mongoid
28
+ ```
29
+ $ gem install validates_timeliness-mongoid
30
+ ```
24
31
 
25
32
  ## Development
26
33
 
data/Rakefile CHANGED
@@ -1 +1,8 @@
1
- require "bundler/gem_tasks"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -1,4 +1,8 @@
1
- require "validates_timeliness"
2
- require "validates_timeliness/mongoid/version"
1
+ # frozen_string_literal: true
3
2
 
4
- ValidatesTimeliness.extend_orms << :mongoid
3
+ require 'validates_timeliness'
4
+ require 'validates_timeliness/mongoid/info'
5
+
6
+ ValidatesTimeliness.setup do |config|
7
+ config.extend_orms << :mongoid
8
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ValidatesTimeliness
4
+ module Mongoid
5
+ VERSION = '5.0.0'
6
+
7
+ # Name to gem
8
+ GEM_NAME = 'validates_timeliness-mongoid'
9
+
10
+ # Authors
11
+ AUTHORS = ['VAILLANT Jeremy'].freeze
12
+
13
+ # Emails
14
+ EMAILS = ['jeremy@dazzl.tv'].freeze
15
+
16
+ # Licence
17
+ LICENSE = 'MIT'
18
+
19
+ # Define a summary description to gem
20
+ SUMMARY = 'ValidatesTimeliness mongoid extension'
21
+
22
+ # Define a long description to gem
23
+ DESCRIPTION = <<-DESC
24
+ ValidatesTimeliness mongoid ORM compatability.
25
+ DESC
26
+
27
+ # Define homepage
28
+ HOMEPAGE = 'https://github.com/dazzl-tv/validates_timeliness-mongoid'
29
+ end
30
+ end
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'validates_timeliness'
4
+
1
5
  module ValidatesTimeliness
2
6
  module ORM
3
7
  module Mongoid
@@ -7,15 +11,15 @@ module ValidatesTimeliness
7
11
  # field value in Mongoid. Parser will return nil rather than error.
8
12
 
9
13
  module ClassMethods
10
- public
11
-
12
14
  # Mongoid has no bulk attribute method definition hook. It defines
13
15
  # them with each field definition. So we likewise define them after
14
16
  # each validation is defined.
15
17
  #
16
18
  def timeliness_validation_for(attr_names, type)
17
19
  super
18
- attr_names.each { |attr_name| define_timeliness_write_method(attr_name) }
20
+ attr_names.each do |attr_name|
21
+ define_timeliness_write_method(attr_name)
22
+ end
19
23
  end
20
24
 
21
25
  def timeliness_attribute_type(attr_name)
@@ -33,17 +37,51 @@ module ValidatesTimeliness
33
37
 
34
38
  "#{var_name} = Timeliness::Parser.parse(value, :#{type})"
35
39
  end
40
+
41
+ def define_timeliness_write_method(attr_name)
42
+ generated_timeliness_methods.module_eval <<-STR, __FILE__, __LINE__ + 1
43
+ def #{attr_name}=(value) # def publish_date=(value)
44
+ @timeliness_cache ||= {} # @timeliness_cache ||= {}
45
+ @timeliness_cache['#{attr_name}'] = value # @timeliness_cache['publish_date'] = value
46
+ @attributes['#{attr_name}'] = super # @attributes['publish_date']
47
+ end # end
48
+ STR
49
+ end
50
+
51
+ def generated_timeliness_methods
52
+ @generated_timeliness_methods ||= Module.new do |_m|
53
+ extend Mutex_m
54
+ end
55
+ @generated_timeliness_methods.tap { |mod| include mod }
56
+ end
57
+ end
58
+
59
+ # This is needed in order to mark the attribute as changed;
60
+ # otherwise, mongoid won't save it to the database.
61
+ def write_timeliness_attribute(attr_name, value)
62
+ attribute_will_change!(database_field_name(attr_name))
63
+ super
36
64
  end
37
65
 
38
66
  def reload(*args)
39
67
  _clear_timeliness_cache
40
68
  super
41
69
  end
70
+
71
+ def read_timeliness_attribute_before_type_cast(attr_name)
72
+ @timeliness_cache && @timeliness_cache[attr_name] || @attributes[attr_name]
73
+ end
74
+
75
+ def _clear_timeliness_cache
76
+ @timeliness_cache = {}
77
+ end
42
78
  end
43
79
  end
44
80
  end
45
81
 
46
- module Mongoid::Document
47
- include ValidatesTimeliness::AttributeMethods
48
- include ValidatesTimeliness::ORM::Mongoid
82
+ module Mongoid
83
+ module Document
84
+ include ValidatesTimeliness::AttributeMethods
85
+ include ValidatesTimeliness::ORM::Mongoid
86
+ end
49
87
  end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'faker'
4
+ require 'mongoid'
5
+ require 'validates_timeliness/mongoid'
6
+ require 'simplecov'
7
+ require 'simplecov_json_formatter'
8
+
9
+ SimpleCov.start
10
+ SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
11
+
12
+ Dir['spec/support/faker/*.rb'].each do |class_example|
13
+ require File.expand_path(class_example)
14
+ end
15
+
16
+ Mongoid.configure do |config|
17
+ config.connect_to('validates_timeliness_test')
18
+ end
19
+
20
+ RSpec.configure do |config|
21
+ config.fail_fast = true
22
+ config.filter_run_excluding broken: true
23
+
24
+ config.expect_with :rspec do |expectations|
25
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
26
+ end
27
+
28
+ config.mock_with :rspec do |mocks|
29
+ mocks.verify_partial_doubles = true
30
+ end
31
+
32
+ config.shared_context_metadata_behavior = :apply_to_host_groups
33
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Article < Base
5
+ include Mongoid::Document
6
+
7
+ field :publish_date, type: ::Date
8
+ field :publish_time, type: ::Time
9
+ field :publish_datetime, type: ::DateTime
10
+
11
+ validates_date :publish_date, allow_nil: true
12
+ validates_time :publish_time, allow_nil: true
13
+ validates_datetime :publish_datetime, allow_nil: true
14
+ end
15
+ end
@@ -0,0 +1,201 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe ValidatesTimeliness, Mongoid do
6
+ after { Mongoid.purge! }
7
+
8
+ let(:article) { Faker::Article }
9
+
10
+ context 'with validation methods' do
11
+ let(:record) { article.new }
12
+
13
+ it 'is defined on the class' do
14
+ expect(article).to respond_to(:validates_date)
15
+ expect(article).to respond_to(:validates_time)
16
+ expect(article).to respond_to(:validates_datetime)
17
+ end
18
+
19
+ it 'is defined on the instance' do
20
+ expect(record).to respond_to(:validates_date)
21
+ expect(record).to respond_to(:validates_time)
22
+ expect(record).to respond_to(:validates_datetime)
23
+ end
24
+
25
+ it 'validates a valid value string' do
26
+ record.publish_date = Date.parse '2012-01-01'
27
+
28
+ record.valid?
29
+ expect(record.errors[:publish_date]).to be_empty
30
+ end
31
+
32
+ it 'validates a nil value' do
33
+ record.publish_date = nil
34
+
35
+ record.valid?
36
+ expect(record.errors[:publish_date]).to be_empty
37
+ end
38
+ end
39
+
40
+ it 'determines type for attribute' do
41
+ expect(article.timeliness_attribute_type(:publish_date)).to eq :date
42
+ expect(article.timeliness_attribute_type(:publish_time)).to eq :time
43
+ expect(article.timeliness_attribute_type(:publish_datetime)).to eq :datetime
44
+ end
45
+
46
+ context 'with attribute write method' do
47
+ let(:record) { article.new }
48
+
49
+ it 'caches attribute raw value' do
50
+ record.publish_datetime = date_string = '2010-01-01'
51
+
52
+ expect(record.read_timeliness_attribute_before_type_cast('publish_datetime')).to eq date_string
53
+ end
54
+
55
+ context 'with plugin parser' do
56
+ before { described_class.use_plugin_parser = true }
57
+
58
+ after { described_class.use_plugin_parser = false }
59
+
60
+ let(:record) { article.new }
61
+
62
+ context 'with date columns' do
63
+ it 'parses a string value', broken: true do
64
+ allow(Timeliness::Parser).to receive(:parse)
65
+
66
+ record.update(publish_date: '2010-01-01')
67
+
68
+ expect(Timeliness::Parser).to have_received(:parse)
69
+ end
70
+
71
+ it 'parses a invalid string value as nil', broken: true do
72
+ allow(Timeliness::Parser).to receive(:parse)
73
+
74
+ record.update(publish_date: 'not valid')
75
+
76
+ expect(Timeliness::Parser).to have_received(:parse)
77
+ end
78
+
79
+ it 'stores a Date value after parsing string' do
80
+ record.publish_date = '2010-01-01'
81
+
82
+ expect(record.publish_date).to be_kind_of(Date)
83
+ expect(record.publish_date).to eq Date.new(2010, 1, 1)
84
+ end
85
+ end
86
+
87
+ context 'with time columns' do
88
+ it 'parses a string value', broken: true do
89
+ allow(Timeliness::Parser).to receive(:parse)
90
+
91
+ record.update(publish_time: '12:30')
92
+
93
+ expect(Timeliness::Parser).to have_received(:parse)
94
+ end
95
+
96
+ it 'parses a invalid string value as nil', broken: true do
97
+ allow(Timeliness::Parser).to receive(:parse)
98
+
99
+ record.update(publish_time: 'not valid')
100
+
101
+ expect(Timeliness::Parser).to have_received(:parse)
102
+ end
103
+
104
+ it 'stores a Time value after parsing string' do
105
+ record.publish_time = '12:30'
106
+
107
+ expect(record.publish_time).to be_kind_of(Time)
108
+ expect(record.publish_time).to eq Time.new(Time.now.year,
109
+ Time.now.month,
110
+ Time.now.day, 12, 30)
111
+ end
112
+ end
113
+
114
+ context 'with datetime columns' do
115
+ let(:time_zone) { Faker::Address.time_zone }
116
+
117
+ it 'parses a string value', broken: true do
118
+ allow(Timeliness::Parser).to receive(:parse)
119
+
120
+ record.update(publish_datetime: '2010-01-01 12:00')
121
+
122
+ expect(Timeliness::Parser).to have_received(:parse)
123
+ end
124
+
125
+ it 'parses a invalid string value as nil', broken: true do
126
+ allow(Timeliness::Parser).to receive(:parse)
127
+
128
+ record.update(publish_datetime: 'not valid')
129
+
130
+ expect(Timeliness::Parser).to have_received(:parse)
131
+ end
132
+
133
+ it 'parses string into DateTime value' do
134
+ record.publish_datetime = '2010-01-01 12:00'
135
+
136
+ expect(record.publish_datetime).to be_kind_of(DateTime)
137
+ end
138
+
139
+ it 'parses string as current timezone' do
140
+ record.update(publish_datetime: DateTime.new)
141
+
142
+ expect(record.publish_datetime.utc_offset).to eq \
143
+ Time.local(time_zone).utc_offset
144
+ end
145
+ end
146
+ end
147
+ end
148
+
149
+ context 'with cached values' do
150
+ it 'is cleared on reload' do
151
+ record = article.create!
152
+ record.publish_date = '2010-01-01'
153
+ record.reload
154
+ expect(record.read_timeliness_attribute_before_type_cast('publish_date')).to be_nil
155
+ end
156
+ end
157
+
158
+ context 'with before_type_cast method' do
159
+ let(:record) { article.new }
160
+
161
+ it 'is defined on class if ORM supports it' do
162
+ expect(record).to respond_to(:publish_datetime_before_type_cast)
163
+ end
164
+
165
+ it 'returns original value' do
166
+ record.publish_datetime = date_string = DateTime.now
167
+
168
+ expect(record.publish_datetime_before_type_cast).to eq date_string
169
+ end
170
+
171
+ it 'returns attribute if no attribute assignment has been made' do
172
+ time = Time.local(2010, 0o1, 0o1)
173
+ article.create(publish_datetime: time)
174
+ record = article.last
175
+ expect(record.publish_datetime_before_type_cast).to eq time.to_datetime
176
+ end
177
+
178
+ context 'with plugin parser' do
179
+ before { described_class.use_plugin_parser = true }
180
+
181
+ after { described_class.use_plugin_parser = true }
182
+
183
+ it 'returns original value' do
184
+ record.publish_datetime = date_string = '2010-01-31'
185
+ expect(record.publish_datetime_before_type_cast).to eq date_string
186
+ end
187
+ end
188
+ end
189
+
190
+ context 'with aliased fields' do
191
+ before { described_class.use_plugin_parser = true }
192
+
193
+ after { described_class.use_plugin_parser = false }
194
+
195
+ it 'determines type for attribute' do
196
+ expect(article.timeliness_attribute_type(:publish_date)).to eq :date
197
+ expect(article.timeliness_attribute_type(:publish_time)).to eq :time
198
+ expect(article.timeliness_attribute_type(:publish_datetime)).to eq :datetime
199
+ end
200
+ end
201
+ end
metadata CHANGED
@@ -1,78 +1,255 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_timeliness-mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 5.0.0.pre.814042540
5
5
  platform: ruby
6
6
  authors:
7
- - Adam Meehan
7
+ - VAILLANT Jeremy
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-24 00:00:00.000000000 Z
11
+ date: 2021-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: validates_timeliness
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.0
20
- type: :runtime
19
+ version: '2.2'
20
+ - - "<="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.2.16
23
+ type: :development
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: 4.0.0
29
+ version: '2.2'
30
+ - - "<="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.2.16
27
33
  - !ruby/object:Gem::Dependency
28
- name: bundler
34
+ name: faker
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.17'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.17'
47
+ - !ruby/object:Gem::Dependency
48
+ name: pry-byebug
29
49
  requirement: !ruby/object:Gem::Requirement
30
50
  requirements:
31
51
  - - "~>"
32
52
  - !ruby/object:Gem::Version
33
- version: '1.10'
53
+ version: '3.9'
34
54
  type: :development
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
37
57
  requirements:
38
58
  - - "~>"
39
59
  - !ruby/object:Gem::Version
40
- version: '1.10'
60
+ version: '3.9'
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: rake
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
65
  - - "~>"
46
66
  - !ruby/object:Gem::Version
47
- version: '10.0'
67
+ version: '13.0'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 13.0.3
71
+ type: :development
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '13.0'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 13.0.3
81
+ - !ruby/object:Gem::Dependency
82
+ name: reek
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: 6.0.4
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - "~>"
93
+ - !ruby/object:Gem::Version
94
+ version: 6.0.4
95
+ - !ruby/object:Gem::Dependency
96
+ name: rspec
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: '3.10'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - "~>"
107
+ - !ruby/object:Gem::Version
108
+ version: '3.10'
109
+ - !ruby/object:Gem::Dependency
110
+ name: rubocop
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: 1.13.0
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: 1.13.0
123
+ - !ruby/object:Gem::Dependency
124
+ name: rubocop-faker
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '1.1'
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - "~>"
135
+ - !ruby/object:Gem::Version
136
+ version: '1.1'
137
+ - !ruby/object:Gem::Dependency
138
+ name: rubocop-performance
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: '1.11'
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: 1.11.1
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '1.11'
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: 1.11.1
157
+ - !ruby/object:Gem::Dependency
158
+ name: rubocop-rspec
159
+ requirement: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - "~>"
162
+ - !ruby/object:Gem::Version
163
+ version: '2.3'
164
+ type: :development
165
+ prerelease: false
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - "~>"
169
+ - !ruby/object:Gem::Version
170
+ version: '2.3'
171
+ - !ruby/object:Gem::Dependency
172
+ name: simplecov
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - "~>"
176
+ - !ruby/object:Gem::Version
177
+ version: 0.21.2
178
+ type: :development
179
+ prerelease: false
180
+ version_requirements: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - "~>"
183
+ - !ruby/object:Gem::Version
184
+ version: 0.21.2
185
+ - !ruby/object:Gem::Dependency
186
+ name: simplecov_json_formatter
187
+ requirement: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - "~>"
190
+ - !ruby/object:Gem::Version
191
+ version: 0.1.3
48
192
  type: :development
49
193
  prerelease: false
50
194
  version_requirements: !ruby/object:Gem::Requirement
51
195
  requirements:
52
196
  - - "~>"
53
197
  - !ruby/object:Gem::Version
54
- version: '10.0'
55
- description: ValidatesTimeliness mongoid ORM compatability
198
+ version: 0.1.3
199
+ - !ruby/object:Gem::Dependency
200
+ name: mongoid
201
+ requirement: !ruby/object:Gem::Requirement
202
+ requirements:
203
+ - - "~>"
204
+ - !ruby/object:Gem::Version
205
+ version: '7.2'
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: 7.2.2
209
+ type: :runtime
210
+ prerelease: false
211
+ version_requirements: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '7.2'
216
+ - - ">="
217
+ - !ruby/object:Gem::Version
218
+ version: 7.2.2
219
+ - !ruby/object:Gem::Dependency
220
+ name: validates_timeliness
221
+ requirement: !ruby/object:Gem::Requirement
222
+ requirements:
223
+ - - "~>"
224
+ - !ruby/object:Gem::Version
225
+ version: '5.0'
226
+ type: :runtime
227
+ prerelease: false
228
+ version_requirements: !ruby/object:Gem::Requirement
229
+ requirements:
230
+ - - "~>"
231
+ - !ruby/object:Gem::Version
232
+ version: '5.0'
233
+ description: " ValidatesTimeliness mongoid ORM compatability.\n"
56
234
  email:
57
- - adam.meehan@gmail.com
235
+ - jeremy@dazzl.tv
58
236
  executables: []
59
237
  extensions: []
60
238
  extra_rdoc_files: []
61
239
  files:
62
- - ".gitignore"
63
- - ".rspec"
64
- - ".travis.yml"
65
240
  - Gemfile
241
+ - LICENSE
66
242
  - README.md
67
243
  - Rakefile
68
- - bin/console
69
- - bin/setup
70
244
  - lib/validates_timeliness/mongoid.rb
71
- - lib/validates_timeliness/mongoid/version.rb
245
+ - lib/validates_timeliness/mongoid/info.rb
72
246
  - lib/validates_timeliness/orm/mongoid.rb
73
- - validates_timeliness-mongoid.gemspec
74
- homepage: https://github.com/Dev-Crea/validates_timeliness-mongoid
75
- licenses: []
247
+ - spec/spec_helper.rb
248
+ - spec/support/faker/article.rb
249
+ - spec/validates_timeliness/orm/validates_timeliness_mongoid_spec.rb
250
+ homepage: https://github.com/dazzl-tv/validates_timeliness-mongoid
251
+ licenses:
252
+ - MIT
76
253
  metadata: {}
77
254
  post_install_message:
78
255
  rdoc_options: []
@@ -82,15 +259,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
259
  requirements:
83
260
  - - ">="
84
261
  - !ruby/object:Gem::Version
85
- version: '0'
262
+ version: 2.6.0
86
263
  required_rubygems_version: !ruby/object:Gem::Requirement
87
264
  requirements:
88
- - - ">="
265
+ - - ">"
89
266
  - !ruby/object:Gem::Version
90
- version: '0'
267
+ version: 1.3.1
91
268
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 2.5.1
269
+ rubygems_version: 3.0.3.1
94
270
  signing_key:
95
271
  specification_version: 4
96
272
  summary: ValidatesTimeliness mongoid extension
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
data/.travis.yml DELETED
@@ -1,4 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.2
4
- before_install: gem install bundler -v 1.10.6
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "validates_timeliness/mongoid"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Do any other automated setup that you need to do here
@@ -1,7 +0,0 @@
1
- module ValidatesTimeliness
2
- module Mongoid
3
- VERSION = '0.1.0'
4
- GEM_NAME = 'validates_timeliness-mongoid'
5
- HOMEPAGE = 'https://github.com/Dev-Crea/validates_timeliness-mongoid'
6
- end
7
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
- # coding: utf-8
3
-
4
- lib = File.expand_path('../lib', __FILE__)
5
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
-
7
- require 'validates_timeliness/mongoid/version'
8
-
9
- Gem::Specification.new do |spec|
10
- spec.name = ValidatesTimeliness::Mongoid::GEM_NAME
11
- spec.version = ValidatesTimeliness::Mongoid::VERSION
12
- spec.authors = ['Adam Meehan']
13
- spec.email = ['adam.meehan@gmail.com']
14
-
15
- spec.summary = %q{ValidatesTimeliness mongoid extension}
16
- spec.description = %q{ValidatesTimeliness mongoid ORM compatability}
17
- spec.homepage = ValidatesTimeliness::Mongoid::HOMEPAGE
18
-
19
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
- spec.bindir = 'exe'
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ['lib']
23
-
24
- spec.add_dependency 'validates_timeliness', '~> 4.0.0'
25
-
26
- spec.add_development_dependency 'bundler', '~> 1.10'
27
- spec.add_development_dependency 'rake', '~> 10.0'
28
- end