pebbles-xmas 0.1.0

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.
@@ -0,0 +1,5 @@
1
+ === 0.1.0 / 2011-12-24
2
+
3
+ * 1 major enhancement
4
+
5
+ * Merry Xmas
@@ -0,0 +1,6 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ bin/xmas
6
+ lib/pebbles/xmas.rb
@@ -0,0 +1,41 @@
1
+ = pebbles-xmas
2
+
3
+ * https://github.com/kwappa/pebbles-xmas
4
+
5
+ == DESCRIPTION:
6
+
7
+ * Merry Xmas
8
+
9
+ == SYNOPSIS:
10
+
11
+ xmas
12
+
13
+ == INSTALL:
14
+
15
+ * gem install pebbles-xmas
16
+
17
+
18
+ == LICENSE:
19
+
20
+ (The MIT License)
21
+
22
+ Copyright (c) 2011 kwappa (SHIOYA, Hiromu)
23
+
24
+ Permission is hereby granted, free of charge, to any person obtaining
25
+ a copy of this software and associated documentation files (the
26
+ 'Software'), to deal in the Software without restriction, including
27
+ without limitation the rights to use, copy, modify, merge, publish,
28
+ distribute, sublicense, and/or sell copies of the Software, and to
29
+ permit persons to whom the Software is furnished to do so, subject to
30
+ the following conditions:
31
+
32
+ The above copyright notice and this permission notice shall be
33
+ included in all copies or substantial portions of the Software.
34
+
35
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
36
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
37
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
38
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
39
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
40
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
41
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,11 @@
1
+ # -*- coding: utf-8 -*-
2
+ # -*- ruby -*-
3
+ Encoding.default_external = Encoding.find("UTF-8")
4
+
5
+ require 'rubygems'
6
+ require 'hoe'
7
+
8
+ Hoe.spec 'pebbles-xmas' do
9
+ developer('SHIOYA, Hiromu', 'kwappa.856@gmail.com')
10
+ extra_deps << ['pebbles', '>= 0']
11
+ end
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.join(File.dirname(File.expand_path(__FILE__)), %w{ .. lib pebbles xmas })
3
+ Pebbles::Xmas.tree ARGV[0].to_i || 20
@@ -0,0 +1,33 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'pebbles'
3
+
4
+ class Pebbles::Xmas
5
+ VERSION = '0.1.0'
6
+
7
+ S = ' ' + [0x2605].pack('U')
8
+ F = [0xff0f].pack('U')
9
+ B = [0xff3c].pack('U')
10
+ O = [0x0069, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
11
+ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
12
+ 0x0020, 0x2E1B, 0x2042, 0x2E2E, 0x0026, 0x0040,
13
+ 0xFF61,].pack('U*').split('')
14
+ OC = [21, 33, 34, 35, 36, 37]
15
+ L = [0x005e].pack('U')
16
+
17
+ def self.tree h = 20
18
+ h = 20 unless h > 0
19
+ puts "\n#{' ' * h}\033[33m#{S}"
20
+ m = h * 2 - 1
21
+ (h - 1).times do |l|
22
+ o = (l + 1) * 2 - 2
23
+ s = (m - o) / 2 + 1
24
+ print "#{' ' * s}\033[32m#{F}"
25
+ o.times { print "\033[#{OC[rand(OC.length)]}m#{O[rand(O.length)]}" }
26
+ puts "\033[32m#{B}"
27
+ end
28
+ print " \033[32m#{L * (h - 1)}| |#{L * (h - 1)}"
29
+ print "\n#{' ' * h}| |#{' ' * (h - 1)}" if h > 10
30
+ puts
31
+ puts "\033[37mHappy Xmas, \033[31mRubyists!"
32
+ end
33
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pebbles-xmas
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - SHIOYA, Hiromu
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-12-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: pebbles
16
+ requirement: &70221256075180 !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: *70221256075180
25
+ - !ruby/object:Gem::Dependency
26
+ name: rdoc
27
+ requirement: &70221256074360 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '3.10'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70221256074360
36
+ - !ruby/object:Gem::Dependency
37
+ name: hoe
38
+ requirement: &70221256073500 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '2.12'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70221256073500
47
+ description: ! '* Merry Xmas'
48
+ email:
49
+ - kwappa.856@gmail.com
50
+ executables:
51
+ - xmas
52
+ extensions: []
53
+ extra_rdoc_files:
54
+ - History.txt
55
+ - Manifest.txt
56
+ - README.txt
57
+ files:
58
+ - History.txt
59
+ - Manifest.txt
60
+ - README.txt
61
+ - Rakefile
62
+ - bin/xmas
63
+ - lib/pebbles/xmas.rb
64
+ homepage: https://github.com/kwappa/pebbles-xmas
65
+ licenses: []
66
+ post_install_message:
67
+ rdoc_options:
68
+ - --main
69
+ - README.txt
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ requirements: []
85
+ rubyforge_project: pebbles-xmas
86
+ rubygems_version: 1.8.10
87
+ signing_key:
88
+ specification_version: 3
89
+ summary: ! '* Merry Xmas'
90
+ test_files: []