rubyul 0.5.1 → 0.5.2

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: c3adc9af06ed073986a681fb8e00145f7ebbfd21
4
- data.tar.gz: 35303bc14b3de9a452f99130d832f61171577284
3
+ metadata.gz: 796ed1cea3ca42c4048e9fd0352636f45c6f0699
4
+ data.tar.gz: 4a7a844e9e05a0fe632c5e13f5b3ee0f7bb36158
5
5
  SHA512:
6
- metadata.gz: fe1de0e190b253bdb5d19e946b4cd3287be51066d03a4a2782e9441a79d821d661d12636d3511632c77006fe9d2b2740696b681a7d73451d483e8923820ed90a
7
- data.tar.gz: ed01c5a213c262294ed73c27f5248d988d964abd8c068e5c4e9a83dadf633101f713af59991b1fca4ba6c221f9969c22734cd512c18e12d0d5ad89eed490edc6
6
+ metadata.gz: 43fd90eae49fc30eb51e62658432f948654ee0586f3aa40860f4c3ceaeb4c4cede4291cb7964d3825ed18ab0854189e14cb13ae66091522d46047496d74968bc
7
+ data.tar.gz: 29d68789ae8c6704166a6b1142ad55513b07ba74d23ef8bce79fbdaeac60f0413c06c605ab783b6b240e40d711cbad4f31cdc784c6d7525b834672497d4ecccc
data/lib/rubyul.rb CHANGED
@@ -1,23 +1,23 @@
1
1
  require "rubyul/version"
2
2
 
3
- require 'date'
4
- require 'json'
3
+ require "date"
4
+ require "json"
5
5
 
6
+ # All the small helper functions are here.
6
7
  module Rubyul
7
-
8
8
  def self.academic_year(date)
9
+ # Academic years go from September to August.
9
10
  (Date.parse(date) << 8).year
10
11
  end
11
12
 
12
- PLATFORM_REGEXES = JSON.parse(File.read(File.dirname(__FILE__) + "/platform_regexes.json"))
13
+ PLATFORM_REGEXES = JSON.parse(File.read(File.dirname(__FILE__) +
14
+ "/platform_regexes.json"))
13
15
 
14
16
  def self.hostname_to_platform(hostname)
17
+ # TODO: Deal with ignores or not, with an option.
15
18
  PLATFORM_REGEXES.each do |regexp, platform_name|
16
- if Regexp.new(regexp) =~ hostname
17
- return platform_name
18
- end
19
+ return platform_name if Regexp.new(regexp) =~ hostname
19
20
  end
20
- return nil
21
+ nil
21
22
  end
22
-
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module Rubyul
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Denton