ffakeron 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ffakeron.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Dirk Kelly
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # Fakeron
2
+
3
+ Adds the module Faker::SwansonIpsum, giving you endless hours of fun with Ron Swanson Quotes
4
+
5
+ ## Why?
6
+
7
+ I don't think you should have to run off a branch to get this comedy gold, and I don't think it should really be additional code in the master branch.
8
+
9
+ Also I wanted to publish another gem so it doesn't look like I do nothing with my life other than watch NBC sitcoms... As true as that conception may be.
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ gem 'ffakeron'
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install ffakeron
24
+
25
+ ## Usage
26
+
27
+ As you would any other Ipsum generator you're able to get a few basic strings from Faker::SwansonIpsum, notably.
28
+
29
+ Faker::SwansonIpsum.word # single word
30
+ Faker::SwansonIpsum.sentence # an actual sentence quote
31
+ Faker::SwansonIpsum.paragraph # a few sentences, strung together
32
+
33
+ Along with this you can generate multiple of each, with the parameter controlling the count
34
+
35
+ Faker::SwansonIpsum.words(count) # an array of words
36
+ Faker::SwansonIpsum.sentences(count) # an array of sentences
37
+ Faker::SwansonIpsum.paragraphs(count) # an array of paragraphs
38
+
39
+ ## Contributing
40
+
41
+ 1. Fork it
42
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
43
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
44
+ 4. Push to the branch (`git push origin my-new-feature`)
45
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+ Rake::TestTask.new do |t|
5
+ t.libs << "test/" << "lib/"
6
+ t.ruby_opts << "-rhelper"
7
+ t.test_files = FileList['test/test*.rb']
8
+ t.verbose = true
9
+ end
10
+
11
+ task :default => :test
data/ffakeron.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ffakeron/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "ffakeron"
8
+ gem.version = Fakeron::VERSION
9
+ gem.authors = ["Dirk Kelly"]
10
+ gem.email = ["git+dk@dirkkelly.com"]
11
+ gem.description = %q{Ron Swanson addition to Faker library}
12
+ gem.summary = %q{Generates dummy data based off Ron Swanson quotes}
13
+ gem.homepage = "http://swansonipsum.com"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency 'ffaker'
21
+ gem.add_development_dependency 'rake'
22
+ gem.add_development_dependency 'test-unit'
23
+ end
@@ -0,0 +1,82 @@
1
+ module Faker
2
+ module SwansonIpsum
3
+ extend ModuleUtils
4
+ extend Lorem
5
+ extend self
6
+
7
+ def word
8
+ SWANSON_WORDS.rand
9
+ end
10
+
11
+ def sentence
12
+ punctuation = SWANSON_PUNCTUATION.rand
13
+ quote = SWANSON_QUOTES.rand
14
+
15
+ "#{quote}#{punctuation}"
16
+ end
17
+
18
+ def words(num = 3)
19
+ SWANSON_WORDS.random_pick(num)
20
+ end
21
+
22
+ SWANSON_WORDS = k [
23
+ "Swanson", "Ron", "bacon", "meat", "government", "tax", "profits", "business",
24
+ "parks", "alcohol", "breakfast", "ribs", "ex-wife", "food", "cloven", "hooves",
25
+ "woodwork", "steel", "toolbox", "hammer", "Pawnee", "Tammy", "Knope", "Humpsville",
26
+ "wreathes", "torches", "horrible", "department", "manager", "greedy", "piglet",
27
+ "mustache", "scam", "philosophy", "respect", "horrifying", "hamburger", "ketchup",
28
+ "crusade", "effigy", "kill", "hunting", "Mulligan", "steakhouse", "ribeye", "whiskey",
29
+ "Lagavulin", "melancholy", "April", "worst", "Claymine", "rectangle", "America",
30
+ "Megaphone", "Monday", "Butthole", "man", "whittel", "Horsemeals", "Eggporkalypse",
31
+ "tornado", "apathetic", "mean", "greatness", "Capitalism", "rage", "property", "rights",
32
+ "turkey", "communists", "spitballin", "slashing", "pork", "crackling", "Swoopeses",
33
+ "fighting", "stabbed", "hellscape", "nightmare", "hate", "schlemiel", "schlamazel",
34
+ "workshop", "liberty", "mustacheoed", "masculine", "Duke", "Silver", "bandsaw",
35
+ "spokeshave", "sander", "preternaturally", "tolerance", "privatized", "deviled",
36
+ "buffet"
37
+ ]
38
+
39
+ SWANSON_QUOTES = k [
40
+ "I have been developing the Swanson Pyramid of Greatness for years",
41
+ "The less I know about other people's affairs, the happier I am",
42
+ "April really is the whole package",
43
+ "You had me at meat tornado",
44
+ "The Four Horsemeals of the Eggporkalypse",
45
+ "It's like yoga, except I still get to kill something",
46
+ "Birthdays were invented by Hallmark to sell cards",
47
+ "Clear alcohols are for rich women on diets",
48
+ "I don't want to paint with a broad brush here, but every single contractor in the world is a miserable, incompetent thief",
49
+ "Never half-ass two things, whole-ass one thing",
50
+ "From gladiators into Swansons",
51
+ "The government is a greedy piglet that suckles on a taxpayer's teat until they have sore, chapped nipples",
52
+ "Turkey can never beat cow",
53
+ "There is only one bad word: taxes",
54
+ "Child labor laws are ruining this country",
55
+ "Shorts over six inches are capri pants, shorts under six inches are European",
56
+ "Only women shave beneath the neck",
57
+ "I work hard to make sure my department is as small and as ineffective as possible",
58
+ "Jerry's work is often adequate",
59
+ "When I eat it is the food that is scared",
60
+ "The important thing is your dream has been crushed",
61
+ "Every two weeks I need to sand down my toe nails",
62
+ "It is a beautiful night for the end of the world",
63
+ "We have one activity planned, not getting killed",
64
+ "We use that stuff to burn warts off mules",
65
+ "I hope the rest of your day is cool beans",
66
+ "You have come up with a plan so spectacularly horrible that it might ruin the entire department",
67
+ "I hear it has a dope aftertaste",
68
+ "Everyone shut up and look at me",
69
+ "I'm just making sure no one ever has to eat this",
70
+ "Is that a fried turkey leg inside a grilled hamburger",
71
+ "Do not stand too close when you light an ex-wife effigy",
72
+ "You may have thought you heard me say I wanted a lot of bacon and eggs, but what I said was: Give me all the bacon and eggs you have"
73
+ ]
74
+
75
+ SWANSON_PUNCTUATION = k [
76
+ ".",
77
+ "?",
78
+ "!"
79
+ ]
80
+
81
+ end
82
+ end
@@ -0,0 +1,3 @@
1
+ module Fakeron
2
+ VERSION = "0.0.1"
3
+ end
data/lib/ffakeron.rb ADDED
@@ -0,0 +1,9 @@
1
+ require 'ffaker'
2
+ require 'ffakeron/version'
3
+
4
+ module Fakeron
5
+
6
+ end
7
+ module Faker
8
+ autoload :SwansonIpsum, 'ffaker/swanson_ipsum'
9
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'test/unit'
2
+
3
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
4
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
+ require 'ffaker'
6
+ require 'ffakeron'
7
+
8
+ class Test::Unit::TestCase
9
+ def self.it(description, &block)
10
+ define_method("test_#{ description }", &block)
11
+ end
12
+ end
@@ -0,0 +1,27 @@
1
+ require 'helper'
2
+
3
+ class TestSwansonIpsum < Test::Unit::TestCase
4
+ def test_paragraph
5
+ assert_match /1\+|[ a-z]+/i, Faker::SwansonIpsum.paragraph
6
+ end
7
+
8
+ def test_sentence
9
+ assert_match /1\+|[ a-z]+/i, Faker::SwansonIpsum.sentence
10
+ end
11
+
12
+ def test_paragraphs
13
+ assert_match /1\+|[ a-z]+/i, Faker::SwansonIpsum.paragraphs.join(" ")
14
+ end
15
+
16
+ def test_sentences
17
+ assert_match /1\+|[ a-z]+/i, Faker::SwansonIpsum.sentences.join(" ")
18
+ end
19
+
20
+ def test_words
21
+ assert_match /1\+|[ a-z]+/i, Faker::SwansonIpsum.words.join(" ")
22
+ end
23
+
24
+ def test_word
25
+ assert_match /1\+|[a-z]+/i, Faker::SwansonIpsum.word
26
+ end
27
+ end
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ffakeron
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dirk Kelly
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: ffaker
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
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: rake
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: test-unit
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
+ description: Ron Swanson addition to Faker library
63
+ email:
64
+ - git+dk@dirkkelly.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - .gitignore
70
+ - Gemfile
71
+ - LICENSE.txt
72
+ - README.md
73
+ - Rakefile
74
+ - ffakeron.gemspec
75
+ - lib/ffaker/swanson_ipsum.rb
76
+ - lib/ffakeron.rb
77
+ - lib/ffakeron/version.rb
78
+ - test/helper.rb
79
+ - test/test_swanson_ipsum.rb
80
+ homepage: http://swansonipsum.com
81
+ licenses: []
82
+ post_install_message:
83
+ rdoc_options: []
84
+ require_paths:
85
+ - lib
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ segments:
93
+ - 0
94
+ hash: -2132846410419671989
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ segments:
102
+ - 0
103
+ hash: -2132846410419671989
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 1.8.24
107
+ signing_key:
108
+ specification_version: 3
109
+ summary: Generates dummy data based off Ron Swanson quotes
110
+ test_files:
111
+ - test/helper.rb
112
+ - test/test_swanson_ipsum.rb