ecm_downloads2 5.0.0 → 5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28c5883c76a6822d22b8b4b7cc20566e0c66c5f7
4
- data.tar.gz: 73226d25629f495b87ede0936e52382c655378b8
3
+ metadata.gz: 456136de30ecda9957cadc0c41bada6ded670538
4
+ data.tar.gz: 8cd392b8c17a7408d154bc4fca352a253cb25b70
5
5
  SHA512:
6
- metadata.gz: 510a8fe86b638c193f447236b0364da4aa1f85fc939ff4a34142dc2b01ad9664a598ff8d517620269caad1a48bbb344e9ead24ea9dc787e27918ab1fb16de2af
7
- data.tar.gz: a3a7317c5f044b20dd636f967dfd3b38cc76d267dec5b96643e135be5eb2d1abf72a0148f042455edcf164c830c9fe66851810a5063ee5a33bc0695c90f13fde
6
+ metadata.gz: cd29318a6fb84415be4233abb35e59bca76f4ab0f6fb017bc0c86325cf9c6d3b23fadcce5dd07b8927c414ba347bf904bbad926847edee80b62dbcbe1a04665e
7
+ data.tar.gz: 0bcaeeadc53f740b39d298206a4f05effdf6b1198cf072bdd7d81e462d4c64f8c40bb40c0f246cc98909d2170ee40fc60280fd3d275e8ceb4a40c32cf07a1539
@@ -12,14 +12,8 @@ module Ecm
12
12
  belongs_to :download_category,
13
13
  inverse_of: :downloads
14
14
 
15
- # attibutes
16
- attr_accessible :asset,
17
- :description,
18
- :download_category_id,
19
- :name if respond_to? :attr_accessible
20
-
21
15
  # callbacks
22
- before_update :fix_updated_position, if: proc { |d| !position.blank? && d.category_id_changed? }
16
+ before_update :fix_updated_position, if: proc { |d| !position.blank? && d.download_category_id_changed? }
23
17
 
24
18
  # friendly id
25
19
  extend FriendlyId
@@ -10,16 +10,6 @@ module Ecm
10
10
  accepts_nested_attributes_for :downloads,
11
11
  allow_destroy: true
12
12
 
13
- # attributes
14
- attr_accessible :description,
15
- :downloads_attributes,
16
- :downloads_count,
17
- :locale,
18
- :name,
19
- :parent_id,
20
- :position,
21
- :slug if respond_to? :attr_accessible
22
-
23
13
  # awesome nested set
24
14
  acts_as_nested_set
25
15
  default_scope { order('lft ASC') }
@@ -24,4 +24,4 @@ de:
24
24
  actions:
25
25
  back: 'Zurück'
26
26
  routes:
27
- ecm_downloads: downloads
27
+ ecm_downloads_engine: downloads
@@ -24,4 +24,4 @@ en:
24
24
  actions:
25
25
  back: 'Back'
26
26
  routes:
27
- ecm_downloads: downloads
27
+ ecm_downloads_engine: downloads
data/config/routes.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  Ecm::Downloads::Engine.routes.draw do
2
2
  localized do
3
- scope :ecm_downloads do
3
+ scope :ecm_downloads_engine do
4
4
  resources :download_categories, only: [:index, :show]
5
5
  resources :downloads, only: [:index, :show] do
6
6
  get :download, on: :member
7
7
  end
8
+
8
9
  root to: 'download_categories#index'
9
10
  end
10
11
  end
@@ -1,4 +1,4 @@
1
- class CreateEcmDownloadsDownloadCategories < ActiveRecord::Migration
1
+ class CreateEcmDownloadsDownloadCategories < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :ecm_downloads_download_categories do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateEcmDownloadsDownloads < ActiveRecord::Migration
1
+ class CreateEcmDownloadsDownloads < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :ecm_downloads_downloads do |t|
4
4
  t.string :name
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Downloads
3
- VERSION = '5.0.0'
3
+ VERSION = '5.0.1'
4
4
  end
5
5
  end
@@ -0,0 +1,7 @@
1
+ FactoryGirl.define do
2
+ factory :ecm_downloads_download, class: Ecm::Downloads::Download do
3
+ sequence(:name) { |i| "Download ##{i}" }
4
+ association :download_category, factory: :ecm_downloads_download_category
5
+ asset { File.open(Ecm::Downloads::Engine.root.join(*%w(spec files ecm downloads download asset.txt))) }
6
+ end
7
+ end
@@ -3,7 +3,7 @@ FactoryGirl.define do
3
3
  sequence(:name) { |i| "Download category ##{i}" }
4
4
  locale I18n.default_locale.to_s
5
5
 
6
- factory :ecm_downloads_download_category_with_parent do
6
+ factory :download_category_with_parent do
7
7
  locale nil
8
8
  association :parent, factory: :ecm_downloads_download_category
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_downloads2
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
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: 2017-05-07 00:00:00.000000000 Z
11
+ date: 2017-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -507,8 +507,8 @@ files:
507
507
  - lib/generators/ecm/downloads/install/templates/routes.source
508
508
  - lib/generators/ecm/downloads/locales/locales_generator.rb
509
509
  - lib/tasks/ecm_downloads_tasks.rake
510
- - spec/factories/ecm/downloads/download.rb
511
- - spec/factories/ecm/downloads/download_category.rb
510
+ - spec/factories/ecm_downloads_download.rb
511
+ - spec/factories/ecm_downloads_download_categories.rb
512
512
  - spec/files/ecm/downloads/download/asset.txt
513
513
  homepage: https://github.com/robotex82/ecm_downloads
514
514
  licenses: []
@@ -529,9 +529,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
529
529
  version: '0'
530
530
  requirements: []
531
531
  rubyforge_project:
532
- rubygems_version: 2.4.8
532
+ rubygems_version: 2.6.11
533
533
  signing_key:
534
534
  specification_version: 4
535
535
  summary: Provides downloads for active admin.
536
536
  test_files: []
537
- has_rdoc:
@@ -1,7 +0,0 @@
1
- FactoryGirl.define do
2
- factory :ecm_downloads_download, class: Ecm::Downloads::Download do
3
- sequence(:name) { |i| "Download ##{i}" }
4
- ecm_downloads_download_category
5
- asset { File.open(File.join(Ecm::Downloads::Engine.root, 'spec/files', 'ecm/downloads', 'download/asset.txt')) }
6
- end
7
- end