birdel 3.4.1 → 3.6.0

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: 86ae975123ab07548564d7e98655794af6c7d086a854c3bcc22afb5953a26393
4
- data.tar.gz: 7eb5f7e8b9aa1c2288fe741c3907d331b606836b84edb5cee3a583d5eefabb9d
3
+ metadata.gz: 3f0e1f6ed63d219765fa3de0d984992060126c272a714fea2fc506d861019812
4
+ data.tar.gz: fea5d4f1bf20ad84cf2b327b04c58b422513de731260ade1e52624b75be7c188
5
5
  SHA512:
6
- metadata.gz: 9c7681c8005fd8b4fdb4a538e7ba3337815ac2563e5865220145a108087f191b639f1820acbc398c6671e95bfa0db02279375cac74920f9df54242b578b12c96
7
- data.tar.gz: 1df8fa511d0149d5f98def5dbdbf57095238097600b9991daa82410d4d9cc69c1f8e740444ccffb04f20ca8eb74e28d609e806363c30446f5853fdf17d0e83d0
6
+ metadata.gz: 9d71dc9cdbe5de2259c940d5babdc0453e220d81a974d683b86338ac1651a9aae8efba0ed2af07c1bbfdeff6d0d5cacaaea38d25ac7cd43ba8035b5a866228c1
7
+ data.tar.gz: accbc46370f8b86504b9fbd731c2304f1eaa02053ef194359beb03cd594a5afbcb34d7afc4cbe7487c9fba1c2133cd779833aaf773ad2faf6ff7e09af49ff316
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- birdel (3.4.0)
4
+ birdel (3.4.1)
5
5
  colored (~> 1.2)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -14,19 +14,20 @@ $ birdel synth
14
14
  ```
15
15
  Send request
16
16
  ```js
17
- window.Birdel.actor("ui__angry_cat_actor")
18
- .method("get_article")
19
- .required_component("ui--mix--article-component") // or false
20
- .inputs({
17
+ window.Birdel.send({
18
+ actor: "ui__angry_cat_actor",
19
+ method: "get_article",
20
+ required_component: "ui--mix--article-component", // or false
21
+ inputs: {
21
22
  articleId: 69
22
- })
23
- .callback({
23
+ },
24
+ callback: {
24
25
  "component": "ui--entries--home-component",
25
26
  "actor": "home-component-actor",
26
27
  "method": "showArticle",
27
- "resource_id": false //or ID of your actor
28
- })
29
- .send()
28
+ "resourceId": false //or ID of your actor
29
+ } // or false
30
+ })
30
31
  ```
31
32
 
32
33
  Full documentation is not ready and will be at https://digitalthing.io/docs/birdel, well, sorry😄
@@ -1,7 +1,7 @@
1
1
  module Birdel
2
2
  module Component
3
3
  def css_class
4
- self.class.name.underscore.gsub('_', '-').gsub('/', '--').split('--')[0..-2].join('--')
4
+ @css_class ||= self.class.name.underscore.gsub('_', '-').gsub('/', '--').split('--')[0..-2].join('--')
5
5
  end
6
6
  end
7
7
  end
@@ -10,7 +10,7 @@ module Birdel
10
10
 
11
11
  actor_string = actor_name.split("__").map{|e| e.camelize}.join("::")
12
12
  res_name = actor_string << "::#{actor_string.split("::")[-1]}"
13
- actor = if res_name.constantize.ancestors.include?(Birdel::BaseActor)
13
+ actor = if res_name.constantize.ancestors.include?(Birdel::Base::BaseActor)
14
14
  res_name.constantize.new(current_user: self.current_user)
15
15
  else
16
16
  res_name.constantize.new
@@ -75,11 +75,12 @@ module Birdel
75
75
  component_controller_path = components_folder_path.join("#{controller_from_components}.js")
76
76
  if component_controller_path.exist?
77
77
  component_path_dashed = component_path.tr("_", "-").gsub("/", "--")
78
- camelized_component_name = component_name.split("_").map(&:capitalize).join
78
+ # camelized_component_name = component_name.split("_").map(&:capitalize).join
79
+ rand_name = "_#{rand(36**8).to_s(36)}"
79
80
  controller_backpath = component_controller_path.relative_path_from(entry_folder_path)
80
81
  controller_backpath_without_ext = controller_backpath.to_s.gsub(controller_backpath.extname, "")
81
- file.puts "import #{camelized_component_name} from \"#{controller_backpath_without_ext}\";"
82
- file.puts "application.register(\"#{component_path_dashed}\", #{camelized_component_name});"
82
+ file.puts "import #{rand_name} from \"#{controller_backpath_without_ext}\";"
83
+ file.puts "application.register(\"#{component_path_dashed}\", #{rand_name});"
83
84
  file.puts ""
84
85
  puts "+ #{component_path_dashed}"
85
86
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Birdel
4
- VERSION = "3.4.1"
4
+ VERSION = "3.6.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: birdel
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@serhiijun"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-03 00:00:00.000000000 Z
11
+ date: 2023-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored