dummy 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/dummy.rb +2 -0
  2. data/lib/dummy/internet.rb +4 -0
  3. metadata +2 -2
data/lib/dummy.rb CHANGED
@@ -83,6 +83,8 @@ module Dummy
83
83
  Dummy::Geolocation.lat.to_s
84
84
  when /^(.*[-_:+ ])*(lon|lng)/ then
85
85
  Dummy::Geolocation.lng.to_s
86
+ when /^ip|ip$/
87
+ Dummy::Internet.ip
86
88
  else
87
89
  case type
88
90
  when :string then
@@ -41,6 +41,10 @@ module Dummy
41
41
 
42
42
  "#{protocol}://#{name}.#{DOMAINS.rand}"
43
43
  end
44
+
45
+ def ip
46
+ Array.new(4) { rand(256) }.join(".")
47
+ end
44
48
 
45
49
  private
46
50
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dummy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-31 00:00:00.000000000 Z
12
+ date: 2011-11-01 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A Ruby library to generate clever dummy data
15
15
  email: