stimulus_reflex 2.0.2 → 2.1.4

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: f3c225ea9ccdf33b87964486c734e4091e454650c0276c1d000104246e7cd3bc
4
- data.tar.gz: d38efd762fec5cf27843c64c37959dec9f10167c93a0c4a742e276a5de176853
3
+ metadata.gz: 1e7f7d9dd1475b7a56d9920dc815ff1ac0609add399996e8b5992365955abdeb
4
+ data.tar.gz: d32fa60ca923753176253f36c48507a85d9d7f859f9ffce13c56838cb60c1f15
5
5
  SHA512:
6
- metadata.gz: 62993d44aaec8ad5805820163927a91c58eb69072bad71e062c23c345b6a2415b4698530838a8b46c85cad4611e23bf56e833f61e91fd80eb302cb5938e5bf69
7
- data.tar.gz: 9787c3178e523c35bf6d6883c0b8a0bb2e755c5c1e138795ba9bfa1a1fbb66e0e6278119bf343104a5dc731b87d94c554ce3bfb17d21f73fa33bad34b1c1acf0
6
+ metadata.gz: f9498339be7be1297189373f155a6a92871e8c05e096b3027eff1a644e48ad693bd564d42d424724780fd93952fe867ef822c91d352f19bf0e5bf397a32611b4
7
+ data.tar.gz: b9d49433b932ac09c2f6947ce243d5876861f35fb6caa8c9c25d8530e69d96f8b8a648f790d6cab5aed34962bd104a66a268faa5a0a8df935d1164fdecb712c1
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stimulus_reflex (2.0.2)
5
- cable_ready (>= 4.0.3)
4
+ stimulus_reflex (2.1.4)
5
+ cable_ready (>= 4.0.7)
6
6
  nokogiri
7
7
  rack
8
8
  rails (>= 5.2)
@@ -67,15 +67,15 @@ GEM
67
67
  zeitwerk (~> 2.1, >= 2.1.8)
68
68
  ast (2.4.0)
69
69
  builder (3.2.3)
70
- cable_ready (4.0.5)
70
+ cable_ready (4.0.7)
71
71
  rails (>= 5.2)
72
72
  coderay (1.1.2)
73
73
  concurrent-ruby (1.1.5)
74
- crass (1.0.4)
74
+ crass (1.0.5)
75
75
  erubi (1.9.0)
76
76
  globalid (0.4.2)
77
77
  activesupport (>= 4.2.0)
78
- i18n (1.6.0)
78
+ i18n (1.7.0)
79
79
  concurrent-ruby (~> 1.0)
80
80
  jaro_winkler (1.5.3)
81
81
  loofah (2.3.0)
@@ -93,8 +93,8 @@ GEM
93
93
  nio4r (2.5.2)
94
94
  nokogiri (1.10.4)
95
95
  mini_portile2 (~> 2.4.0)
96
- parallel (1.17.0)
97
- parser (2.6.4.1)
96
+ parallel (1.18.0)
97
+ parser (2.6.5.0)
98
98
  ast (~> 2.4.0)
99
99
  pry (0.12.2)
100
100
  coderay (~> 1.1.0)
@@ -122,8 +122,8 @@ GEM
122
122
  rails-dom-testing (2.0.3)
123
123
  activesupport (>= 4.2.0)
124
124
  nokogiri (>= 1.6)
125
- rails-html-sanitizer (1.2.0)
126
- loofah (~> 2.2, >= 2.2.2)
125
+ rails-html-sanitizer (1.3.0)
126
+ loofah (~> 2.3)
127
127
  railties (6.0.0)
128
128
  actionpack (= 6.0.0)
129
129
  activesupport (= 6.0.0)
@@ -142,7 +142,7 @@ GEM
142
142
  rubocop-performance (1.4.1)
143
143
  rubocop (>= 0.71.0)
144
144
  ruby-progressbar (1.10.1)
145
- sprockets (3.7.2)
145
+ sprockets (4.0.0)
146
146
  concurrent-ruby (~> 1.0)
147
147
  rack (> 1, < 3)
148
148
  sprockets-rails (3.2.1)
@@ -162,7 +162,7 @@ GEM
162
162
  websocket-driver (0.7.1)
163
163
  websocket-extensions (>= 0.1.0)
