hello_world_project 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +2 -0
- data/hello_world_project.gemspec +24 -0
- data/lib/hello_world_project.rb +7 -0
- data/lib/hello_world_project/base.rb +10 -0
- data/lib/hello_world_project/translate.rb +29 -0
- data/lib/hello_world_project/version.rb +3 -0
- metadata +115 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 420c92bed8036bdb678be98be3bcfe47abd60470
|
4
|
+
data.tar.gz: b0144c9bcea92bbeac60abaa0a7d1e12f2d9704c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d0ee81059072607dadc7bba51b9861d9ec0495e35deba43a1fb179f53bd7727a4176aba8ef2d1cc2b5f2b6a713ceec1788fa52090f4ce866de5bced1bebc615d
|
7
|
+
data.tar.gz: 251d15ae75fbe328ad4b262f31921af3e9a3ca8cdcaf78c28b598897c8f6cb788c5475c382e2c81c556805e41db288211968ace96c2e7e8617b228dcdeb1feeb
|
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 elsapet
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# HelloWorldProject
|
2
|
+
|
3
|
+
New to Ruby? New to git? Bewildered by gems and pull requests? Me too! Let's start small together and *say hello to the beautiful world* of Ruby gems and open source technology.
|
4
|
+
|
5
|
+
## How it works
|
6
|
+
|
7
|
+
We want everyone to have the chance to say hello in whichever language they prefer. Have a look at (this class)[https://github.com/elsapet/hello_world_project/blob/master/lib/hello_world_project/translate.rb]. Is your language in the ```SUPPORTED_LANGUAGES``` hash? If not, (add it)[https://github.com/elsapet/hello_world_project#contributing]! If so, is it correct? Can you think of another greeting to add? (Add that one instead)[https://github.com/elsapet/hello_world_project#contributing]!
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'hello_world_project'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install hello_world_project
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
It's easy!
|
30
|
+
|
31
|
+
1. Fork it ( https://github.com/[my-github-username]/hello_world_project/fork )
|
32
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
33
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
34
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
35
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'hello_world_project/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "hello_world_project"
|
8
|
+
spec.version = HelloWorldProject::VERSION
|
9
|
+
spec.authors = ["elsapet"]
|
10
|
+
spec.homepage = "https://github.com/elsapet/hello_world_project"
|
11
|
+
spec.summary = %q{Say hello to the world!}
|
12
|
+
spec.description = %q{A simple Hello World gem (based on rubygems.org introductory tutorial)}
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
|
+
spec.require_paths = ["lib"]
|
17
|
+
|
18
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
19
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
20
|
+
|
21
|
+
# testing
|
22
|
+
spec.add_development_dependency "rspec", "~> 3.2", ">= 3.2.3"
|
23
|
+
spec.add_development_dependency "pry", "~> 0.10.0"
|
24
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module HelloWorldProject
|
2
|
+
class Translate
|
3
|
+
|
4
|
+
SUPPORTED_LANGUAGES = {
|
5
|
+
'dansk' => 'hej verden',
|
6
|
+
'default' => 'hello world',
|
7
|
+
'deutsch' => 'guten tag',
|
8
|
+
'dinosaur' => 'rawr!',
|
9
|
+
'english' => 'hello world',
|
10
|
+
'francais' => 'salut tout le monde',
|
11
|
+
'isixhosa' => 'molweni'
|
12
|
+
}
|
13
|
+
|
14
|
+
attr_accessor :language
|
15
|
+
|
16
|
+
def initialize(language)
|
17
|
+
@language = if SUPPORTED_LANGUAGES.key? language
|
18
|
+
language.downcase
|
19
|
+
else
|
20
|
+
'default'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def say_hello
|
25
|
+
SUPPORTED_LANGUAGES[@language]
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hello_world_project
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- elsapet
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-06-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.9'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.2'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 3.2.3
|
51
|
+
type: :development
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '3.2'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 3.2.3
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: pry
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.10.0
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.10.0
|
75
|
+
description: A simple Hello World gem (based on rubygems.org introductory tutorial)
|
76
|
+
email:
|
77
|
+
executables: []
|
78
|
+
extensions: []
|
79
|
+
extra_rdoc_files: []
|
80
|
+
files:
|
81
|
+
- ".gitignore"
|
82
|
+
- Gemfile
|
83
|
+
- LICENSE.txt
|
84
|
+
- README.md
|
85
|
+
- Rakefile
|
86
|
+
- hello_world_project.gemspec
|
87
|
+
- lib/hello_world_project.rb
|
88
|
+
- lib/hello_world_project/base.rb
|
89
|
+
- lib/hello_world_project/translate.rb
|
90
|
+
- lib/hello_world_project/version.rb
|
91
|
+
homepage: https://github.com/elsapet/hello_world_project
|
92
|
+
licenses:
|
93
|
+
- MIT
|
94
|
+
metadata: {}
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
requirements: []
|
110
|
+
rubyforge_project:
|
111
|
+
rubygems_version: 2.2.1
|
112
|
+
signing_key:
|
113
|
+
specification_version: 4
|
114
|
+
summary: Say hello to the world!
|
115
|
+
test_files: []
|