bone_hola 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 913c7a70ef9c6b61c30db3b761e4c5747facff8e
4
- data.tar.gz: 0d7c45273d02c1c55817a974ff534cb9891b672f
3
+ metadata.gz: ce55007f8db243b23b894e39a774d09953fc5266
4
+ data.tar.gz: ac6948477a42b3b64f0fdb6f47bd02bcd9ef5fa3
5
5
  SHA512:
6
- metadata.gz: c3ae7a677e700791b2723562c08dd3deafc4de1016ccb363a004a4e2ff571185f15018bf581ee91dddcdac6273e4a96771760d25253076a543670404f550398e
7
- data.tar.gz: 653c009e0e623b036cf0602da43bb9243d9e266056e1bbda08322937eb0f846ff4a2041ca9cbacd7874565aa516a99322329afd9e60d59d242d6e41c83df95c1
6
+ metadata.gz: 54ac541f0bc59391fe5c0f6b008c24622aaca01e9ca8dd89704d13c3c688465b0f4b8196eed05e2c5523cd6fde90d1d1d0f9a46ef89f257f1908c53ed3f43219
7
+ data.tar.gz: e8bb9070aead04a2aa5860af1cb8aef6e99907b4e104be94040b771b42475f67915b4a333589d2912036d36171b89ee7318af09a9d2a4296d74cbc7c9fc1e130
data/.gitignore CHANGED
@@ -1,17 +1,17 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /.idea/
11
- *.bundle
12
- *.so
13
- *.o
14
- *.a
15
- *.gem
16
- mkmf.log
17
-
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /.idea/
11
+ *.bundle
12
+ *.so
13
+ *.o
14
+ *.a
15
+ *.gem
16
+ mkmf.log
17
+
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in bone_hola.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bone_hola.gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2015 xiao_dli
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.
1
+ Copyright (c) 2015 xiao_dli
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 CHANGED
@@ -1,33 +1,33 @@
1
- # BoneHola
2
-
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'bone_hola'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install bone_hola
20
-
21
- ## Usage
22
-
23
- $ bone_hola
24
- $ bone_hola english
25
- $ bone_hola spanish
26
-
27
- ## Contributing
28
-
29
- 1. Fork it ( https://github.com/ietjxdl/bone_hola/fork )
30
- 2. Create your feature branch (`git checkout -b my-new-feature`)
31
- 3. Commit your changes (`git commit -am 'Add some feature'`)
32
- 4. Push to the branch (`git push origin my-new-feature`)
33
- 5. Create a new Pull Request
1
+ # BoneHola
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'bone_hola'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install bone_hola
20
+
21
+ ## Usage
22
+
23
+ $ bone_hola
24
+ $ bone_hola english
25
+ $ bone_hola spanish
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it ( https://github.com/ietjxdl/bone_hola/fork )
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create a new Pull Request
data/Rakefile CHANGED
@@ -1,9 +1,9 @@
1
- require "rake/testtask"
2
-
3
- Rake::TestTask.new do |t|
4
- t.libs << 'test'
5
- end
6
-
7
- desc "Run hola tests"
8
- task :default=>:test
9
-
1
+ require "rake/testtask"
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+
7
+ desc "Run hola tests"
8
+ task :default=>:test
9
+
data/bin/bone_hola CHANGED
@@ -1,5 +1,5 @@
1
- #! /usr/bin/env ruby
2
-
3
- require 'bone_hola'
4
- language = ARGV.length == 0? nil : ARGV[0]
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'bone_hola'
4
+ language = ARGV.empty?? nil : ARGV[0]
5
5
  puts(BoneHola.hi(language))
data/bone_hola.gemspec CHANGED
@@ -1,25 +1,25 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'bone_hola/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "bone_hola"
8
- spec.version = BoneHola::VERSION
9
- spec.authors = ["xiao_dli"]
10
- spec.email = ["ietjxdl@gmail.com"]
11
- spec.summary = %q{My first gem.}
12
- spec.description = %q{Support Chinese's hola.}
13
- spec.homepage = "http://rubygems.org/gems/bone_hola"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.7"
22
- spec.add_development_dependency "rake", "~> 10.0"
23
- spec.add_development_dependency "test-unit", "~> 0"
24
-
25
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'bone_hola/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "bone_hola"
8
+ spec.version = BoneHola::VERSION
9
+ spec.authors = ["xiao_dli"]
10
+ spec.email = ["ietjxdl@gmail.com"]
11
+ spec.summary = %q{My first gem.}
12
+ spec.description = %q{Support Chinese's hola.}
13
+ spec.homepage = "http://rubygems.org/gems/bone_hola"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "test-unit", "~> 0"
24
+
25
+ end
@@ -1,19 +1,24 @@
1
- # translater content by language
2
- class BoneHola::Translator
3
- # init say language
4
- def initialize(language)
5
- @language = language
6
- end
7
-
8
- # Say hi to the world through tree languanges
9
- def hi
10
- case @language
11
- when "english"
12
- "Hello World!"
13
- when "spanish"
14
- "hola mundo!"
15
- else
16
- "你好,世界!"
17
- end
18
- end
19
- end
1
+ # translater content by language
2
+ module BoneHola
3
+ class Translator
4
+ attr_accessor :language
5
+ private :language, :language=
6
+
7
+ # init say language
8
+ def initialize(language)
9
+ self.language = language
10
+ end
11
+
12
+ # Say hi to the world through tree languanges
13
+ def hi
14
+ case language
15
+ when "english"
16
+ "Hello World!"
17
+ when "spanish"
18
+ "hola mundo!"
19
+ else
20
+ "你好,世界!"
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,3 @@
1
- module BoneHola
2
- VERSION = "0.0.5"
3
- end
1
+ module BoneHola
2
+ VERSION = "0.1.0"
3
+ end
data/lib/bone_hola.rb CHANGED
@@ -1,10 +1,10 @@
1
- require "bone_hola/version"
2
- require "bone_hola/translator"
3
-
4
- module BoneHola
5
- # Say hi to the world!.
6
- def self.hi(language = nil)
7
- translator = Translator.new(language)
8
- translator.hi
9
- end
10
- end
1
+ require "bone_hola/version"
2
+ require "bone_hola/translator"
3
+
4
+ module BoneHola
5
+ # Say hi to the world!.
6
+ def self.hi(language = nil)
7
+ translator = Translator.new(language)
8
+ translator.hi
9
+ end
10
+ end
data/test/test_hola.rb CHANGED
@@ -1,16 +1,16 @@
1
- require 'test/unit'
2
- require 'bone_hola'
3
-
4
- class BoneHolaTest < Test::Unit::TestCase
5
- def test_chinese_hola
6
- assert_equal("你好,世界!", BoneHola.hi())
7
- end
8
-
9
- def test_spanish_hola
10
- assert_equal("hola mundo!", BoneHola.hi("spanish"))
11
- end
12
-
13
- def test_other_hola
14
- assert_equal("Hello World!", BoneHola.hi("english"))
15
- end
1
+ require 'test/unit'
2
+ require 'bone_hola'
3
+
4
+ class BoneHolaTest < Test::Unit::TestCase
5
+ def test_default_or_other_hola
6
+ assert_equal("你好,世界!", BoneHola.hi())
7
+ end
8
+
9
+ def test_spanish_hola
10
+ assert_equal("hola mundo!", BoneHola.hi("spanish"))
11
+ end
12
+
13
+ def test_other_hola
14
+ assert_equal("Hello World!", BoneHola.hi("english"))
15
+ end
16
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bone_hola
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - xiao_dli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.4.6
94
+ rubygems_version: 2.4.8
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: My first gem.