asbru 0.0.4 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f40ada517e35639198ac0daafbaa5c6b72e098fad324dae809cc4fd6c29d6712
4
- data.tar.gz: 9f36d6adf5f41bba7e7ad6b9fc20bf4cd32e7f3a07fd3e976fd04775af0d3ea2
3
+ metadata.gz: 8653328289429aa14d9eda181f6fb7dc5238b40100f868e97c06b57cf6a19d89
4
+ data.tar.gz: 9c7673198aeaee7c9a806d65768e6af02674c9217236869f075eb11401e3abce
5
5
  SHA512:
6
- metadata.gz: 7567e3494d68b11fcdcb38bae91e9b4245c8984355da0890d6bc26dae87c7c3fbb00531daed779f04f5087ee1bcb49459d01b57b34bf8cee127655393fc0dba7
7
- data.tar.gz: 130a80ec9529e09fcb08c84da66aa32b7beaa68ef682e08536977c4aae451dada58cbe235f77a10c411f5a3aae8266272480992b1bac2428e2a6e01a4bd4cd0d
6
+ metadata.gz: 3b242cc4b0b24c09e7f5c4d14abfe5ee77d09a841991a66a4a7581d076e83796fc165a37f9b6619fd4c345b91d6c8f6b3e418333a17f5fd99450ba53cff19089
7
+ data.tar.gz: f50357a443108f1b701127076d10f4deaa9483921c6b9a3a6b1ef703b37445b35696431d03ba0b300cb5985a6a2540e96739d460f35048ff33fd839f048035ba
@@ -54,10 +54,11 @@ module Asbru
54
54
  end
55
55
 
56
56
  def render_form_element(attribute, options)
57
- new_options = options.merge(
57
+ new_options = options.reverse_merge(
58
58
  {
59
59
  name: tag_name_for(attribute),
60
- errors: errors(attribute)
60
+ errors: errors(attribute),
61
+ errorIcon:{ icon: { name: error_icon } }
61
62
  }
62
63
  )
63
64
 
@@ -210,5 +211,11 @@ module Asbru
210
211
  )
211
212
  )
212
213
  end
214
+
215
+ private
216
+
217
+ def error_icon
218
+ Asbru.config.default_form_error_icon
219
+ end
213
220
  end
214
221
  end
data/lib/asbru/links.rb CHANGED
@@ -7,9 +7,9 @@ module Asbru
7
7
  url,
8
8
  method: nil,
9
9
  link: true,
10
+ remote: false,
10
11
  confirm: nil,
11
12
  **options)
12
-
13
13
  options[:text] = text
14
14
  options[:action] = url
15
15
  options[:link] = link
@@ -17,10 +17,11 @@ module Asbru
17
17
  options[:customData] = {}
18
18
  options[:customData][:'data-method'] = method if method.present?
19
19
  options[:customData][:'data-confirm'] = confirm if confirm.present?
20
- options[:customData].merge(options[:custom_data]) if options[:custom_data]
21
- Asbru::Components::Savage.send "#{Asbru.config.form_builder_prefix}_button",
20
+ options[:customData][:'data-remote'] = remote if remote.present?
21
+ options[:customData].merge!(options[:custom_data]) if options[:custom_data]
22
+
23
+ Asbru::Components::Savage.send "#{Asbru.config.component_prefix}_button",
22
24
  **options
23
- component_prefix
24
25
  end
25
26
 
26
27
  def asbru_link_to(text, url, **options)
data/lib/asbru/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Asbru
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.8'
3
3
  end
data/lib/asbru.rb CHANGED
@@ -5,4 +5,5 @@ module Asbru
5
5
  extend Dry::Configurable
6
6
  setting :component_prefix,'app'
7
7
  setting :form_builder_prefix, 'app'
8
+ setting :default_form_error_icon, 'cross'
8
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asbru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stev-0
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2021-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: Creating component based webpages with short hand syntax.
56
70
  email:
57
71
  - skemp@adflow.io
@@ -94,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
108
  - !ruby/object:Gem::Version
95
109
  version: '0'
96
110
  requirements: []
97
- rubygems_version: 3.1.2
111
+ rubygems_version: 3.2.15
98
112
  signing_key:
99
113
  specification_version: 4
100
114
  summary: Asbru is a tool for creating component based webpages.