banisterfiend 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gemtest ADDED
File without changes
data/Rakefile CHANGED
@@ -1,2 +1,7 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
+
4
+ require 'rake/testtask'
5
+ Rake::TestTask.new do |test|
6
+ test.pattern = 'test/*.rb'
7
+ end
@@ -15,4 +15,6 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.version = Banisterfiend::VERSION
17
17
  s.platform = Gem::Platform::RUBY
18
+
19
+ s.add_dependency 'faker'
18
20
  end
data/lib/banisterfiend.rb CHANGED
@@ -1,4 +1,11 @@
1
+ require 'faker'
1
2
  require 'banisterfiend/version'
2
3
 
3
4
  module Banisterfiend
4
- end
5
+ extend self
6
+
7
+ def name
8
+ digit = rand(30) + 70 if rand(3) == 1
9
+ Faker::Internet.domain_word + digit.to_s
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Banisterfiend
2
- VERSION = "0.0.0"
2
+ VERSION = "0.0.1"
3
3
  end
@@ -0,0 +1,12 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/spec'
3
+ require 'banisterfiend'
4
+
5
+ describe Banisterfiend do
6
+
7
+ describe "#name" do
8
+ it "should never (well) generate empty names" do
9
+ 1000.times.map { Banisterfiend::name }.any?(&:empty?).must_equal false
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: banisterfiend
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.0
5
+ version: 0.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kim Burgestrand
@@ -12,8 +12,18 @@ cert_chain: []
12
12
 
13
13
  date: 2011-04-07 00:00:00 +02:00
14
14
  default_executable:
15
- dependencies: []
16
-
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: faker
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
17
27
  description:
18
28
  email:
19
29
  - kim@burgestrand.se
@@ -24,12 +34,14 @@ extensions: []
24
34
  extra_rdoc_files: []
25
35
 
26
36
  files:
37
+ - .gemtest
27
38
  - .gitignore
28
39
  - Gemfile
29
40
  - Rakefile
30
41
  - banisterfiend.gemspec
31
42
  - lib/banisterfiend.rb
32
43
  - lib/banisterfiend/version.rb
44
+ - test/banisterfiend.rb
33
45
  has_rdoc: true
34
46
  homepage: https://github.com/banister
35
47
  licenses: []
@@ -58,5 +70,5 @@ rubygems_version: 1.6.2
58
70
  signing_key:
59
71
  specification_version: 3
60
72
  summary: Fiendishly sneaky; loves to pry!
61
- test_files: []
62
-
73
+ test_files:
74
+ - test/banisterfiend.rb