164
164
  websocket-extensions (0.1.4)
165
- zeitwerk (2.1.10)
165
+ zeitwerk (2.2.0)
166
166
 
167
167
  PLATFORMS
168
168
  ruby
data/README.md CHANGED
@@ -1,7 +1,14 @@
1
- [![Lines of Code](http://img.shields.io/badge/lines_of_code-223-brightgreen.svg?style=flat)](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)
1
+ <p align="center">
2
+ <a href="https://codefund.io/properties/525/visit-sponsor">
3
+ <img src="https://codefund.io/properties/525/sponsor" />
4
+ </a>
5
+ </p>
6
+
7
+ [![Lines of Code](http://img.shields.io/badge/lines_of_code-516-brightgreen.svg?style=flat)](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)
2
8
  [![Maintainability](https://api.codeclimate.com/v1/badges/2b24fdbd1ae37a24bedb/maintainability)](https://codeclimate.com/github/hopsoft/stimulus_reflex/maintainability)
3
- ![Prettier](https://github.com/hopsoft/stimulus_reflex/workflows/Prettier/badge.svg)
9
+ ![Prettier-Standard](https://github.com/hopsoft/stimulus_reflex/workflows/Prettier-Standard/badge.svg)
4
10
  ![StandardRB](https://github.com/hopsoft/stimulus_reflex/workflows/StandardRB/badge.svg)
11
+ ![Tests](https://github.com/hopsoft/stimulus_reflex/workflows/Tests/badge.svg)
5
12
 
6
13
  # StimulusReflex
7
14
 
@@ -25,7 +32,8 @@ Everyone interacting with StimulusReflex is expected to follow the [Code of Cond
25
32
  ### Coding Standards
26
33
 
27
34
  This project uses [Standard](https://github.com/testdouble/standard)
28
- and [Prettier](https://github.com/prettier/prettier) to minimize bike shedding related to code formatting.
35
+ and [Prettier-Standard](https://github.com/sheerun/prettier-standard) to minimize bike shedding related to code formatting.
36
+
29
37
  Please run `./bin/standardize` prior submitting pull requests.
30
38
 
31
39
  View the [wiki](https://github.com/hopsoft/stimulus_reflex/wiki/Editor-Configuration) to see recommendations for configuring your editor to work best with the project.
data/Rakefile CHANGED
@@ -1,9 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "bundler/gem_tasks"
4
+ require "rails/test_unit/runner"
4
5
 
5
6
  task default: [:test]
6
7
 
7
- task :test do
8
- puts "Please write some tests..."
8
+ task :test do |task|
9
+ return 1 unless system("cd javascript && yarn run test")
10
+ Rails::TestUnit::Runner.run
11
+ end
12
+
13
+ task :test_ruby do |task|
14
+ Rails::TestUnit::Runner.run
9
15
  end
data/bin/loc ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ cloc --exclude-dir=node_modules,test --include-ext=rb,js .
data/bin/rake ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rake", "rake")
data/bin/standardize CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
 
3
3
  bundle exec standardrb --fix
4
- cd ./javascript && yarn run prettier-standard stimulus_reflex.js test/*.js
4
+ cd ./javascript && yarn run prettier-standard --lint javascript/*.js test/*.js
@@ -0,0 +1,14 @@
1
+ Description:
2
+ Generate boilerplate files to help get you up and running with StimulusReflex
3
+
4
+ Example:
5
+ rails generate stimulus_reflex User
6
+
7
+ This will create, but not overwrite the following files:
8
+
9
+ app/javascript/controllers/application_controller.js
10
+ app/javascript/controllers/user_controller.js
11
+ app/reflexes/application_reflex.rb
12
+ app/reflexes/user_reflex.rb
13
+
14
+ Don't forget to setup the application: https://docs.stimulusreflex.com/setup
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators"
4
+
5
+ class StimulusReflexGenerator < Rails::Generators::NamedBase
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ def initialize_reflexes
9
+ copy_reflex_files
10
+ end
11
+
12
+ def initialize_controllers
13
+ copy_controller_files
14
+ end
15
+
16
+ private
17
+
18
+ CONTROLLER_BASE_PATH = "app/javascript/controllers"
19
+ REFLEX_BASE_PATH = "app/reflexes"
20
+
21
+ def copy_reflex_files
22
+ template "application_reflex.rb", File.join(REFLEX_BASE_PATH, "application_reflex.rb")
23
+ template "custom_reflex.rb", File.join(REFLEX_BASE_PATH, "#{name.underscore}_reflex.rb")
24
+ end
25
+
26
+ def copy_controller_files
27
+ template "application_controller.js", File.join(CONTROLLER_BASE_PATH, "application_controller.js")
28
+ template "custom_controller.js", File.join(CONTROLLER_BASE_PATH, "#{name.underscore}_controller.js")
29
+ end
30
+ end
@@ -0,0 +1,59 @@
1
+ import { Controller } from 'stimulus'
2
+ import StimulusReflex from 'stimulus_reflex'
3
+
4
+ /* This is your application's ApplicationController.
5
+ * All StimulusReflex controllers should inherit from this class.
6
+ *
7
+ * Example:
8
+ *
9
+ * import ApplicationController from './application_controller'
10
+ *
11
+ * export default class extends ApplicationController { ... }
12
+ *
13
+ * Learn more at: https://docs.stimulusreflex.com
14
+ */
15
+ export default class extends Controller {
16
+ connect () {
17
+ StimulusReflex.register(this)
18
+ }
19
+
20
+ /* Application wide lifecycle methods.
21
+ * Use these methods to handle lifecycle concerns for the entire application.
22
+ * Using the lifecycle is optional, so feel free to delete these stubs if you don't need them.
23
+ *
24
+ * Arguments:
25
+ *
26
+ * element - the element that triggered the reflex
27
+ * may be different than the Stimulus controller's this.element
28
+ *
29
+ * reflex - the name of the reflex e.g. "ExampleReflex#demo"
30
+ *
31
+ * error - error message from the server
32
+ */
33
+
34
+ beforeReflex (element, reflex) {
35
+ // document.body.classList.add('wait')
36
+ }
37
+
38
+ reflexSuccess (element, reflex, error) {
39
+ // show success message etc...
40
+ }
41
+
42
+ reflexError (element, reflex, error) {
43
+ // show error message etc...
44
+ }
45
+
46
+ afterReflex (element, reflex) {
47
+ // document.body.classList.remove('wait')
48
+
49
+ const focusElement = this.element.querySelector('[autofocus]')
50
+ if (focusElement) {
51
+ focusElement.focus()
52
+
53
+ // shenanigans to ensure that the cursor is placed at the end of the existing value
54
+ const value = focusElement.value
55
+ focusElement.value = ''
56
+ focusElement.value = value
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationReflex < StimulusReflex::Reflex
4
+ # Put application wide Reflex behavior in this file.
5
+ #
6
+ # Example:
7
+ #
8
+ # # If your ActionCable connection is: `identified_by :current_user`
9
+ # delegate :current_user, to: :channel
10
+ #
11
+ # Learn more at: https://docs.stimulusreflex.com
12
+ end
@@ -0,0 +1,37 @@
1
+ import ApplicationController from './application_controller'
2
+
3
+ /* This is the custom StimulusReflex controller for <%= @name.classify %>Reflex.
4
+ * Learn more at: https://docs.stimulusreflex.com
5
+ */
6
+ export default class extends ApplicationController {
7
+ /* Reflex specific lifecycle methods.
8
+ * Use methods similar to this example to handle lifecycle concerns for a specific Reflex method.
9
+ * Using the lifecycle is optional, so feel free to delete these stubs if you don't need them.
10
+ *
11
+ * Example:
12
+ *
13
+ * <a href="#" data-reflex="<%= @name.classify %>Reflex#example">Example</a>
14
+ *
15
+ * Arguments:
16
+ *
17
+ * element - the element that triggered the reflex
18
+ * may be different than the Stimulus controller's this.element
19
+ *
20
+ * reflex - the name of the reflex e.g. "<%= @name.classify %>Reflex#example"
21
+ *
22
+ * error - error message from the server
23
+ */
24
+
25
+ // beforeUpdate(element, reflex) {
26
+ // element.innerText = 'Updating...'
27
+ // }
28
+
29
+ // updateSuccess(element, reflex) {
30
+ // element.innerText = 'Updated Successfully.'
31
+ // }
32
+
33
+ // updateError(element, reflex, error) {
34
+ // console.error('updateError', error);
35
+ // element.innerText = 'Updated Failed!'
36
+ // }
37
+ }
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ class <%= @name.classify %>Reflex < ApplicationReflex
4
+ # Add Reflex methods in this file.
5
+ #
6
+ # All Reflex instances expose the following properties:
7
+ #
8
+ # - connection - the ActionCable connection
9
+ # - channel - the ActionCable channel
10
+ # - request - an ActionDispatch::Request proxy for the socket connection
11
+ # - session - the ActionDispatch::Session store for the current visitor
12
+ # - url - the URL of the page that triggered the reflex
13
+ # - element - a Hash like object that represents the HTML element that triggered the reflex
14
+ #
15
+ # Example:
16
+ #
17
+ # def example(argument=true)
18
+ # # Your logic here...
19
+ # # Any declared instance variables will be made available to the Rails controller and view.
20
+ # end
21
+ #
22
+ # Learn more at: https://docs.stimulusreflex.com
23
+ end
@@ -12,6 +12,7 @@ require "stimulus_reflex/version"
12
12
  require "stimulus_reflex/reflex"
13
13
  require "stimulus_reflex/element"
14
14
  require "stimulus_reflex/channel"
15
+ require "generators/stimulus_reflex_generator"
15
16
 
16
17
  module StimulusReflex
17
18
  class Engine < Rails::Engine
@@ -4,7 +4,7 @@ class StimulusReflex::Channel < ActionCable::Channel::Base
4
4
  include CableReady::Broadcaster
5
5
 
6
6
  def stream_name
7
- ids = connection.identifiers.map { |identifier| send(identifier).try(:id) }
7
+ ids = connection.identifiers.map { |identifier| send(identifier).try(:id) || send(identifier) }
8
8
  [
9
9
  params[:channel],
10
10
  params[:room],
@@ -18,6 +18,8 @@ class StimulusReflex::Channel < ActionCable::Channel::Base
18
18
 
19
19
  def receive(data)
20
20
  url = data["url"].to_s
21
+ selectors = (data["selectors"] || []).select(&:present?)
22
+ selectors = data["selectors"] = ["body"] if selectors.blank?
21
23
  target = data["target"].to_s
22
24
  reflex_name, method_name = target.split("#")
23
25
  reflex_name = reflex_name.classify
@@ -27,14 +29,14 @@ class StimulusReflex::Channel < ActionCable::Channel::Base
27
29
  begin
28
30
  reflex_class = reflex_name.constantize
29
31
  raise ArgumentError.new("#{reflex_name} is not a StimulusReflex::Reflex") unless is_reflex?(reflex_class)
30
- reflex = reflex_class.new(self, url: url, element: element)
32
+ reflex = reflex_class.new(self, url: url, element: element, selectors: selectors)
31
33
  delegate_call_to_reflex reflex, method_name, arguments
32
34
  rescue => invoke_error
33
35
  return broadcast_error("StimulusReflex::Channel Failed to invoke #{target}! #{url} #{invoke_error}", data)
34
36
  end
35
37
 
36
38
  begin
37
- render_page_and_broadcast_morph url, reflex, data
39
+ render_page_and_broadcast_morph url, reflex, selectors, data
38
40
  rescue => render_error
39
41
  broadcast_error "StimulusReflex::Channel Failed to re-render #{url} #{render_error}", data
40
42
  end
@@ -60,9 +62,9 @@ class StimulusReflex::Channel < ActionCable::Channel::Base
60
62
  end
61
63
  end
62
64
 
63
- def render_page_and_broadcast_morph(url, reflex, data = {})
65
+ def render_page_and_broadcast_morph(url, reflex, selectors, data = {})
64
66
  html = render_page(url, reflex)
65
- broadcast_morph url, html, data if html.present?
67
+ broadcast_morphs selectors, data, html if html.present?
66
68
  end
67
69
 
68
70
  def render_page(url, reflex)
@@ -96,20 +98,27 @@ class StimulusReflex::Channel < ActionCable::Channel::Base
96
98
  controller.response.body
97
99
  end
98
100
 
99
- def broadcast_morph(url, html, data = {})
100
- html = extract_body_html(html)
101
- cable_ready[stream_name].morph selector: "body", html: html, children_only: true, stimulus_reflex: data
101
+ def broadcast_morphs(selectors, data, html)
102
+ document = Nokogiri::HTML(html)
103
+ selectors = selectors.select { |s| document.css(s).present? }
104
+ selectors.each do |selector|
105
+ cable_ready[stream_name].morph(
106
+ selector: selector,
107
+ html: document.css(selector).inner_html,
108
+ children_only: true,
109
+ permanent_attribute_name: "data-reflex-permanent",
110
+ stimulus_reflex: data.merge(last: selector == selectors.last)
111
+ )
112
+ end
102
113
  cable_ready.broadcast
103
114
  end
104
115
 
105
116
  def broadcast_error(message, data = {})
106
117
  logger.error "\e[31m#{message}\e[0m"
107
- cable_ready[stream_name].dispatch_event name: "stimulus-reflex:500", detail: {stimulus_reflex: data.merge(error: message)}
118
+ cable_ready[stream_name].dispatch_event(
119
+ name: "stimulus-reflex:500",
120
+ detail: {stimulus_reflex: data.merge(error: message)}
121
+ )
108
122
  cable_ready.broadcast
109
123
  end
110
-
111
- def extract_body_html(html)
112
- doc = Nokogiri::HTML(html)
113
- doc.css("body").to_s
114
- end
115
124
  end
@@ -1,15 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class StimulusReflex::Reflex
4
- attr_reader :channel, :url, :element
4
+ attr_reader :channel, :url, :element, :selectors
5
5
 
6
6
  delegate :connection, to: :channel
7
7
  delegate :session, to: :request
8
8
 
9
- def initialize(channel, url: nil, element: nil)
9
+ def initialize(channel, url: nil, element: nil, selectors: [])
10
10
  @channel = channel
11
11
  @url = url
12
12
  @element = element
13
+ @selectors = selectors
13
14
  end
14
15
 
15
16
  def request
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StimulusReflex
4
- VERSION = "2.0.2"
4
+ VERSION = "2.1.4"
5
5
  end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "fileutils"
4
+
5
+ namespace :stimulus_reflex do
6
+ desc "Install StimulusReflex in this application"
7
+ task install: :environment do
8
+ system "bundle exec rails webpacker:install:stimulus"
9
+ system "yarn add stimulus_reflex"
10
+
11
+ FileUtils.mkdir_p Rails.root.join("app/javascript/controllers"), verbose: true
12
+ FileUtils.mkdir_p Rails.root.join("app/reflexes"), verbose: true
13
+
14
+ filepath = Rails.root.join("app/javascript/controllers/index.js")
15
+ puts "Updating #{filepath}"
16
+ lines = File.open(filepath, "r") { |f| f.readlines }
17
+ import_line = lines.find { |line| line.start_with?("import StimulusReflex") }
18
+ initialize_line = lines.find { |line| line.start_with?("StimulusReflex.initialize") }
19
+ unless import_line
20
+ matches = lines.select { |line| line =~ /\A(require|import)/ }
21
+ lines.insert lines.index(matches.last).to_i + 1, "import StimulusReflex from 'stimulus_reflex'\n"
22
+ end
23
+ lines << "StimulusReflex.initialize(application)\n" unless initialize_line
24
+ File.open(filepath, "w") { |f| f.write lines.join }
25
+
26
+ system "bundle exec rails generate stimulus_reflex example"
27
+ end
28
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators/test_case"
4
+ require_relative "../test_helper"
5
+
6
+ class StimulusReflexGeneratorTest < Rails::Generators::TestCase
7
+ tests StimulusReflexGenerator
8
+ destination File.expand_path("../../tmp", __FILE__)
9
+ setup :prepare_destination
10
+
11
+ test "creates named controller and reflex files" do
12
+ run_generator %w[demo]
13
+ assert_file "app/javascript/controllers/application_controller.js"
14
+ assert_file "app/javascript/controllers/demo_controller.js", /DemoReflex/
15
+ assert_file "app/reflexes/application_reflex.rb"
16
+ assert_file "app/reflexes/demo_reflex.rb", /DemoReflex/
17
+ end
18
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ ENV["RAILS_ENV"] ||= "test"
4
+ require_relative "../lib/stimulus_reflex"
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationReflex < StimulusReflex::Reflex
4
+ # Put application wide Reflex behavior in this file.
5
+ #
6
+ # Example:
7
+ #
8
+ # # If your ActionCable connection is: `identified_by :current_user`
9
+ # delegate :current_user, to: :channel
10
+ #
11
+ # Learn more at: https://docs.stimulusreflex.com
12
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ class DemoReflex < ApplicationReflex
4
+ # Add Reflex methods in this file.
5
+ #
6
+ # All Reflex instances expose the following properties:
7
+ #
8
+ # - connection - the ActionCable connection
9
+ # - channel - the ActionCable channel
10
+ # - request - an ActionDispatch::Request proxy for the socket connection
11
+ # - session - the ActionDispatch::Session store for the current visitor
12
+ # - url - the URL of the page that triggered the reflex
13
+ # - element - a Hash like object that represents the HTML element that triggered the reflex
14
+ #
15
+ # Example:
16
+ #
17
+ # def example(argument=true)
18
+ # # Your logic here...
19
+ # # Any declared instance variables will be made available to the Rails controller and view.
20
+ # end
21
+ #
22
+ # Learn more at: https://docs.stimulusreflex.com
23
+ end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus_reflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins
8
- - Ron Cooke
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2019-09-30 00:00:00.000000000 Z
11
+ date: 2019-10-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rack
@@ -59,14 +58,14 @@ dependencies:
59
58
  requirements:
60
59
  - - ">="
61
60
  - !ruby/object:Gem::Version
62
- version: 4.0.3
61
+ version: 4.0.7
63
62
  type: :runtime
64
63
  prerelease: false
65
64
  version_requirements: !ruby/object:Gem::Requirement
66
65
  requirements:
67
66
  - - ">="
68
67
  - !ruby/object:Gem::Version
69
- version: 4.0.3
68
+ version: 4.0.7
70
69
  - !ruby/object:Gem::Dependency
71
70
  name: bundler
72
71
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +139,6 @@ dependencies:
140
139
  description:
141
140
  email:
142
141
  - natehop@gmail.com
143
- - brasco@thebrascode.com
144
142
  executables: []
145
143
  extensions: []
146
144
  extra_rdoc_files: []
@@ -152,13 +150,26 @@ files:
152
150
  - README.md
153
151
  - Rakefile
154
152
  - bin/console
153
+ - bin/loc
154
+ - bin/rake
155
155
  - bin/setup
156
156
  - bin/standardize
157
+ - lib/generators/USAGE
158
+ - lib/generators/stimulus_reflex_generator.rb
159
+ - lib/generators/templates/application_controller.js
160
+ - lib/generators/templates/application_reflex.rb
161
+ - lib/generators/templates/custom_controller.js
162
+ - lib/generators/templates/custom_reflex.rb
157
163
  - lib/stimulus_reflex.rb
158
164
  - lib/stimulus_reflex/channel.rb
159
165
  - lib/stimulus_reflex/element.rb
160
166
  - lib/stimulus_reflex/reflex.rb
161
167
  - lib/stimulus_reflex/version.rb
168
+ - lib/tasks/stimulus_reflex/install.rake
169
+ - test/generators/stimulus_reflex_generator_test.rb
170
+ - test/test_helper.rb
171
+ - test/tmp/app/reflexes/application_reflex.rb
172
+ - test/tmp/app/reflexes/demo_reflex.rb
162
173
  homepage: https://github.com/hopsoft/stimulus_reflex
163
174
  licenses:
164
175
  - MIT
@@ -181,5 +192,9 @@ requirements: []
181
192
  rubygems_version: 3.0.3
182
193
  signing_key:
183
194
  specification_version: 4
184
- summary: Build reactive Single Page Applications (SPAs) with Rails and Stimulus
185
- test_files: []
195
+ summary: Build reactive applications with the Rails tooling you already know and love.
196
+ test_files:
197
+ - test/test_helper.rb
198
+ - test/generators/stimulus_reflex_generator_test.rb
199
+ - test/tmp/app/reflexes/demo_reflex.rb
200
+ - test/tmp/app/reflexes/application_reflex.rb