check-date 0.0.2 → 0.0.3
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.
- data/lib/check-date/hook.rb +2 -3
- data/lib/check-date/version.rb +1 -1
- metadata +2 -2
data/lib/check-date/hook.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
Gem.pre_install do |installer|
|
2
|
-
today =
|
3
|
-
year_sec = 365 * 24 * 60 * 60
|
2
|
+
today = Date.today
|
4
3
|
|
5
|
-
if (today - installer.spec.date)
|
4
|
+
if (today - installer.spec.date).to_f > 365 then
|
6
5
|
if !Gem::ConsoleUI.new.ask_yes_no("This gem was updated more than 1 years ago. (last update: #{installer.spec.date})\nInstall this gem?", true) then
|
7
6
|
abort
|
8
7
|
end
|
data/lib/check-date/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: check-date
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-07-
|
12
|
+
date: 2011-07-26 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: Check gem's date and warn if date is more than 1 years ago.
|
15
15
|
email:
|