stimulus_reflex 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of stimulus_reflex might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b3bef53019c76b6db11b128e1632a776ce69d0c8d3f47f459197bb3ea8b02d0
4
- data.tar.gz: ad2e3b5f667d6c15914edcc359fb499792e423790a2793d2a174b920aa07b832
3
+ metadata.gz: eafcc20ac3e52f7df87a43ace490956ff04c6573d29cf33c04d6128202e873d1
4
+ data.tar.gz: d49badd9f76377e244cca6a0d8213d88b0d6579f8395c4b0d67b2f68e475175b
5
5
  SHA512:
6
- metadata.gz: 3fd38f425c3faaf90d098fc03b2523d2a41eb9171e00456497ab8b9ab4719199b1e18f48e41befe7b76ab40c6006f7aded3ced87d2fca1d39d4c4730eee12906
7
- data.tar.gz: b12976c413b42fdb34bb319f2f97a0a6aeaae0622b4040a1d742a8e4b97c6b70fee2b3bdb6d0e77e05d2b446f8a111def0c452838e746c4d82f5e73bcb919f2a
6
+ metadata.gz: f961b93069bfd17769e653dc97c17911f96783e425518de6b1f11fe7d9e153e931814150e26bad112654292a8f9688d12afd7ff0607652f389c4bf780ef6cf45
7
+ data.tar.gz: ee757e45a4156352db7065fdc0ee9e6eec4571730affcce66c7977ece227dcd753185b95e017a112e95d87808ef035192fb9cec60a1f9e62fb9fd7979aecdaaf
data/Gemfile.lock CHANGED
@@ -1,9 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stimulus_reflex (0.1.0)
4
+ stimulus_reflex (0.1.1)
5
5
  actioncable (>= 5.2.1)
6
+ actionpack (>= 5.2.1)
6
7
  cable_ready (>= 2.0.5)
8
+ nokogiri
9
+ rack
7
10
 
8
11
  GEM
9
12
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,39 +1,29 @@
1
1
  # StimulusReflex
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/stimulus_reflex`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ #### Server side reactive behavior for Stimulus controllers
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
5
+ ## Usage
10
6
 
11
7
  ```ruby
