string-witchy 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,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in string-witchy.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # string-witchy
2
+
3
+ S†RING EX†ENSION FOR WI†☾HY.
4
+ SEE ΔLSO: http://chillwitchnamemagic.com/
5
+
6
+ ## Example
7
+
8
+ ```ruby
9
+ require 'string-witchy'
10
+ 'String extension for witchy'.witchy
11
+ # => S†RING EX†ENSION FOR WI†☾HY.
12
+ ```
13
+
14
+ ## License
15
+
16
+ Released under the MIT License - Copyright (c) 2012 koyachi
17
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,28 @@
1
+ # -*- coding: utf-8 -*-
2
+ require "string-witchy/version"
3
+
4
+ class String
5
+ module Witchy
6
+ @@TABLE = {
7
+ :A => 'Δ',
8
+ :C => '☾',
9
+ :T => '†',
10
+ }
11
+
12
+ class << self
13
+ def convert(src_text)
14
+ result = src_text.upcase
15
+ @@TABLE.keys.each do |key|
16
+ result = result.gsub(/#{key.to_s}/, @@TABLE[key])
17
+ end
18
+ result
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ class String
25
+ def witchy
26
+ String::Witchy.convert(self)
27
+ end
28
+ end
@@ -0,0 +1,5 @@
1
+ class String
2
+ module Witchy
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,2 @@
1
+ -c
2
+ -fs
@@ -0,0 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ $:.unshift File.dirname(__FILE__)
3
+
4
+ require 'string-witchy'
5
+
6
+ describe String::Witchy do
7
+ before do
8
+ @string = 'total cost'
9
+ end
10
+
11
+ it 'should wichied' do
12
+ @string.witchy.should eql('†O†ΔL ☾OS†')
13
+ end
14
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "string-witchy/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "string-witchy"
7
+ s.version = String::Witchy::VERSION
8
+ s.authors = ["koyachi"]
9
+ s.email = ["rtk2106@gmail.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{S†RING EX†ENSION FOR WI†CHY}
12
+ s.description = %q{S†RING EX†ENSION FOR WI†CHY. SEE ALSO: http://chillwitchnamemagic.com/}
13
+
14
+ s.rubyforge_project = "string-witchy"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_development_dependency "rspec"
22
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: string-witchy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - koyachi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &2151837860 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *2151837860
25
+ description: ! 'S†RING EX†ENSION FOR WI†CHY. SEE ALSO: http://chillwitchnamemagic.com/'
26
+ email:
27
+ - rtk2106@gmail.com
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - README.md
35
+ - Rakefile
36
+ - lib/string-witchy.rb
37
+ - lib/string-witchy/version.rb
38
+ - spec/spec.opts
39
+ - spec/string-witchy_spec.rb
40
+ - string-witchy.gemspec
41
+ homepage: ''
42
+ licenses: []
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project: string-witchy
61
+ rubygems_version: 1.8.11
62
+ signing_key:
63
+ specification_version: 3
64
+ summary: S†RING EX†ENSION FOR WI†CHY
65
+ test_files:
66
+ - spec/spec.opts
67
+ - spec/string-witchy_spec.rb