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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b8022a4bc27211e7fef3326880c967d4ad80c564f3783e52ce93a606f7ca962
4
- data.tar.gz: 04d994257f27de7bc89108369539380cf4cea95b79ec13d7a52ee6b9593f852f
3
+ metadata.gz: 32cc602e97cbad7a5daecec690a029710a2b2b3a7c8c3f12b9542ecd0a1ae817
4
+ data.tar.gz: 1d7c3d3a3c8abc6218ba30f3dd7814f9cd361de0ead4735f7832bf9032dc7664
5
5
  SHA512:
6
- metadata.gz: 5556d2ba1221927d585b4e007067686b3995a7d339581281feb8f9c0be72006b0cfb2e5db8708a09af637a89a690840793a061b8f1f3806d9f37d5239e83f8ca
7
- data.tar.gz: ed4aab7a461816e4b9191a9c3e6a31b3b201cd6b982f0eaa3af7d790247049ad23db216130cda05a7c4d930c5dd54146df05d903a6b7e8979fb6203a16a30698
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.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
@@ -7,12 +7,13 @@ RailsでLINEBotを開発するためのgem。
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
+ # Gemfile
10
11
  gem 'pleiades'
11
12
  ```
12
- $ bundle install
13
+ $ bundle
13
14
 
14
15
  ## Usage
15
- Comming soon.....
16
+ Comming soon...
16
17
 
17
18
  ## Contributing
18
19
 
@@ -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.last
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
 
@@ -3,4 +3,4 @@
3
3
  <%= ' ' * (dirs.size + 1) %>def call
4
4
  <%= ' ' * (dirs.size + 2) %># TODO: write something
5
5
  <% [*0..(dirs.size + 1)].reverse_each do |tab| %><%= ' ' * tab %>end
6
- <% end %>
6
+ <% end %>
@@ -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
- p <<~MES
15
- \n
16
- \n
13
+ mes = <<~MES
14
+
15
+
17
16
  |------------------------------------|
18
17
  | There is no corresponding command. |
19
18
  |------------------------------------|
20
- \n
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
@@ -1,3 +1,3 @@
1
1
  module Pleiades
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.freeze
3
3
  end
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.3
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-13 00:00:00.000000000 Z
11
+ date: 2020-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler