lizi 0.1.1 → 0.1.2

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: 201a7232767882171b46a06cc22167673556caaf
4
- data.tar.gz: a78bbec8399bf219c8103f1909ab5e6ce8e6ff38
3
+ metadata.gz: 431d74a1ad2c33442ea5bb6b623d79dbb8847878
4
+ data.tar.gz: f7eb8c6cb30b3ef672281ce856c799140eb19e7c
5
5
  SHA512:
6
- metadata.gz: 2039650960cd1d1a835242b3e66dd2b16b64b2b03d88378fd3206b3bdc82671e93c38fab069f8794f638c40a865fb3daa3927e9ab0d494e95b4030b6c1cc11e0
7
- data.tar.gz: a7241b25257857f94db12a2c05a6b0ebc14aa28fce82c5c81fb3e004f7e19972b472fe0cb045b6bfb097838c4518f7abcac57deb9666aa82045bd5b47ac9952b
6
+ metadata.gz: 31c5023af83adc636f1c5064743c727fb683d505688bbade47ebf7fd76b404a4bb74bd84e2db6507af77a6e14b24953cd5f29c7196363ed827b56eccbfdc9afc
7
+ data.tar.gz: 33f0b115742668a82ee48873632f0fad8f64cfcdf22791a94d4f9a8d70c8260cf27911a24cae06269fe21dbd6b6dd42086a20fc586e171c21d8ab58d0318d232
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /*.gem
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in lizi.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Lizi
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/lizi`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'lizi'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install lizi
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lizi.
36
+
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "lizi"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,16 @@
1
+ module Lizi
2
+ class Translator
3
+
4
+ def initialize(language)
5
+ @language = language
6
+ end
7
+ def hi
8
+ case @language
9
+ when "spanish"
10
+ "hola mundo"
11
+ else
12
+ "hello world!"
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,3 @@
1
+ module Lizi
2
+ VERSION = "0.1.2"
3
+ end
data/lib/lizi.rb ADDED
@@ -0,0 +1,10 @@
1
+ require "lizi/version"
2
+ require 'lizi/translator'
3
+
4
+ module Lizi
5
+ # Your code goes here...
6
+ def self.hello_world(language = "english")
7
+ translator = Translator.new(language)
8
+ translator.hi
9
+ end
10
+ end
data/lizi.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'lizi/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "lizi"
8
+ spec.version = Lizi::VERSION
9
+ spec.authors = ["Shi pengfei"]
10
+ spec.email = ["spfzzz@163.com"]
11
+
12
+ spec.summary = 'learn how to build a gem'
13
+ spec.description = 'This is an example!'
14
+ spec.homepage = 'https://github.com/shipengfei/lizi'
15
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
16
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
17
+ if spec.respond_to?(:metadata)
18
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
19
+ else
20
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
21
+ end
22
+
23
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ spec.bindir = "exe"
25
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ["lib"]
27
+
28
+ spec.add_development_dependency "bundler", "~> 1.12"
29
+ spec.add_development_dependency "rake", "~> 10.0"
30
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lizi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shi pengfei
@@ -44,7 +44,17 @@ email:
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
- files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - README.md
51
+ - Rakefile
52
+ - bin/console
53
+ - bin/setup
54
+ - lib/lizi.rb
55
+ - lib/lizi/translator.rb
56
+ - lib/lizi/version.rb
57
+ - lizi.gemspec
48
58
  homepage: https://github.com/shipengfei/lizi
49
59
  licenses: []
50
60
  metadata: