salve 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.
- checksums.yaml +7 -0
- data/Rakefile +8 -0
- data/bin/salve +4 -0
- data/lib/rubygems_plugin.rb +13 -0
- data/lib/salve/translator.rb +18 -0
- data/lib/salve.rb +8 -0
- data/test/test_salve.rb +16 -0
- metadata +48 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 30551110b78041ae4b9f73cccbbf73e7d7ba482aa401abc61fc58443bb7f333f
|
|
4
|
+
data.tar.gz: be085577976e1e981a8da42e4b25a1219ec935a81c4659f3e39fa8b1bf8fbbcd
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b91b0e85974fe3ce8d0780aad9b0951344934287abaa27829cde6a87245d43c113aac60697862411fd2543abf8a1609d6c3d8ada53de3f518d07a6fb062f4f77
|
|
7
|
+
data.tar.gz: 45b6d99aae31c34a0c349b43d18bfc52342d0688850750416fd2f5b97f5806b7bbf8e3445b3ac951d72c34af107e07250ccf12dc9ac132b2edf3b00b49fe91b4
|
data/Rakefile
ADDED
data/bin/salve
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Gem.pre_install do
|
|
2
|
+
puts "========================================"
|
|
3
|
+
puts " PLUGIN INSTALLING "
|
|
4
|
+
puts "========================================"
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
Gem.post_install do
|
|
8
|
+
puts "========================================"
|
|
9
|
+
puts " PLUGIN INSTALLED "
|
|
10
|
+
puts "========================================"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
class Salve::Translator
|
|
2
|
+
def initialize(language = "english")
|
|
3
|
+
@language = language
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def hi
|
|
7
|
+
case @language
|
|
8
|
+
when "latin"
|
|
9
|
+
"salve munde"
|
|
10
|
+
when "spanish"
|
|
11
|
+
"hola mundo"
|
|
12
|
+
when "korean"
|
|
13
|
+
"anyoung ha se yo"
|
|
14
|
+
else
|
|
15
|
+
"hello world"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
data/lib/salve.rb
ADDED
data/test/test_salve.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'test/unit'
|
|
2
|
+
require 'salve'
|
|
3
|
+
|
|
4
|
+
class SalveTest < Test::Unit::TestCase
|
|
5
|
+
def test_english_hello
|
|
6
|
+
assert_equal "hello world", Salve.hi("english")
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def test_any_hello
|
|
10
|
+
assert_equal "hello world", Salve.hi("ruby")
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def test_latin_hello
|
|
14
|
+
assert_equal "salve munde", Salve.hi("latin")
|
|
15
|
+
end
|
|
16
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: salve
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- eric_phylum
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2010-04-03 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: A simple hello world gem
|
|
14
|
+
email: eric@phylum.io
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- Rakefile
|
|
20
|
+
- bin/salve
|
|
21
|
+
- lib/rubygems_plugin.rb
|
|
22
|
+
- lib/salve.rb
|
|
23
|
+
- lib/salve/translator.rb
|
|
24
|
+
- test/test_salve.rb
|
|
25
|
+
homepage: http://rubygems.org/gems/salve
|
|
26
|
+
licenses: []
|
|
27
|
+
metadata: {}
|
|
28
|
+
post_install_message:
|
|
29
|
+
rdoc_options: []
|
|
30
|
+
require_paths:
|
|
31
|
+
- lib
|
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
33
|
+
requirements:
|
|
34
|
+
- - ">="
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '0'
|
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
|
+
requirements:
|
|
39
|
+
- - ">="
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '0'
|
|
42
|
+
requirements: []
|
|
43
|
+
rubygems_version: 3.3.7
|
|
44
|
+
signing_key:
|
|
45
|
+
specification_version: 3
|
|
46
|
+
summary: Hola!
|
|
47
|
+
test_files:
|
|
48
|
+
- test/test_salve.rb
|