alchemy-richmedia-essences 1.0.0 → 2.0.0

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
  SHA1:
3
- metadata.gz: d868ba94d2c79f37ccd320126840d8bd7c803195
4
- data.tar.gz: a433b359ff064e065c6081f01f0dc1bc08d697b9
3
+ metadata.gz: 299155d3d95957fa0d389c9088e72168fa6b6513
4
+ data.tar.gz: 4fe0286cee0b99569227213ca50a980c3020dd65
5
5
  SHA512:
6
- metadata.gz: ebd2df4a4fd9dfa932ade846c72d4f20aabbb4ef1271dbc3ed3eb53cd47d3923341f6612efc4810d91d5301d7b05c9326014244047e5a2160edd75e88fda1849
7
- data.tar.gz: adbf22abb6a089dfdb57d3c89703625398d579e3c4813c4df2d6ae0d18357734746012ac56c20501fef820fa0a4dd1decba0b80ce00e0e3493420786f4adfe4a
6
+ metadata.gz: 3d37398490272910fa3f85f2287febc46aa2bb327157e657aedcfa3fa4637de60d7c52eb9b5453812b5c3efe656eca9b81b746d41f3663f7a39b031e377f06a2
7
+ data.tar.gz: 20d1490901ceb769505279788cea0fe8c57ebe865944360b46932f4e373fd9a995b53288d846ba989601d6eb9365755b764f75a0813b17e779c4ecf75246a49c
data/README.md CHANGED
@@ -1,19 +1,20 @@
1
- # Alchemy CMS HTML5 Richmedia Essences
1
+ # AlchemyCMS HTML5 Richmedia Essences
2
2
 
3
- Adds HTML5 `EssenceAudio` and `EssenceVideo` essences to your Alchemy CMS powered site.
3
+ Adds HTML5 `EssenceAudio` and `EssenceVideo` essences to your AlchemyCMS powered website.
4
4
 
5
5
  ## Alchemy version
6
6
 
7
- This version is compatible with Alchemy version 3.0 and above only.
8
-
9
- Also this plugin does not contain a `EssenceFlash` any more. If you need `EssenceFlash`, you need to use version 0.3-stable.
7
+ This version is compatible with Alchemy v4.0 and above only.
10
8
 
9
+ - For Alchemy v3.x please use version 1.0.0.
11
10
  - For Alchemy v2.7.0 please use version 0.2.0.
12
11
  - For Alchemy v2.6.0 and below please use version 0.1.0.
13
12
 
13
+ Also this plugin does not contain a `EssenceFlash` any more. If you need `EssenceFlash`, you need to use version 0.3-stable.
14
+
14
15
  ## Installation
15
16
 
16
- **Make sure you have Alchemy CMS installed.**
17
+ **Make sure you have AlchemyCMS installed.**
17
18
 
18
19
  Add this line to your application's Gemfile:
19
20
 
@@ -7,14 +7,14 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "alchemy-richmedia-essences"
8
8
  gem.version = Alchemy::Richmedia::Essences::VERSION
9
9
  gem.authors = ["Thomas von Deyen"]
10
- gem.email = ["tvd@magiclabs.de"]
11
- gem.description = %q{EssenceAudio and EssenceVideo for Alchemy CMS 3.0}
12
- gem.summary = %q{Adds EssenceAudio and EssenceVideo essences to your Alchemy CMS powered site.}
10
+ gem.email = ["thomas@vondeyen.com"]
11
+ gem.description = %q{EssenceAudio and EssenceVideo for AlchemyCMS 4.0}
12
+ gem.summary = %q{Adds EssenceAudio and EssenceVideo essences to your AlchemyCMS powered website.}
13
13
  gem.homepage = "http://alchemy-cms.com"
14
14
  gem.license = 'BSD New'
15
15
 
16
16
  gem.files = `git ls-files`.split($/)
17
17
  gem.require_paths = ["lib"]
18
18
 
19
- gem.add_runtime_dependency 'alchemy_cms', ['>= 3.0.0']
19
+ gem.add_runtime_dependency 'alchemy_cms', ['>= 4.0.0.rc1']
20
20
  end
@@ -1,7 +1,7 @@
1
1
  module Alchemy
2
2
  class Admin::EssenceAudiosController < Alchemy::Admin::BaseController
3
3
  authorize_resource class: Alchemy::EssenceAudio
4
- before_filter :load_essence
4
+ before_action :load_essence
5
5
 
6
6
  def update
7
7
  @essence_audio.update(essence_audio_params)
@@ -1,7 +1,7 @@
1
1
  module Alchemy
2
2
  class Admin::EssenceVideosController < Alchemy::Admin::BaseController
3
3
  authorize_resource class: Alchemy::EssenceVideo
4
- before_filter :load_essence
4
+ before_action :load_essence
5
5
 
6
6
  def update
7
7
  @essence_video.update(essence_video_params)
@@ -21,6 +21,7 @@ module Alchemy
21
21
  :controls,
22
22
  :loop,
23
23
  :muted,
24
+ :preload,
24
25
  :attachment_id
25
26
  )
26
27
  end
@@ -3,6 +3,6 @@ module Alchemy
3
3
  acts_as_essence ingredient_column: 'attachment',
4
4
  preview_text_method: 'name'
5
5
 
6
- belongs_to :attachment
6
+ belongs_to :attachment, optional: true
7
7
  end
8
8
  end
@@ -3,6 +3,6 @@ module Alchemy
3
3
  acts_as_essence ingredient_column: 'attachment',
4
4
  preview_text_method: 'name'
5
5
 
6
- belongs_to :attachment
6
+ belongs_to :attachment, optional: true
7
7
  end
8
8
  end
@@ -3,5 +3,5 @@
3
3
  <%= f.input :controls %>
4
4
  <%= f.input :loop %>
5
5
  <%= f.input :muted %>
6
- <%= f.submit _t(:save) %>
6
+ <%= f.submit Alchemy.t(:save) %>
7
7
  <% end %>
@@ -5,5 +5,7 @@
5
5
  <%= f.input :controls %>
6
6
  <%= f.input :loop %>
7
7
  <%= f.input :muted %>
8
- <%= f.submit _t(:save) %>
8
+ <%= f.input :preload, collection: %w(auto none metadata),
9
+ include_blank: false, input_html: {class: 'alchemy_selectbox'} %>
10
+ <%= f.submit Alchemy.t(:save) %>
9
11
  <% end %>
@@ -4,6 +4,7 @@
4
4
  autoplay: content.essence.autoplay,
5
5
  loop: content.essence.loop,
6
6
  muted: content.essence.muted,
7
+ preload: content.essence.preload.presence || nil,
7
8
  width: content.essence.width,
8
9
  height: content.essence.height do %>
9
10
  <%= content_tag :source, nil,
@@ -1,67 +1,52 @@
1
- <div class="content_editor essence_file" id="<%= content.dom_id %>">
2
- <% if respond_to?(:content_label) %>
3
- <%= content_label(content) %>
4
- <% else %>
5
- <%= label_and_remove_link(content) %>
6
- <% end %>
1
+ <% dialog_link = link_to_dialog('',
2
+ alchemy.admin_attachments_path(
3
+ content_id: content.id,
4
+ only: content.settings_value(:only, local_assigns.fetch(:options, {})),
5
+ except: content.settings_value(:except, local_assigns.fetch(:options, {})),
6
+ options: local_assigns.fetch(:options, {})
7
+ ),
8
+ {
9
+ title: Alchemy.t(:assign_file),
10
+ size: '780x585',
11
+ padding: false
12
+ },
13
+ {
14
+ class: 'icon assign_file',
15
+ title: Alchemy.t(:assign_file)
16
+ }
17
+ ) %>
18
+
19
+ <div class="content_editor essence_file" id="<%= content.dom_id %>" data-content-id="<%= content.id %>">
20
+ <%= content_label(content) %>
7
21
  <div class="file" id="file_<%= content.id %>">
8
22
  <div class="file_icon">
9
- <% if content.ingredient.nil? %>
10
- <%= link_to_dialog '',
11
- alchemy.admin_attachments_path(
12
- content_id: content.id,
13
- only: options[:file_assign_show_only],
14
- except: options[:file_assign_do_not_show],
15
- options: options.to_json
16
- ),
17
- {
18
- title: _t(:assign_file),
19
- size: '780x585',
20
- padding: false
21
- },
22
- class: 'assign_file',
23
- title: _t(:assign_file)
24
- %>
25
- <% else %>
23
+ <% if content.ingredient %>
26
24
  <%= render_icon(content.ingredient.icon_css_class) %>
25
+ <% else %>
26
+ <%= dialog_link %>
27
27
  <% end %>
28
28
  </div>
29
29
  <div class="file_name">
30
- <%= content.ingredient.name rescue ("&#x2190;" + _t(:assign_file_from_archive)).html_safe %>
30
+ <%= content.ingredient.try(:name) ||
31
+ ("&#x2190;" + Alchemy.t(:assign_file_from_archive)).html_safe %>
31
32
  </div>
