cm-admin 1.1.2 → 1.1.3

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: 6ca2b1b912d7ae2bc0925180a861cba806874e54baa273c2176af245e68940c0
4
- data.tar.gz: d56e8c3155712a502cab04a22aa209877988cc85593d56008155e0daf7d4778b
3
+ metadata.gz: 886a7bc2909a6a2a250e5eddf3572b15b97a86a135c7857360504170fae37eb8
4
+ data.tar.gz: 3a0b0c08d4a2aa3f3257ca3252a1501b8d0c410ac94ae48770f6b0fc80d39fcb
5
5
  SHA512:
6
- metadata.gz: d71ce2f05820e692c76d40db3fee7f646066a3bff0c1341b2ef78dae62339f6d750bfacc38d4a8d4676ce73b5bb502469487c93a9a32246281d3bdfa14eb2933
7
- data.tar.gz: 564ddd3e0842b3ce7505e41f4f34a26a55bb3428aac6e7c9960af3bf34cb2c17877f4c251c0c3f6f54981d19a2f33fc87b2a761d6782f55a4a9d231e9ae044b6
6
+ metadata.gz: 48401171329b37a99161420596c036556d017c971ae2287607fe4eab36022ed61a6362201912750d5ef0dcf7b934061fd52495d98c500b7dd330b438ad23e36d
7
+ data.tar.gz: 122a7cfeb69e6a88c5b59a5f0603172b0cde917fc5e9d7d34b736580890c82693247d2d419e76ad2c6649e8d73ccb3671260a986546ec5423e8692486f5bd8e8
data/.gitignore CHANGED
@@ -10,3 +10,4 @@ node_modules/
10
10
  public/cm-admin-packs/
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ .rubocop-*
data/.reek.yml ADDED
@@ -0,0 +1,9 @@
1
+ detectors:
2
+ IrresponsibleModule:
3
+ enabled: false
4
+ UncommunicativeVariableName:
5
+ enabled: true
6
+ accept:
7
+ - e
8
+ TooManyStatements:
9
+ enabled: false
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ inherit_from:
2
+ - https://raw.githubusercontent.com/commutatus/cm-linters/main/rubocop.yml
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (1.1.2)
4
+ cm-admin (1.1.3)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -161,7 +161,7 @@ input.cm-checkbox[type="checkbox"] {
161
161
  }
162
162
  &:checked:after {
163
163
  background: $brand-color;
164
- content: "\f00c";
164
+ content: "\2713";
165
165
  font-family: FontAwesome !important;
166
166
  color: $white;
167
167
  border: none;
@@ -173,7 +173,7 @@ input.cm-checkbox[type="checkbox"] {
173
173
  }
174
174
  &:checked:after {
175
175
  background: $grey-light-clr;
176
- content: "\f00c";
176
+ content: "\2713";
177
177
  font-family: FontAwesome !important;
178
178
  color: $white;
179
179
  border: none;
@@ -238,9 +238,9 @@ module CmAdmin
238
238
  nested_tables = @model.available_fields[:new].map(&:nested_table_fields).map(&:keys).flatten
239
239
  nested_tables += @model.available_fields[:edit].map(&:nested_table_fields).map(&:keys).flatten
240
240
  nested_fields = nested_tables.uniq.map {|assoc_name|
241
- table_name = @ar_object._reflections[assoc_name.to_s].klass.table_name
241
+ table_name = @model.ar_model.reflections[assoc_name.to_s].klass.table_name
242
242
  Hash[
243
- table_name.to_s + '_attributes',
243
+ "#{table_name}_attributes",
244
244
  table_name.to_s.classify.constantize.column_names.reject { |i| CmAdmin::REJECTABLE_FIELDS.include?(i) }.map(&:to_sym) + [:id, :_destroy]
245
245
  ]
246
246
  }
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
@@ -76,7 +76,7 @@ module CmAdmin
76
76
  def set_nested_form_fields(form_obj, section)
77
77
  content_tag(:div) do
78
78
  section.nested_table_fields.keys.each do |key|
79
- concat(render partial: '/cm_admin/main/nested_table_form', locals: {f: form_obj, assoc_name: key, section: section})
79
+ concat(render partial: '/cm_admin/main/nested_table_form', locals: { f: form_obj, assoc_name: key, section: section })
80
80
  end
81
81
  end
82
82
  end
@@ -14,7 +14,7 @@ module CmAdmin
14
14
  content_tag(:span, class: 'menu-icon') do
15
15
  concat tag.i class: "#{model.icon_name}"
16
16
  end +
17
- model.name.underscore.titleize.pluralize
17
+ model.name.titleize.pluralize
18
18
  end
19
19
  end
20
20
  elsif navigation_type == "quick_links"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cm-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sajinmp
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2023-07-12 00:00:00.000000000 Z
13
+ date: 2023-07-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -166,7 +166,9 @@ files:
166
166
  - ".github/ISSUE_TEMPLATE/feature_request.md"
167
167
  - ".github/workflows/linters.yml"
168
168
  - ".gitignore"
169
+ - ".reek.yml"
169
170
  - ".rspec"
171
+ - ".rubocop.yml"
170
172
  - ".stylelintrc.json"
171
173
  - ".travis.yml"
172
174
  - CODE_OF_CONDUCT.md