babbler 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +54 -0
- data/Rakefile +7 -0
- data/babbler.gemspec +25 -0
- data/lib/babbler.rb +50 -0
- data/lib/babbler/version.rb +3 -0
- data/lib/babbler/words.rb +4501 -0
- data/script/list.rb +4497 -0
- data/script/make_lists.rb +5047 -0
- data/script/pos/README.txt +115 -0
- data/script/pos/part-of-speech.txt +295172 -0
- data/spec/lib/babbler_spec.rb +30 -0
- data/spec/spec_helper.rb +1 -0
- metadata +103 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Babbler do
|
4
|
+
|
5
|
+
describe "#babble" do
|
6
|
+
it "should return an appropriate random babble" do
|
7
|
+
babble = Babbler.babble
|
8
|
+
words = babble.split(" ")
|
9
|
+
words.length.should == 2
|
10
|
+
Babbler::ADJECTIVES.should include(words[0])
|
11
|
+
Babbler::NOUNS.should include(words[1])
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should return the same babble given the same seed" do
|
15
|
+
Babbler.babble(1).should == Babbler.babble(1)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should return two adjectives when configured like that" do
|
19
|
+
Babbler.configure do |config|
|
20
|
+
config.num_adjectives = 2
|
21
|
+
end
|
22
|
+
babble = Babbler.babble
|
23
|
+
words = babble.split(" ")
|
24
|
+
words.length.should == 3
|
25
|
+
Babbler::ADJECTIVES.should include(words[0], words[1])
|
26
|
+
Babbler::NOUNS.should include(words[2])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'babbler'
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: babbler
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- JP Slavinsky
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-12-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: Creates nonsense babble in the form of an adjective plus a noun
|
47
|
+
email:
|
48
|
+
- jpslav@gmail.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- .gitignore
|
54
|
+
- .rvmrc
|
55
|
+
- Gemfile
|
56
|
+
- LICENSE.txt
|
57
|
+
- README.md
|
58
|
+
- Rakefile
|
59
|
+
- babbler.gemspec
|
60
|
+
- lib/babbler.rb
|
61
|
+
- lib/babbler/version.rb
|
62
|
+
- lib/babbler/words.rb
|
63
|
+
- script/list.rb
|
64
|
+
- script/make_lists.rb
|
65
|
+
- script/pos/README.txt
|
66
|
+
- script/pos/part-of-speech.txt
|
67
|
+
- spec/lib/babbler_spec.rb
|
68
|
+
- spec/spec_helper.rb
|
69
|
+
homepage: http://github.com/lml/babbler
|
70
|
+
licenses: []
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ! '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
segments:
|
82
|
+
- 0
|
83
|
+
hash: -4564966390128832604
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
hash: -4564966390128832604
|
93
|
+
requirements: []
|
94
|
+
rubyforge_project:
|
95
|
+
rubygems_version: 1.8.24
|
96
|
+
signing_key:
|
97
|
+
specification_version: 3
|
98
|
+
summary: Creates nonsense babble in the form of an adjective plus a noun. Useful
|
99
|
+
for creating code phrases or random names. The words are limited to common ones,
|
100
|
+
so the number of unique combinations is only around 5e6.
|
101
|
+
test_files:
|
102
|
+
- spec/lib/babbler_spec.rb
|
103
|
+
- spec/spec_helper.rb
|