dummer 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -0
- data/CHANGELOG.md +6 -0
- data/lib/dummer/generator.rb +8 -4
- data/lib/dummer/version.rb +1 -1
- metadata +45 -21
- checksums.yaml +0 -7
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/dummer/generator.rb
CHANGED
@@ -155,7 +155,8 @@ module Dummer
|
|
155
155
|
|
156
156
|
# belows are data types
|
157
157
|
|
158
|
-
def string(
|
158
|
+
def string(opts = {})
|
159
|
+
length, any, value = (opts[:length] || 8), opts[:any], opts[:value]
|
159
160
|
if value
|
160
161
|
string = value.to_s
|
161
162
|
Proc.new { string }
|
@@ -166,7 +167,8 @@ module Dummer
|
|
166
167
|
end
|
167
168
|
end
|
168
169
|
|
169
|
-
def integer(
|
170
|
+
def integer(opts = {})
|
171
|
+
format, range, countup, value = opts[:format], opts[:range], opts[:countup], opts[:value]
|
170
172
|
if format
|
171
173
|
if value
|
172
174
|
integer = sprintf(format, value.to_i)
|
@@ -192,7 +194,8 @@ module Dummer
|
|
192
194
|
end
|
193
195
|
end
|
194
196
|
|
195
|
-
def float(
|
197
|
+
def float(opts = {})
|
198
|
+
format, range, value = opts[:format], opts[:range], opts[:value]
|
196
199
|
if format
|
197
200
|
if value
|
198
201
|
float = value.to_f
|
@@ -214,7 +217,8 @@ module Dummer
|
|
214
217
|
end
|
215
218
|
end
|
216
219
|
|
217
|
-
def datetime(
|
220
|
+
def datetime(opts = {})
|
221
|
+
format, random, value = (opts[:format] || "%Y-%m-%d %H:%M:%S.%3N"), (opts[:random] || false), opts[:value]
|
218
222
|
if value
|
219
223
|
Proc.new { value.strftime(format) }
|
220
224
|
elsif random
|
data/lib/dummer/version.rb
CHANGED
metadata
CHANGED
@@ -1,60 +1,68 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dummer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- sonots
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: thor
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- - '>='
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- - '>='
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: serverengine
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- - '>='
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- - '>='
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '0'
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: fluent-logger
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- - '>='
|
51
|
+
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '0'
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- - '>='
|
59
|
+
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '0'
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: bundler
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,57 +78,65 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: rake
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
|
-
- - '>='
|
83
|
+
- - ! '>='
|
74
84
|
- !ruby/object:Gem::Version
|
75
85
|
version: '0'
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
|
-
- - '>='
|
91
|
+
- - ! '>='
|
81
92
|
- !ruby/object:Gem::Version
|
82
93
|
version: '0'
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: rspec
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
|
-
- - '>='
|
99
|
+
- - ! '>='
|
88
100
|
- !ruby/object:Gem::Version
|
89
101
|
version: '0'
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
|
-
- - '>='
|
107
|
+
- - ! '>='
|
95
108
|
- !ruby/object:Gem::Version
|
96
109
|
version: '0'
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: pry
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
|
-
- - '>='
|
115
|
+
- - ! '>='
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
|
-
- - '>='
|
123
|
+
- - ! '>='
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: '0'
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: pry-nav
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
|
-
- - '>='
|
131
|
+
- - ! '>='
|
116
132
|
- !ruby/object:Gem::Version
|
117
133
|
version: '0'
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
|
-
- - '>='
|
139
|
+
- - ! '>='
|
123
140
|
- !ruby/object:Gem::Version
|
124
141
|
version: '0'
|
125
142
|
description: Generates dummy log data for Fluentd benchmark
|
@@ -162,25 +179,32 @@ files:
|
|
162
179
|
homepage: https://github.com/sonots/dummer
|
163
180
|
licenses:
|
164
181
|
- MIT
|
165
|
-
metadata: {}
|
166
182
|
post_install_message:
|
167
183
|
rdoc_options: []
|
168
184
|
require_paths:
|
169
185
|
- lib
|
170
186
|
required_ruby_version: !ruby/object:Gem::Requirement
|
187
|
+
none: false
|
171
188
|
requirements:
|
172
|
-
- - '>='
|
189
|
+
- - ! '>='
|
173
190
|
- !ruby/object:Gem::Version
|
174
191
|
version: '0'
|
192
|
+
segments:
|
193
|
+
- 0
|
194
|
+
hash: 652710321
|
175
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
|
+
none: false
|
176
197
|
requirements:
|
177
|
-
- - '>='
|
198
|
+
- - ! '>='
|
178
199
|
- !ruby/object:Gem::Version
|
179
200
|
version: '0'
|
201
|
+
segments:
|
202
|
+
- 0
|
203
|
+
hash: 652710321
|
180
204
|
requirements: []
|
181
205
|
rubyforge_project:
|
182
|
-
rubygems_version:
|
206
|
+
rubygems_version: 1.8.23
|
183
207
|
signing_key:
|
184
|
-
specification_version:
|
208
|
+
specification_version: 3
|
185
209
|
summary: Generates dummy log data for Fluentd benchmark
|
186
210
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 8984ddee054506da184ebf29c915680da19a0bcc
|
4
|
-
data.tar.gz: 250cc66f762763e375a17d2b71b06eb9f7b31d26
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 6bf2537e3a84c0bb57dd1ccfc49df5857675c905421fe33dc7f5860e51d4c7993691225607c6409d2f1e0255c7c07553e3784dd9a1871857bb8aa5c9e7631eac
|
7
|
-
data.tar.gz: cfad7d19f7e04d130a1f83cb8afd84ed85933865b594662037eab0a75116790a70b13aa8c80a5b1742d0df2fef1600c66eac40cd904b4880ef73559c9af20466
|