proscenium 0.1.0.alpha1-arm64-darwin → 0.1.0.alpha2-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7556409464d251ec5783ca4046de13b2e6c27cbeee7839c63484a55e88179b99
4
- data.tar.gz: 4d87111d78e34c22edc7dd31b8c3a744936061e2670a78f1218358e2d43e4184
3
+ metadata.gz: f8247c82996a679f10da36d65c389e07ae4bad1b1399168338ffd937401b1cc6
4
+ data.tar.gz: 113eeee3890bc5e35ed8c114d209f365fea71f6f3c6b87e1dffbef359208973d
5
5
  SHA512:
6
- metadata.gz: 9677592e778f4e27f2f7efa36e78d9194260d4441a17fd7e0396cd4ae8a65b4fad19040ef8cede333c3c4df4d4fe9cce1543ab18afc214cf48330b82a92cbdf7
7
- data.tar.gz: 3e6fc192739cc5728eac8fb137044836cdb85c5d63e1724be76267a62b7e725f3f20f32570f286583f4d4434460c7b0b88eed6896eb13f2659f75c91d4c97b57
6
+ metadata.gz: faa3d8d5a0986b1b58b4bc0452dfd4e4144cf1517651fa416c487e7c155dbd67eea7d7a5fc0d583ad93226edfc5de4271cfd2bdfb6fa7bd1f3eb3071c816bfb9
7
+ data.tar.gz: 522e92bbe7193632ed084eb69344408e1085319ff99a76c1c7994414038c6512324c3cc0e2e4dcc3d3ba91fab042fc8be9cf325fcda0264e734e631d58a205ca
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Joel Moss
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,11 @@
1
+ module Proscenium
2
+ class Connection < ActionCable::Connection::Base
3
+ identified_by :uid
4
+
5
+ def connect
6
+ self.uid = request.params[:uid]
7
+ logger.add_tags(uid)
8
+ logger.info 'connected to Proscenium'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ module Proscenium
2
+ class ReloadChannel < ActionCable::Channel::Base
3
+ def subscribed
4
+ stream_from 'reload'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'view_component'
4
+
5
+ class ApplicationComponent < ViewComponent::Base
6
+ include Proscenium::ViewComponent
7
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ReactComponent < ApplicationComponent
4
+ attr_accessor :props
5
+
6
+ def initialize(props = {})
7
+ @props = props
8
+ super
9
+ end
10
+
11
+ def call
12
+ tag.div data: { component: { path: virtual_path, props: @props } }
13
+ end
14
+ end
data/bin/esbuild ADDED
Binary file
data/bin/parcel_css ADDED
Binary file
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ Proscenium::Railtie.routes.draw do
2
+ if Proscenium.config.auto_refresh
3
+ mount Proscenium::Railtie.websocket => Proscenium.config.cable_mount_path
4
+ end
5
+ end
@@ -93,6 +93,7 @@ module Proscenium
93
93
 
94
94
  class << self
95
95
  def websocket
96
+ return @websocket unless @websocket.nil?
96
97
  return unless config.proscenium.auto_refresh
97
98
 
98
99
  cable = ActionCable::Server::Configuration.new
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.1.0.alpha1'
4
+ VERSION = '0.1.0.alpha2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.alpha1
4
+ version: 0.1.0.alpha2
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-25 00:00:00.000000000 Z
11
+ date: 2022-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actioncable
@@ -98,15 +98,39 @@ dependencies:
98
98
  - - "<"
99
99
  - !ruby/object:Gem::Version
100
100
  version: '8.0'
101
+ - !ruby/object:Gem::Dependency
102
+ name: view_component
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: '2.0'
108
+ type: :runtime
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - "~>"
113
+ - !ruby/object:Gem::Version
114
+ version: '2.0'
101
115
  description:
102
116
  email:
103
117
  - joel@developwithstyle.com
104
- executables: []
118
+ executables:
119
+ - esbuild
120
+ - parcel_css
105
121
  extensions: []
106
122
  extra_rdoc_files: []
107
123
  files:
108
124
  - CODE_OF_CONDUCT.md
125
+ - LICENSE.txt
109
126
  - README.md
127
+ - app/channels/proscenium/connection.rb
128
+ - app/channels/proscenium/reload_channel.rb
129
+ - app/components/application_component.rb
130
+ - app/components/react_component.rb
131
+ - bin/esbuild
132
+ - bin/parcel_css
133
+ - config/routes.rb
110
134
  - lib/proscenium.rb
111
135
  - lib/proscenium/cli/argument_error.js
112
136
  - lib/proscenium/cli/builders/index.js