holapizza 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.
@@ -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
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'holapizza'
4
+ puts Holapizza.hi(ARGV[0])
@@ -0,0 +1,5 @@
1
+ class Holapizza
2
+ def self.hi
3
+ puts "hello pizza"
4
+ end
5
+ end
@@ -0,0 +1,14 @@
1
+ class Holapizza::Translator
2
+ def initialize(language = "english")
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola pizza"
10
+ else
11
+ "hello pizza"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,16 @@
1
+ require 'test/unit'
2
+ require 'holapizza'
3
+
4
+ class HolapizzaTest < Test::Unit::TestCase
5
+ def test_english_hello
6
+ assert_equal "hello world", Holapizza.hi("english")
7
+ end
8
+
9
+ def test_any_hello
10
+ assert_equal "hello pizza", Holapizza.hi("ruby")
11
+ end
12
+
13
+ def test_spanish_hello
14
+ assert_equal "hola pizza", Holapizza.hi("spanish")
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: holapizza
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
+ - Nick Quaranto
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-04-03 00:00:00 Z
19
+ dependencies: []
20
+
21
+ description: A simple hello world gem
22
+ email: nick@quaran.to
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - Rakefile
31
+ - lib/holapizza.rb
32
+ - lib/holapizza/translator.rb
33
+ - bin/holapizza
34
+ - test/test_holapizza.rb
35
+ homepage: http://rubygems.org/gems/holapizza
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.10
65
+ signing_key:
66
+ specification_version: 3
67
+ summary: Holapizza!
68
+ test_files:
69
+ - test/test_holapizza.rb