lizi 0.1.3 → 0.1.3.1
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 +4 -4
- data/lib/lizi.rb +29 -0
- data/lib/lizi/my_railtle.rb +7 -0
- data/lib/lizi/version.rb +1 -1
- data/lizi.gemspec +5 -0
- metadata +44 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e66fb3d266e9f06003930e81d07bef708660511
|
|
4
|
+
data.tar.gz: 47837526adb16dfa3bcae323e74bac6503124f88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f01ebd042ed5534e1ad0054c4a35ba7c6389986e6a053cb49073ac4f122714d44258b97fda135a21542612964008c9b38b477335ad34dbc910b9a8a79ec9efa
|
|
7
|
+
data.tar.gz: b5e793224b5d96db0016fa8bce817bf83a21c275b5da9a2d13286aa2ff61476e361baa998b3e0f842e267d205d16793dd273c6b320aaa57c7102b9e6a19f31c9
|
data/lib/lizi.rb
CHANGED
|
@@ -1,7 +1,36 @@
|
|
|
1
1
|
require "lizi/version"
|
|
2
2
|
require 'lizi/translator'
|
|
3
|
+
require 'active_support/configurable'
|
|
4
|
+
# require 'rails'
|
|
5
|
+
require 'lizi/my_railtle' if defined?(Rails)
|
|
6
|
+
|
|
3
7
|
|
|
4
8
|
module Lizi
|
|
9
|
+
|
|
10
|
+
class Configuration
|
|
11
|
+
include ActiveSupport::Configurable
|
|
12
|
+
config_accessor :name
|
|
13
|
+
config_accessor :email
|
|
14
|
+
# configure do |config|
|
|
15
|
+
# self.config.name = "spf"
|
|
16
|
+
# self.config.email = "spfzzz@163.com"
|
|
17
|
+
# end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.configure(&block)
|
|
22
|
+
yield @config ||= Configuration.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.config
|
|
26
|
+
@config
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
configure do |config|
|
|
30
|
+
config.name = "spf"
|
|
31
|
+
config.email = "spfzzz@163.com"
|
|
32
|
+
end
|
|
33
|
+
|
|
5
34
|
# Your code goes here...
|
|
6
35
|
def self.hello_world(language = "english")
|
|
7
36
|
translator = Translator.new(language)
|
data/lib/lizi/version.rb
CHANGED
data/lizi.gemspec
CHANGED
|
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.version = Lizi::VERSION
|
|
9
9
|
spec.authors = ["Shi pengfei"]
|
|
10
10
|
spec.email = ["spfzzz@163.com"]
|
|
11
|
+
spec.licenses = ['MIT']
|
|
11
12
|
|
|
12
13
|
spec.summary = 'learn how to build a gem'
|
|
13
14
|
spec.description = 'This is an example!'
|
|
@@ -25,6 +26,10 @@ Gem::Specification.new do |spec|
|
|
|
25
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
26
27
|
spec.require_paths = ["lib"]
|
|
27
28
|
|
|
29
|
+
spec.add_runtime_dependency 'activesupport', '~> 5.0.0', '>= 4.0.0'
|
|
30
|
+
|
|
28
31
|
spec.add_development_dependency "bundler", "~> 1.12"
|
|
29
32
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
33
|
+
spec.add_development_dependency "rails", "~> 5.0.0", '>= 4.0.0'
|
|
34
|
+
|
|
30
35
|
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.3
|
|
4
|
+
version: 0.1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shi pengfei
|
|
@@ -10,6 +10,26 @@ bindir: exe
|
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2016-07-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: activesupport
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 5.0.0
|
|
20
|
+
- - ">="
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 4.0.0
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - "~>"
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 5.0.0
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 4.0.0
|
|
13
33
|
- !ruby/object:Gem::Dependency
|
|
14
34
|
name: bundler
|
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -38,6 +58,26 @@ dependencies:
|
|
|
38
58
|
- - "~>"
|
|
39
59
|
- !ruby/object:Gem::Version
|
|
40
60
|
version: '10.0'
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: rails
|
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: 5.0.0
|
|
68
|
+
- - ">="
|
|
69
|
+
- !ruby/object:Gem::Version
|
|
70
|
+
version: 4.0.0
|
|
71
|
+
type: :development
|
|
72
|
+
prerelease: false
|
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
74
|
+
requirements:
|
|
75
|
+
- - "~>"
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: 5.0.0
|
|
78
|
+
- - ">="
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: 4.0.0
|
|
41
81
|
description: This is an example!
|
|
42
82
|
email:
|
|
43
83
|
- spfzzz@163.com
|
|
@@ -53,11 +93,13 @@ files:
|
|
|
53
93
|
- bin/lizi
|
|
54
94
|
- bin/setup
|
|
55
95
|
- lib/lizi.rb
|
|
96
|
+
- lib/lizi/my_railtle.rb
|
|
56
97
|
- lib/lizi/translator.rb
|
|
57
98
|
- lib/lizi/version.rb
|
|
58
99
|
- lizi.gemspec
|
|
59
100
|
homepage: https://github.com/shipengfei/lizi
|
|
60
|
-
licenses:
|
|
101
|
+
licenses:
|
|
102
|
+
- MIT
|
|
61
103
|
metadata:
|
|
62
104
|
allowed_push_host: https://rubygems.org
|
|
63
105
|
post_install_message:
|