dohdata 0.1.11 → 0.1.12

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86f0da3c3a1a6bf6e0f8a25348154663b58428bc
4
- data.tar.gz: d251aa3c9bbcc70dfb8890fbe6e2979c1753453d
3
+ metadata.gz: 9736380035cb812bc387d1703d7f890497cb22e5
4
+ data.tar.gz: 61f230a20c65222b2619b6aa91ee914e1d40b35b
5
5
  SHA512:
6
- metadata.gz: 1cf284579469670b1089407dde77993d8a1388759b0c0c09e79100c875f17735494765c2aaeea31f576dbba8a7c641a33eb9844b15930b7ff7e9b1c6cae5b6b7
7
- data.tar.gz: 674e8de8af7f774d819d975d0665b5e3952f4891b68ea0cb56ac705d20e096db655f42026de3d252a01756ecfc0397de0158d801c945806e81fc62a161b919ee
6
+ metadata.gz: 682fb116d6f49e330f88135fc410466f0726834e3250996bc09050de26c484dfc8d5e5925fcf4c59a538a2baeeecadfee900f808c47d3edb427b5fc53cc933db
7
+ data.tar.gz: 4112bb3e0241b6dd4f9b728cb782d1781816cf4ee13bec8df833c17ebe2356bf29c28b5eb30e24468f14b5351f335c0d98ce2e3f4bfb38f72070eb98ae8bcc68
data/lib/dohdata/basic.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module DohData
2
+ extend self
2
3
 
3
4
  #implemented here so random behavior can be overridden by end user
4
5
  def random_int(max)
data/lib/dohdata/human.rb CHANGED
@@ -2,6 +2,7 @@ require 'date'
2
2
  require 'dohdata/bulk'
3
3
 
4
4
  module DohData
5
+ extend self
5
6
 
6
7
  def random_first_name
7
8
  random_element(@@first_names)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makani Mason
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-17 00:00:00.000000000 Z
12
+ date: 2013-10-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dohutil
@@ -50,9 +50,7 @@ files:
50
50
  - lib/dohdata.rb
51
51
  - lib/dohdata/basic.rb
52
52
  - lib/dohdata/bulk.rb
53
- - lib/dohdata/catalog.rb
54
53
  - lib/dohdata/human.rb
55
- - lib/dohdata/make_global.rb
56
54
  - MIT-LICENSE
57
55
  homepage: https://github.com/atpsoft/dohdata
58
56
  licenses:
@@ -1,44 +0,0 @@
1
- require 'dohutil/class_basename'
2
-
3
- module DohData
4
-
5
- @@catalog = {'all' => {}}
6
- def self.catalog
7
- @@catalog
8
- end
9
-
10
- def self.catalog=(key, value)
11
- @@catalog[key]
12
- end
13
-
14
- def self.catalog_list(group = nil)
15
- @@catalog[group || 'all'].values.collect do |klass|
16
- text = Doh::class_basename(klass)
17
- if klass.respond_to?('description')
18
- text += ' - ' + klass.description
19
- end
20
- text
21
- end.sort
22
- end
23
-
24
- def self.add_to_catalog(klass, *groups_ary)
25
- lookup_str = Doh::class_basename(klass).downcase
26
- raise "can't add class #{klass.inspect} - there's already a class registered with a lookup string of '#{lookup_str}'" if @@catalog['all'].key?(lookup_str)
27
- @@catalog['all'][lookup_str] = klass
28
- groups_ary.each do |group|
29
- @@catalog[group] ||= {}
30
- @@catalog[group][lookup_str] = klass
31
- end
32
- end
33
-
34
- def self.search_catalog(text)
35
- @@catalog['all'][text.strip.downcase]
36
- end
37
-
38
- end
39
-
40
- class Class
41
- def dohdata_catalog(*groups_ary)
42
- DohData::add_to_catalog(self, *groups_ary)
43
- end
44
- end
@@ -1,3 +0,0 @@
1
- class Object
2
- include DohData
3
- end