pleiades 0.1.3 → 0.1.4
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/Gemfile.lock +5 -4
- data/README.md +3 -2
- data/lib/pleiades/core/command/routing/nest_blocks.rb +2 -2
- data/lib/pleiades/core/command/routing/result.rb +3 -1
- data/lib/pleiades/core/command/routing/route_refine.rb +2 -2
- data/lib/pleiades/generators/pleiades/command/templates/command.erb +1 -1
- data/lib/pleiades/generators/pleiades/setup/templates/base_command.rb +6 -5
- data/lib/pleiades/generators/pleiades/setup/templates/command_common.erb +2 -5
- data/lib/pleiades/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32cc602e97cbad7a5daecec690a029710a2b2b3a7c8c3f12b9542ecd0a1ae817
|
4
|
+
data.tar.gz: 1d7c3d3a3c8abc6218ba30f3dd7814f9cd361de0ead4735f7832bf9032dc7664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c17b819b56c0b460695a92897efc79348e3a80ce3fe8068e7b3efa161f7507adb780b96800137d57f3a58d63d972a89d17890dfe8155688ccdd6d1aabb7e4b4
|
7
|
+
data.tar.gz: 037f7b06ac3dfa03f8ab4b6955d3778d85c8dde1fefcf461f8c8b1eb3da2ca9fd0576ffd3a823d109a2540be318199ba6874a693ce67c4ba4b215555e429de2f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pleiades (0.1.
|
4
|
+
pleiades (0.1.3)
|
5
|
+
bundler (~> 2.0)
|
6
|
+
freeezer
|
7
|
+
line-bot-api (~> 1.12.0)
|
5
8
|
|
6
9
|
GEM
|
7
10
|
remote: https://rubygems.org/
|
@@ -53,6 +56,7 @@ GEM
|
|
53
56
|
crass (1.0.5)
|
54
57
|
diff-lcs (1.3)
|
55
58
|
erubi (1.9.0)
|
59
|
+
freeezer (0.1.0)
|
56
60
|
globalid (0.4.2)
|
57
61
|
activesupport (>= 4.2.0)
|
58
62
|
i18n (1.7.0)
|
@@ -133,9 +137,6 @@ PLATFORMS
|
|
133
137
|
ruby
|
134
138
|
|
135
139
|
DEPENDENCIES
|
136
|
-
bundler (~> 2.0)
|
137
|
-
line-bot-api (~> 1.12.0)
|
138
|
-
loofah (>= 2.3.1)
|
139
140
|
pleiades!
|
140
141
|
rails (~> 5.2.3)
|
141
142
|
rake (~> 10.0)
|
data/README.md
CHANGED
@@ -164,9 +164,9 @@ module Pleiades
|
|
164
164
|
break if routers.include?(false)
|
165
165
|
|
166
166
|
arr << nest_routers(routers) { method(method_name).call(arg) }.flatten
|
167
|
-
end
|
167
|
+
end
|
168
168
|
|
169
|
-
nested_options ? nested_options.map(&:options) : false
|
169
|
+
nested_options ? nested_options.last.map(&:options) : false
|
170
170
|
end
|
171
171
|
|
172
172
|
def nest_routers(routers, &proc)
|
@@ -27,7 +27,9 @@ module Pleiades
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def command_path
|
30
|
-
normalize_path(@event_args[:scope], @event_args[:action])
|
30
|
+
path = normalize_path(@event_args[:scope], @event_args[:action])
|
31
|
+
|
32
|
+
path.blank? ? Pleiades::Config.command.default : path
|
31
33
|
end
|
32
34
|
|
33
35
|
def call_method
|
@@ -11,7 +11,7 @@ module Pleiades
|
|
11
11
|
# end
|
12
12
|
#
|
13
13
|
def only_events(*events, &block)
|
14
|
-
return false unless callable_event_type?(events)
|
14
|
+
return false unless callable_event_type?(events.flatten)
|
15
15
|
|
16
16
|
return self unless block_given?
|
17
17
|
|
@@ -27,7 +27,7 @@ module Pleiades
|
|
27
27
|
# end
|
28
28
|
#
|
29
29
|
def talk_type(*talk_types, &block)
|
30
|
-
return false unless callable_talk_type?(talk_types)
|
30
|
+
return false unless callable_talk_type?(talk_types.flatten)
|
31
31
|
|
32
32
|
return self unless block_given?
|
33
33
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
class BaseCommand < Pleiades::Command::BaseCommand
|
2
2
|
def call
|
3
|
-
success!
|
4
3
|
show_event if disp?
|
5
4
|
end
|
6
5
|
|
@@ -11,14 +10,16 @@ class BaseCommand < Pleiades::Command::BaseCommand
|
|
11
10
|
end
|
12
11
|
|
13
12
|
def show_event
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
mes = <<~MES
|
14
|
+
|
15
|
+
|
17
16
|
|------------------------------------|
|
18
17
|
| There is no corresponding command. |
|
19
18
|
|------------------------------------|
|
20
|
-
|
19
|
+
|
21
20
|
event:#{@event.type}
|
22
21
|
MES
|
22
|
+
|
23
|
+
mes.split("\n").each { |m| p m }
|
23
24
|
end
|
24
25
|
end
|
@@ -1,14 +1,11 @@
|
|
1
1
|
module CommandCommon
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
include Pleiades::Client
|
4
|
-
|
5
|
-
included do
|
6
4
|
<% if options['user_related_files'] %>
|
7
|
-
|
5
|
+
included do
|
8
6
|
def current_user
|
9
7
|
@user ||= User.find_by_line_id(@event.source.user_id)
|
10
8
|
end
|
11
|
-
alias_method :user, :current_user
|
12
|
-
<% end %>
|
9
|
+
alias_method :user, :current_user<% end %>
|
13
10
|
end
|
14
11
|
end
|
data/lib/pleiades/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pleiades
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HarukiKubota
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|