fucko 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ *~
2
+ .DS_Store
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm --create 1.9.3@fucko
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source :rubygems
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'pry'
7
+ gem 'rb-fsevent'
8
+ gem 'gem-release'
9
+ end
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fucko (0.1.0)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ coderay (1.0.7)
10
+ diff-lcs (1.1.3)
11
+ gem-release (0.4.1)
12
+ guard (1.3.3)
13
+ listen (>= 0.4.2)
14
+ thor (>= 0.14.6)
15
+ guard-bundler (1.0.0)
16
+ bundler (~> 1.0)
17
+ guard (~> 1.1)
18
+ guard-rspec (1.2.1)
19
+ guard (>= 1.1)
20
+ listen (0.5.2)
21
+ method_source (0.8)
22
+ pry (0.9.10)
23
+ coderay (~> 1.0.5)
24
+ method_source (~> 0.8)
25
+ slop (~> 3.3.1)
26
+ rb-fsevent (0.9.1)
27
+ rspec (2.11.0)
28
+ rspec-core (~> 2.11.0)
29
+ rspec-expectations (~> 2.11.0)
30
+ rspec-mocks (~> 2.11.0)
31
+ rspec-core (2.11.1)
32
+ rspec-expectations (2.11.3)
33
+ diff-lcs (~> 1.1.3)
34
+ rspec-mocks (2.11.3)
35
+ slop (3.3.3)
36
+ thor (0.16.0)
37
+
38
+ PLATFORMS
39
+ ruby
40
+
41
+ DEPENDENCIES
42
+ fucko!
43
+ gem-release
44
+ guard
45
+ guard-bundler
46
+ guard-rspec
47
+ pry
48
+ rb-fsevent
49
+ rspec
@@ -0,0 +1,12 @@
1
+ notification :terminal_notifier, app_name: "Fucko"
2
+
3
+ guard 'rspec', version: 2, cli: '--format documentation --color --tty --fail-fast', bundler: true do
4
+ watch(%r{^spec/.+_spec\.rb$})
5
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
6
+ watch('spec/spec_helper.rb') { "spec" }
7
+ end
8
+
9
+ guard 'bundler' do
10
+ watch('Gemfile')
11
+ watch(/^.+\.gemspec/)
12
+ end
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2012 Eric "Doc" Ritezel
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,40 @@
1
+ # Fucko
2
+
3
+ Make a mess out of both sample string generation and your good reputation. Hopefully it'll get someone in massive trouble someday.
4
+
5
+ Oh and I guess it's useful for testing profanity filters or something? Whatever, dude.
6
+
7
+
8
+ ## Usage
9
+
10
+ require 'fucko'
11
+ Fucko::Name.name => "Spaz Wankovich"
12
+ Fucko::Company.name => "Motherfucking Balls and Co."
13
+ Fucko::Dictionary.adjective => "shaggy-nippled"
14
+ Fucko::Dictionary.noun => "cock"
15
+
16
+ ## Note on Patches/Pull Requests
17
+
18
+ * Fork the project.
19
+ * Make your feature addition or bug fix.
20
+ * Add tests for it. This is important so I don't break it in a
21
+ future version unintentionally.
22
+ * Commit, do not mess with rakefile, version, or history.
23
+ (if you want to have your own version, that is fine but
24
+ bump version in a commit by itself I can ignore when I pull)
25
+ * Send me a pull request. Bonus points for topic branches.
26
+
27
+
28
+ ## Mentions
29
+
30
+ * Thanks to [Matthew Kocher](https://twitter.com/mkocher) for the idea, half of the name, most of the inspiration and constantly asking me if I've made this yet.
31
+ * Benjamin Curtis and his fantastic [Faker](http://faker.rubyforge.org) gem.
32
+
33
+ If you're offended by this gem, which you should be, and you happen to make [a blog post](http://unethicalblogger.com/2011/11/13/ten-poorly-chosen-gem-names.html) about it, please email me.
34
+
35
+ Also, if it gets you (or a friend) fired or divorced, I'd love to know!
36
+
37
+
38
+ ## Copyright
39
+
40
+ Copyright (c) 2012 Eric "Doc" Ritezel. See LICENSE for details.
@@ -0,0 +1,22 @@
1
+ require File.expand_path('../lib/fucko/version', __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'fucko'
5
+ s.version = Fucko::VERSION
6
+ s.platform = Gem::Platform::RUBY
7
+ s.homepage = 'https://github.com/ohrite/fucko'
8
+ s.authors = ['Eric Ritezel']
9
+ s.email = 'ritezel+fucko@gmail.com'
10
+ s.summary = 'Offensive string generation.'
11
+ s.description = 'Need to be offensive? Fucko has your string and more!'
12
+
13
+ s.add_development_dependency 'rspec'
14
+ s.add_development_dependency 'guard'
15
+ s.add_development_dependency 'guard-rspec'
16
+ s.add_development_dependency 'guard-bundler'
17
+
18
+ s.files = `git ls-files`.split( "\n" )
19
+ s.test_files = `git ls-files -- spec/*`.split( "\n" )
20
+ s.executables = `git ls-files -- bin/*`.split( "\n" ).map{ |f| File.basename( f ) }
21
+ s.require_path = 'lib'
22
+ end
@@ -0,0 +1,2 @@
1
+ require 'fucko/version'
2
+ require 'fucko/name'
@@ -0,0 +1,33 @@
1
+ module Fucko
2
+ module Dictionary
3
+ WORDS = ["testicle", "ball", "ass", "cock", "slag", "shit", "gonad"]
4
+
5
+ def self.noun
6
+ WORDS.sample
7
+ end
8
+
9
+ def self.plural_noun
10
+ word = noun
11
+ if word =~ /s$/
12
+ "#{word}es"
13
+ else
14
+ "#{word}s"
15
+ end
16
+ end
17
+
18
+ def self.adjective
19
+ word = noun
20
+ ending = 'ed'
21
+
22
+ if word =~ /[aeiou][^aeiou]$/
23
+ "#{word}#{word[-1, 1]}#{ending}"
24
+ else
25
+ "#{word}#{ending}"
26
+ end
27
+ end
28
+
29
+ def self.compound_adjective
30
+ "#{noun}-#{adjective}"
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,31 @@
1
+ require 'fucko/dictionary'
2
+
3
+ module Fucko
4
+ class Name
5
+ attr_reader :first_name, :last_name
6
+
7
+ ENDINGS = ["%sson", "von %s", "%sevich", "%sman", "%sowsky", "%s", "%sov", "%sworth", "Mac %s"]
8
+
9
+ def self.first_name
10
+ name.first_name
11
+ end
12
+
13
+ def self.last_name
14
+ name.last_name
15
+ end
16
+
17
+ def self.name
18
+ self.new(Dictionary.plural_noun.capitalize,
19
+ ENDINGS.sample % Dictionary.noun.capitalize)
20
+ end
21
+
22
+ def initialize(first_name, last_name)
23
+ @first_name = first_name
24
+ @last_name = last_name
25
+ end
26
+
27
+ def to_s
28
+ "#{first_name} #{last_name}"
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,4 @@
1
+ module Fucko
2
+ VERSION = '0.1.0'
3
+ end
4
+
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe Fucko::Dictionary do
4
+ it "can select a noun at random" do
5
+ Fucko::Dictionary::WORDS.should_receive(:sample).once
6
+ Fucko::Dictionary.noun
7
+ end
8
+
9
+ its(:noun) { should =~ /^\w+$/ }
10
+ its(:plural_noun) { should =~ /^\w+s$/ }
11
+ its(:adjective) { should =~ /^\w+ed$/ }
12
+ its(:compound_adjective) { should =~ /^\w+-\w+$/ }
13
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe Fucko::Name do
4
+ describe "when generating a name" do
5
+ let(:name) { Fucko::Name.name }
6
+
7
+ it "has a first and last name" do
8
+ Fucko::Name::ENDINGS.should_receive(:sample).and_return("%sson")
9
+ name.first_name.should =~ /^\w+$/
10
+ name.last_name.should =~ /^\w+son$/
11
+ end
12
+
13
+ it "converts to a string" do
14
+ name.should_receive(:first_name).and_return("something")
15
+ name.should_receive(:last_name).and_return("offensive")
16
+ name.to_s.should == "something offensive"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,4 @@
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+
3
+ require 'fucko'
4
+ require 'rspec'
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fucko
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Eric Ritezel
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
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: guard
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
+ - !ruby/object:Gem::Dependency
47
+ name: guard-rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: guard-bundler
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ description: Need to be offensive? Fucko has your string and more!
79
+ email: ritezel+fucko@gmail.com
80
+ executables: []
81
+ extensions: []
82
+ extra_rdoc_files: []
83
+ files:
84
+ - .gitignore
85
+ - .rvmrc
86
+ - Gemfile
87
+ - Gemfile.lock
88
+ - Guardfile
89
+ - LICENSE
90
+ - README.md
91
+ - fucko.gemspec
92
+ - lib/fucko.rb
93
+ - lib/fucko/dictionary.rb
94
+ - lib/fucko/name.rb
95
+ - lib/fucko/version.rb
96
+ - spec/lib/fucko/dictionary_spec.rb
97
+ - spec/lib/fucko/name_spec.rb
98
+ - spec/spec_helper.rb
99
+ homepage: https://github.com/ohrite/fucko
100
+ licenses: []
101
+ post_install_message:
102
+ rdoc_options: []
103
+ require_paths:
104
+ - lib
105
+ required_ruby_version: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ! '>='
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ requirements: []
118
+ rubyforge_project:
119
+ rubygems_version: 1.8.24
120
+ signing_key:
121
+ specification_version: 3
122
+ summary: Offensive string generation.
123
+ test_files:
124
+ - spec/lib/fucko/dictionary_spec.rb
125
+ - spec/lib/fucko/name_spec.rb
126
+ - spec/spec_helper.rb