specstar-support-random 0.0.6 → 0.0.7

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.
Files changed (2) hide show
  1. data/lib/specstar/support/random.rb +4 -1
  2. metadata +2 -2
@@ -37,10 +37,13 @@ end
37
37
 
38
38
  def random_url(options={})
39
39
  domain = options.delete(:domain) || random_domain
40
+ scheme = options.delete(:scheme) || ['http', 'https'].sample
41
+ fragment = options.delete(:fragment) || random_text
40
42
 
41
- uri = URI("#{['http', 'https'].sample}://#{domain}")
43
+ uri = URI("#{scheme}://#{domain}")
42
44
  uri.path = "/#{random_text.downcase}"
43
45
  uri.query = random_query
46
+ uri.fragment = fragment
44
47
 
45
48
  uri.to_s
46
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specstar-support-random
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
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: 2012-12-12 00:00:00.000000000 Z
12
+ date: 2013-02-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: sujoyg@gmail.com