yan 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6355bd5c17b49560f02d160a4a2f356b05405066
4
+ data.tar.gz: a29d4282a52497593ae1de37a83c020bf526faea
5
+ SHA512:
6
+ metadata.gz: dd443df857a3e37e52a85fd8891d954a1c4517d9138308e34e51285c36630d7acc52b80c8d8f85772cdfcacb1fb60b5eec9536ec7249c90203eda61369b07c21
7
+ data.tar.gz: 77264498db0effe955694d45d188cfa8a4808e668c8260c639013b6ef40877ab02947f7df4205750c4f773d9e78cf1b8efbc97eb47e3aec6e00256b6416ef902
data/.gitignore ADDED
@@ -0,0 +1,22 @@
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
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in yan.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Phil Crissman
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,33 @@
1
+ # Yan
2
+
3
+ `yan` is a little gem to return a quote from the seminal Chinese-Canadian cooking programme, [_Wok With Yan_](http://en.wikipedia.org/wiki/Wok_with_Yan).
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'yan'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install yan
18
+
19
+ ## Usage
20
+
21
+ `yan` comes with an executable which you can just run to get a quote on the commandline. Alternately, you can include the gem and get a quote with:
22
+
23
+ ```
24
+ Yan::Quote.run
25
+ ```
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it ( https://github.com/[my-github-username]/yan/fork )
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new do |test|
5
+ test.test_files = FileList['test/*_test.rb','test/*_spec.rb']
6
+ end
7
+
8
+ task :default => :test
data/bin/yan ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'yan'
4
+
5
+ puts Yan::Quote.run
@@ -0,0 +1,3 @@
1
+ module Yan
2
+ VERSION = "0.0.1"
3
+ end
data/lib/yan.rb ADDED
@@ -0,0 +1,55 @@
1
+ require "yan/version"
2
+ require 'singleton'
3
+
4
+ # This is a pretty simple gem. All the code will be namespaced under Yan
5
+ module Yan
6
+
7
+ # The Quote class will be a singleton. When it gets a `run` message,
8
+ # it will return a pun from a Stephen Yan _Wok With Yan_ apron.
9
+ class Quote
10
+ include Singleton
11
+
12
+ PUNS = [
13
+ "Wok the heck",
14
+ "Wok goes in, must come out",
15
+ "Wok and roll",
16
+ "Wok-a-doodle-doo",
17
+ "101 ways to wok your dog",
18
+ "Wok this way",
19
+ "Danger, men at wok",
20
+ "Wok around the clock",
21
+ "You are wok you eat",
22
+ "Wok goes up must come down",
23
+ "Wok's new, Pussycat?",
24
+ "Raiders of the lost wok",
25
+ "Mook Wok",
26
+ "Jailhouse Wok",
27
+ "Over wok, under pay",
28
+ "Wokking my baby back home",
29
+ "Wokkey night in Canada",
30
+ "Stuck between a wok and a hard place",
31
+ "Eat your wok out",
32
+ "Superior wokmanship",
33
+ "Wok on the moon",
34
+ "Wok on the wild side",
35
+ "All wokked up",
36
+ "Wok's next",
37
+ "Wok up a storm",
38
+ "Wok-a my baby",
39
+ "The Whacky Wokker",
40
+ ]
41
+
42
+ # Class method to make an instance of quote and run it.
43
+ def self.run
44
+ quote = new
45
+
46
+ quote.run
47
+ end
48
+
49
+ # Actually returns the pun
50
+ def run
51
+ # Array#shuffle randomly shuffles an Array's elements in place.
52
+ Yan::Quote::PUNS.shuffle.first
53
+ end
54
+ end
55
+ end
data/test/yan_test.rb ADDED
@@ -0,0 +1,11 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/spec'
3
+
4
+ require 'yan'
5
+
6
+ describe Yan do
7
+ it "should return a wok pun" do
8
+ pun = Yan::Quote.run
9
+ Yan::Quote::PUNS.must_include pun
10
+ end
11
+ end
data/yan.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'yan/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "yan"
8
+ spec.version = Yan::VERSION
9
+ spec.authors = ["Phil Crissman"]
10
+ spec.email = ["phil.crissman@gmail.com"]
11
+ spec.summary = %q{Return a Stephen Yan Wok pun}
12
+ spec.description = %q{Return a pun from one of Stephen Yan's aprons from the seminal Chinese-Canadian cooking program, _Wok With Yan_}
13
+ spec.homepage = "https://github.com/philcrissman/yan"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "minitest"
24
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yan
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Phil Crissman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Return a pun from one of Stephen Yan's aprons from the seminal Chinese-Canadian
56
+ cooking program, _Wok With Yan_
57
+ email:
58
+ - phil.crissman@gmail.com
59
+ executables:
60
+ - yan
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - .gitignore
65
+ - Gemfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - bin/yan
70
+ - lib/yan.rb
71
+ - lib/yan/version.rb
72
+ - test/yan_test.rb
73
+ - yan.gemspec
74
+ homepage: https://github.com/philcrissman/yan
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.3.0
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: Return a Stephen Yan Wok pun
98
+ test_files:
99
+ - test/yan_test.rb