effective_regions 1.9.0 → 1.10.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e524f4fbaed0d1a7b576b17b8a53d1d290549abaa90e7b1d6006fd06803e3ee1
|
4
|
+
data.tar.gz: d194dc40db088c50b15b1a7c1b672303667a9214dd8dc5d683cfadca3aabc962
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d74ad70f5eaeca444e44718f3fb699599725f39754e15f70b3cb57a692c1ee74790456c2f3adb366155e829b713f7271ea4ff5072db4d7bb9f81f07e12926c57
|
7
|
+
data.tar.gz: a6b086403cd36c5b4280ac3b398ba4f46da9d11c62e9f070e5062a91a71279b92aebc25a30dbc7e9a75b44d195dbc5d61b5ce0959d84146869c5c75adf715830
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Effective
|
2
|
+
module Snippets
|
3
|
+
class EffectiveAsset < Snippet
|
4
|
+
# attr_accessor :asset_id #, Integer
|
5
|
+
# attr_accessor :html_class #, String
|
6
|
+
# attr_accessor :link_title #, String
|
7
|
+
# attr_accessor :private_url # , Boolean
|
8
|
+
|
9
|
+
def snippet_attributes
|
10
|
+
super + [:asset_id, :html_class, :link_title, :private_url]
|
11
|
+
end
|
12
|
+
|
13
|
+
def asset
|
14
|
+
return nil unless defined?(Effective::Asset)
|
15
|
+
@asset ||= (Effective::Asset.where(:id => asset_id).first if asset_id)
|
16
|
+
end
|
17
|
+
|
18
|
+
def snippet_tag
|
19
|
+
:span
|
20
|
+
end
|
21
|
+
|
22
|
+
def private_url
|
23
|
+
super || aws_private?
|
24
|
+
end
|
25
|
+
|
26
|
+
def is_private?
|
27
|
+
[true, 'true', '1'].include?(private_url)
|
28
|
+
end
|
29
|
+
|
30
|
+
def aws_private?
|
31
|
+
asset.try(:aws_acl) == 'authenticated-read'
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -6,15 +6,21 @@ module EffectiveRegions
|
|
6
6
|
|
7
7
|
# Include Helpers to base application
|
8
8
|
initializer 'effective_regions.action_controller' do |app|
|
9
|
-
|
10
|
-
|
9
|
+
app.config.to_prepare do
|
10
|
+
ActiveSupport.on_load :action_controller_base do
|
11
|
+
helper EffectiveRegionsHelper
|
12
|
+
|
13
|
+
ActionController::Base.send(:include, ::EffectiveRegionsControllerHelper)
|
14
|
+
end
|
11
15
|
end
|
12
16
|
end
|
13
17
|
|
14
18
|
# Include acts_as_addressable concern and allow any ActiveRecord object to call it
|
15
19
|
initializer 'effective_regions.active_record' do |app|
|
16
|
-
|
17
|
-
|
20
|
+
app.config.to_prepare do
|
21
|
+
ActiveSupport.on_load :active_record do
|
22
|
+
ActiveRecord::Base.extend(ActsAsRegionable::Base)
|
23
|
+
end
|
18
24
|
end
|
19
25
|
end
|
20
26
|
|
@@ -24,7 +30,7 @@ module EffectiveRegions
|
|
24
30
|
end
|
25
31
|
|
26
32
|
initializer "effective_regions.append_precompiled_assets" do |app|
|
27
|
-
|
33
|
+
app.config.assets.precompile += ['effective_regions_manifest.js', 'ck_assets.js', 'ck_assets.css', 'drop_cap.css']
|
28
34
|
end
|
29
35
|
|
30
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_regions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sassc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Create editable content regions within your existing, ordinary ActionView::Base
|
56
70
|
views, and update content with an actually-good full-screen WYSIWYG editor.
|
57
71
|
email:
|
@@ -63,6 +77,7 @@ files:
|
|
63
77
|
- MIT-LICENSE
|
64
78
|
- README.md
|
65
79
|
- Rakefile
|
80
|
+
- app/assets/config/effective_regions_manifest.js
|
66
81
|
- app/assets/images/effective/templates/image_and_title.png
|
67
82
|
- app/assets/javascripts/ck_assets.js.coffee
|
68
83
|
- app/assets/javascripts/effective/snippets/current_date_time.js.coffee
|
@@ -80,6 +95,7 @@ files:
|
|
80
95
|
- app/models/effective/snippets/current_date_time.rb
|
81
96
|
- app/models/effective/snippets/current_user_info.rb
|
82
97
|
- app/models/effective/snippets/drop_cap.rb
|
98
|
+
- app/models/effective/snippets/effective_asset.rb
|
83
99
|
- app/models/effective/snippets/snippet.rb
|
84
100
|
- app/models/effective/templates/image_and_title.rb
|
85
101
|
- app/models/effective/templates/template.rb
|