stimulus_reflex 3.3.0 → 3.4.0.pre0
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 +4 -4
- data/CHANGELOG.md +55 -8
- data/Gemfile.lock +66 -65
- data/README.md +5 -2
- data/lib/generators/stimulus_reflex/config_generator.rb +14 -0
- data/lib/generators/{stimulus_reflex_generator.rb → stimulus_reflex/stimulus_reflex_generator.rb} +0 -0
- data/lib/generators/{templates → stimulus_reflex/templates}/app/javascript/controllers/%file_name%_controller.js.tt +0 -0
- data/lib/generators/{templates → stimulus_reflex/templates}/app/javascript/controllers/application_controller.js.tt +0 -0
- data/lib/generators/{templates → stimulus_reflex/templates}/app/reflexes/%file_name%_reflex.rb.tt +0 -0
- data/lib/generators/{templates → stimulus_reflex/templates}/app/reflexes/application_reflex.rb.tt +0 -0
- data/lib/generators/stimulus_reflex/templates/config/initializers/stimulus_reflex.rb +9 -0
- data/lib/stimulus_reflex.rb +1 -2
- data/lib/stimulus_reflex/broadcasters/broadcaster.rb +3 -7
- data/lib/stimulus_reflex/broadcasters/page_broadcaster.rb +2 -2
- data/lib/stimulus_reflex/broadcasters/selector_broadcaster.rb +2 -2
- data/lib/stimulus_reflex/configuration.rb +24 -0
- data/lib/stimulus_reflex/element.rb +8 -0
- data/lib/stimulus_reflex/reflex.rb +21 -18
- data/lib/stimulus_reflex/sanity_checker.rb +36 -18
- data/lib/stimulus_reflex/version.rb +1 -1
- data/lib/tasks/stimulus_reflex/install.rake +11 -8
- data/package.json +63 -0
- data/stimulus_reflex.gemspec +40 -0
- data/tags +98 -0
- data/test/generators/stimulus_reflex_generator_test.rb +1 -0
- data/test/tmp/app/reflexes/application_reflex.rb +12 -0
- data/test/tmp/app/reflexes/user_reflex.rb +33 -0
- data/yarn.lock +6261 -0
- metadata +25 -15
- data/lib/stimulus_reflex/channel.rb +0 -110
@@ -17,7 +17,7 @@ module StimulusReflex
|
|
17
17
|
children_only: true,
|
18
18
|
permanent_attribute_name: permanent_attribute_name,
|
19
19
|
stimulus_reflex: data.merge({
|
20
|
-
|
20
|
+
morph: to_sym
|
21
21
|
})
|
22
22
|
)
|
23
23
|
else
|
@@ -25,7 +25,7 @@ module StimulusReflex
|
|
25
25
|
selector: selector,
|
26
26
|
html: fragment.to_html,
|
27
27
|
stimulus_reflex: data.merge({
|
28
|
-
|
28
|
+
morph: to_sym
|
29
29
|
})
|
30
30
|
)
|
31
31
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module StimulusReflex
|
4
|
+
class << self
|
5
|
+
def configure
|
6
|
+
yield configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
def configuration
|
10
|
+
@configuration ||= Configuration.new
|
11
|
+
end
|
12
|
+
|
13
|
+
alias_method :config, :configuration
|
14
|
+
end
|
15
|
+
|
16
|
+
class Configuration
|
17
|
+
attr_accessor :exit_on_failed_sanity_checks, :parent_channel
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
@exit_on_failed_sanity_checks = true
|
21
|
+
@parent_channel = "ApplicationCable::Channel"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -11,6 +11,14 @@ class StimulusReflex::Element < OpenStruct
|
|
11
11
|
@data_attributes.transform_keys! { |key| key.delete_prefix "data-" }
|
12
12
|
end
|
13
13
|
|
14
|
+
def signed
|
15
|
+
@signed ||= ->(accessor) { GlobalID::Locator.locate_signed(dataset[accessor]) }
|
16
|
+
end
|
17
|
+
|
18
|
+
def unsigned
|
19
|
+
@unsigned ||= ->(accessor) { GlobalID::Locator.locate(dataset[accessor]) }
|
20
|
+
end
|
21
|
+
|
14
22
|
def dataset
|
15
23
|
@dataset ||= OpenStruct.new(data_attributes.merge(data_attributes.transform_keys(&:underscore)))
|
16
24
|
end
|
@@ -45,8 +45,10 @@ class StimulusReflex::Reflex
|
|
45
45
|
|
46
46
|
attr_reader :channel, :url, :element, :selectors, :method_name, :broadcaster, :permanent_attribute_name
|
47
47
|
|
48
|
+
alias_method :action_name, :method_name # for compatibility with controller libraries like Pundit that expect an action name
|
49
|
+
|
48
50
|
delegate :connection, :stream_name, to: :channel
|
49
|
-
delegate :session, to: :request
|
51
|
+
delegate :flash, :session, to: :request
|
50
52
|
delegate :broadcast, :broadcast_message, to: :broadcaster
|
51
53
|
|
52
54
|
def initialize(channel, url: nil, element: nil, selectors: [], method_name: nil, permanent_attribute_name: nil, params: {})
|
@@ -66,21 +68,26 @@ class StimulusReflex::Reflex
|
|
66
68
|
uri = URI.parse(url)
|
67
69
|
path = ActionDispatch::Journey::Router::Utils.normalize_path(uri.path)
|
68
70
|
query_hash = Rack::Utils.parse_nested_query(uri.query)
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
)
|
81
|
-
)
|
71
|
+
mock_env = Rack::MockRequest.env_for(uri.to_s)
|
72
|
+
|
73
|
+
mock_env.merge!(
|
74
|
+
"rack.request.query_hash" => query_hash,
|
75
|
+
"rack.request.query_string" => uri.query,
|
76
|
+
"ORIGINAL_SCRIPT_NAME" => "",
|
77
|
+
"ORIGINAL_FULLPATH" => path,
|
78
|
+
Rack::SCRIPT_NAME => "",
|
79
|
+
Rack::PATH_INFO => path,
|
80
|
+
Rack::REQUEST_PATH => path,
|
81
|
+
Rack::QUERY_STRING => uri.query
|
82
82
|
)
|
83
|
+
|
84
|
+
env = connection.env.merge(mock_env)
|
85
|
+
req = ActionDispatch::Request.new(env)
|
86
|
+
|
83
87
|
path_params = Rails.application.routes.recognize_path_with_request(req, url, req.env[:extras] || {})
|
88
|
+
path_params[:controller] = path_params[:controller].force_encoding("UTF-8")
|
89
|
+
path_params[:action] = path_params[:action].force_encoding("UTF-8")
|
90
|
+
|
84
91
|
req.env.merge(ActionDispatch::Http::Parameters::PARAMETERS_KEY => path_params)
|
85
92
|
req.env["action_dispatch.request.parameters"] = req.parameters.merge(@params)
|
86
93
|
req.tap { |r| r.session.send :load! }
|
@@ -112,10 +119,6 @@ class StimulusReflex::Reflex
|
|
112
119
|
end
|
113
120
|
end
|
114
121
|
|
115
|
-
def url_params
|
116
|
-
@url_params ||= Rails.application.routes.recognize_path_with_request(request, request.path, request.env[:extras] || {})
|
117
|
-
end
|
118
|
-
|
119
122
|
def process(name, *args)
|
120
123
|
reflex_invoked = false
|
121
124
|
result = run_callbacks(:process) {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class StimulusReflex::SanityChecker
|
4
|
-
NODE_VERSION_FORMAT = /(\d+\.\d+\.\d+.*):/
|
5
4
|
JSON_VERSION_FORMAT = /(\d+\.\d+\.\d+.*)"/
|
6
5
|
|
7
6
|
def self.check!
|
@@ -12,25 +11,32 @@ class StimulusReflex::SanityChecker
|
|
12
11
|
|
13
12
|
def check_caching_enabled
|
14
13
|
unless caching_enabled?
|
15
|
-
|
16
|
-
|
14
|
+
warn_and_exit <<~WARN
|
15
|
+
Stimulus Reflex requires caching to be enabled. Caching allows the session to be modified during ActionCable requests.
|
17
16
|
To enable caching in development, run:
|
18
17
|
rails dev:cache
|
19
18
|
WARN
|
20
19
|
end
|
20
|
+
|
21
|
+
unless not_null_store?
|
22
|
+
warn_and_exit <<~WARN
|
23
|
+
Stimulus Reflex requires caching to be enabled. Caching allows the session to be modified during ActionCable requests.
|
24
|
+
But your config.cache_store is set to :null_store, so it won't work.
|
25
|
+
WARN
|
26
|
+
end
|
21
27
|
end
|
22
28
|
|
23
29
|
def check_javascript_package_version
|
24
30
|
if javascript_package_version.nil?
|
25
|
-
|
26
|
-
|
31
|
+
warn_and_exit <<~WARN
|
32
|
+
Can't locate the stimulus_reflex NPM package.
|
27
33
|
Either add it to your package.json as a dependency or use "yarn link stimulus_reflex" if you are doing development.
|
28
34
|
WARN
|
29
35
|
end
|
30
36
|
|
31
37
|
unless javascript_version_matches?
|
32
|
-
|
33
|
-
|
38
|
+
warn_and_exit <<~WARN
|
39
|
+
The Stimulus Reflex javascript package version (#{javascript_package_version}) does not match the Rubygem version (#{gem_version}).
|
34
40
|
To update the Stimulus Reflex npm package:
|
35
41
|
yarn upgrade stimulus_reflex@#{gem_version}
|
36
42
|
WARN
|
@@ -40,8 +46,11 @@ class StimulusReflex::SanityChecker
|
|
40
46
|
private
|
41
47
|
|
42
48
|
def caching_enabled?
|
43
|
-
Rails.application.config.action_controller.perform_caching
|
44
|
-
|
49
|
+
Rails.application.config.action_controller.perform_caching
|
50
|
+
end
|
51
|
+
|
52
|
+
def not_null_store?
|
53
|
+
Rails.application.config.cache_store != :null_store
|
45
54
|
end
|
46
55
|
|
47
56
|
def javascript_version_matches?
|
@@ -53,14 +62,11 @@ class StimulusReflex::SanityChecker
|
|
53
62
|
end
|
54
63
|
|
55
64
|
def javascript_package_version
|
56
|
-
|
57
|
-
@_js_version = find_javascript_package_version
|
65
|
+
@_js_version ||= find_javascript_package_version
|
58
66
|
end
|
59
67
|
|
60
68
|
def find_javascript_package_version
|
61
|
-
if (match = search_file(
|
62
|
-
match[NODE_VERSION_FORMAT, 1]
|
63
|
-
elsif (match = search_file(yarn_link_path, regex: /version/))
|
69
|
+
if (match = search_file(package_json_path, regex: /version/))
|
64
70
|
match[JSON_VERSION_FORMAT, 1]
|
65
71
|
end
|
66
72
|
end
|
@@ -70,11 +76,23 @@ class StimulusReflex::SanityChecker
|
|
70
76
|
File.foreach(path).grep(regex).first
|
71
77
|
end
|
72
78
|
|
73
|
-
def
|
74
|
-
Rails.root.join("
|
79
|
+
def package_json_path
|
80
|
+
Rails.root.join("node_modules", "stimulus_reflex", "package.json")
|
75
81
|
end
|
76
82
|
|
77
|
-
def
|
78
|
-
|
83
|
+
def warn_and_exit(text)
|
84
|
+
puts "WARNING:"
|
85
|
+
puts text
|
86
|
+
exit_with_info if StimulusReflex.config.exit_on_failed_sanity_checks
|
87
|
+
end
|
88
|
+
|
89
|
+
def exit_with_info
|
90
|
+
puts
|
91
|
+
puts <<~INFO
|
92
|
+
If you know what you are doing and you want to start the application anyway,
|
93
|
+
you can add the following directive to an initializer:
|
94
|
+
StimulusReflex.config.exit_on_failed_sanity_checks = false
|
95
|
+
INFO
|
96
|
+
exit
|
79
97
|
end
|
80
98
|
end
|
@@ -8,16 +8,17 @@ namespace :stimulus_reflex do
|
|
8
8
|
task install: :environment do
|
9
9
|
system "bundle exec rails webpacker:install:stimulus"
|
10
10
|
gem_version = StimulusReflex::VERSION.gsub(".pre", "-pre")
|
11
|
-
system "yarn add stimulus_reflex@#{gem_version}"
|
11
|
+
system "yarn add cable_ready stimulus_reflex@#{gem_version}"
|
12
|
+
main_folder = defined?(Webpacker) ? Webpacker.config.source_path.to_s.gsub("#{Rails.root}/", "") : "app/javascript"
|
12
13
|
|
13
|
-
FileUtils.mkdir_p Rails.root.join("
|
14
|
+
FileUtils.mkdir_p Rails.root.join("#{main_folder}/controllers"), verbose: true
|
14
15
|
FileUtils.mkdir_p Rails.root.join("app/reflexes"), verbose: true
|
15
16
|
|
16
|
-
filepath =
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
filepath = [
|
18
|
+
"#{main_folder}/controllers/index.js",
|
19
|
+
"#{main_folder}/controllers/index.ts",
|
20
|
+
"#{main_folder}/packs/application.js",
|
21
|
+
"#{main_folder}/packs/application.ts"
|
21
22
|
]
|
22
23
|
.select { |path| File.exist?(path) }
|
23
24
|
.map { |path| Rails.root.join(path) }
|
@@ -42,7 +43,8 @@ namespace :stimulus_reflex do
|
|
42
43
|
end
|
43
44
|
|
44
45
|
initialize_line = lines.find { |line| line.start_with?("StimulusReflex.initialize") }
|
45
|
-
lines << "StimulusReflex.initialize(application, { consumer, controller,
|
46
|
+
lines << "StimulusReflex.initialize(application, { consumer, controller, isolate: true })\n" unless initialize_line
|
47
|
+
lines << "StimulusReflex.debug = process.env.RAILS_ENV === 'development'\n" unless initialize_line
|
46
48
|
File.open(filepath, "w") { |f| f.write lines.join }
|
47
49
|
|
48
50
|
filepath = Rails.root.join("config/environments/development.rb")
|
@@ -63,6 +65,7 @@ namespace :stimulus_reflex do
|
|
63
65
|
end
|
64
66
|
|
65
67
|
system "bundle exec rails generate stimulus_reflex example"
|
68
|
+
system "bundle exec rails generate stimulus_reflex:config"
|
66
69
|
system "rails dev:cache" unless Rails.root.join("tmp", "caching-dev.txt").exist?
|
67
70
|
end
|
68
71
|
end
|
data/package.json
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"name": "stimulus_reflex",
|
3
|
+
"version": "3.3.0",
|
4
|
+
"description": "Build reactive applications with the Rails tooling you already know and love.",
|
5
|
+
"keywords": [
|
6
|
+
"ruby",
|
7
|
+
"rails",
|
8
|
+
"websockets",
|
9
|
+
"actioncable",
|
10
|
+
"turbolinks",
|
11
|
+
"reactive",
|
12
|
+
"cable",
|
13
|
+
"ujs",
|
14
|
+
"ssr",
|
15
|
+
"stimulus",
|
16
|
+
"reflex",
|
17
|
+
"stimulus_reflex",
|
18
|
+
"dom",
|
19
|
+
"morphdom"
|
20
|
+
],
|
21
|
+
"homepage": "https://docs.stimulusreflex.com/",
|
22
|
+
"bugs": {
|
23
|
+
"url": "https://github.com/hopsoft/stimulus_reflex/issues"
|
24
|
+
},
|
25
|
+
"repository": {
|
26
|
+
"type": "git",
|
27
|
+
"url": "git+https://github.com:hopsoft/stimulus_reflex.git"
|
28
|
+
},
|
29
|
+
"license": "MIT",
|
30
|
+
"author": "Nathan Hopkins <natehop@gmail.com>",
|
31
|
+
"source": "javascript/stimulus_reflex.js",
|
32
|
+
"main": "javascript/dist/stimulus_reflex.js",
|
33
|
+
"module": "javascript/dist/stimulus_reflex.module.js",
|
34
|
+
"esmodule": "javascript/dist/stimulus_reflex.modern.js",
|
35
|
+
"scripts": {
|
36
|
+
"prepare": "yarn build",
|
37
|
+
"postinstall": "node javascript/scripts/post_install.js",
|
38
|
+
"prettier-standard:check": "yarn run prettier-standard --check *.js **/*.js",
|
39
|
+
"prettier-standard:format": "yarn run prettier-standard *.js **/*.js",
|
40
|
+
"test": "yarn run mocha --require @babel/register --require esm ./javascript/test",
|
41
|
+
"build": "microbundle --target browser --format modern,es,cjs --no-strict",
|
42
|
+
"dev": "microbundle watch --target browser --format modern,es,cjs --no-strict"
|
43
|
+
},
|
44
|
+
"peerDependencies": {
|
45
|
+
"@rails/actioncable": ">= 6.0",
|
46
|
+
"cable_ready": ">= 4.3.0",
|
47
|
+
"stimulus": ">= 1.1"
|
48
|
+
},
|
49
|
+
"devDependencies": {
|
50
|
+
"@babel/core": "^7.6.2",
|
51
|
+
"@babel/preset-env": "^7.6.2",
|
52
|
+
"@babel/register": "^7.6.2",
|
53
|
+
"@rails/actioncable": "^6.0.3-3",
|
54
|
+
"assert": "^2.0.0",
|
55
|
+
"cable_ready": "^4.4.0-pre2",
|
56
|
+
"esm": "^3.2.25",
|
57
|
+
"jsdom": "^16.0.1",
|
58
|
+
"microbundle": "^0.12.3",
|
59
|
+
"mocha": "^8.0.1",
|
60
|
+
"prettier-standard": "^16.1.0",
|
61
|
+
"stimulus": "^1.1.1"
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require File.expand_path("../lib/stimulus_reflex/version", __FILE__)
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = "stimulus_reflex"
|
5
|
+
gem.license = "MIT"
|
6
|
+
gem.version = StimulusReflex::VERSION
|
7
|
+
gem.authors = ["Nathan Hopkins"]
|
8
|
+
gem.email = ["natehop@gmail.com"]
|
9
|
+
gem.homepage = "https://github.com/hopsoft/stimulus_reflex"
|
10
|
+
gem.summary = "Build reactive applications with the Rails tooling you already know and love."
|
11
|
+
gem.post_install_message = <<~MESSAGE
|
12
|
+
Friendly reminder: When updating the stimulus_reflex gem,
|
13
|
+
don't forget to update your npm package as well.
|
14
|
+
|
15
|
+
See https://www.npmjs.com/package/stimulus_reflex
|
16
|
+
MESSAGE
|
17
|
+
|
18
|
+
gem.metadata = {
|
19
|
+
"bug_tracker_uri" => "https://github.com/hopsoft/stimulus_reflex/issues",
|
20
|
+
"changelog_uri" => "https://github.com/hopsoft/stimulus_reflex/CHANGELOG.md",
|
21
|
+
"documentation_uri" => "https://docs.stimulusreflex.com",
|
22
|
+
"homepage_uri" => gem.homepage,
|
23
|
+
"source_code_uri" => gem.homepage
|
24
|
+
}
|
25
|
+
|
26
|
+
gem.files = Dir["lib/**/*", "bin/*", "[A-Z]*"]
|
27
|
+
gem.test_files = Dir["test/**/*.rb"]
|
28
|
+
|
29
|
+
gem.add_dependency "rack"
|
30
|
+
gem.add_dependency "nokogiri"
|
31
|
+
gem.add_dependency "rails", ">= 5.2"
|
32
|
+
gem.add_dependency "cable_ready", ">= 4.3.0"
|
33
|
+
gem.add_dependency "redis"
|
34
|
+
|
35
|
+
gem.add_development_dependency "bundler", "~> 2.0"
|
36
|
+
gem.add_development_dependency "pry-nav"
|
37
|
+
gem.add_development_dependency "pry"
|
38
|
+
gem.add_development_dependency "rake"
|
39
|
+
gem.add_development_dependency "standardrb"
|
40
|
+
end
|
data/tags
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
2
|
+
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
3
|
+
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
4
|
+
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
5
|
+
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
6
|
+
!_TAG_PROGRAM_VERSION 5.8 //
|
7
|
+
ApplicationReflex test/tmp/app/reflexes/application_reflex.rb /^class ApplicationReflex < StimulusReflex::Reflex$/;" c
|
8
|
+
Broadcaster lib/stimulus_reflex/broadcasters/broadcaster.rb /^ class Broadcaster$/;" c class:StimulusReflex
|
9
|
+
CompareXML lib/stimulus_reflex/compare_xml.rb /^module CompareXML$/;" m
|
10
|
+
Engine lib/stimulus_reflex.rb /^ class Engine < Rails::Engine$/;" c class:StimulusReflex
|
11
|
+
NothingBroadcaster lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb /^ class NothingBroadcaster < Broadcaster$/;" c class:StimulusReflex
|
12
|
+
PageBroadcaster lib/stimulus_reflex/broadcasters/page_broadcaster.rb /^ class PageBroadcaster < Broadcaster$/;" c class:StimulusReflex
|
13
|
+
SelectorBroadcaster lib/stimulus_reflex/broadcasters/selector_broadcaster.rb /^ class SelectorBroadcaster < Broadcaster$/;" c class:StimulusReflex
|
14
|
+
StimulusReflex lib/stimulus_reflex.rb /^module StimulusReflex$/;" m
|
15
|
+
StimulusReflex lib/stimulus_reflex/broadcasters/broadcaster.rb /^module StimulusReflex$/;" m
|
16
|
+
StimulusReflex lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb /^module StimulusReflex$/;" m
|
17
|
+
StimulusReflex lib/stimulus_reflex/broadcasters/page_broadcaster.rb /^module StimulusReflex$/;" m
|
18
|
+
StimulusReflex lib/stimulus_reflex/broadcasters/selector_broadcaster.rb /^module StimulusReflex$/;" m
|
19
|
+
StimulusReflex lib/stimulus_reflex/channel.rb /^class StimulusReflex::Channel < ActionCable::Channel::Base$/;" c
|
20
|
+
StimulusReflex lib/stimulus_reflex/element.rb /^class StimulusReflex::Element < OpenStruct$/;" c
|
21
|
+
StimulusReflex lib/stimulus_reflex/reflex.rb /^class StimulusReflex::Reflex$/;" c
|
22
|
+
StimulusReflex lib/stimulus_reflex/version.rb /^module StimulusReflex$/;" m
|
23
|
+
StimulusReflexGenerator lib/generators/stimulus_reflex_generator.rb /^class StimulusReflexGenerator < Rails::Generators::NamedBase$/;" c
|
24
|
+
StimulusReflexGeneratorTest test/generators/stimulus_reflex_generator_test.rb /^class StimulusReflexGeneratorTest < Rails::Generators::TestCase$/;" c
|
25
|
+
UserReflex test/tmp/app/reflexes/user_reflex.rb /^class UserReflex < ApplicationReflex$/;" c
|
26
|
+
addDifference lib/stimulus_reflex/compare_xml.rb /^ def addDifference(node1, node2, diff1, diff2, opts, differences)$/;" f class:CompareXML
|
27
|
+
add_callback lib/stimulus_reflex/reflex.rb /^ def add_callback(kind, *args, &block)$/;" f class:StimulusReflex
|
28
|
+
after_reflex lib/stimulus_reflex/reflex.rb /^ def after_reflex(*args, &block)$/;" f class:StimulusReflex
|
29
|
+
around_reflex lib/stimulus_reflex/reflex.rb /^ def around_reflex(*args, &block)$/;" f class:StimulusReflex
|
30
|
+
attrContentExcluded? lib/stimulus_reflex/compare_xml.rb /^ def attrContentExcluded?(a1, a2, opts)$/;" f class:CompareXML
|
31
|
+
attrNameExcluded? lib/stimulus_reflex/compare_xml.rb /^ def attrNameExcluded?(a1, a2, opts)$/;" f class:CompareXML
|
32
|
+
attrsExcluded? lib/stimulus_reflex/compare_xml.rb /^ def attrsExcluded?(a1, a2, opts)$/;" f class:CompareXML
|
33
|
+
before_reflex lib/stimulus_reflex/reflex.rb /^ def before_reflex(*args, &block)$/;" f class:StimulusReflex
|
34
|
+
broadcast lib/stimulus_reflex/broadcasters/broadcaster.rb /^ def broadcast(*args)$/;" f class:StimulusReflex.Broadcaster
|
35
|
+
broadcast lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb /^ def broadcast(_, data)$/;" f class:StimulusReflex.NothingBroadcaster
|
36
|
+
broadcast lib/stimulus_reflex/broadcasters/page_broadcaster.rb /^ def broadcast(selectors, data)$/;" f class:StimulusReflex.PageBroadcaster
|
37
|
+
broadcast lib/stimulus_reflex/broadcasters/selector_broadcaster.rb /^ def broadcast(_, data = {})$/;" f class:StimulusReflex.SelectorBroadcaster
|
38
|
+
broadcast_message lib/stimulus_reflex/broadcasters/broadcaster.rb /^ def broadcast_message(subject:, body: nil, data: {})$/;" f class:StimulusReflex.Broadcaster
|
39
|
+
collapse lib/stimulus_reflex/compare_xml.rb /^ def collapse(text)$/;" f class:CompareXML
|
40
|
+
commit_session lib/stimulus_reflex/channel.rb /^ def commit_session(reflex)$/;" f class:StimulusReflex
|
41
|
+
compareAttributeSets lib/stimulus_reflex/compare_xml.rb /^ def compareAttributeSets(n1, n2, a1_set, a2_set, opts, differences)$/;" f class:CompareXML
|
42
|
+
compareAttributes lib/stimulus_reflex/compare_xml.rb /^ def compareAttributes(n1, n2, a1, a2, opts, differences, status = EQUIVALENT)$/;" f class:CompareXML
|
43
|
+
compareChildren lib/stimulus_reflex/compare_xml.rb /^ def compareChildren(n1_set, n2_set, opts, differences, diffchildren = false, status = EQUIVALENT)$/;" f class:CompareXML
|
44
|
+
compareCommentNodes lib/stimulus_reflex/compare_xml.rb /^ def compareCommentNodes(n1, n2, opts, differences, status = EQUIVALENT)$/;" f class:CompareXML
|
45
|
+
compareDocumentNodes lib/stimulus_reflex/compare_xml.rb /^ def compareDocumentNodes(n1, n2, opts, differences, childopts = {}, diffchildren = false, status = EQUIVALENT)$/;" f class:CompareXML
|
46
|
+
compareElementNodes lib/stimulus_reflex/compare_xml.rb /^ def compareElementNodes(n1, n2, opts, differences, childopts = {}, diffchildren = false, status = EQUIVALENT)$/;" f class:CompareXML
|
47
|
+
compareNodes lib/stimulus_reflex/compare_xml.rb /^ def compareNodes(n1, n2, opts, differences, childopts = {}, diffchildren = false, status = EQUIVALENT)$/;" f class:CompareXML
|
48
|
+
compareSortedAttributeSets lib/stimulus_reflex/compare_xml.rb /^ def compareSortedAttributeSets(n1, n2, a1_set, a2_set, opts, differences, status = EQUIVALENT)$/;" f class:CompareXML
|
49
|
+
compareTextNodes lib/stimulus_reflex/compare_xml.rb /^ def compareTextNodes(n1, n2, opts, differences, status = EQUIVALENT)$/;" f class:CompareXML
|
50
|
+
compareUnsortedAttributeSets lib/stimulus_reflex/compare_xml.rb /^ def compareUnsortedAttributeSets(n1, n2, a1_set, a2_set, opts, differences, status = EQUIVALENT)$/;" f class:CompareXML
|
51
|
+
controller lib/stimulus_reflex/reflex.rb /^ def controller$/;" f
|
52
|
+
copy_application_files lib/generators/stimulus_reflex_generator.rb /^ def copy_application_files$/;" f class:StimulusReflexGenerator
|
53
|
+
dataset lib/stimulus_reflex/element.rb /^ def dataset$/;" f class:StimulusReflex
|
54
|
+
default_reflex lib/stimulus_reflex/reflex.rb /^ def default_reflex$/;" f
|
55
|
+
delegate_call_to_reflex lib/stimulus_reflex/channel.rb /^ def delegate_call_to_reflex(reflex, method_name, arguments = [])$/;" f class:StimulusReflex
|
56
|
+
do_more_stuff test/tmp/app/reflexes/user_reflex.rb /^ def do_more_stuff$/;" f class:UserReflex
|
57
|
+
do_stuff test/tmp/app/reflexes/user_reflex.rb /^ def do_stuff$/;" f class:UserReflex
|
58
|
+
enqueue_message lib/stimulus_reflex/broadcasters/broadcaster.rb /^ def enqueue_message(subject:, body: nil, data: {})$/;" f class:StimulusReflex.Broadcaster
|
59
|
+
equivalent? lib/stimulus_reflex/compare_xml.rb /^ def equivalent?(n1, n2, opts = {}, childopts = {}, diffchildren = false)$/;" f class:CompareXML
|
60
|
+
error javascript/log.js /^function error (response) {$/;" f
|
61
|
+
exception_message_with_backtrace lib/stimulus_reflex/channel.rb /^ def exception_message_with_backtrace(exception)$/;" f class:StimulusReflex
|
62
|
+
execute lib/generators/stimulus_reflex_generator.rb /^ def execute$/;" f class:StimulusReflexGenerator
|
63
|
+
export.reflexAttribute javascript/schema.js /^ reflexAttribute: 'data-reflex',$/;" p
|
64
|
+
export.reflexDatasetAttribute javascript/schema.js /^ reflexDatasetAttribute: 'data-reflex-dataset'$/;" p
|
65
|
+
export.reflexPermanentAttribute javascript/schema.js /^ reflexPermanentAttribute: 'data-reflex-permanent',$/;" p
|
66
|
+
export.reflexRootAttribute javascript/schema.js /^ reflexRootAttribute: 'data-reflex-root',$/;" p
|
67
|
+
findConsumer javascript/consumer.js /^function findConsumer (object, depth = 0) {$/;" f
|
68
|
+
function.success javascript/log.js /^function success (response, options = { halted: false }) {$/;" f
|
69
|
+
halted? lib/stimulus_reflex/reflex.rb /^ def halted?$/;" f
|
70
|
+
initialize lib/stimulus_reflex/broadcasters/broadcaster.rb /^ def initialize(reflex)$/;" f class:StimulusReflex.Broadcaster
|
71
|
+
initialize lib/stimulus_reflex/element.rb /^ def initialize(data = {})$/;" f class:StimulusReflex
|
72
|
+
initialize lib/stimulus_reflex/reflex.rb /^ def initialize(channel, url: nil, element: nil, selectors: [], method_name: nil, permanent_attribute_name: nil, params: {})$/;" f
|
73
|
+
is_reflex? lib/stimulus_reflex/channel.rb /^ def is_reflex?(reflex_class)$/;" f class:StimulusReflex
|
74
|
+
morph lib/stimulus_reflex/reflex.rb /^ def morph(selectors, html = "")$/;" f
|
75
|
+
morphs lib/stimulus_reflex/broadcasters/selector_broadcaster.rb /^ def morphs$/;" f class:StimulusReflex.SelectorBroadcaster
|
76
|
+
nodeExcluded? lib/stimulus_reflex/compare_xml.rb /^ def nodeExcluded?(n, opts)$/;" f class:CompareXML
|
77
|
+
normalize_callback_option! lib/stimulus_reflex/reflex.rb /^ def normalize_callback_option!(options, from, to)$/;" f class:StimulusReflex
|
78
|
+
normalize_callback_options! lib/stimulus_reflex/reflex.rb /^ def normalize_callback_options!(options)$/;" f class:StimulusReflex
|
79
|
+
nothing? lib/stimulus_reflex/broadcasters/broadcaster.rb /^ def nothing?$/;" f class:StimulusReflex.Broadcaster
|
80
|
+
nothing? lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb /^ def nothing?$/;" f class:StimulusReflex.NothingBroadcaster
|
81
|
+
object_with_indifferent_access lib/stimulus_reflex/channel.rb /^ def object_with_indifferent_access(object)$/;" f class:StimulusReflex
|
82
|
+
page? lib/stimulus_reflex/broadcasters/broadcaster.rb /^ def page?$/;" f class:StimulusReflex.Broadcaster
|
83
|
+
page? lib/stimulus_reflex/broadcasters/page_broadcaster.rb /^ def page?$/;" f class:StimulusReflex.PageBroadcaster
|
84
|
+
page_cache lib/stimulus_reflex/channel.rb /^ def page_cache$/;" f class:StimulusReflex
|
85
|
+
params lib/stimulus_reflex/reflex.rb /^ def params$/;" f
|
86
|
+
process lib/stimulus_reflex/reflex.rb /^ def process(name, *args)$/;" f
|
87
|
+
receive lib/stimulus_reflex/channel.rb /^ def receive(data)$/;" f class:StimulusReflex
|
88
|
+
request lib/stimulus_reflex/reflex.rb /^ def request$/;" f
|
89
|
+
selector? lib/stimulus_reflex/broadcasters/broadcaster.rb /^ def selector?$/;" f class:StimulusReflex.Broadcaster
|
90
|
+
selector? lib/stimulus_reflex/broadcasters/selector_broadcaster.rb /^ def selector?$/;" f class:StimulusReflex.SelectorBroadcaster
|
91
|
+
stream_name lib/stimulus_reflex/channel.rb /^ def stream_name$/;" f class:StimulusReflex
|
92
|
+
subscribed lib/stimulus_reflex/channel.rb /^ def subscribed$/;" f class:StimulusReflex
|
93
|
+
to_sym lib/stimulus_reflex/broadcasters/broadcaster.rb /^ def to_sym$/;" f class:StimulusReflex.Broadcaster
|
94
|
+
to_sym lib/stimulus_reflex/broadcasters/nothing_broadcaster.rb /^ def to_sym$/;" f class:StimulusReflex.NothingBroadcaster
|
95
|
+
to_sym lib/stimulus_reflex/broadcasters/page_broadcaster.rb /^ def to_sym$/;" f class:StimulusReflex.PageBroadcaster
|
96
|
+
to_sym lib/stimulus_reflex/broadcasters/selector_broadcaster.rb /^ def to_sym$/;" f class:StimulusReflex.SelectorBroadcaster
|
97
|
+
update test/tmp/app/reflexes/user_reflex.rb /^ def update$/;" f class:UserReflex
|
98
|
+
url_params lib/stimulus_reflex/reflex.rb /^ def url_params$/;" f
|