dohdata 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/datagen +12 -12
- data/lib/{doh/data → dohdata}/basic.rb +0 -0
- data/lib/{doh/data → dohdata}/bulk.rb +0 -0
- data/lib/{doh/data → dohdata}/catalog.rb +1 -1
- data/lib/{doh/data → dohdata}/human.rb +1 -1
- data/lib/{doh/data → dohdata}/make_global.rb +0 -0
- data/lib/{doh/data → dohdata}/require_datagen.rb +2 -2
- data/lib/dohdata.rb +2 -0
- metadata +14 -14
- data/lib/doh/data.rb +0 -2
data/bin/datagen
CHANGED
@@ -1,34 +1,34 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require '
|
6
|
-
require '
|
7
|
-
require '
|
2
|
+
require 'dohutil/app/init_from_pwd'
|
3
|
+
require 'dohroot/options'
|
4
|
+
require 'dohutil/config'
|
5
|
+
require 'dohdata/catalog'
|
6
|
+
require 'dohdata/require_datagen'
|
7
|
+
require 'dohmysql/connector_util'
|
8
8
|
require 'dohlog'
|
9
|
-
DohData
|
9
|
+
DohData.require_datagen
|
10
10
|
|
11
11
|
opts = Doh::Options.new(
|
12
|
-
{'target' => [Doh
|
12
|
+
{'target' => [Doh.config['primary_database'], "-g", "--target <database>", "name of the target database -- defaults to config['primary_database'], currently '#{Doh.config['primary_database']}'"] \
|
13
13
|
,'count' => [1, "-c", "--count <amount>", "how many to create"] \
|
14
14
|
,'logging' => [false, "-l", "--logging", "enable logging (off by default)"] \
|
15
15
|
}, true, 'list of catalog entries to create')
|
16
16
|
|
17
17
|
if opts.varargs.size == 0
|
18
|
-
DohData
|
18
|
+
DohData.catalog_list.each {|elem| puts elem }
|
19
19
|
exit
|
20
20
|
end
|
21
21
|
|
22
22
|
if opts.target
|
23
|
-
DohDb
|
23
|
+
DohDb.reconfigure_connector({'database' => opts.target})
|
24
24
|
end
|
25
25
|
|
26
26
|
opts.varargs.each do |entry|
|
27
|
-
klass = DohData
|
27
|
+
klass = DohData.search_catalog(entry)
|
28
28
|
if klass.nil?
|
29
29
|
puts "unable to find data object matching: #{entry}"
|
30
30
|
else
|
31
|
-
DohLog
|
31
|
+
DohLog.disable unless opts.logging
|
32
32
|
opts.count.to_i.times { klass.new.save_to_database }
|
33
33
|
end
|
34
34
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require '
|
1
|
+
require 'dohroot'
|
2
2
|
|
3
3
|
module DohData
|
4
4
|
|
5
5
|
def self.require_datagen
|
6
|
-
lib_datagen_file = File.join(Doh
|
6
|
+
lib_datagen_file = File.join(Doh.root, 'lib/datagen.rb')
|
7
7
|
require(lib_datagen_file) if File.exist?(lib_datagen_file)
|
8
8
|
end
|
9
9
|
|
data/lib/dohdata.rb
ADDED
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.
|
4
|
+
version: 0.1.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-05-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: dohutil
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.2.12
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ! '>='
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 0.
|
30
|
+
version: 0.2.12
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: dohlog
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
requirements:
|
36
36
|
- - ! '>='
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: 0.2.
|
38
|
+
version: 0.2.1
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ! '>='
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.2.
|
46
|
+
version: 0.2.1
|
47
47
|
description: utilities for generating random names, phone numbers, emails, etc.
|
48
48
|
email:
|
49
49
|
- devinfo@atpsoft.com
|
@@ -54,13 +54,13 @@ extra_rdoc_files:
|
|
54
54
|
- MIT-LICENSE
|
55
55
|
files:
|
56
56
|
- bin/datagen
|
57
|
-
- lib/
|
58
|
-
- lib/
|
59
|
-
- lib/
|
60
|
-
- lib/
|
61
|
-
- lib/
|
62
|
-
- lib/
|
63
|
-
- lib/
|
57
|
+
- lib/dohdata/basic.rb
|
58
|
+
- lib/dohdata/bulk.rb
|
59
|
+
- lib/dohdata/catalog.rb
|
60
|
+
- lib/dohdata/human.rb
|
61
|
+
- lib/dohdata/make_global.rb
|
62
|
+
- lib/dohdata/require_datagen.rb
|
63
|
+
- lib/dohdata.rb
|
64
64
|
- MIT-LICENSE
|
65
65
|
homepage: https://github.com/atpsoft/dohdata
|
66
66
|
licenses:
|
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 1.9.
|
77
|
+
version: 1.9.3
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
79
|
none: false
|
80
80
|
requirements:
|
data/lib/doh/data.rb
DELETED