cmor_system 0.0.52.pre → 0.0.57.pre

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: aa7b14acca8f4cbff977ed57fd52ea6ca1b8073fc5e10821bc0f1f6c259b9267
4
- data.tar.gz: a02635195724abf3d7c443913573e25ae2b09c78cd42dd9ee31467e69e480953
3
+ metadata.gz: 96c56f838566bfc1a83f8af7eaaa7e4d0a8fb19720cf4fcf6704f49ed4f462b9
4
+ data.tar.gz: 128416980108a899c7c23b7e733f38d78eaef2b727023231922b99e0757e65b2
5
5
  SHA512:
6
- metadata.gz: e8932b778ec610dc6504a1320f5d2d08e97732a78ebbacb881a49d5b9dd1ad9661fc8020935b50c3c1110b3b2065784ad2ee4daf42da18b6bddeabacee2f742a
7
- data.tar.gz: be62ed4fffe8a81fa43ff53ad8639f65e423505114e3c6e6c6277f16047ea3a723a4ee380769839c6ee4f6b00494d070f891fea916da230b740fa98e5c030944
6
+ metadata.gz: 62f979cd011336172caae7be98b88ea8be5e4e0c00418386313b4a92d495025e89f13062e90d8ed3f8b163487b3f5cd7068c57bcdf1f16fecca97601fb833984
7
+ data.tar.gz: e96174e82fd4ca3e5908a8f33b20630cff38b2a5c1897f38087b1e5ed3b7360d6945167198791a8072d06cffe42f046225374ec4307333ba4287ca39eb5ed9e5
@@ -5,9 +5,9 @@ module Cmor
5
5
  ::Delayed::Backend::ActiveRecord::Job
6
6
  end
7
7
 
8
- # def self.available_rest_actions
9
- # %i(index show edit update)
10
- # end
8
+ def self.available_rest_actions
9
+ %i(index show edit update destroy)
10
+ end
11
11
 
12
12
  private
13
13
 
@@ -1,7 +1,16 @@
1
1
  = table.column :name
2
- = table.column :record
2
+ = table.association :record do |resource|
3
+ - capture_haml do
4
+ - begin
5
+ - engine_name = resource.record.class.name.deconstantize.underscore.gsub("/", "_")
6
+ - engine_name = 'main_app' if engine_name.empty?
7
+ - url = send(engine_name).polymorphic_path(resource.record)
8
+ = link_to(url) do
9
+ = administrador_helper(self).label_for(resource.record)
10
+ - rescue NameError => e
11
+ = "#{resource.record_type}##{resource.record_id}"
3
12
  = table.column :blob do |resource|
4
13
  - link_to(resource.blob.filename, [:active_storage, resource.blob])
5
- = table.column :created_at
14
+ = table.timestamp :created_at
6
15
  = table.column :additional_actions do |resource|
7
16
  - link_to(t('.download'), main_app.url_for(resource.blob), class: 'btn btn-primary btn-xs')
@@ -0,0 +1,7 @@
1
+ FactoryBot.define do
2
+ factory :active_storage_attachment, class: 'ActiveStorage::Attachment' do
3
+ association(:record, factory: Cmor::System::Configuration.record_factory_name)
4
+ association(:blob, factory: :active_storage_blob)
5
+ name { 'example.png' }
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ FactoryBot.define do
2
+ factory :active_storage_blob, class: 'ActiveStorage::Blob' do
3
+ filename { 'example.png' }
4
+ byte_size { File.size(Cmor::System::Engine.root.join(*%w(spec files active_storage blob example.png))) }
5
+ checksum { Digest::MD5.file(Cmor::System::Engine.root.join(*%w(spec files active_storage blob example.png))).base64digest }
6
+ after(:build) do |resource|
7
+ resource.upload(File.open(Cmor::System::Engine.root.join(*%w(spec files active_storage blob example.png))))
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ FactoryBot.define do
2
+ factory :cmor_system_changelog, class: 'Cmor::System::Changelog' do
3
+ sequence(:id) { |i| "changelog_#{i}" }
4
+ sequence(:name) { |i| "changelog_#{i}" }
5
+ version { "1.0.0" }
6
+ file { Cmor::System::Engine.root.join(*%w(spec files cmor system changelog file example.md)) }
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ FactoryBot.define do
2
+ factory :delayed_backend_active_record_job, class: 'Delayed::Backend::ActiveRecord::Job' do
3
+ handler { 'handler' }
4
+ end
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.52.pre
4
+ version: 0.0.57.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-26 00:00:00.000000000 Z
11
+ date: 2020-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.52.pre
33
+ version: 0.0.57.pre
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.0.52.pre
40
+ version: 0.0.57.pre
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cmor_core_backend
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.52.pre
47
+ version: 0.0.57.pre
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.52.pre
54
+ version: 0.0.57.pre
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -389,6 +389,10 @@ files:
389
389
  - lib/generators/cmor/system/install/install_generator.rb
390
390
  - lib/generators/cmor/system/install/templates/initializer.rb
391
391
  - lib/generators/cmor/system/install/templates/routes.source
392
+ - spec/factories/active_storage/attachments.rb
393
+ - spec/factories/active_storage/blobs.rb
394
+ - spec/factories/cmor_system_changelogs.rb
395
+ - spec/factories/delayed/backend_active_record_jobs.rb
392
396
  - spec/files/active_storage/blob/example.png
393
397
  - spec/files/cmor/system/changelog/file/example.md
394
398
  homepage: https://github.com/content-management-on-rails
@@ -410,7 +414,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
410
414
  - !ruby/object:Gem::Version
411
415
  version: 1.3.1
412
416
  requirements: []
413
- rubygems_version: 3.1.2
417
+ rubygems_version: 3.1.4
414
418
  signing_key:
415
419
  specification_version: 4
416
420
  summary: Cmor System Module.