zadok 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2f0bb196ffa018f7254465b81a00e24b418b6b25e1aee84f4ca1adfd07dc713
4
- data.tar.gz: 74b3656c552206215c42e65787d5fb4d51b6772b542dabd243f16b43c731c3d2
3
+ metadata.gz: 1bcd5163593d2bac96ca058c59802ef3977286bef98bb99377556c98f0bdfd74
4
+ data.tar.gz: e088d089e2743deb6c69c1828f1ac7b27d5e33690f64860aa12978593e1a6aa2
5
5
  SHA512:
6
- metadata.gz: 0be9758961a361c0d9d0feb26c4d6eec02399085a0405e5ad8f05e5d5d75e3071488996b1bb81c9b6e71a5ec3aefebc8f77b12a431fa89993b664457eadeffdc
7
- data.tar.gz: 0471db1b540d96ee98f48cdf5f84f141db6c93bf6c898e7a8b67205685af81b973d177b8325213b96765f27eeec7c04d40bb3e0e886594030765a4107a0b96fc
6
+ metadata.gz: a936ad999525e0a183f3a5129be5b5c3a811a9aef90979d7dbffea52ebf0a400d49d59de3e9ef2ed07722c885db91da341c902dc7f43a49fe3ab20f22bcda4df
7
+ data.tar.gz: e825e56041831128185f0cd6e0ed867c323991505851c7f224ba2efb387efc38739e936107876e7c39ca41f13059f65d2e6f11123d565b594ea03af4bbf2d6dd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zadok (0.3.5)
4
+ zadok (0.3.6)
5
5
  bootstrap (~> 4.0)
6
6
  bundler-audit (~> 0.6)
7
7
  cancancan (~> 2.1)
@@ -89,8 +89,8 @@ GEM
89
89
  railties (>= 4.1.0, < 5.2)
90
90
  responders
91
91
  warden (~> 1.2.3)
92
- devise-i18n (1.5.1)
93
- devise (>= 3.4)
92
+ devise-i18n (1.6.0)
93
+ devise (>= 4.4)
94
94
  devise_invitable (1.7.3)
95
95
  actionmailer (>= 4.1.0)
96
96
  devise (>= 4.0.0)
@@ -3,17 +3,28 @@
3
3
  .card-body
4
4
  h2.card-title
5
5
  = t("#{resource_name.pluralize}.edit")
6
- = link_to t("activerecord.models.#{resource_name}.other"), resource_url_for(:index), class: "btn btn-primary text-white float-right"
6
+ = link_to(t("activerecord.models.#{resource_name}.other"),
7
+ resource_url_for(:index),
8
+ class: "btn btn-primary text-white float-right")
7
9
 
8
- = form_for(resource, url: resource_url_for(:update), as: resource_name, html: { autocomplete: "off", class: "bg-white" }) do |form|
10
+ = form_for(resource,
11
+ url: resource_url_for(:update),
12
+ as: resource_name,
13
+ html: { autocomplete: "off" }) do |form|
9
14
  - edit_attributes.each do |attr, options|
10
- = render "zadok/form/fields/#{options[:type]}", resource: resource, form: form, attr: attr, options: options
15
+ = render("zadok/form/fields/#{options[:type]}",
16
+ resource: resource,
17
+ form: form,
18
+ attr: attr,
19
+ options: options)
11
20
 
12
21
  .form-group
13
- = form.submit class: "btn btn-primary text-white"
22
+ = form.submit(class: "btn btn-primary text-white")
23
+
14
24
  - if can?(:destroy, resource)
15
25
  .card-footer
16
- = link_to(t("#{resource_name.pluralize}.destroy"), resource_url_for(:destroy),
17
- data: {confirm: t("#{resource_name.pluralize}.destroy_confirm")},
18
- method: :delete,
19
- class: "btn btn-danger pull-right")
26
+ = link_to(t("#{resource_name.pluralize}.destroy"),
27
+ resource_url_for(:destroy),
28
+ data: { confirm: t("#{resource_name.pluralize}.destroy_confirm") },
29
+ method: :delete,
30
+ class: "btn btn-danger pull-right")
@@ -1,2 +1,6 @@
1
1
  - options[:field_count].times do
2
- = render "zadok/form/fields/#{options[:field_type]}", resource: resource, form: form, attr: attr, options: options.deep_merge(html: { multiple: true })
2
+ = render("zadok/form/fields/#{options[:field_type]}",
3
+ resource: resource,
4
+ form: form,
5
+ attr: attr,
6
+ options: options.deep_merge(html: { multiple: true }))
@@ -3,5 +3,8 @@
3
3
  br
4
4
  - [true, false].each do |option|
5
5
  .form-check.form-check-inline
6
- = form.radio_button attr, option, class: "form-check-input"
7
- = form.label attr, t("zadok.options").fetch(option), value: option, class: "form-check-label"
6
+ = form.radio_button(attr, option, class: "form-check-input")
7
+ = form.label(attr,
8
+ t("zadok.options").fetch(option.to_s.to_sym),
9
+ value: option,
10
+ class: "form-check-label")
@@ -1,3 +1,4 @@
1
1
  .form-group
2
- = form.label attr
3
- = form.email_field attr, options.fetch(:html) { {} }.merge(class: "form-control")
2
+ = form.label(attr)
3
+ = form.email_field(attr,
4
+ options.fetch(:html) { {} }.merge(class: "form-control"))
@@ -1,7 +1,8 @@
1
1
  .form-group
2
2
  .custom-file
