radiant-assets-extension 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile +3 -0
- data/README +5 -0
- data/Rakefile +117 -0
- data/app/controllers/admin/assets_controller.rb +4 -0
- data/app/helpers/assets_helper.rb +24 -0
- data/app/models/asset_tags.rb +36 -0
- data/app/models/image.rb +3 -0
- data/app/views/admin/assets/edit.html.erb +25 -0
- data/app/views/admin/assets/index.html.erb +27 -0
- data/app/views/admin/assets/new.html.erb +8 -0
- data/app/views/admin/assets/remove.html.erb +16 -0
- data/assets_extension.rb +27 -0
- data/config/initializers/radiant_config.rb +3 -0
- data/config/locales/en.yml +3 -0
- data/config/routes.rb +5 -0
- data/cucumber.yml +1 -0
- data/db/migrate/20110224001246_add_images_table.rb +11 -0
- data/features/support/env.rb +16 -0
- data/features/support/paths.rb +14 -0
- data/lib/radiant-assets-extension.rb +2 -0
- data/lib/radiant-assets-extension/version.rb +5 -0
- data/lib/tasks/images_extension_tasks.rake +55 -0
- data/public/stylesheets/admin/extensions/assets/assets.css +4 -0
- data/radiant-assets-extension.gemspec +27 -0
- data/spec/spec.opts +6 -0
- data/spec/spec_helper.rb +36 -0
- metadata +128 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
# Determine where the RSpec plugin is by loading the boot
|
2
|
+
unless defined? RADIANT_ROOT
|
3
|
+
ENV["RAILS_ENV"] = "test"
|
4
|
+
case
|
5
|
+
when ENV["RADIANT_ENV_FILE"]
|
6
|
+
require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
|
7
|
+
when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
|
8
|
+
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
|
9
|
+
else
|
10
|
+
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'rake'
|
15
|
+
require 'rake/rdoctask'
|
16
|
+
require 'rake/testtask'
|
17
|
+
|
18
|
+
rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
|
19
|
+
$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
|
20
|
+
require 'spec/rake/spectask'
|
21
|
+
require 'cucumber'
|
22
|
+
require 'cucumber/rake/task'
|
23
|
+
|
24
|
+
# Cleanup the RADIANT_ROOT constant so specs will load the environment
|
25
|
+
Object.send(:remove_const, :RADIANT_ROOT)
|
26
|
+
|
27
|
+
extension_root = File.expand_path(File.dirname(__FILE__))
|
28
|
+
|
29
|
+
task :default => :spec
|
30
|
+
task :stats => "spec:statsetup"
|
31
|
+
|
32
|
+
desc "Run all specs in spec directory"
|
33
|
+
Spec::Rake::SpecTask.new(:spec) do |t|
|
34
|
+
t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
|
35
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
36
|
+
end
|
37
|
+
|
38
|
+
task :features => 'spec:integration'
|
39
|
+
|
40
|
+
namespace :spec do
|
41
|
+
desc "Run all specs in spec directory with RCov"
|
42
|
+
Spec::Rake::SpecTask.new(:rcov) do |t|
|
43
|
+
t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
|
44
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
45
|
+
t.rcov = true
|
46
|
+
t.rcov_opts = ['--exclude', 'spec', '--rails']
|
47
|
+
end
|
48
|
+
|
49
|
+
desc "Print Specdoc for all specs"
|
50
|
+
Spec::Rake::SpecTask.new(:doc) do |t|
|
51
|
+
t.spec_opts = ["--format", "specdoc", "--dry-run"]
|
52
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
53
|
+
end
|
54
|
+
|
55
|
+
[:models, :controllers, :views, :helpers].each do |sub|
|
56
|
+
desc "Run the specs under spec/#{sub}"
|
57
|
+
Spec::Rake::SpecTask.new(sub) do |t|
|
58
|
+
t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
|
59
|
+
t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
desc "Run the Cucumber features"
|
64
|
+
Cucumber::Rake::Task.new(:integration) do |t|
|
65
|
+
t.fork = true
|
66
|
+
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
|
67
|
+
# t.feature_pattern = "#{extension_root}/features/**/*.feature"
|
68
|
+
t.profile = "default"
|
69
|
+
end
|
70
|
+
|
71
|
+
# Setup specs for stats
|
72
|
+
task :statsetup do
|
73
|
+
require 'code_statistics'
|
74
|
+
::STATS_DIRECTORIES << %w(Model\ specs spec/models)
|
75
|
+
::STATS_DIRECTORIES << %w(View\ specs spec/views)
|
76
|
+
::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
|
77
|
+
::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
|
78
|
+
::CodeStatistics::TEST_TYPES << "Model specs"
|
79
|
+
::CodeStatistics::TEST_TYPES << "View specs"
|
80
|
+
::CodeStatistics::TEST_TYPES << "Controller specs"
|
81
|
+
::CodeStatistics::TEST_TYPES << "Helper specs"
|
82
|
+
::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
|
83
|
+
end
|
84
|
+
|
85
|
+
namespace :db do
|
86
|
+
namespace :fixtures do
|
87
|
+
desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
|
88
|
+
task :load => :environment do
|
89
|
+
require 'active_record/fixtures'
|
90
|
+
ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
|
91
|
+
(ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
|
92
|
+
Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
desc 'Generate documentation for the images extension.'
|
100
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
101
|
+
rdoc.rdoc_dir = 'rdoc'
|
102
|
+
rdoc.title = 'ImagesExtension'
|
103
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
104
|
+
rdoc.rdoc_files.include('README')
|
105
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
106
|
+
end
|
107
|
+
|
108
|
+
# For extensions that are in transition
|
109
|
+
desc 'Test the images extension.'
|
110
|
+
Rake::TestTask.new(:test) do |t|
|
111
|
+
t.libs << 'lib'
|
112
|
+
t.pattern = 'test/**/*_test.rb'
|
113
|
+
t.verbose = true
|
114
|
+
end
|
115
|
+
|
116
|
+
# Load any custom rakefiles for extension
|
117
|
+
Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module AssetsHelper
|
2
|
+
def image_listing(image)
|
3
|
+
square_thumb(image) +
|
4
|
+
content_tag(:span, image_link(image), :class=>'title')
|
5
|
+
end
|
6
|
+
|
7
|
+
def square_thumb(image, size=30)
|
8
|
+
src = image.upload.thumb("#{size}x#{size}#").url
|
9
|
+
image_tag(src, :width=>size, :height => size)
|
10
|
+
end
|
11
|
+
|
12
|
+
def image_link(image)
|
13
|
+
link_to image.upload_uid, edit_admin_asset_path(image)
|
14
|
+
end
|
15
|
+
|
16
|
+
def image_tag(*args)
|
17
|
+
image = args.first
|
18
|
+
if image && image.respond_to?(:upload)
|
19
|
+
super image.upload.url, :width => image.upload.width, :height => image.upload.height
|
20
|
+
else
|
21
|
+
super(*args)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module AssetTags
|
2
|
+
include Radiant::Taggable
|
3
|
+
|
4
|
+
desc %{
|
5
|
+
Renders an image tag
|
6
|
+
|
7
|
+
Examples of possible values for the size attribute
|
8
|
+
|
9
|
+
'400x300' # resize, maintain aspect ratio
|
10
|
+
'400x300!' # force resize, don't maintain aspect ratio
|
11
|
+
'400x' # resize width, maintain aspect ratio
|
12
|
+
'x300' # resize height, maintain aspect ratio
|
13
|
+
'400x300>' # resize only if the image is larger than this
|
14
|
+
'400x300<' # resize only if the image is smaller than this
|
15
|
+
'50x50%' # resize width and height to 50%
|
16
|
+
'400x300^' # resize width, height to minimum 400,300, maintain aspect ratio
|
17
|
+
'2000@' # resize so max area in pixels is 2000
|
18
|
+
'400x300#' # resize, crop if necessary to maintain aspect ratio (centre gravity)
|
19
|
+
'400x300#ne' # as above, north-east gravity
|
20
|
+
'400x300se' # crop, with south-east gravity
|
21
|
+
'400x300+50+100' # crop from the point 50,100 with width, height 400,300
|
22
|
+
|
23
|
+
<r:image id="2" [size="400x200"] />
|
24
|
+
}
|
25
|
+
# TODO: accept width/height attributes and do something sensible like
|
26
|
+
# resizing proportionally
|
27
|
+
tag 'image' do |tag|
|
28
|
+
image = Image.find(tag.attr['id'])
|
29
|
+
job = if(tag.attr['size'])
|
30
|
+
image.upload.process(:resize, tag.attr['size'])
|
31
|
+
else
|
32
|
+
image.upload
|
33
|
+
end
|
34
|
+
%{<img src="#{job.url}" width="#{job.width}" height="#{job.height}">}
|
35
|
+
end
|
36
|
+
end
|
data/app/models/image.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
<% include_stylesheet 'admin/extensions/assets/assets' %>
|
2
|
+
|
3
|
+
<h1>Edit Asset</h1>
|
4
|
+
|
5
|
+
<% form_for @image, :url => admin_asset_path(@image), :html => {'data-onsubmit_status' => onsubmit_status(@image)} do |f| %>
|
6
|
+
<div class="form_area">
|
7
|
+
<p class="title">
|
8
|
+
Name: <%= @image.upload_uid %>
|
9
|
+
</p>
|
10
|
+
<table>
|
11
|
+
<tbody>
|
12
|
+
<tr><th>Width</th><td><%= @image.upload.width %></td></tr>
|
13
|
+
<tr><th>Height</th><td><%= @image.upload.height %></td></tr>
|
14
|
+
</tbody>
|
15
|
+
</table>
|
16
|
+
<div class="frame">
|
17
|
+
<%= image_tag @image %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<p class="buttons">
|
21
|
+
<%= save_model_button(@image) %>
|
22
|
+
<%= save_model_and_continue_editing_button(@image) %>
|
23
|
+
or <%= link_to 'Cancel', admin_assets_url %>
|
24
|
+
</p>
|
25
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="outset">
|
2
|
+
<table class="index" id="assets">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th class="name">Asset</th>
|
6
|
+
<th class="actions">Modify</th>
|
7
|
+
</tr>
|
8
|
+
</thead>
|
9
|
+
<tbody>
|
10
|
+
<% unless @images.empty? %>
|
11
|
+
<% @images.each do |image| %>
|
12
|
+
<tr>
|
13
|
+
<td class="name"><%= image_listing(image) %></td>
|
14
|
+
<td class="actions"><%= link_to 'Remove', remove_admin_asset_path(image), :class => 'action remove' %></td>
|
15
|
+
</tr>
|
16
|
+
<% end %>
|
17
|
+
<% else %>
|
18
|
+
<tr><td class='empty' colspan='2'>No Assets</td></tr>
|
19
|
+
<% end %>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
22
|
+
</div>
|
23
|
+
<div id="actions">
|
24
|
+
<ul>
|
25
|
+
<li><%= link_to 'Upload New Asset', new_admin_asset_path %></li>
|
26
|
+
</ul>
|
27
|
+
</div>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<h1>Upload New Asset</h1>
|
2
|
+
<% form_for @image, :url => admin_assets_path, :html => {:multipart => true, 'data-onsubmit_status'=>'Uploading Asset…'} do |f| %>
|
3
|
+
<%= f.file_field :upload %>
|
4
|
+
<p class="buttons">
|
5
|
+
<%= f.submit 'Upload Asset', :class=>'button' %>
|
6
|
+
or <%= link_to 'Cancel', admin_assets_path %>
|
7
|
+
</p>
|
8
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h1>Remove Asset</h1>
|
2
|
+
<p>
|
3
|
+
Are you sure you want to <strong class="warning">permanently remove</strong>
|
4
|
+
the following asset?
|
5
|
+
</p>
|
6
|
+
|
7
|
+
<table class="index" id="assets">
|
8
|
+
<tr><td class="name"><%= image_listing(@image) %></td></tr>
|
9
|
+
</table>
|
10
|
+
|
11
|
+
<% form_for @image, :url => admin_asset_path(@image), :html => {:method => :delete, 'data-onsubmit_status'=>'Removing asset…'} do |f| %>
|
12
|
+
<p class="buttons">
|
13
|
+
<%= f.submit 'Delete asset', :class=>'button' %>
|
14
|
+
or <%= link_to 'Cancel', admin_assets_path %>
|
15
|
+
</p>
|
16
|
+
<% end %>
|
data/assets_extension.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Uncomment this if you reference any of your controllers in activate
|
2
|
+
# require_dependency 'application_controller'
|
3
|
+
require 'radiant-assets-extension/version'
|
4
|
+
require 'dragonfly'
|
5
|
+
|
6
|
+
class AssetsExtension < Radiant::Extension
|
7
|
+
version RadiantAssetsExtension::VERSION
|
8
|
+
description "Simple asset management (images and other uploads) for Radiant."
|
9
|
+
url "http://github"
|
10
|
+
|
11
|
+
extension_config do |config|
|
12
|
+
path = '/assets'
|
13
|
+
dragonfly = Dragonfly[:assets]
|
14
|
+
dragonfly.configure_with(:imagemagick)
|
15
|
+
dragonfly.configure_with(:rails)
|
16
|
+
dragonfly.url_path_prefix = path
|
17
|
+
dragonfly.define_macro(ActiveRecord::Base, :image_accessor)
|
18
|
+
config.middleware.insert_after 'Rack::Lock', 'Dragonfly::Middleware', :assets, path
|
19
|
+
end
|
20
|
+
|
21
|
+
def activate
|
22
|
+
tab 'Content' do
|
23
|
+
add_item 'Assets', '/admin/assets', :after => 'Pages'
|
24
|
+
end
|
25
|
+
Page.send :include, AssetTags
|
26
|
+
end
|
27
|
+
end
|
data/config/routes.rb
ADDED
data/cucumber.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
default: --format progress features --tags ~@proposed,~@in_progress
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Sets up the Rails environment for Cucumber
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
# Extension root
|
4
|
+
extension_env = File.expand_path(File.dirname(__FILE__) + '/../../../../../config/environment')
|
5
|
+
require extension_env+'.rb'
|
6
|
+
|
7
|
+
Dir.glob(File.join(RADIANT_ROOT, "features", "**", "*.rb")).each {|step| require step}
|
8
|
+
|
9
|
+
Cucumber::Rails::World.class_eval do
|
10
|
+
include Dataset
|
11
|
+
datasets_directory "#{RADIANT_ROOT}/spec/datasets"
|
12
|
+
Dataset::Resolver.default = Dataset::DirectoryResolver.new("#{RADIANT_ROOT}/spec/datasets", File.dirname(__FILE__) + '/../../spec/datasets', File.dirname(__FILE__) + '/../datasets')
|
13
|
+
self.datasets_database_dump_path = "#{Rails.root}/tmp/dataset"
|
14
|
+
|
15
|
+
# dataset :images
|
16
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
namespace :radiant do
|
2
|
+
namespace :extensions do
|
3
|
+
namespace :images do
|
4
|
+
|
5
|
+
desc "Runs the migration of the Images extension"
|
6
|
+
task :migrate => :environment do
|
7
|
+
require 'radiant/extension_migrator'
|
8
|
+
if ENV["VERSION"]
|
9
|
+
ImagesExtension.migrator.migrate(ENV["VERSION"].to_i)
|
10
|
+
Rake::Task['db:schema:dump'].invoke
|
11
|
+
else
|
12
|
+
ImagesExtension.migrator.migrate
|
13
|
+
Rake::Task['db:schema:dump'].invoke
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Copies public assets of the Images to the instance public/ directory."
|
18
|
+
task :update => :environment do
|
19
|
+
is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
|
20
|
+
puts "Copying assets from ImagesExtension"
|
21
|
+
Dir[ImagesExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
|
22
|
+
path = file.sub(ImagesExtension.root, '')
|
23
|
+
directory = File.dirname(path)
|
24
|
+
mkdir_p RAILS_ROOT + directory, :verbose => false
|
25
|
+
cp file, RAILS_ROOT + path, :verbose => false
|
26
|
+
end
|
27
|
+
unless ImagesExtension.root.starts_with? RAILS_ROOT # don't need to copy vendored tasks
|
28
|
+
puts "Copying rake tasks from ImagesExtension"
|
29
|
+
local_tasks_path = File.join(RAILS_ROOT, %w(lib tasks))
|
30
|
+
mkdir_p local_tasks_path, :verbose => false
|
31
|
+
Dir[File.join ImagesExtension.root, %w(lib tasks *.rake)].each do |file|
|
32
|
+
cp file, local_tasks_path, :verbose => false
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "Syncs all available translations for this ext to the English ext master"
|
38
|
+
task :sync => :environment do
|
39
|
+
# The main translation root, basically where English is kept
|
40
|
+
language_root = ImagesExtension.root + "/config/locales"
|
41
|
+
words = TranslationSupport.get_translation_keys(language_root)
|
42
|
+
|
43
|
+
Dir["#{language_root}/*.yml"].each do |filename|
|
44
|
+
next if filename.match('_available_tags')
|
45
|
+
basename = File.basename(filename, '.yml')
|
46
|
+
puts "Syncing #{basename}"
|
47
|
+
(comments, other) = TranslationSupport.read_file(filename, basename)
|
48
|
+
words.each { |k,v| other[k] ||= words[k] } # Initializing hash variable as empty if it does not exist
|
49
|
+
other.delete_if { |k,v| !words[k] } # Remove if not defined in en.yml
|
50
|
+
TranslationSupport.write_file(filename, basename, comments, other)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path('../lib', __FILE__)
|
3
|
+
require 'radiant-assets-extension/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'radiant-assets-extension'
|
7
|
+
s.version = RadiantAssetsExtension::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ['Gerrit Kaiser']
|
10
|
+
s.email = ['gerrit@gerritkaiser.de']
|
11
|
+
s.homepage = 'http://ext.radiantcms.org/extensions/269-assets'
|
12
|
+
s.summary = %q{Simple asset management (images and other uploads) for Radiant CMS}
|
13
|
+
s.description = %q{Makes Radiant better by adding images!}
|
14
|
+
|
15
|
+
s.add_dependency 'dragonfly', '~>0.8.2'
|
16
|
+
s.add_dependency 'aws-s3', '~>0.6.2'
|
17
|
+
|
18
|
+
s.files = `git ls-files`.split("\n")
|
19
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
|
23
|
+
s.post_install_message = %{
|
24
|
+
Add this to your radiant project with:
|
25
|
+
config.gem 'radiant-assets-extension', :version => '#{RadiantAssetsExtension::VERSION}'
|
26
|
+
}
|
27
|
+
end
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
unless defined? RADIANT_ROOT
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
case
|
4
|
+
when ENV["RADIANT_ENV_FILE"]
|
5
|
+
require ENV["RADIANT_ENV_FILE"]
|
6
|
+
when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
|
7
|
+
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
|
8
|
+
else
|
9
|
+
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
require "#{RADIANT_ROOT}/spec/spec_helper"
|
13
|
+
|
14
|
+
Dataset::Resolver.default << (File.dirname(__FILE__) + "/datasets")
|
15
|
+
|
16
|
+
if File.directory?(File.dirname(__FILE__) + "/matchers")
|
17
|
+
Dir[File.dirname(__FILE__) + "/matchers/*.rb"].each {|file| require file }
|
18
|
+
end
|
19
|
+
|
20
|
+
Spec::Runner.configure do |config|
|
21
|
+
# config.use_transactional_fixtures = true
|
22
|
+
# config.use_instantiated_fixtures = false
|
23
|
+
# config.fixture_path = RAILS_ROOT + '/spec/fixtures'
|
24
|
+
|
25
|
+
# You can declare fixtures for each behaviour like this:
|
26
|
+
# describe "...." do
|
27
|
+
# fixtures :table_a, :table_b
|
28
|
+
#
|
29
|
+
# Alternatively, if you prefer to declare them only once, you can
|
30
|
+
# do so here, like so ...
|
31
|
+
#
|
32
|
+
# config.global_fixtures = :table_a, :table_b
|
33
|
+
#
|
34
|
+
# If you declare global fixtures, be aware that they will be declared
|
35
|
+
# for all of your examples, even those that don't use them.
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: radiant-assets-extension
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Gerrit Kaiser
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-02-24 00:00:00 +00:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: dragonfly
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 59
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 8
|
33
|
+
- 2
|
34
|
+
version: 0.8.2
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: aws-s3
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 6
|
49
|
+
- 2
|
50
|
+
version: 0.6.2
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
|
+
description: Makes Radiant better by adding images!
|
54
|
+
email:
|
55
|
+
- gerrit@gerritkaiser.de
|
56
|
+
executables: []
|
57
|
+
|
58
|
+
extensions: []
|
59
|
+
|
60
|
+
extra_rdoc_files: []
|
61
|
+
|
62
|
+
files:
|
63
|
+
- .gitignore
|
64
|
+
- Gemfile
|
65
|
+
- README
|
66
|
+
- Rakefile
|
67
|
+
- app/controllers/admin/assets_controller.rb
|
68
|
+
- app/helpers/assets_helper.rb
|
69
|
+
- app/models/asset_tags.rb
|
70
|
+
- app/models/image.rb
|
71
|
+
- app/views/admin/assets/edit.html.erb
|
72
|
+
- app/views/admin/assets/index.html.erb
|
73
|
+
- app/views/admin/assets/new.html.erb
|
74
|
+
- app/views/admin/assets/remove.html.erb
|
75
|
+
- assets_extension.rb
|
76
|
+
- config/initializers/radiant_config.rb
|
77
|
+
- config/locales/en.yml
|
78
|
+
- config/routes.rb
|
79
|
+
- cucumber.yml
|
80
|
+
- db/migrate/20110224001246_add_images_table.rb
|
81
|
+
- features/support/env.rb
|
82
|
+
- features/support/paths.rb
|
83
|
+
- lib/radiant-assets-extension.rb
|
84
|
+
- lib/radiant-assets-extension/version.rb
|
85
|
+
- lib/tasks/images_extension_tasks.rake
|
86
|
+
- public/stylesheets/admin/extensions/assets/assets.css
|
87
|
+
- radiant-assets-extension.gemspec
|
88
|
+
- spec/spec.opts
|
89
|
+
- spec/spec_helper.rb
|
90
|
+
has_rdoc: true
|
91
|
+
homepage: http://ext.radiantcms.org/extensions/269-assets
|
92
|
+
licenses: []
|
93
|
+
|
94
|
+
post_install_message: "\n Add this to your radiant project with:\n config.gem 'radiant-assets-extension', :version => '0.0.1'\n "
|
95
|
+
rdoc_options: []
|
96
|
+
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
hash: 3
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
version: "0"
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 3
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
requirements: []
|
118
|
+
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 1.3.7
|
121
|
+
signing_key:
|
122
|
+
specification_version: 3
|
123
|
+
summary: Simple asset management (images and other uploads) for Radiant CMS
|
124
|
+
test_files:
|
125
|
+
- features/support/env.rb
|
126
|
+
- features/support/paths.rb
|
127
|
+
- spec/spec.opts
|
128
|
+
- spec/spec_helper.rb
|