radiant-clipped-extension 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/page_attachment.rb +0 -1
- data/clipped_extension.rb +9 -7
- data/config/locales/en.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/{app/models → lib}/asset_tags.rb +2 -4
- data/lib/radiant-clipped-extension.rb +6 -0
- data/radiant-clipped-extension.gemspec +10 -10
- data/spec/datasets/assets_dataset.rb +0 -1
- metadata +7 -9
- data/lib/radiant-clipped-extension/version.rb +0 -3
- data/radiant-clipped-extension-1.0.0.gem +0 -0
@@ -14,7 +14,6 @@ class PageAttachment < ActiveRecord::Base
|
|
14
14
|
# a small change to the method in acts_as_list so that we don't override
|
15
15
|
# the position value if it has already been set (as it usually is for new attachments)
|
16
16
|
def add_to_list_bottom
|
17
|
-
p "add_to_list_bottom: current value is #{self[position_column]}"
|
18
17
|
self[position_column] ||= bottom_position_in_list.to_i + 1
|
19
18
|
end
|
20
19
|
|
data/clipped_extension.rb
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
require_dependency 'application_controller'
|
2
|
-
require 'radiant-clipped-extension
|
2
|
+
require 'radiant-clipped-extension'
|
3
|
+
require 'uuidtools'
|
4
|
+
|
3
5
|
class ClippedExtension < Radiant::Extension
|
4
6
|
version RadiantClippedExtension::VERSION
|
5
|
-
description
|
6
|
-
url
|
7
|
+
description RadiantClippedExtension::DESCRIPTION
|
8
|
+
url RadiantClippedExtension::URL
|
7
9
|
|
8
10
|
extension_config do |config|
|
9
|
-
config.gem "uuidtools"
|
10
|
-
config.gem 'paperclip', :version =>
|
11
|
-
config.gem 'acts_as_list'
|
11
|
+
config.gem "uuidtools", :version => "~> 2.1.2"
|
12
|
+
config.gem 'paperclip', :version => "~> 2.3.11"
|
13
|
+
config.gem 'acts_as_list', :version => "~> 0.1.2"
|
12
14
|
end
|
13
15
|
|
14
|
-
migrate_from '
|
16
|
+
migrate_from 'Paperclipped', 20100327111216
|
15
17
|
|
16
18
|
def activate
|
17
19
|
require 'paperclip/geometry_transformation'
|
data/config/locales/en.yml
CHANGED
data/config/locales/nl.yml
CHANGED
@@ -319,14 +319,12 @@ private
|
|
319
319
|
end
|
320
320
|
|
321
321
|
def find_asset(tag, options)
|
322
|
-
|
323
|
-
if title = options.delete('name') || options.delete('title')
|
322
|
+
tag.locals.asset ||= if title = (options.delete('name') || options.delete('title'))
|
324
323
|
Asset.find_by_title(title)
|
325
324
|
elsif id = options.delete('id')
|
326
325
|
Asset.find_by_id(id)
|
327
|
-
else
|
328
|
-
raise TagError, "'name' or 'id' attribute required for unenclosed r:asset tag" unless tag.locals.asset
|
329
326
|
end
|
327
|
+
tag.locals.asset || raise(TagError, "Asset not found.")
|
330
328
|
end
|
331
329
|
|
332
330
|
def assets_find_options(tag)
|
@@ -1,2 +1,8 @@
|
|
1
1
|
module RadiantClippedExtension
|
2
|
+
VERSION = '1.0.2'
|
3
|
+
SUMMARY = %q{Assets for Radiant CMS}
|
4
|
+
DESCRIPTION = %q{Asset-management derived from Keith Bingman's Paperclipped extension.}
|
5
|
+
URL = "http://radiantcms.org"
|
6
|
+
AUTHORS = ["Keith Bingman", "Benny Degezelle", "William Ross", "John W. Long"]
|
7
|
+
EMAIL = ["radiant@radiantcms.org"]
|
2
8
|
end
|
@@ -1,16 +1,20 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "radiant-clipped-extension
|
3
|
+
require "radiant-clipped-extension"
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "radiant-clipped-extension"
|
7
7
|
s.version = RadiantClippedExtension::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors =
|
10
|
-
s.email =
|
11
|
-
s.homepage =
|
12
|
-
s.summary =
|
13
|
-
s.description =
|
9
|
+
s.authors = RadiantClippedExtension::AUTHORS
|
10
|
+
s.email = RadiantClippedExtension::EMAIL
|
11
|
+
s.homepage = RadiantClippedExtension::URL
|
12
|
+
s.summary = RadiantClippedExtension::SUMMARY
|
13
|
+
s.description = RadiantClippedExtension::DESCRIPTION
|
14
|
+
|
15
|
+
s.add_dependency 'acts_as_list', "~> 0.1.2"
|
16
|
+
s.add_dependency 'paperclip', "~> 2.3.11"
|
17
|
+
s.add_dependency 'uuidtools', "~> 2.1.2"
|
14
18
|
|
15
19
|
ignores = if File.exist?('.gitignore')
|
16
20
|
File.read('.gitignore').split("\n").inject([]) {|a,p| a + Dir[p] }
|
@@ -26,8 +30,4 @@ Gem::Specification.new do |s|
|
|
26
30
|
Add this to your radiant project with:
|
27
31
|
config.gem 'radiant-clipped-extension', :version => '~>#{RadiantClippedExtension::VERSION}'
|
28
32
|
}
|
29
|
-
|
30
|
-
s.add_dependency 'acts_as_list', "~> 0.1.2"
|
31
|
-
s.add_dependency 'paperclip', "~> 2.3.11"
|
32
|
-
s.add_dependency 'uuidtools', "~> 2.1.2"
|
33
33
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-clipped-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Keith Bingman
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2011-
|
21
|
+
date: 2011-07-05 00:00:00 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: acts_as_list
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: 2.1.2
|
69
69
|
type: :runtime
|
70
70
|
version_requirements: *id003
|
71
|
-
description:
|
71
|
+
description: Asset-management derived from Keith Bingman's Paperclipped extension.
|
72
72
|
email:
|
73
73
|
- radiant@radiantcms.org
|
74
74
|
executables: []
|
@@ -82,7 +82,6 @@ files:
|
|
82
82
|
- app/controllers/admin/page_attachments_controller.rb
|
83
83
|
- app/helpers/admin/assets_helper.rb
|
84
84
|
- app/models/asset.rb
|
85
|
-
- app/models/asset_tags.rb
|
86
85
|
- app/models/asset_type.rb
|
87
86
|
- app/models/old_page_attachment.rb
|
88
87
|
- app/models/page_attachment.rb
|
@@ -131,11 +130,11 @@ files:
|
|
131
130
|
- db/migrate/20110609101438_dimensions.rb
|
132
131
|
- features/support/env.rb
|
133
132
|
- features/support/paths.rb
|
133
|
+
- lib/asset_tags.rb
|
134
134
|
- lib/clipped_admin_ui.rb
|
135
135
|
- lib/page_asset_associations.rb
|
136
136
|
- lib/paperclip/frame_grab.rb
|
137
137
|
- lib/paperclip/geometry_transformation.rb
|
138
|
-
- lib/radiant-clipped-extension/version.rb
|
139
138
|
- lib/radiant-clipped-extension.rb
|
140
139
|
- lib/tasks/clipped_extension_tasks.rake
|
141
140
|
- lib/tasks/paperclip_tasks.rake
|
@@ -178,7 +177,6 @@ files:
|
|
178
177
|
- public/images/admin/assets/zip_icon.png
|
179
178
|
- public/javascripts/admin/assets.js
|
180
179
|
- public/stylesheets/sass/admin/assets.sass
|
181
|
-
- radiant-clipped-extension-1.0.0.gem
|
182
180
|
- radiant-clipped-extension.gemspec
|
183
181
|
- Rakefile
|
184
182
|
- README.md
|
@@ -206,7 +204,7 @@ files:
|
|
206
204
|
homepage: http://radiantcms.org
|
207
205
|
licenses: []
|
208
206
|
|
209
|
-
post_install_message: "\n Add this to your radiant project with:\n config.gem 'radiant-clipped-extension', :version => '~>1.0.
|
207
|
+
post_install_message: "\n Add this to your radiant project with:\n config.gem 'radiant-clipped-extension', :version => '~>1.0.2'\n "
|
210
208
|
rdoc_options: []
|
211
209
|
|
212
210
|
require_paths:
|
Binary file
|