charcoalcms 0.0.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/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+
7
+ desc "Run tests"
8
+ task :default => :test
data/bin/charcoalcms ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'charcoalcms'
4
+ puts CharcoalCms.hi(ARGV[0])
@@ -0,0 +1,16 @@
1
+ class CharcoalCms::Translator
2
+ def initialize(language = "english")
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola mundo"
10
+ when "korean"
11
+ "anyoung ha se yo"
12
+ else
13
+ "hello world"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,8 @@
1
+ class CharcoalCms
2
+ def self.hi(language)
3
+ translator = Translator.new(language)
4
+ translator.hi
5
+ end
6
+ end
7
+
8
+ require 'charcoalcms/translator'
@@ -0,0 +1,16 @@
1
+ require 'test/unit'
2
+ require 'charcoalcms'
3
+
4
+ class CharcoalCmsTest < Test::Unit::TestCase
5
+ def test_english_hello
6
+ assert_equal "hello world", CharcoalCms.hi("english")
7
+ end
8
+
9
+ def test_any_hello
10
+ assert_equal "hello world", CharcoalCms.hi("ruby")
11
+ end
12
+
13
+ def test_spanish_hello
14
+ assert_equal "CharcoalCms mundo", CharcoalCms.hi("spanish")
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: charcoalcms
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Nik | Polikin.ca
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2013-06-10 00:00:00 Z
19
+ dependencies: []
20
+
21
+ description: CharcoalCms GEM
22
+ email: responsiveness@polikin.ca
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - Rakefile
31
+ - lib/charcoalcms.rb
32
+ - lib/charcoalcms/translator.rb
33
+ - bin/charcoalcms
34
+ - test/test_charcoalcms.rb
35
+ homepage: http://rubygems.org/gems/charcoalcms
36
+ licenses: []
37
+
38
+ post_install_message:
39
+ rdoc_options: []
40
+
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ hash: 3
49
+ segments:
50
+ - 0
51
+ version: "0"
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ requirements: []
62
+
63
+ rubyforge_project:
64
+ rubygems_version: 1.8.25
65
+ signing_key:
66
+ specification_version: 3
67
+ summary: charcoalcms!
68
+ test_files:
69
+ - test/test_charcoalcms.rb