birdel 3.2.0 → 3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7f141c3d5be51f76b78a748d5521d24a7f1921e2eb0a6167490c4706a3dd925
4
- data.tar.gz: 510744019aa67d13ced99d9ead12b65e415412c5e19065b68bdb52442e0e9cda
3
+ metadata.gz: c3808af54ae7c333e8b2ecd7b60223654e3f11c6d5103d4dc0e4f86a3ab28678
4
+ data.tar.gz: 62ae9492e2490b43139c809a84900b8efe733509ecd4057622c8e6ffdf266dc0
5
5
  SHA512:
6
- metadata.gz: 45de59d0371824a3d04928e9b29a11c58aeb194389178ec70e7f2baf4d124d8a8f2cb63b928e56d72e6755f723b5b160ad74607a60fe3510966891fcf2e6bbf2
7
- data.tar.gz: f17fd2d63c274875b715ebb1cd0c937d2f17f7190fa31771dbc0b2723a5ac79aeb739f4acfdde073aa9953fbd878ea6fae9a3844f2bbbea357c34c9e34ee3c4f
6
+ metadata.gz: fdc016be7f98c172d4daf314ca34889cab412a7bbeedf9663138a77293cd2e8bf6e23f4541620216c0e5a23fb3169b7689d8f78ccb7847e6edd06e2bc6245107
7
+ data.tar.gz: e653303588521976e0358e1fd41689dae9984b944988162cf15031ac7f5a6b5ad6c8cd5da7c2e2dad33b515a1e6957333238b750bdf9f1075396b22d2691d4c3
data/Gemfile CHANGED
@@ -13,6 +13,4 @@ gem "rubocop", "~> 1.21"
13
13
 
14
14
  gem 'activesupport', '~> 7.0', '>= 7.0.4.3'
15
15
 
16
- gem 'colored', '~> 1.2'
17
-
18
- gem 'thor', '~> 1.2', '>= 1.2.1'
16
+ gem 'colored', '~> 1.2'
@@ -4,26 +4,26 @@ module Birdel
4
4
  def actorThrough(data)
5
5
  actor_name = data.fetch("actor")
6
6
  inputs = data.fetch("inputs")
7
- callback = data.fetch("callback")
7
+ callback = data.fetch("callback", false)
8
8
  required_component = data.fetch("required_component")
9
9
  method = data.fetch("method")
10
10
 
11
11
  actor_string = actor_name.split("__").map{|e| e.camelize}.join("::")
12
- res_name = actor_string << "::#{actor_string.split("::")[-1]}"
13
- actor = res_name.constantize.new()
14
- method_res = actor.public_send(method, inputs, self.current_user)
12
+ res_name = actor_string << "::#{actor_string.split("::")[-1]}"
13
+ actor = res_name.constantize.new()
14
+ method_res = actor.public_send(method, inputs, self.current_user)
15
15
  res = {
16
- "ok": method_res[:ok],
17
- "message": method_res[:message],
16
+ "ok": method_res[:ok],
17
+ "message": method_res[:message],
18
18
  "data": {
19
- "actor": actor_name,
20
- "method": method,
19
+ "actor": actor_name,
20
+ "method": method,
21
21
  "outputs": method_res[:outputs]
22
22
  }
23
23
  }
24
24
  if required_component
25
- component_name = required_component.split('--').map{|i| i.gsub("-", "_").camelize}.join('::') + '::' + required_component.split('--').last.gsub("-", "_").camelize
26
- component = component_name.constantize.new(inputs: method_res[:outputs])
25
+ component_name = required_component.split('--').map{|i| i.gsub("-", "_").camelize}.join('::') + '::' + required_component.split('--').last.gsub("-", "_").camelize
26
+ component = component_name.constantize.new(inputs: method_res[:outputs])
27
27
  res[:data][:html] = ApplicationController.render(component, layout: false)
28
28
  end
29
29
  if callback
@@ -33,7 +33,7 @@ module Birdel
33
33
  if method_res[:resource_id].present?
34
34
  res[:callback][:resourceId] = method_res[:resource_id]
35
35
  else
36
- res[:callback][:resourceId] = callback[:resourceId].present? ? callback[:resourceId] : false
36
+ res[:callback][:resourceId] = callback["resourceId"].present? ? callback["resourceId"] : false
37
37
  end
38
38
  ActionCable.server.broadcast(self.first_stream, res)
39
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Birdel
4
- VERSION = "3.2.0"
4
+ VERSION = "3.3.1"
5
5
  end
metadata CHANGED
@@ -1,17 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: birdel
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
- - Serhii
7
+ - "@serhiijun"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
12
- dependencies: []
13
- description: Send json messages to your actors and get view_components back! Now you
14
- can be sure that your actors are processed correctly.
11
+ date: 2023-08-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: colored
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ description: Ruby/JS actors communication framework for Rails.
15
28
  email:
16
29
  - serhii.jun@gmail.com
17
30
  executables:
@@ -65,5 +78,5 @@ requirements: []
65
78
  rubygems_version: 3.4.6
66
79
  signing_key:
67
80
  specification_version: 4
68
- summary: Make actors great again!
81
+ summary: Birdel actors framework for Rails.
69
82
  test_files: []