12
- gem 'stimulus_reflex'
8
+ # Gemfile
9
+ gem "stimulus_reflex"
13
10
  ```
14
11
 
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install stimulus_reflex
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
12
+ ```
13
+ // app/assets/javascripts/cable.js
14
+ //= require cable_ready
15
+ //= require stimulus_reflex
16
+ ```
28
17
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
18
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
19
 
33
- ## Contributing
34
20
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/stimulus_reflex.
21
+ ## JavaScript Development
36
22
 
37
- ## License
23
+ The JavaScript source is located in `vendor/assets/javascripts/stimulus_reflex/src`
24
+ & transpiles to `vendor/assets/javascripts/stimulus_reflex/stimulus_reflex.js` via Webpack.
38
25
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
26
+ ```sh
27
+ cd vendor/assets/javascripts/stimulus_reflex/src
28
+ node_modules/webpack/bin/webpack.js
29
+ ```
@@ -0,0 +1,87 @@
1
+ require "uri"
2
+ require "rack"
3
+ require "nokogiri"
4
+ require "active_support/all"
5
+ require "action_dispatch"
6
+ require "cable_ready"
7
+
8
+ #class StimulusReflex::Channel < ApplicationCable::Channel
9
+ class StimulusReflex::Channel < ActionCable::Channel::Base
10
+ include CableReady::Broadcaster
11
+
12
+ def stream_name
13
+ "#{channel_name}_#{person.id}"
14
+ end
15
+
16
+ def subscribed
17
+ stream_from stream_name
18
+ end
19
+
20
+ def receive(data)
21
+ logger.debug "StimulusReflex::Channel#receive #{data.inspect}"
22
+ start = Time.current
23
+ url = data["url"].to_s
24
+ target = data["target"].to_s
25
+ stimulus_controller_name, stimulus_method_name = target.split("#")
26
+ stimulus_controller_name = "#{stimulus_controller_name.classify}StimulusController"
27
+ stimulus_controller = nil
28
+ arguments = data["args"]
29
+
30
+ begin
31
+ ActiveSupport::Notifications.instrument "delegate_call.stimulus_reflex", url: url, target: target, arguments: arguments do
32
+ stimulus_controller = stimulus_controller_name.constantize.new(self)
33
+ if arguments.present?
34
+ stimulus_controller.send stimulus_method_name, *arguments
35
+ else
36
+ stimulus_controller.send stimulus_method_name
37
+ end
38
+ end
39
+
40
+ begin
41
+ html = render_page(url, stimulus_controller)
42
+ broadcast_morph extract_body_html(html)
43
+ rescue StandardError => render_error
44
+ logger.error "StimulusReflex::Channel: #{url} Failed to rerender #{params} after invoking #{target}! #{render_error} #{render_error.backtrace}"
45
+ end
46
+ rescue StandardError => invoke_error
47
+ logger.error "StimulusReflex::Channel: #{url} Failed to invoke #{target}! #{invoke_error}"
48
+ end
49
+ end
50
+
51
+ private
52
+
53
+ def render_page(url, stimulus_controller)
54
+ params = Rails.application.routes.recognize_path(url)
55
+ controller_class = "#{params[:controller]}_controller".classify.constantize
56
+ controller = controller_class.new
57
+ controller.instance_variable_set :"@stimulus_reflex", true
58
+ stimulus_controller.instance_variables.each do |instance_variable_name|
59
+ controller.instance_variable_set instance_variable_name, stimulus_controller.instance_variable_get(instance_variable_name)
60
+ end
61
+
62
+ uri = URI.parse(url)
63
+ env = {
64
+ Rack::SCRIPT_NAME => uri.path,
65
+ Rack::QUERY_STRING => uri.query,
66
+ Rack::PATH_INFO => ""
67
+ }
68
+ request = ActionDispatch::Request.new(connection.env.merge(env))
69
+ controller.request = request
70
+ controller.response = ActionDispatch::Response.new
71
+
72
+ ActiveSupport::Notifications.instrument "process_controller_action.stimulus_reflex", url: url do
73
+ controller.process params[:action]
74
+ end
75
+ controller.response.body
76
+ end
77
+
78
+ def extract_body_html(html)
79
+ doc = Nokogiri::HTML(html)
80
+ doc.css("body").to_s
81
+ end
82
+
83
+ def broadcast_morph(html)
84
+ cable_ready[stream_name].morph selector: "body", html: html, children_only: true
85
+ cable_ready.broadcast
86
+ end
87
+ end
@@ -0,0 +1,7 @@
1
+ class StimulusReflex::Controller
2
+ attr_reader :channel
3
+
4
+ def initialize(channel)
5
+ @channel = channel
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module StimulusReflex
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require "stimulus_reflex/version"
2
+ require "stimulus_reflex/controller"
3
+ require "stimulus_reflex/channel"
2
4
 
3
5
  module StimulusReflex
4
- # Your code goes here...
5
6
  end
@@ -0,0 +1 @@
1
+ window.StimulusReflex=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){(function(t){var n="Expected a function",r=NaN,o="[object Symbol]",i=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,a=parseInt,f="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,p=f||l||Function("return this")(),h=Object.prototype.toString,d=Math.max,y=Math.min,m=function(){return p.Date.now()};function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&h.call(e)==o}(e))return r;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||u.test(e)?a(e.slice(2),n?2:8):c.test(e)?r:+e}e.exports=function(e,t,r){var o,i,c,s,u,a,f=0,l=!1,p=!1,h=!0;if("function"!=typeof e)throw new TypeError(n);function v(t){var n=o,r=i;return o=i=void 0,f=t,s=e.apply(r,n)}function O(e){var n=e-a;return void 0===a||n>=t||n<0||p&&e-f>=c}function E(){var e=m();if(O(e))return w(e);u=setTimeout(E,function(e){var n=t-(e-a);return p?y(n,c-(e-f)):n}(e))}function w(e){return u=void 0,h&&o?v(e):(o=i=void 0,s)}function A(){var e=m(),n=O(e);if(o=arguments,i=this,a=e,n){if(void 0===u)return function(e){return f=e,u=setTimeout(E,t),l?v(e):s}(a);if(p)return u=setTimeout(E,t),v(a)}return void 0===u&&(u=setTimeout(E,t)),s}return t=g(t)||0,b(r)&&(l=!!r.leading,c=(p="maxWait"in r)?d(g(r.maxWait)||0,t):c,h="trailing"in r?!!r.trailing:h),A.cancel=function(){void 0!==u&&clearTimeout(u),f=0,o=a=i=u=void 0},A.flush=function(){return void 0===u?s:w(m())},A}}).call(this,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t){this.eventTarget=e,this.eventName=t,this.unorderedBindings=new Set}return e.prototype.connect=function(){this.eventTarget.addEventListener(this.eventName,this,!1)},e.prototype.disconnect=function(){this.eventTarget.removeEventListener(this.eventName,this,!1)},e.prototype.bindingConnected=function(e){this.unorderedBindings.add(e)},e.prototype.bindingDisconnected=function(e){this.unorderedBindings.delete(e)},e.prototype.handleEvent=function(e){for(var t=function(e){if("immediatePropagationStopped"in e)return e;var t=e.stopImmediatePropagation;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation:function(){this.immediatePropagationStopped=!0,t.call(this)}})}(e),n=0,r=this.bindings;n<r.length;n++){var o=r[n];if(t.immediatePropagationStopped)break;o.handleEvent(t)}},Object.defineProperty(e.prototype,"bindings",{get:function(){return Array.from(this.unorderedBindings).sort(function(e,t){var n=e.index,r=t.index;return n<r?-1:n>r?1:0})},enumerable:!0,configurable:!0}),e}();var o=function(){function e(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}return e.prototype.start=function(){this.started||(this.started=!0,this.eventListeners.forEach(function(e){return e.connect()}))},e.prototype.stop=function(){this.started&&(this.started=!1,this.eventListeners.forEach(function(e){return e.disconnect()}))},Object.defineProperty(e.prototype,"eventListeners",{get:function(){return Array.from(this.eventListenerMaps.values()).reduce(function(e,t){return e.concat(Array.from(t.values()))},[])},enumerable:!0,configurable:!0}),e.prototype.bindingConnected=function(e){this.fetchEventListenerForBinding(e).bindingConnected(e)},e.prototype.bindingDisconnected=function(e){this.fetchEventListenerForBinding(e).bindingDisconnected(e)},e.prototype.handleError=function(e,t,n){void 0===n&&(n={}),this.application.handleError(e,"Error "+t,n)},e.prototype.fetchEventListenerForBinding=function(e){var t=e.eventTarget,n=e.eventName;return this.fetchEventListener(t,n)},e.prototype.fetchEventListener=function(e,t){var n=this.fetchEventListenerMapForEventTarget(e),r=n.get(t);return r||(r=this.createEventListener(e,t),n.set(t,r)),r},e.prototype.createEventListener=function(e,t){var n=new r(e,t);return this.started&&n.connect(),n},e.prototype.fetchEventListenerMapForEventTarget=function(e){var t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t},e}(),i=/^((.+?)(@(window|document))?->)?(.+?)(#(.+))?$/;function c(e){var t=e.trim().match(i)||[];return{eventTarget:function(e){if("window"==e)return window;if("document"==e)return document}(t[4]),eventName:t[2],identifier:t[5],methodName:t[7]}}var s=function(){function e(e,t,n){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(e){var t=e.tagName.toLowerCase();if(t in u)return u[t](e)}(e)||a("missing event name"),this.identifier=n.identifier||a("missing identifier"),this.methodName=n.methodName||a("missing method name")}return e.forToken=function(e){return new this(e.element,e.index,c(e.content))},e.prototype.toString=function(){var e=this.eventTargetName?"@"+this.eventTargetName:"";return""+this.eventName+e+"->"+this.identifier+"#"+this.methodName},Object.defineProperty(e.prototype,"eventTargetName",{get:function(){return function(e){return e==window?"window":e==document?"document":void 0}(this.eventTarget)},enumerable:!0,configurable:!0}),e}(),u={a:function(e){return"click"},button:function(e){return"click"},form:function(e){return"submit"},input:function(e){return"submit"==e.getAttribute("type")?"click":"change"},select:function(e){return"change"},textarea:function(e){return"change"}};function a(e){throw new Error(e)}var f=function(){function e(e,t){this.context=e,this.action=t}return Object.defineProperty(e.prototype,"index",{get:function(){return this.action.index},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"eventTarget",{get:function(){return this.action.eventTarget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!0,configurable:!0}),e.prototype.handleEvent=function(e){this.willBeInvokedByEvent(e)&&this.invokeWithEvent(e)},Object.defineProperty(e.prototype,"eventName",{get:function(){return this.action.eventName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){var e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error('Action "'+this.action+'" references undefined method "'+this.methodName+'"')},enumerable:!0,configurable:!0}),e.prototype.invokeWithEvent=function(e){try{this.method.call(this.controller,e)}catch(n){var t={identifier:this.identifier,controller:this.controller,element:this.element,index:this.index,event:e};this.context.handleError(n,'invoking action "'+this.action+'"',t)}},e.prototype.willBeInvokedByEvent=function(e){var t=e.target;return this.element===t||(!(t instanceof Element&&this.element.contains(t))||this.scope.containsElement(t))},Object.defineProperty(e.prototype,"controller",{get:function(){return this.context.controller},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"methodName",{get:function(){return this.action.methodName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this.context.scope},enumerable:!0,configurable:!0}),e}(),l=function(){function e(e,t){var n=this;this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(function(e){return n.processMutations(e)})}return e.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,childList:!0,subtree:!0}),this.refresh())},e.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},e.prototype.refresh=function(){if(this.started){for(var e=new Set(this.matchElementsInTree()),t=0,n=Array.from(this.elements);t<n.length;t++){var r=n[t];e.has(r)||this.removeElement(r)}for(var o=0,i=Array.from(e);o<i.length;o++){r=i[o];this.addElement(r)}}},e.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var r=n[t];this.processMutation(r)}},e.prototype.processMutation=function(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))},e.prototype.processAttributeChange=function(e,t){var n=e;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,t):this.removeElement(n):this.matchElement(n)&&this.addElement(n)},e.prototype.processRemovedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t],o=this.elementFromNode(r);o&&this.processTree(o,this.removeElement)}},e.prototype.processAddedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t],o=this.elementFromNode(r);o&&this.elementIsActive(o)&&this.processTree(o,this.addElement)}},e.prototype.matchElement=function(e){return this.delegate.matchElement(e)},e.prototype.matchElementsInTree=function(e){return void 0===e&&(e=this.element),this.delegate.matchElementsInTree(e)},e.prototype.processTree=function(e,t){for(var n=0,r=this.matchElementsInTree(e);n<r.length;n++){var o=r[n];t.call(this,o)}},e.prototype.elementFromNode=function(e){if(e.nodeType==Node.ELEMENT_NODE)return e},e.prototype.elementIsActive=function(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)},e.prototype.addElement=function(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))},e.prototype.removeElement=function(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))},e}(),p=function(){function e(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new l(e,this)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.elementObserver.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selector",{get:function(){return"["+this.attributeName+"]"},enumerable:!0,configurable:!0}),e.prototype.start=function(){this.elementObserver.start()},e.prototype.stop=function(){this.elementObserver.stop()},e.prototype.refresh=function(){this.elementObserver.refresh()},Object.defineProperty(e.prototype,"started",{get:function(){return this.elementObserver.started},enumerable:!0,configurable:!0}),e.prototype.matchElement=function(e){return e.hasAttribute(this.attributeName)},e.prototype.matchElementsInTree=function(e){var t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)},e.prototype.elementMatched=function(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)},e.prototype.elementUnmatched=function(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)},e.prototype.elementAttributeChanged=function(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)},e}();function h(e,t,n){y(e,t).add(n)}function d(e,t,n){y(e,t).delete(n),function(e,t){var n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}function y(e,t){var n=e.get(t);return n||(n=new Set,e.set(t,n)),n}var m=function(){function e(){this.valuesByKey=new Map}return Object.defineProperty(e.prototype,"values",{get:function(){return Array.from(this.valuesByKey.values()).reduce(function(e,t){return e.concat(Array.from(t))},[])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return Array.from(this.valuesByKey.values()).reduce(function(e,t){return e+t.size},0)},enumerable:!0,configurable:!0}),e.prototype.add=function(e,t){h(this.valuesByKey,e,t)},e.prototype.delete=function(e,t){d(this.valuesByKey,e,t)},e.prototype.has=function(e,t){var n=this.valuesByKey.get(e);return null!=n&&n.has(t)},e.prototype.hasKey=function(e){return this.valuesByKey.has(e)},e.prototype.hasValue=function(e){return Array.from(this.valuesByKey.values()).some(function(t){return t.has(e)})},e.prototype.getValuesForKey=function(e){var t=this.valuesByKey.get(e);return t?Array.from(t):[]},e.prototype.getKeysForValue=function(e){return Array.from(this.valuesByKey).filter(function(t){t[0];return t[1].has(e)}).map(function(e){var t=e[0];e[1];return t})},e}(),b=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=(function(e){function t(){var t=e.call(this)||this;return t.keysByValue=new Map,t}b(t,e),Object.defineProperty(t.prototype,"values",{get:function(){return Array.from(this.keysByValue.keys())},enumerable:!0,configurable:!0}),t.prototype.add=function(t,n){e.prototype.add.call(this,t,n),h(this.keysByValue,n,t)},t.prototype.delete=function(t,n){e.prototype.delete.call(this,t,n),d(this.keysByValue,n,t)},t.prototype.hasValue=function(e){return this.keysByValue.has(e)},t.prototype.getKeysForValue=function(e){var t=this.keysByValue.get(e);return t?Array.from(t):[]}}(m),function(){function e(e,t,n){this.attributeObserver=new p(e,t,this),this.delegate=n,this.tokensByElement=new m}return Object.defineProperty(e.prototype,"started",{get:function(){return this.attributeObserver.started},enumerable:!0,configurable:!0}),e.prototype.start=function(){this.attributeObserver.start()},e.prototype.stop=function(){this.attributeObserver.stop()},e.prototype.refresh=function(){this.attributeObserver.refresh()},Object.defineProperty(e.prototype,"element",{get:function(){return this.attributeObserver.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this.attributeObserver.attributeName},enumerable:!0,configurable:!0}),e.prototype.elementMatchedAttribute=function(e){this.tokensMatched(this.readTokensForElement(e))},e.prototype.elementAttributeValueChanged=function(e){var t=this.refreshTokensForElement(e),n=t[0],r=t[1];this.tokensUnmatched(n),this.tokensMatched(r)},e.prototype.elementUnmatchedAttribute=function(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))},e.prototype.tokensMatched=function(e){var t=this;e.forEach(function(e){return t.tokenMatched(e)})},e.prototype.tokensUnmatched=function(e){var t=this;e.forEach(function(e){return t.tokenUnmatched(e)})},e.prototype.tokenMatched=function(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)},e.prototype.tokenUnmatched=function(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)},e.prototype.refreshTokensForElement=function(e){var t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),r=function(e,t){var n=Math.max(e.length,t.length);return Array.from({length:n},function(n,r){return[e[r],t[r]]})}(t,n).findIndex(function(e){return!function(e,t){return e&&t&&e.index==t.index&&e.content==t.content}(e[0],e[1])});return-1==r?[[],[]]:[t.slice(r),n.slice(r)]},e.prototype.readTokensForElement=function(e){var t=this.attributeName;return function(e,t,n){return e.trim().split(/\s+/).filter(function(e){return e.length}).map(function(e,r){return{element:t,attributeName:n,content:e,index:r}})}(e.getAttribute(t)||"",e,t)},e}());var v=function(){function e(e,t,n){this.tokenListObserver=new g(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}return Object.defineProperty(e.prototype,"started",{get:function(){return this.tokenListObserver.started},enumerable:!0,configurable:!0}),e.prototype.start=function(){this.tokenListObserver.start()},e.prototype.stop=function(){this.tokenListObserver.stop()},e.prototype.refresh=function(){this.tokenListObserver.refresh()},Object.defineProperty(e.prototype,"element",{get:function(){return this.tokenListObserver.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this.tokenListObserver.attributeName},enumerable:!0,configurable:!0}),e.prototype.tokenMatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))},e.prototype.tokenUnmatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))},e.prototype.fetchParseResultForToken=function(e){var t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t},e.prototype.fetchValuesByTokenForElement=function(e){var t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t},e.prototype.parseToken=function(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}},e}(),O=function(){function e(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}return e.prototype.start=function(){this.valueListObserver||(this.valueListObserver=new v(this.element,this.actionAttribute,this),this.valueListObserver.start())},e.prototype.stop=function(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())},Object.defineProperty(e.prototype,"element",{get:function(){return this.context.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionAttribute",{get:function(){return this.schema.actionAttribute},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.context.schema},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return Array.from(this.bindingsByAction.values())},enumerable:!0,configurable:!0}),e.prototype.connectAction=function(e){var t=new f(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)},e.prototype.disconnectAction=function(e){var t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))},e.prototype.disconnectAllActions=function(){var e=this;this.bindings.forEach(function(t){return e.delegate.bindingDisconnected(t)}),this.bindingsByAction.clear()},e.prototype.parseValueForToken=function(e){var t=s.forToken(e);if(t.identifier==this.identifier)return t},e.prototype.elementMatchedValue=function(e,t){this.connectAction(t)},e.prototype.elementUnmatchedValue=function(e,t){this.disconnectAction(t)},e}(),E=function(){function e(e,t){this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new O(this,this.dispatcher);try{this.controller.initialize()}catch(e){this.handleError(e,"initializing controller")}}return e.prototype.connect=function(){this.bindingObserver.start();try{this.controller.connect()}catch(e){this.handleError(e,"connecting controller")}},e.prototype.disconnect=function(){try{this.controller.disconnect()}catch(e){this.handleError(e,"disconnecting controller")}this.bindingObserver.stop()},Object.defineProperty(e.prototype,"application",{get:function(){return this.module.application},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.module.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.application.schema},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dispatcher",{get:function(){return this.application.dispatcher},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.element.parentElement},enumerable:!0,configurable:!0}),e.prototype.handleError=function(e,t,n){void 0===n&&(n={});var r=this.identifier,o=this.controller,i=this.element;n=Object.assign({identifier:r,controller:o,element:i},n),this.application.handleError(e,"Error "+t,n)},e}(),w=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function A(e){return{identifier:e.identifier,controllerConstructor:function(e){var t=j(e);return t.bless(),t}(e.controllerConstructor)}}var j=function(){function e(e){function t(){var n=this&&this instanceof t?this.constructor:void 0;return Reflect.construct(e,arguments,n)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return function(){var t=e(function(){this.a.call(this)});t.prototype.a=function(){},new t}(),e}catch(e){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t}(e)}}}(),P=function(){function e(e,t){this.application=e,this.definition=A(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this.definition.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controllerConstructor",{get:function(){return this.definition.controllerConstructor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contexts",{get:function(){return Array.from(this.connectedContexts)},enumerable:!0,configurable:!0}),e.prototype.connectContextForScope=function(e){var t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()},e.prototype.disconnectContextForScope=function(e){var t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())},e.prototype.fetchContextForScope=function(e){var t=this.contextsByScope.get(e);return t||(t=new E(this,e),this.contextsByScope.set(e,t)),t},e}(),k=function(){function e(e){this.scope=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!0,configurable:!0}),e.prototype.get=function(e){return e=this.getFormattedKey(e),this.element.getAttribute(e)},e.prototype.set=function(e,t){return e=this.getFormattedKey(e),this.element.setAttribute(e,t),this.get(e)},e.prototype.has=function(e){return e=this.getFormattedKey(e),this.element.hasAttribute(e)},e.prototype.delete=function(e){return!!this.has(e)&&(e=this.getFormattedKey(e),this.element.removeAttribute(e),!0)},e.prototype.getFormattedKey=function(e){return"data-"+this.identifier+"-"+function(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()})}(e)},e}();function B(e,t){return"["+e+'~="'+t+'"]'}var x=function(){function e(e){this.scope=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.scope.schema},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return null!=this.find(e)},e.prototype.find=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.getSelectorForTargetNames(e);return this.scope.findElement(n)},e.prototype.findAll=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.getSelectorForTargetNames(e);return this.scope.findAllElements(n)},e.prototype.getSelectorForTargetNames=function(e){var t=this;return e.map(function(e){return t.getSelectorForTargetName(e)}).join(", ")},e.prototype.getSelectorForTargetName=function(e){var t=this.identifier+"."+e;return B(this.schema.targetAttribute,t)},e}(),T=function(){function e(e,t,n){this.schema=e,this.identifier=t,this.element=n,this.targets=new x(this),this.data=new k(this)}return e.prototype.findElement=function(e){return this.findAllElements(e)[0]},e.prototype.findAllElements=function(e){var t=this.element.matches(e)?[this.element]:[],n=this.filterElements(Array.from(this.element.querySelectorAll(e)));return t.concat(n)},e.prototype.filterElements=function(e){var t=this;return e.filter(function(e){return t.containsElement(e)})},e.prototype.containsElement=function(e){return e.closest(this.controllerSelector)===this.element},Object.defineProperty(e.prototype,"controllerSelector",{get:function(){return B(this.schema.controllerAttribute,this.identifier)},enumerable:!0,configurable:!0}),e}(),F=function(){function e(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new v(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}return e.prototype.start=function(){this.valueListObserver.start()},e.prototype.stop=function(){this.valueListObserver.stop()},Object.defineProperty(e.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!0,configurable:!0}),e.prototype.parseValueForToken=function(e){var t=e.element,n=e.content,r=this.fetchScopesByIdentifierForElement(t),o=r.get(n);return o||(o=new T(this.schema,n,t),r.set(n,o)),o},e.prototype.elementMatchedValue=function(e,t){var n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)},e.prototype.elementUnmatchedValue=function(e,t){var n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))},e.prototype.fetchScopesByIdentifierForElement=function(e){var t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t},e}(),M=function(){function e(e){this.application=e,this.scopeObserver=new F(this.element,this.schema,this),this.scopesByIdentifier=new m,this.modulesByIdentifier=new Map}return Object.defineProperty(e.prototype,"element",{get:function(){return this.application.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.application.schema},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modules",{get:function(){return Array.from(this.modulesByIdentifier.values())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contexts",{get:function(){return this.modules.reduce(function(e,t){return e.concat(t.contexts)},[])},enumerable:!0,configurable:!0}),e.prototype.start=function(){this.scopeObserver.start()},e.prototype.stop=function(){this.scopeObserver.stop()},e.prototype.loadDefinition=function(e){this.unloadIdentifier(e.identifier);var t=new P(this.application,e);this.connectModule(t)},e.prototype.unloadIdentifier=function(e){var t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)},e.prototype.getContextForElementAndIdentifier=function(e,t){var n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find(function(t){return t.element==e})},e.prototype.handleError=function(e,t,n){this.application.handleError(e,t,n)},e.prototype.scopeConnected=function(e){this.scopesByIdentifier.add(e.identifier,e);var t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)},e.prototype.scopeDisconnected=function(e){this.scopesByIdentifier.delete(e.identifier,e);var t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)},e.prototype.connectModule=function(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(function(t){return e.connectContextForScope(t)})},e.prototype.disconnectModule=function(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(function(t){return e.disconnectContextForScope(t)})},e}(),N={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target"},S=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function c(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(c,s)}u((r=r.apply(e,t||[])).next())})},C=function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};!function(){function e(e,t){void 0===e&&(e=document.documentElement),void 0===t&&(t=N),this.element=e,this.schema=t,this.dispatcher=new o(this),this.router=new M(this)}e.start=function(t,n){var r=new e(t,n);return r.start(),r},e.prototype.start=function(){return S(this,void 0,void 0,function(){return C(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",e):e()})];case 1:return e.sent(),this.router.start(),this.dispatcher.start(),[2]}})})},e.prototype.stop=function(){this.router.stop(),this.dispatcher.stop()},e.prototype.register=function(e,t){this.load({identifier:e,controllerConstructor:t})},e.prototype.load=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(Array.isArray(e)?e:[e].concat(n)).forEach(function(e){return t.router.loadDefinition(e)})},e.prototype.unload=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(Array.isArray(e)?e:[e].concat(n)).forEach(function(e){return t.router.unloadIdentifier(e)})},Object.defineProperty(e.prototype,"controllers",{get:function(){return this.router.contexts.map(function(e){return e.controller})},enumerable:!0,configurable:!0}),e.prototype.getControllerForElementAndIdentifier=function(e,t){var n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null},e.prototype.handleError=function(e,t,n){console.error("%s\n\n%o\n\n%o",t,e,n)}}();function L(e){var t=e.prototype;(function(e){var t=function(e){var t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t}(e);return Array.from(t.reduce(function(e,t){return function(e){var t=e.targets;return Array.isArray(t)?t:[]}(t).forEach(function(t){return e.add(t)}),e},new Set))})(e).forEach(function(e){var n;return function(e,t){Object.keys(t).forEach(function(n){if(!(n in e)){var r=t[n];Object.defineProperty(e,n,r)}})}(t,((n={})[e+"Target"]={get:function(){var t=this.targets.find(e);if(t)return t;throw new Error('Missing target element "'+this.identifier+"."+e+'"')}},n[e+"Targets"]={get:function(){return this.targets.findAll(e)}},n["has"+function(e){return e.charAt(0).toUpperCase()+e.slice(1)}(e)+"Target"]={get:function(){return this.targets.has(e)}},n))})}var I=function(){function e(e){this.context=e}return e.bless=function(){L(this)},Object.defineProperty(e.prototype,"application",{get:function(){return this.context.application},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this.context.scope},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"targets",{get:function(){return this.scope.targets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.scope.data},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){},e.prototype.connect=function(){},e.prototype.disconnect=function(){},e.targets=[],e}(),_=n(0),V=n.n(_),K=window.App=window.App||{};K.cable=K.cable||ActionCable.createConsumer();var R=K;function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var q=V()(function(e){return R.stimulus.send(e)},250,{}),G=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),W(this,z(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$(e,t)}(t,I),function(e,t,n){t&&D(e.prototype,t),n&&D(e,n)}(t,[{key:"send",value:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();q({url:location.href,target:t,args:e})}}]),t}();t.default={ReactiveController:G}}]);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus_reflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins
@@ -9,22 +9,36 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-10-14 00:00:00.000000000 Z
12
+ date: 2018-10-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: cable_ready
15
+ name: rack
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 2.0.5
20
+ version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 2.0.5
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: nokogiri
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: actioncable
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -39,6 +53,34 @@ dependencies:
39
53
  - - ">="
40
54
  - !ruby/object:Gem::Version
41
55
  version: 5.2.1
56
+ - !ruby/object:Gem::Dependency
57
+ name: actionpack
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 5.2.1
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 5.2.1
70
+ - !ruby/object:Gem::Dependency
71
+ name: cable_ready
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 2.0.5
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 2.0.5
42
84
  - !ruby/object:Gem::Dependency
43
85
  name: bundler
44
86
  requirement: !ruby/object:Gem::Requirement
@@ -70,6 +112,7 @@ dependencies:
70
112
  description:
71
113
  email:
72
114
  - natehop@gmail.com
115
+ - brasco@thebrascode.com
73
116
  executables: []
74
117
  extensions: []
75
118
  extra_rdoc_files: []
@@ -82,6 +125,8 @@ files:
82
125
  - bin/console
83
126
  - bin/setup
84
127
  - lib/stimulus_reflex.rb
128
+ - lib/stimulus_reflex/channel.rb
129
+ - lib/stimulus_reflex/controller.rb
85
130
  - lib/stimulus_reflex/version.rb
86
131
  - vendor/assets/javascripts/stimulus_reflex.js
87
132
  homepage: https://github.com/hopsoft/stimulus_reflex