whimsy-asf 0.0.54 → 0.0.55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/asf.version +1 -1
  3. data/lib/whimsy/asf/icla.rb +9 -5
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 837012031d70e879af6bf5b86caa4e951a206f22
4
- data.tar.gz: 9c18801e448db661f07601ab34926bc915062009
3
+ metadata.gz: 014e1d3d29d74cc2577d222313ee2816be728737
4
+ data.tar.gz: 734e7cec99fa6d62b49945db165632be24cedc7b
5
5
  SHA512:
6
- metadata.gz: 14e9b8cc58aacfaef847ec21f016040203e54155b2df685b8b113d51ae74b646b26a1774a75d6888415684b863f6160e7eed28b15f6d156685d95222cb395b8c
7
- data.tar.gz: a3b8eac1ca4c5a627793f3feede567248b9c22002365aa2e74490782df89cbacd714020eb66b9931310aaf01656147aa6f5eecbe622359ebf863567c831caf08
6
+ metadata.gz: 514a68fc7099e9f957a0cc0a8cdb0a830e4ef138b34075890c83440387119bae18763a3e57627566fe68a5eb2d5012a7d66551daecc2bb957b6d310de0731c1f
7
+ data.tar.gz: f06a33ca3ebee28e99af2283fb2f49aadbc99bd24f00600739c0d11fee45e5d79b4afc6e6fb96dfc27462a9126c810adc294834c3f0ca49dbc2d379da06bb874
data/asf.version CHANGED
@@ -1 +1 @@
1
- 0.0.54
1
+ 0.0.55
@@ -6,12 +6,12 @@ module ASF
6
6
  @@mtime = nil
7
7
 
8
8
  OFFICERS = ASF::SVN['private/foundation/officers']
9
- SOURCE = "#{OFFICERS}/iclas.txt" if OFFICERS
9
+ SOURCE = OFFICERS ? "#{OFFICERS}/iclas.txt" : nil
10
10
 
11
11
  # flush caches if source file changed
12
12
  def self.refresh
13
- if SOURCE and File.mtime(SOURCE) != @@mtime
14
- @@mtime = File.mtime(SOURCE)
13
+ if not SOURCE or File.mtime(SOURCE) != @@mtime
14
+ @@mtime = SOURCE ? File.mtime(SOURCE) : Time.now
15
15
  @@id_index = nil
16
16
  @@email_index = nil
17
17
  @@name_index = nil
@@ -29,7 +29,7 @@ module ASF
29
29
 
30
30
  # find ICLA by ID
31
31
  def self.find_by_id(value)
32
- return if value == 'notinavail'
32
+ return if value == 'notinavail' or not SOURCE
33
33
 
34
34
  refresh
35
35
  unless @@id_index
@@ -42,6 +42,8 @@ module ASF
42
42
 
43
43
  # find ICLA by email
44
44
  def self.find_by_email(value)
45
+ return unless SOURCE
46
+
45
47
  refresh
46
48
  unless @@email_index
47
49
  @@email_index = {}
@@ -53,6 +55,7 @@ module ASF
53
55
 
54
56
  # find ICLA by name
55
57
  def self.find_by_name(value)
58
+ return unless SOURCE
56
59
  refresh
57
60
  unless @@name_index
58
61
  @@name_index = {}
@@ -64,6 +67,7 @@ module ASF
64
67
 
65
68
  # list of all ids
66
69
  def self.availids
70
+ return unless SOURCE
67
71
  refresh
68
72
  return @@availids if @@availids
69
73
  availids = []
@@ -80,7 +84,7 @@ module ASF
80
84
  @@email_index.values.each(&block)
81
85
  elsif @@name_index and not @@name_index.empty?
82
86
  @@name_index.values.each(&block)
83
- elsif File.exist?(SOURCE)
87
+ elsif SOURCE and File.exist?(SOURCE)
84
88
  File.read(SOURCE).scan(/^([-\w]+):(.*?):(.*?):(.*?):/).each do |list|
85
89
  icla = ICLA.new()
86
90
  icla.id = list[0]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whimsy-asf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.54
4
+ version: 0.0.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-15 00:00:00.000000000 Z
11
+ date: 2015-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri