stimulizer 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/stimulizer/version.rb +1 -1
- data/lib/stimulizer.rb +11 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7ff225da6cb516af29d0cd30787586c6c13a9ac6db4bb26eaa2e8dc11f832d0
|
4
|
+
data.tar.gz: 88c7d3e6259d1052c19e254f15402ff859ccd8e480d21254b13f29f141d80ff6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4b33e806d801cebce6220f0c6d63ed14facc335fd6e8eeb38c893b38fffba85e8fa6cde19b30d9a42d0bea36dcf7e833b895c2648a54c9a8d9da231cfb26da3
|
7
|
+
data.tar.gz: d7049053a80543023684f9581c37ac4d32b11a6ab835079af617a9a6a7a12850cabcad8b316d3b4ecd8c4053bb693d2490f7be98de6ad4ffda4e323db60d0a4a
|
data/README.md
CHANGED
data/lib/stimulizer/version.rb
CHANGED
data/lib/stimulizer.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "stimulizer"
|
4
|
+
|
3
5
|
require "active_support/concern"
|
4
6
|
require "dry-configurable"
|
5
7
|
require "lucky_case"
|
@@ -32,7 +34,15 @@ module Stimulizer
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def stimulus_hash(*args)
|
35
|
-
|
37
|
+
if args.size == 1 && !args.first.is_a?(Hash)
|
38
|
+
build_stimulus_hash(args.first)
|
39
|
+
elsif args.size == 1 && args.first.is_a?(Hash)
|
40
|
+
build_stimulus_hash(**args.first)
|
41
|
+
elsif args.size == 2 && args[1..].all? { |a| a.is_a?(Hash) }
|
42
|
+
build_stimulus_hash(args[0], **args[1..].first)
|
43
|
+
else
|
44
|
+
raise ArgumentError, "wrong number of arguments (given #{args.size}, expected 1..2)"
|
45
|
+
end
|
36
46
|
end
|
37
47
|
|
38
48
|
def stimulus(*args)
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stimulizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt E Patterson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-11-04 00:00:00.000000000 Z
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email:
|
57
57
|
- mattp@digimonkey.com
|
58
58
|
executables: []
|
@@ -81,7 +81,7 @@ metadata:
|
|
81
81
|
homepage_uri: https://github.com/mepatterson/stimulizer
|
82
82
|
source_code_uri: https://github.com/mepatterson/stimulizer
|
83
83
|
changelog_uri: https://github.com/mepatterson/stimulizer/blob/main/CHANGELOG.md
|
84
|
-
post_install_message:
|
84
|
+
post_install_message:
|
85
85
|
rdoc_options: []
|
86
86
|
require_paths:
|
87
87
|
- lib
|
@@ -96,8 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
|
-
rubygems_version: 3.
|
100
|
-
signing_key:
|
99
|
+
rubygems_version: 3.3.7
|
100
|
+
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Stimulizer provides convenience methods for working with StimulusJS in views,
|
103
103
|
templates, and components.
|