32
- <% unless content.ingredient.nil? %>
33
- <%= hidden_field_tag content.form_field_name(:attachment_id), content.ingredient.id %>
34
33
  <div class="essence_file_tools">
35
- <%= link_to_dialog '',
36
- alchemy.admin_attachments_path(
37
- content_id: content.id,
38
- only: options[:file_assign_show_only],
39
- except: options[:file_assign_do_not_show],
40
- options: options.to_json
41
- ),
42
- {
43
- title: _t(:assign_file),
44
- size: '780x585',
45
- padding: false
46
- },
47
- class: 'assign_file',
48
- title: _t(:assign_file)
49
- %>
34
+ <%= dialog_link %>
50
35
  <%= link_to_dialog '',
51
36
  url_for(
52
37
  controller: controller,
53
38
  action: 'edit',
54
- options: options.to_json,
39
+ options: local_assigns[:options],
55
40
  id: content.essence.id
56
41
  ),
57
42
  {
58
- title: _t(:edit_file_properties),
59
- size: '400x165'
43
+ title: Alchemy.t(:edit_file_properties),
44
+ size: '400x215'
60
45
  },
61
46
  class: 'edit_file',
62
- title: _t(:edit_file_properties)
63
- %>
47
+ title: Alchemy.t(:edit_file_properties) %>
64
48
  </div>
65
- <% end %>
49
+ <%= hidden_field_tag content.form_field_name(:attachment_id),
50
+ content.ingredient && content.ingredient.id %>
66
51
  </div>
67
52
  </div>
@@ -1,4 +1,4 @@
1
- class CreateAlchemyRichmediaEssences < ActiveRecord::Migration
1
+ class CreateAlchemyRichmediaEssences < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  return if table_exists?(:alchemy_essence_audios)
4
4
 
@@ -1,4 +1,4 @@
1
- class AlchemyEssenceVideoHtml5Update < ActiveRecord::Migration
1
+ class AlchemyEssenceVideoHtml5Update < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  change_table :alchemy_essence_videos do |t|
4
4
  t.change :width, :string
@@ -1,4 +1,4 @@
1
- class RemoveAlchemyEssenceFlashes < ActiveRecord::Migration
1
+ class RemoveAlchemyEssenceFlashes < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  drop_table :alchemy_essence_flashes
4
4
  end
@@ -1,4 +1,4 @@
1
- class AlchemyEssenceAudioHtml5Update < ActiveRecord::Migration
1
+ class AlchemyEssenceAudioHtml5Update < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  change_table :alchemy_essence_audios do |t|
4
4
  t.boolean :autoplay, default: false
@@ -0,0 +1,5 @@
1
+ class AddPreloadToAlchemyEssenceVideos < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_column :alchemy_essence_videos, :preload, :string
4
+ end
5
+ end
@@ -1,7 +1,7 @@
1
1
  module Alchemy
2
2
  module Richmedia
3
3
  module Essences
4
- VERSION = "1.0.0"
4
+ VERSION = "2.0.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-richmedia-essences
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2017-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -16,17 +16,17 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0
19
+ version: 4.0.0.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.0
27
- description: EssenceAudio and EssenceVideo for Alchemy CMS 3.0
26
+ version: 4.0.0.rc1
27
+ description: EssenceAudio and EssenceVideo for AlchemyCMS 4.0
28
28
  email:
29
- - tvd@magiclabs.de
29
+ - thomas@vondeyen.com
30
30
  executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
@@ -54,6 +54,7 @@ files:
54
54
  - db/migrate/20140814212620_alchemy_essence_video_html5_update.rb
55
55
  - db/migrate/20150728153847_remove_alchemy_essence_flashes.rb
56
56
  - db/migrate/20150728172823_alchemy_essence_audio_html5_update.rb
57
+ - db/migrate/20151005130801_add_preload_to_alchemy_essence_videos.rb
57
58
  - lib/alchemy-richmedia-essences.rb
58
59
  - lib/alchemy-richmedia-essences/ability.rb
59
60
  - lib/alchemy-richmedia-essences/engine.rb
@@ -78,8 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
79
  version: '0'
79
80
  requirements: []
80
81
  rubyforge_project:
81
- rubygems_version: 2.4.8
82
+ rubygems_version: 2.6.13
82
83
  signing_key:
83
84
  specification_version: 4
84
- summary: Adds EssenceAudio and EssenceVideo essences to your Alchemy CMS powered site.
85
+ summary: Adds EssenceAudio and EssenceVideo essences to your AlchemyCMS powered website.
85
86
  test_files: []