codersdojo 1.1.24 → 1.2.00

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.
Files changed (2) hide show
  1. data/bin/codersdojo +15 -0
  2. metadata +4 -4
data/bin/codersdojo CHANGED
@@ -1,4 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
+
3
+ def show_update_message_when_old
4
+ threshold = 30
5
+ last_update = File.mtime(__FILE__)
6
+ installation_age_in_days = ((Time.new - last_update)/60/60/24).round
7
+ if installation_age_in_days > threshold then
8
+ puts <<-msg
9
+ Your installation of CodersDojo is more than #{threshold} days old (actual #{installation_age_in_days} days).
10
+ You should consider updating with "sudo gem install codersdojo" (Mac/Linux) or "gem install codersdojo" (Windows),
11
+ especially if you encounter strange behaviour of CodersDojo during kata execution or upload.
12
+ msg
13
+ end
14
+ end
15
+
16
+ show_update_message_when_old
2
17
  codersdojo_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'app'))
3
18
  $LOAD_PATH.unshift(codersdojo_dir) unless $LOAD_PATH.include?(codersdojo_dir)
4
19
  require 'codersdojo'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codersdojo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 35
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 1
9
- - 24
10
- version: 1.1.24
8
+ - 2
9
+ - 0
10
+ version: 1.2.00
11
11
  platform: ruby
12
12
  authors:
13
13
  - CodersDojo-Team