mister_fairy 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 mister_fairy.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Masafumi Yokoyama
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.
@@ -0,0 +1,31 @@
1
+ # MisterFairy
2
+
3
+ a fairy entity
4
+
5
+ 妖精さんが実体化します?
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'mister_fairy'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install mister_fairy
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create new Pull Request
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ Bundler::GemHelper.install_tasks
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task default: :spec
@@ -0,0 +1,7 @@
1
+ require "mister_fairy/version"
2
+ require "mister_fairy/factory"
3
+ require "mister_fairy/fairy"
4
+
5
+ module MisterFairy
6
+ # Your code goes here...
7
+ end
@@ -0,0 +1,12 @@
1
+ module MisterFairy
2
+ class Factory
3
+ class << self
4
+ def create(country="ja")
5
+ case country
6
+ when "ja"
7
+ return Japanese.new
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1 @@
1
+ require 'mister_fairy/japanese'
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+
3
+ module MisterFairy
4
+ class Japanese
5
+ def tweet
6
+ ["だめです?",
7
+ "おちるです?",
8
+ "しんじゃうです?",
9
+ "ふせいです?",
10
+ "へんです?",
11
+ "おかしいです?",
12
+ "さよならです?"].sample
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module MisterFairy
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mister_fairy/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "mister_fairy"
8
+ gem.version = MisterFairy::VERSION
9
+ gem.authors = ["Masafumi Yokoyama"]
10
+ gem.email = ["myokoym@gmail.com"]
11
+ gem.description = %q{It is fairy. So cute.}
12
+ gem.summary = %q{a fairy entity}
13
+ gem.homepage = "https://github.com/myokoym/mister_fairy"
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|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+ end
@@ -0,0 +1,12 @@
1
+ # encoding: utf-8
2
+ require 'mister_fairy'
3
+
4
+ describe MisterFairy do
5
+ describe MisterFairy::Factory do
6
+ context MisterFairy::Japanese do
7
+ it "is tweet" do
8
+ MisterFairy::Factory.create("ja").tweet.should =~ /[ぁ-ゔ]+です?/
9
+ end
10
+ end
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mister_fairy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Masafumi Yokoyama
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-12 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: It is fairy. So cute.
15
+ email:
16
+ - myokoym@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - Gemfile
23
+ - LICENSE.txt
24
+ - README.md
25
+ - Rakefile
26
+ - lib/mister_fairy.rb
27
+ - lib/mister_fairy/factory.rb
28
+ - lib/mister_fairy/fairy.rb
29
+ - lib/mister_fairy/japanese.rb
30
+ - lib/mister_fairy/version.rb
31
+ - mister_fairy.gemspec
32
+ - spec/mister_fairy_spec.rb
33
+ homepage: https://github.com/myokoym/mister_fairy
34
+ licenses: []
35
+ post_install_message:
36
+ rdoc_options: []
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubyforge_project:
53
+ rubygems_version: 1.8.23
54
+ signing_key:
55
+ specification_version: 3
56
+ summary: a fairy entity
57
+ test_files:
58
+ - spec/mister_fairy_spec.rb
59
+ has_rdoc: