ecm_courses2 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: d776410cab440d3bacc2533db2a7f97adb483c0b
4
- data.tar.gz: b29264f79bd335d6fe8298ca5a26d0354de73010
3
+ metadata.gz: 0dfc6e912f248798cf1e9e130eb64eaf4b7ebf02
4
+ data.tar.gz: f00491ee08728287b419a2ed3332f03a849975cd
5
5
  SHA512:
6
- metadata.gz: 417c7217f59f8d73f5c83f413f4b53e72f6182084e1e194a0f618e5e9a0b82603979277379ede459acf821bd7435d061ddbdf2dbfdad88c1594639ed3de642fd
7
- data.tar.gz: 1964c87e537e18fc79bed490cec2ab3c44eae46d5c4162c9f1a8745604a05f4d481c400720ea625cc6b9bcbbb9e581d0740d06efd835324b272e9e6487fa0ca1
6
+ metadata.gz: 16fa484f0ee0f796eefe4fd020e13803c8fe9ae3c49a210f8819a2955e098bae065229fc3d0c9a5a555352109e7826d05a7fa8dd0e27b74089b35801829c872a
7
+ data.tar.gz: d4b2df587eb85e7aac20b640917a4eba8453f67b4949e3cf6377ddfc7ffbe789f9efb76f33ec492034542352caf5a6003a8b7e4913f6f76bd7238ac635108dcb
@@ -13,6 +13,8 @@ module Ecm::Courses
13
13
  validates :end_at, presence: true
14
14
  validates :start_at, presence: true
15
15
 
16
+ validates :end_at, timeliness: { after: :start_at }
17
+
16
18
  def self.for_month(date)
17
19
  date ||= Time.zone.now.to_date
18
20
  where(start_at: (date.beginning_of_month..(date.end_of_month + 1.day)))
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Courses
3
- VERSION = '1.0.2'.freeze
3
+ VERSION = '1.0.3'.freeze
4
4
  end
5
5
  end
data/lib/ecm_courses2.rb CHANGED
@@ -6,6 +6,7 @@ require 'route_translator'
6
6
  require 'icalendar'
7
7
  require 'haml-rails'
8
8
  require 'ecm_calendar_helper'
9
+ require 'validates_timeliness'
9
10
 
10
11
  require 'ecm/courses'
11
12
  require 'ecm/courses/engine'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_courses2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-16 00:00:00.000000000 Z
11
+ date: 2017-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.0.1
139
+ - !ruby/object:Gem::Dependency
140
+ name: validates_timeliness
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: rspec-rails
141
155
  requirement: !ruby/object:Gem::Requirement