pebbles-soreyuke 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -15,3 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+
19
+ .DS_Store
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Pebbles::Soreyuke
2
2
 
3
- TODO: Write a gem description
3
+ ![screen shot](http://cdn-ak.f.st-hatena.com/images/fotolife/f/fukayatsu/20120606/20120606020456.png)
4
+ http://fukayatsu.hateblo.jp/entry/2012/06/06/020616
4
5
 
5
6
  ## Installation
6
7
 
data/bin/soreyuke CHANGED
@@ -1,12 +1,27 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
- msg = ARGV[0] || "I am APM!"
4
- print <<"EOS"
5
- ___
6
- / \ ________
7
- / ∧ ∧ \ /
8
- | ・ ・ | < #{msg}
9
- | )●( | \________
10
- \ ー ノ
11
- \____/
12
- EOS
3
+
4
+ require "pebbles-soreyuke"
5
+ require 'optparse'
6
+
7
+ Soreyuke = Pebbles::Soreyuke
8
+ Version = Soreyuke::VERSION
9
+
10
+ OPTS = {}
11
+ opt = OptionParser.new
12
+
13
+ opt.on('-c NAME', '--character=NAME', '(apm|cpm|spm)') { |name|
14
+ OPTS[:character] = name
15
+ }
16
+ opt.on('-m MESSAGE', '--message=MESSAGE', 'option') { |message|
17
+ OPTS[:message] = message
18
+ }
19
+
20
+ opt.parse!(ARGV)
21
+
22
+ if OPTS.size == 0
23
+ print opt.help
24
+ exit
25
+ end
26
+
27
+ print Soreyuke::AA(OPTS[:character], OPTS[:message])
@@ -1,5 +1,5 @@
1
1
  module Pebbles
2
2
  module Soreyuke
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -1,7 +1,60 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "pebbles-soreyuke/version"
2
3
 
3
4
  module Pebbles
4
5
  module Soreyuke
5
- # Your code goes here...
6
+
7
+ module_function
8
+
9
+ def AA(caracter, text)
10
+ case caracter
11
+ when 'apm'
12
+ apm(text)
13
+ when 'cpm'
14
+ cpm(text)
15
+ when 'spm'
16
+ spm(text)
17
+ end
18
+ end
19
+
20
+ def apm(text = nil)
21
+ text ||= "I am APM!"
22
+ <<"EOS"
23
+ ___
24
+ / \ ________
25
+ / ∧ ∧ \ /
26
+ | ・ ・ | < #{text}
27
+ | )●( | \________
28
+ \ ー ノ
29
+ \____/
30
+ EOS
31
+ end
32
+
33
+ def cpm(text = nil)
34
+ text || "I am CPM!"
35
+ <<"EOS"
36
+ __ヘ_ヘ_ ________
37
+ /∴∵(・) (・)∴\ /
38
+ /∴∵∴∵ ○ ∴∵ ヽ < #{text}
39
+ (∵∴∵ ●~~~● ∴ ) \________
40
+ \∵∴∵∴∵∴∵ /
41
+ \∵∴∵∴ /
42
+ EOS
43
+ end
44
+
45
+ def spm(text = nil)
46
+ text || "I am SPM!"
47
+ <<"EOS"
48
+ ____
49
+ / \
50
+ ( ) ________
51
+ \ ∧ ∧ | /
52
+ | ・ ・ | <  #{text}
53
+ | ○ || ○. | \________
54
+ | 凵 |
55
+ | ー |
56
+ |______|
57
+ EOS
58
+ end
6
59
  end
7
60
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebbles-soreyuke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-05 00:00:00.000000000 Z
12
+ date: 2012-12-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: print some charactors and messages
15
15
  email:
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  version: '0'
49
49
  requirements: []
50
50
  rubyforge_project:
51
- rubygems_version: 1.8.22
51
+ rubygems_version: 1.8.24
52
52
  signing_key:
53
53
  specification_version: 3
54
54
  summary: a joke gem. let's SOREYUKE XXX-man!