3
- = form.file_field attr, options.fetch(:html) { {} }.merge(class: "custom-file-input")
4
- = form.label attr, class: "custom-file-label"
3
+ = form.file_field(attr,
4
+ options.fetch(:html) { {} }.merge(class: "custom-file-input"))
5
+ = form.label(attr, class: "custom-file-label")
5
6
 
6
7
  - if options[:preview]
7
- = image_tag resource.send(attr).url, class: "logo img-fluid"
8
+ = image_tag(resource.send(attr).url, class: "logo img-fluid")
@@ -4,4 +4,5 @@
4
4
  .input-group-prepend
5
5
  .input-group-text
6
6
  | #
7
- = form.text_field attr, options.fetch(:html) { {} }.merge(class: "form-control", maxlength: 6)
7
+ = form.text_field(attr,
8
+ options.fetch(:html) { {} }.merge(class: "form-control", maxlength: 6))
@@ -1,3 +1,4 @@
1
1
  .form-group
2
- = form.label attr
3
- = form.number_field attr, options.fetch(:html) { {} }.merge(class: "form-control")
2
+ = form.label(attr)
3
+ = form.number_field(attr,
4
+ options.fetch(:html) { {} }.merge(class: "form-control"))
@@ -1,4 +1,8 @@
1
1
  .form-group
2
- = form.label attr
2
+ = form.label(attr)
3
3
  br
4
- = form.select attr, options_for_select(options[:choices], resource.send(attr)), options.fetch(:options) { {} }, options.fetch(:html) { {} }.merge(class: "custom-select")
4
+ = form.select(attr,
5
+ options_for_select(options[:choices],
6
+ resource.send(attr)),
7
+ options.fetch(:options) { {} },
8
+ options.fetch(:html) { {} }.merge(class: "custom-select"))
@@ -1,3 +1,6 @@
1
1
  .form-group
2
- = form.label attr
3
- = form.text_area attr, options.fetch(:html) { {} }.merge(rows: options[:rows], cols: options[:cols], class: "form-control")
2
+ = form.label(attr)
3
+ = form.text_area(attr,
4
+ options.fetch(:html) { {} }.merge(rows: options[:rows],
5
+ cols: options[:cols],
6
+ class: "form-control"))
@@ -1,3 +1,4 @@
1
1
  .form-group
2
- = form.label attr
3
- = form.text_field attr, options.fetch(:html) { {} }.merge(class: "form-control")
2
+ = form.label(attr)
3
+ = form.text_field(attr,
4
+ options.fetch(:html) { {} }.merge(class: "form-control"))
@@ -1,3 +1,4 @@
1
1
  .form-group
2
- = form.label attr
3
- = form.url_field attr, options.fetch(:html) { {} }.merge(class: "form-control")
2
+ = form.label(attr)
3
+ = form.url_field(attr,
4
+ options.fetch(:html) { {} }.merge(class: "form-control"))
@@ -4,7 +4,9 @@
4
4
  h2.card-title
5
5
  = t("activerecord.models.#{resource_name}.other")
6
6
  - if can?(:create, resource_name.classify.constantize)
7
- = link_to t("#{resource_name.pluralize}.new"), resource_url_for(:new), class: "btn btn-primary text-white float-right"
7
+ = link_to(t("#{resource_name.pluralize}.new"),
8
+ resource_url_for(:new),
9
+ class: "btn btn-primary text-white float-right")
8
10
 
9
11
  = render "zadok/filters/edit"
10
12
 
@@ -16,12 +18,14 @@
16
18
  tfoot
17
19
  tr
18
20
  td.text-right[colspan=index_attributes.count]
19
- = page_entries_info resources
21
+ = page_entries_info(resources)
20
22
  tbody
21
- = render partial: "#{resource_name.pluralize}/index_row", collection: resources, as: :resource
23
+ = render(partial: "#{resource_name.pluralize}/index_row",
24
+ collection: resources,
25
+ as: :resource)
22
26
 
23
- = will_paginate resources,
24
- inner_window: 1,
25
- outer_window: 0,
26
- renderer: Zadok::LinkRenderer,
27
- class: "pagination justify-content-center"
27
+ = will_paginate(resources,
28
+ inner_window: 1,
29
+ outer_window: 0,
30
+ renderer: Zadok::LinkRenderer,
31
+ class: "pagination justify-content-center")
@@ -3,11 +3,17 @@
3
3
  .card-body
4
4
  h2.card-title
5
5
  = t("#{resource_name.pluralize}.new")
6
- = link_to t("activerecord.models.#{resource_name}.other"), resource_url_for(:index), class: "btn btn-primary text-white float-right"
6
+ = link_to(t("activerecord.models.#{resource_name}.other"),
7
+ resource_url_for(:index),
8
+ class: "btn btn-primary text-white float-right")
7
9
 
8
- = form_for(resource, html: { autocomplete: "off", class: "bg-white" }) do |form|
10
+ = form_for(resource, html: { autocomplete: "off" }) do |form|
9
11
  - new_attributes.each do |attr, options|
10
- = render "zadok/form/fields/#{options[:type]}", resource: resource, form: form, attr: attr, options: options
12
+ = render("zadok/form/fields/#{options[:type]}",
13
+ resource: resource,
14
+ form: form,
15
+ attr: attr,
16
+ options: options)
11
17
 
12
18
  .form-group
13
- = form.submit class: "btn btn-primary text-white"
19
+ = form.submit(class: "btn btn-primary text-white")
data/lib/zadok/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zadok
4
- VERSION = "0.3.5"
4
+ VERSION = "0.3.6"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zadok
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon Hooijer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-16 00:00:00.000000000 Z
11
+ date: 2018-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap