stimulus_reflex 0.1.6 → 0.1.7

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: aa1b3385c6fc339dd85cff34e9fbddc6321dfb44dc2921db48e6d54ec41e12ab
4
- data.tar.gz: 51fae31f79cc65a44d052980d051d50470b39c9805dc143cc9c62cb60dec521b
3
+ metadata.gz: df68c360175088bb48c2916ea3b5af8139644cf88a276a16ae89ee037321f136
4
+ data.tar.gz: 25e23102624eeb2a31afffab458a788dc36dad4dff5d94b0a51ba8037be559d5
5
5
  SHA512:
6
- metadata.gz: 5a756d9b78d8e4be44720a81c3506716d8a42d532a001fc84d266449a15f26833c489a4f99b0f2960a978e2ac976fe27fd970f3bdd5061db72af71176e4ff6f0
7
- data.tar.gz: 06cf961977708a6375eb85a7532ee4e406eca085a925c7060d5d190b1fd4622cba29214e068e60ab40fbdd34c1b95d71dd1944bfd4af559f31943bcf5f326316
6
+ metadata.gz: 386aafa2f5169f2534d42c7f00964ccc50573d4cacb402bc5eb907982b45044260286b8d9cc2f86f2183eb505e3dd51b5a06bcb6b8b1c4ae499501aa1de6ffa8
7
+ data.tar.gz: 39d8f54028f062e2fa06bb317b7ff908ea0aa9d316cdca93ca08ca7a5ecd7729466f91825fbdb5d68d97df64288b3fb6d020ee17d1fe6cadc2e4c4e65208a8eb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stimulus_reflex (0.1.6)
4
+ stimulus_reflex (0.1.7)
5
5
  actioncable (>= 5.2.1)
6
6
  actionpack (>= 5.2.1)
7
7
  cable_ready (>= 2.0.5)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Lines of Code](http://img.shields.io/badge/lines_of_code-131-brightgreen.svg?style=flat)](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)
1
+ [![Lines of Code](http://img.shields.io/badge/lines_of_code-136-brightgreen.svg?style=flat)](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)
2
2
  [![Maintainability](https://img.shields.io/codeclimate/maintainability/hopsoft/stimulus_reflex.svg)](https://codeclimate.com/github/hopsoft/stimulus_reflex)
3
3
 
4
4
  # StimulusReflex
@@ -41,7 +41,7 @@ class StimulusReflex::Channel < ActionCable::Channel::Base
41
41
  private
42
42
 
43
43
  def delegate_call_to_stimulus_controller(stimulus_controller, method_name, arguments = [])
44
- instrument_payload = { stimulus_controller: stimulus_controller.class.name, method_name: method_name, arguments: arguments.inspect }
44
+ instrument_payload = {stimulus_controller: stimulus_controller.class.name, method_name: method_name, arguments: arguments.inspect}
45
45
  ActiveSupport::Notifications.instrument "delegate_call.stimulus_reflex", instrument_payload do
46
46
  if stimulus_controller.method(method_name).arity > 0
47
47
  stimulus_controller.send method_name, *arguments
@@ -1,7 +1,14 @@
1
1
  class StimulusReflex::Controller
2
2
  attr_reader :channel
3
3
 
4
+ delegate :connection, to: :channel
5
+ delegate :session, to: :request
6
+
4
7
  def initialize(channel)
5
8
  @channel = channel
6
9
  end
10
+
11
+ def request
12
+ @request ||= ActionDispatch::Request.new(connection.env)
13
+ end
7
14
  end
@@ -1,3 +1,3 @@
1
1
  module StimulusReflex
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
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.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins