zashoku 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -4
- data/lib/core/config/config.rb +1 -1
- data/lib/core/item.rb +1 -1
- data/lib/daemon.rb +6 -1
- data/lib/zashoku.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 293949927ade60de5f383df77ee37dec6c24dab1
|
4
|
+
data.tar.gz: eda30013219a99aa1045aec09f90d326b674c517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4be47481a6d80651cb4534152e34515c3c31e69e20d194257080524dd13d53a24c845236c48a6892a113c63a4d73e9f292feedc00d05338fc94828ede23ba54c
|
7
|
+
data.tar.gz: b16bfe03e5cfedf4f9cb4205565eedf821f90d5c7889773ea806afe8ab21aebecd2166ee96c3bcbee44cf3956b136e1d06304d19880e77823b0eac821d6bc56d
|
data/README.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
|
-
|
1
|
+
[m]: https://codeclimate.com/github/zashoku/zashoku/maintainability
|
2
|
+
[mb]: https://api.codeclimate.com/v1/badges/d0b79e115826f30cdc9e/maintainability
|
3
|
+
|
4
|
+
[g]: https://rubygems.org/gems/zashoku
|
5
|
+
[gb]: https://img.shields.io/gem/v/zashoku.svg
|
6
|
+
|
7
|
+
[c]: https://img.shields.io/badge/ざ-しょく-red.svg
|
8
|
+
|
9
|
+
|
10
|
+
# zashoku座食 [![Maintainability][mb]][m] [![Gem Version][gb]][g] ![座食][c]
|
2
11
|
command line application framework
|
12
|
+
![screenshot](img/screenshot.png)
|
3
13
|
|
4
14
|
## features
|
5
15
|
+ good for lazy people
|
@@ -9,17 +19,18 @@ command line application framework
|
|
9
19
|
+ client / server model
|
10
20
|
+ rendering support for asian characters
|
11
21
|
|
12
|
-
##
|
22
|
+
## tutorial
|
13
23
|
#### create new app
|
14
24
|
`zashoku -g app <name>`
|
15
25
|
|
16
26
|
#### create new module
|
17
27
|
`zashoku -g module <name>`
|
18
28
|
|
29
|
+
## example app
|
30
|
+
[hello](examples/hello)
|
19
31
|
|
20
32
|
## installation
|
21
33
|
`gem install zashoku`
|
22
34
|
|
23
35
|
## resources
|
24
|
-
+ [rubydoc.info
|
25
|
-
+ [rubygems.org/gems/zashoku](https://www.rubygems.org/gems/zashoku)
|
36
|
+
+ [rubydoc.info](http://www.rubydoc.info/gems/zashoku/)
|
data/lib/core/config/config.rb
CHANGED
data/lib/core/item.rb
CHANGED
@@ -7,7 +7,7 @@ module Zashoku
|
|
7
7
|
@attributes = attributes
|
8
8
|
keys = []
|
9
9
|
@attr = attributes.map { |k, v|
|
10
|
-
pk = k.chars.map { |c| [c, c.swapcase] }.flatten
|
10
|
+
pk = k.to_s.chars.map { |c| [c, c.swapcase] }.flatten
|
11
11
|
kc = 0
|
12
12
|
kc += 1 while kc < pk.length && keys.include?(pk[kc])
|
13
13
|
keys << pk[kc]
|
data/lib/daemon.rb
CHANGED
@@ -21,7 +21,12 @@ module Zashoku
|
|
21
21
|
Zashoku.logger.debug("command got #{message}")
|
22
22
|
message = message.keys.map(&:to_sym).zip(message.values).to_h
|
23
23
|
|
24
|
-
obj =
|
24
|
+
obj =
|
25
|
+
if controllers.key?(message[:mod]) && controllers[message[:mod]].respond_to?(message[:meth])
|
26
|
+
controllers[message[:mod]].send(message[:meth], *message[:args])
|
27
|
+
else
|
28
|
+
nil
|
29
|
+
end
|
25
30
|
Zashoku::Util.encode_object(obj)
|
26
31
|
end
|
27
32
|
end
|
data/lib/zashoku.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require_relative 'core/options'
|
4
4
|
|
5
5
|
module Zashoku
|
6
|
-
Version = [1, 3,
|
6
|
+
Version = [1, 3, 2].freeze
|
7
7
|
Root = File.expand_path('../', __dir__)
|
8
8
|
|
9
9
|
AppRoot = Root unless const_defined?(:AppRoot)
|
@@ -11,7 +11,7 @@ module Zashoku
|
|
11
11
|
ViewerModules = [] unless const_defined?(:ViewerModules)
|
12
12
|
DaemonModules = [] unless const_defined?(:DaemonModules)
|
13
13
|
Host = 'localhost' unless const_defined?(:Host)
|
14
|
-
Port =
|
14
|
+
Port = 26_119 unless const_defined?(:Port)
|
15
15
|
|
16
16
|
LoadPaths = [
|
17
17
|
File.join(Zashoku::AppRoot, 'modules')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zashoku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- annacrombie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|