ecm_downloads2_backend 1.0.0 → 1.0.1

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.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -2
  3. data/app/assets/javascripts/ecm/downloads/backend/application/dummy.js +0 -0
  4. data/app/assets/stylesheets/ecm/downloads/backend/application/dummy.css +0 -0
  5. data/app/controllers/ecm/downloads/backend/download_categories_controller.rb +1 -1
  6. data/app/controllers/ecm/downloads/backend/downloads_controller.rb +1 -1
  7. data/app/policies/ecm/downloads/download_category_policy.rb +1 -1
  8. data/app/policies/ecm/downloads/download_policy.rb +1 -1
  9. data/config/routes.rb +1 -1
  10. data/lib/ecm/downloads/backend/configuration.rb +3 -3
  11. data/lib/ecm/downloads/backend/engine.rb +1 -4
  12. data/lib/ecm/downloads/backend/version.rb +1 -1
  13. data/lib/ecm_downloads2_backend.rb +2 -2
  14. data/lib/generators/ecm/downloads/backend/install/install_generator.rb +1 -1
  15. data/lib/generators/ecm/downloads/backend/install/templates/ecm_downloads_backend.rb +12 -10
  16. data/spec/dummy/app/controllers/backend_controller.rb +1 -1
  17. data/spec/dummy/bin/setup +8 -8
  18. data/spec/dummy/config/application.rb +6 -7
  19. data/spec/dummy/config/initializers/ecm_downloads_backend.rb +4 -4
  20. data/spec/dummy/config/initializers/itsf_backend.rb +4 -4
  21. data/spec/dummy/config/initializers/route_translator.rb +1 -1
  22. data/spec/dummy/config/initializers/simple_form.rb +1 -1
  23. data/spec/dummy/db/migrate/20151130141605_create_ecm_downloads_download_categories.ecm_downloads_engine.rb +4 -4
  24. data/spec/dummy/db/migrate/20151130141606_create_ecm_downloads_downloads.ecm_downloads_engine.rb +1 -1
  25. data/spec/dummy/db/schema.rb +29 -31
  26. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5d95ce5339f20459cfbb74fed9e14194a969641
4
- data.tar.gz: 98ccfbd100b4648fb0e92e94d902bce6593dc511
3
+ metadata.gz: 9c08a98939636f393f99798e72a9134ba7f0bd8e
4
+ data.tar.gz: b11745ebb7bd0f28c291fd83996cbd14478c9fcb
5
5
  SHA512:
6
- metadata.gz: eaeab7a567e428a49249933e5760f75bea79012b2b16c824c47d6d1a047163f1b3e22e87b4247e57f904ee96c6d509e40658d8006240894e86d31e919823c026
7
- data.tar.gz: 84ffa1e2be76f059995543665cd42d7c6678cfe0815416cf4ef70001bc13cc7d8ecbdc6d0bd9e5cb18982c1a1cff4085ea115f6669198c298a7e5da7eb21b8d4
6
+ metadata.gz: c288e90a750013908678469553f3e720e68fe309de76a0189f2c607986681bb75d78d569fea72649e83f9901f9c53cc26f948ee1dbe3fe5da53d553ebafa47bc
7
+ data.tar.gz: 048b382b2c637e3e8d9daa49b528a99027c90a9a584e62143ec37037aa182ae9edc0c04ef942538886f689abc987ab5e80b34e4ebf91ae828550dca13d2685c2
data/Rakefile CHANGED
@@ -14,7 +14,6 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
-
18
17
  Bundler::GemHelper.install_tasks
19
18
 
20
- require 'rails/dummy/tasks'
19
+ require 'rails/dummy/tasks'
@@ -8,6 +8,6 @@ class Ecm::Downloads::Backend::DownloadCategoriesController < Itsf::Backend::Res
8
8
  def permitted_params
9
9
  params
10
10
  .require(:ecm_downloads_download_category)
11
- .permit(:name, :description, :locale)
11
+ .permit(:name, :description, :locale)
12
12
  end
13
13
  end
@@ -12,6 +12,6 @@ class Ecm::Downloads::Backend::DownloadsController < Itsf::Backend::Resource::Ba
12
12
  def permitted_params
13
13
  params
14
14
  .require(:ecm_downloads_download)
15
- .permit(:ecm_downloads_download_category_id, :asset, :name, :description, :published)
15
+ .permit(:ecm_downloads_download_category_id, :asset, :name, :description, :published)
16
16
  end
17
17
  end
@@ -1,4 +1,4 @@
1
1
  module Ecm::Downloads
2
2
  class DownloadCategoryPolicy < Itsf::Backend::BasePolicy
3
3
  end
4
- end
4
+ end
@@ -1,4 +1,4 @@
1
1
  module Ecm::Downloads
2
2
  class DownloadPolicy < Itsf::Backend::BasePolicy
3
3
  end
4
- end
4
+ end
data/config/routes.rb CHANGED
@@ -5,4 +5,4 @@ Ecm::Downloads::Backend::Engine.routes.draw do
5
5
  end
6
6
 
7
7
  root to: 'home#index'
8
- end
8
+ end
@@ -10,13 +10,13 @@ module Ecm
10
10
  end
11
11
 
12
12
  mattr_accessor :registered_controllers do
13
- -> {[]}
13
+ -> { [] }
14
14
  end
15
15
 
16
16
  mattr_accessor :registered_services do
17
- -> {[]}
17
+ -> { [] }
18
18
  end
19
19
  end
20
20
  end
21
21
  end
22
- end
22
+ end
@@ -4,7 +4,7 @@ module Ecm
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace Ecm::Downloads::Backend
6
6
 
7
- initializer "ecm_downloads_backend.asset_pipeline" do |app|
7
+ initializer 'ecm_downloads_backend.asset_pipeline' do |app|
8
8
  app.config.assets.precompile << 'ecm_downloads_backend.js'
9
9
  app.config.assets.precompile << 'ecm_downloads_backend.css'
10
10
  end
@@ -12,6 +12,3 @@ module Ecm
12
12
  end
13
13
  end
14
14
  end
15
-
16
-
17
-
@@ -1,7 +1,7 @@
1
1
  module Ecm
2
2
  module Downloads
3
3
  module Backend
4
- VERSION = "1.0.0"
4
+ VERSION = '1.0.1'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -5,5 +5,5 @@ require 'jquery-rails'
5
5
  require 'rails-i18n'
6
6
  require 'route_translator'
7
7
 
8
- require "ecm/downloads/backend"
9
- require "ecm/downloads/backend/engine"
8
+ require 'ecm/downloads/backend'
9
+ require 'ecm/downloads/backend/engine'
@@ -30,4 +30,4 @@ module Ecm
30
30
  end
31
31
  end
32
32
  end
33
- end
33
+ end
@@ -1,22 +1,24 @@
1
- Ecm::Downloads::Backend.configure do |config|
1
+ Ecm::Downloads::Backend.configure do |config|
2
2
  # Set the resources, that will be shown in the backend menu in development
3
3
  # mode. This needs to be set to get a correct menu because
4
4
  # Controller.descendants is empty in development. This is an eager load
5
5
  # issue.
6
- #
6
+ #
7
7
  # Default: config.registered_controllers = -> {[
8
8
  # Ecm::Downloads::Backend::DownloadCategoriesController,
9
9
  # Ecm::Downloads::Backend::DownloadsController
10
10
  # ]}
11
- #
12
- config.registered_controllers = -> {[
13
- Ecm::Downloads::Backend::DownloadCategoriesController,
14
- Ecm::Downloads::Backend::DownloadsController
15
- ]}
11
+ #
12
+ config.registered_controllers = lambda {
13
+ [
14
+ Ecm::Downloads::Backend::DownloadCategoriesController,
15
+ Ecm::Downloads::Backend::DownloadsController
16
+ ]
17
+ }
16
18
 
17
19
  # Set the services, that will be shown in the backend menu.
18
20
  #
19
21
  # Default: config.registered_services = -> {[]}
20
- #
21
- config.registered_services = -> {[]}
22
- end
22
+ #
23
+ config.registered_services = -> { [] }
24
+ end
@@ -1,2 +1,2 @@
1
1
  class BackendController < ApplicationController
2
- end
2
+ end
data/spec/dummy/bin/setup CHANGED
@@ -2,15 +2,15 @@
2
2
  require 'pathname'
3
3
 
4
4
  # path to your application root.
5
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
6
 
7
7
  Dir.chdir APP_ROOT do
8
8
  # This script is a starting point to setup your application.
9
9
  # Add necessary setup steps to this file:
10
10
 
11
- puts "== Installing dependencies =="
12
- system "gem install bundler --conservative"
13
- system "bundle check || bundle install"
11
+ puts '== Installing dependencies =='
12
+ system 'gem install bundler --conservative'
13
+ system 'bundle check || bundle install'
14
14
 
15
15
  # puts "\n== Copying sample files =="
16
16
  # unless File.exist?("config/database.yml")
@@ -18,12 +18,12 @@ Dir.chdir APP_ROOT do
18
18
  # end
19
19
 
20
20
  puts "\n== Preparing database =="
21
- system "bin/rake db:setup"
21
+ system 'bin/rake db:setup'
22
22
 
23
23
  puts "\n== Removing old logs and tempfiles =="
24
- system "rm -f log/*"
25
- system "rm -rf tmp/cache"
24
+ system 'rm -f log/*'
25
+ system 'rm -rf tmp/cache'
26
26
 
27
27
  puts "\n== Restarting application server =="
28
- system "touch tmp/restart.txt"
28
+ system 'touch tmp/restart.txt'
29
29
  end
@@ -1,18 +1,18 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  # Pick the frameworks you want:
4
- require "active_record/railtie"
5
- require "action_controller/railtie"
6
- require "action_mailer/railtie"
7
- require "action_view/railtie"
8
- require "sprockets/railtie"
4
+ require 'active_record/railtie'
5
+ require 'action_controller/railtie'
6
+ require 'action_mailer/railtie'
7
+ require 'action_view/railtie'
8
+ require 'sprockets/railtie'
9
9
  # require "rails/test_unit/railtie"
10
10
 
11
11
  Bundler.require(*Rails.groups)
12
12
  require 'i18n/debug'
13
13
  require 'rails-i18n'
14
14
  require 'route_translator'
15
- require "ecm_downloads2_backend"
15
+ require 'ecm_downloads2_backend'
16
16
 
17
17
  module Dummy
18
18
  class Application < Rails::Application
@@ -34,4 +34,3 @@ module Dummy
34
34
  config.active_record.raise_in_transactional_callbacks = true
35
35
  end
36
36
  end
37
-
@@ -1,12 +1,12 @@
1
- Ecm::Downloads::Backend.configure do |config|
1
+ Ecm::Downloads::Backend.configure do |config|
2
2
  # Set the resources, that will be shown in the backend menu in development
3
3
  # mode. This needs to be set to get a correct menu because
4
4
  # Controller.descendants is empty in development. This is an eager load
5
5
  # issue.
6
- #
6
+ #
7
7
  # Default: config.registered_controllers = []
8
- #
8
+ #
9
9
  config.registered_controllers = [
10
10
  # Ecm::Downloads::Backend::ContentBoxesController
11
11
  ]
12
- end
12
+ end
@@ -6,12 +6,12 @@ Itsf::Backend.configure do |config|
6
6
  config.base_controller = '::BackendController'
7
7
 
8
8
  # Register backend engines here. They will be added to the backend menu
9
- #
9
+ #
10
10
  # Example: config.backend_engines = [ MyEngine::Engine ]
11
- #
11
+ #
12
12
  # Default: config.backend_engines = []
13
- #
13
+ #
14
14
  config.backend_engines = [
15
15
  Ecm::Downloads::Backend::Engine
16
16
  ]
17
- end
17
+ end
@@ -1,3 +1,3 @@
1
1
  RouteTranslator.config do |config|
2
2
  config.force_locale = true
3
- end
3
+ end
@@ -6,7 +6,7 @@ SimpleForm.setup do |config|
6
6
  # stack. The options given below are used to wrap the
7
7
  # whole input.
8
8
  config.wrappers :default, class: :input,
9
- hint_class: :field_with_hint, error_class: :field_with_errors do |b|
9
+ hint_class: :field_with_hint, error_class: :field_with_errors do |b|
10
10
  ## Extensions enabled by default
11
11
  # Any of these extensions can be disabled for a
12
12
  # given input by passing: `f.input EXTENSION_NAME => false`.
@@ -6,16 +6,16 @@ class CreateEcmDownloadsDownloadCategories < ActiveRecord::Migration
6
6
  t.text :description
7
7
  t.string :locale
8
8
  t.integer :position
9
-
9
+
10
10
  # references
11
- t.integer :ecm_downloads_downloads_count, :default => 0, :null => false
12
-
11
+ t.integer :ecm_downloads_downloads_count, default: 0, null: false
12
+
13
13
  # awesome nested set
14
14
  t.integer :parent_id
15
15
  t.integer :lft
16
16
  t.integer :rgt
17
17
  t.integer :depth
18
-
18
+
19
19
  # frienldy id
20
20
  t.string :slug
21
21
 
@@ -27,6 +27,6 @@ class CreateEcmDownloadsDownloads < ActiveRecord::Migration
27
27
  end
28
28
  add_index :ecm_downloads_downloads,
29
29
  :ecm_downloads_download_category_id,
30
- :name => 'index_ecm_downloads_downloads_on_download_category_id'
30
+ name: 'index_ecm_downloads_downloads_on_download_category_id'
31
31
  end
32
32
  end
@@ -11,39 +11,37 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20151130141606) do
15
-
16
- create_table "ecm_downloads_download_categories", force: :cascade do |t|
17
- t.string "name"
18
- t.text "description"
19
- t.string "locale"
20
- t.integer "position"
21
- t.integer "ecm_downloads_downloads_count", default: 0, null: false
22
- t.integer "parent_id"
23
- t.integer "lft"
24
- t.integer "rgt"
25
- t.integer "depth"
26
- t.string "slug"
27
- t.datetime "created_at"
28
- t.datetime "updated_at"
14
+ ActiveRecord::Schema.define(version: 20_151_130_141_606) do
15
+ create_table 'ecm_downloads_download_categories', force: :cascade do |t|
16
+ t.string 'name'
17
+ t.text 'description'
18
+ t.string 'locale'
19
+ t.integer 'position'
20
+ t.integer 'ecm_downloads_downloads_count', default: 0, null: false
21
+ t.integer 'parent_id'
22
+ t.integer 'lft'
23
+ t.integer 'rgt'
24
+ t.integer 'depth'
25
+ t.string 'slug'
26
+ t.datetime 'created_at'
27
+ t.datetime 'updated_at'
29
28
  end
30
29
 
31
- create_table "ecm_downloads_downloads", force: :cascade do |t|
32
- t.string "name"
33
- t.text "description"
34
- t.datetime "published_at"
35
- t.integer "ecm_downloads_download_category_id"
36
- t.integer "position"
37
- t.string "slug"
38
- t.string "asset_file_name"
39
- t.integer "asset_file_size"
40
- t.string "asset_content_type"
41
- t.datetime "asset_updated_at"
42
- t.string "asset_fingerprint"
43
- t.datetime "created_at"
44
- t.datetime "updated_at"
30
+ create_table 'ecm_downloads_downloads', force: :cascade do |t|
31
+ t.string 'name'
32
+ t.text 'description'
33
+ t.datetime 'published_at'
34
+ t.integer 'ecm_downloads_download_category_id'
35
+ t.integer 'position'
36
+ t.string 'slug'
37
+ t.string 'asset_file_name'
38
+ t.integer 'asset_file_size'
39
+ t.string 'asset_content_type'
40
+ t.datetime 'asset_updated_at'
41
+ t.string 'asset_fingerprint'
42
+ t.datetime 'created_at'
43
+ t.datetime 'updated_at'
45
44
  end
46
45
 
47
- add_index "ecm_downloads_downloads", ["ecm_downloads_download_category_id"], name: "index_ecm_downloads_downloads_on_download_category_id"
48
-
46
+ add_index 'ecm_downloads_downloads', ['ecm_downloads_download_category_id'], name: 'index_ecm_downloads_downloads_on_download_category_id'
49
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_downloads2_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
@@ -203,8 +203,10 @@ files:
203
203
  - README.rdoc
204
204
  - Rakefile
205
205
  - app/assets/javascripts/ecm/downloads/backend/application.js
206
+ - app/assets/javascripts/ecm/downloads/backend/application/dummy.js
206
207
  - app/assets/javascripts/ecm_downloads_backend.js
207
208
  - app/assets/stylesheets/ecm/downloads/backend/application.css
209
+ - app/assets/stylesheets/ecm/downloads/backend/application/dummy.css
208
210
  - app/assets/stylesheets/ecm_downloads_backend.css
209
211
  - app/controllers/ecm/downloads/backend/application_controller.rb
210
212
  - app/controllers/ecm/downloads/backend/download_categories_controller.rb