bone_hola 0.0.3 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1164459d1dae3a5afb0e82e30292fce44afd32b
4
- data.tar.gz: da06a40062689a1d8be03701244d3e2569493cc0
3
+ metadata.gz: 913c7a70ef9c6b61c30db3b761e4c5747facff8e
4
+ data.tar.gz: 0d7c45273d02c1c55817a974ff534cb9891b672f
5
5
  SHA512:
6
- metadata.gz: cedd488480855d5ee931b9a61ccf7dd12618ded8c8b2530cc01f45e83529a33784f5231caf495237621c560e1b40416a626aabfe6b96c9848ee9e3fd7b2fc54d
7
- data.tar.gz: 94f3ec49d08809b4b9a3781d1b258aac53e65d0b26d5f9a9e887daddb9fdd87ee83d97c3530d25a2158aa9e4e986b6339a4e4df3e1dc86d03e1b62198e716b79
6
+ metadata.gz: c3ae7a677e700791b2723562c08dd3deafc4de1016ccb363a004a4e2ff571185f15018bf581ee91dddcdac6273e4a96771760d25253076a543670404f550398e
7
+ data.tar.gz: 653c009e0e623b036cf0602da43bb9243d9e266056e1bbda08322937eb0f846ff4a2041ca9cbacd7874565aa516a99322329afd9e60d59d242d6e41c83df95c1
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,31 +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
- TODO: Write usage instructions here
24
-
25
- ## Contributing
26
-
27
- 1. Fork it ( https://github.com/ietjxdl/bone_hola/fork )
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 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.length == 0? 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,16 +1,19 @@
1
- class BoneHola::Translator
2
- def initialize(language)
3
- @language = language
4
- end
5
-
6
- def hi
7
- case @language
8
- when "english"
9
- "Hello World!"
10
- when "spanish"
11
- "hola mundo!"
12
- else
13
- "你好,世界!"
14
- end
15
- end
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
16
19
  end
@@ -1,3 +1,3 @@
1
- module BoneHola
2
- VERSION = "0.0.3"
3
- end
1
+ module BoneHola
2
+ VERSION = "0.0.5"
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
- # Your code goes here...
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_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
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.3
4
+ version: 0.0.5
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-07 00:00:00.000000000 Z
11
+ date: 2015-05-08 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.5
94
+ rubygems_version: 2.4.6
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: My first gem.