ecm_downloads2_backend 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -2
- data/app/assets/javascripts/ecm/downloads/backend/application/dummy.js +0 -0
- data/app/assets/stylesheets/ecm/downloads/backend/application/dummy.css +0 -0
- data/app/controllers/ecm/downloads/backend/download_categories_controller.rb +1 -1
- data/app/controllers/ecm/downloads/backend/downloads_controller.rb +1 -1
- data/app/policies/ecm/downloads/download_category_policy.rb +1 -1
- data/app/policies/ecm/downloads/download_policy.rb +1 -1
- data/config/routes.rb +1 -1
- data/lib/ecm/downloads/backend/configuration.rb +3 -3
- data/lib/ecm/downloads/backend/engine.rb +1 -4
- data/lib/ecm/downloads/backend/version.rb +1 -1
- data/lib/ecm_downloads2_backend.rb +2 -2
- data/lib/generators/ecm/downloads/backend/install/install_generator.rb +1 -1
- data/lib/generators/ecm/downloads/backend/install/templates/ecm_downloads_backend.rb +12 -10
- data/spec/dummy/app/controllers/backend_controller.rb +1 -1
- data/spec/dummy/bin/setup +8 -8
- data/spec/dummy/config/application.rb +6 -7
- data/spec/dummy/config/initializers/ecm_downloads_backend.rb +4 -4
- data/spec/dummy/config/initializers/itsf_backend.rb +4 -4
- data/spec/dummy/config/initializers/route_translator.rb +1 -1
- data/spec/dummy/config/initializers/simple_form.rb +1 -1
- data/spec/dummy/db/migrate/20151130141605_create_ecm_downloads_download_categories.ecm_downloads_engine.rb +4 -4
- data/spec/dummy/db/migrate/20151130141606_create_ecm_downloads_downloads.ecm_downloads_engine.rb +1 -1
- data/spec/dummy/db/schema.rb +29 -31
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c08a98939636f393f99798e72a9134ba7f0bd8e
|
4
|
+
data.tar.gz: b11745ebb7bd0f28c291fd83996cbd14478c9fcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c288e90a750013908678469553f3e720e68fe309de76a0189f2c607986681bb75d78d569fea72649e83f9901f9c53cc26f948ee1dbe3fe5da53d553ebafa47bc
|
7
|
+
data.tar.gz: 048b382b2c637e3e8d9daa49b528a99027c90a9a584e62143ec37037aa182ae9edc0c04ef942538886f689abc987ab5e80b34e4ebf91ae828550dca13d2685c2
|
data/Rakefile
CHANGED
File without changes
|
File without changes
|
@@ -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
|
-
|
15
|
+
.permit(:ecm_downloads_download_category_id, :asset, :name, :description, :published)
|
16
16
|
end
|
17
17
|
end
|
data/config/routes.rb
CHANGED
@@ -4,7 +4,7 @@ module Ecm
|
|
4
4
|
class Engine < ::Rails::Engine
|
5
5
|
isolate_namespace Ecm::Downloads::Backend
|
6
6
|
|
7
|
-
initializer
|
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,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
|
-
|
14
|
-
|
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('../../',
|
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
|
12
|
-
system
|
13
|
-
system
|
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
|
21
|
+
system 'bin/rake db:setup'
|
22
22
|
|
23
23
|
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system
|
25
|
-
system
|
24
|
+
system 'rm -f log/*'
|
25
|
+
system 'rm -rf tmp/cache'
|
26
26
|
|
27
27
|
puts "\n== Restarting application server =="
|
28
|
-
system
|
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
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
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
|
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
|
@@ -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
|
-
|
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, :
|
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
|
|
data/spec/dummy/db/migrate/20151130141606_create_ecm_downloads_downloads.ecm_downloads_engine.rb
CHANGED
@@ -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
|
-
:
|
30
|
+
name: 'index_ecm_downloads_downloads_on_download_category_id'
|
31
31
|
end
|
32
32
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -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:
|
15
|
-
|
16
|
-
|
17
|
-
t.
|
18
|
-
t.
|
19
|
-
t.
|
20
|
-
t.integer
|
21
|
-
t.integer
|
22
|
-
t.integer
|
23
|
-
t.integer
|
24
|
-
t.integer
|
25
|
-
t.
|
26
|
-
t.
|
27
|
-
t.datetime
|
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
|
32
|
-
t.string
|
33
|
-
t.text
|
34
|
-
t.datetime
|
35
|
-
t.integer
|
36
|
-
t.integer
|
37
|
-
t.string
|
38
|
-
t.string
|
39
|
-
t.integer
|
40
|
-
t.string
|
41
|
-
t.datetime
|
42
|
-
t.string
|
43
|
-
t.datetime
|
44
|
-
t.datetime
|
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
|
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.
|
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
|