hola_wendi 0.0.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.
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ RSpec::Core::RakeTask.new(:spec)
4
+
5
+ task :default => :spec
data/bin/hola ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola'
4
+ puts Hola.hi(ARGV[0])
data/hola.gemspec ADDED
@@ -0,0 +1,12 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'hola_wendi'
3
+ s.version = '0.0.0'
4
+ s.executables << 'hola'
5
+ s.date = '2013-05-22'
6
+ s.summary = "My first gem"
7
+ s.description = "A simple hello world gem"
8
+ s.authors = ["wendi"]
9
+ s.email = 'ifyouseewendy@gmail.com'
10
+ s.files = ["bin/hola", "hola.gemspec", "Rakefile",
11
+ "lib/hola.rb", "lib/hola/translator.rb", "spec/hola_spec.rb"]
12
+ end
@@ -0,0 +1,14 @@
1
+ class Hola::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when 'spanish'
9
+ "hola mundo"
10
+ else
11
+ "hello world"
12
+ end
13
+ end
14
+ end
data/lib/hola.rb ADDED
@@ -0,0 +1,8 @@
1
+ class Hola
2
+ def self.hi(language = :english)
3
+ translator = Translator.new(language)
4
+ translator.hi
5
+ end
6
+ end
7
+
8
+ require 'hola/translator'
data/spec/hola_spec.rb ADDED
@@ -0,0 +1,7 @@
1
+ require 'hola'
2
+
3
+ describe Hola do
4
+ it "should respond to hi" do
5
+ Hola.hi.should == 'hello world'
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hola_wendi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - wendi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-22 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A simple hello world gem
15
+ email: ifyouseewendy@gmail.com
16
+ executables:
17
+ - hola
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - bin/hola
22
+ - hola.gemspec
23
+ - Rakefile
24
+ - lib/hola.rb
25
+ - lib/hola/translator.rb
26
+ - spec/hola_spec.rb
27
+ homepage:
28
+ licenses: []
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ requirements: []
46
+ rubyforge_project:
47
+ rubygems_version: 1.8.24
48
+ signing_key:
49
+ specification_version: 3
50
+ summary: My first gem
51
+ test_files: []
52
+ has_rdoc: