spud_media 0.9.4 → 0.9.5
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.
- data/Rakefile +2 -14
- data/Readme.markdown +21 -1
- data/app/assets/images/spud/admin/media_tiny.png +0 -0
- data/app/assets/javascripts/spud/admin/{media.js → media/application.js} +12 -13
- data/app/assets/javascripts/spud/admin/media/picker.js +208 -0
- data/app/assets/javascripts/spud/admin/media/plugin.js +98 -0
- data/app/assets/stylesheets/spud/admin/{media.css → media/application.css} +1 -0
- data/app/assets/stylesheets/spud/admin/media/plugin.css +154 -0
- data/app/controllers/spud/admin/media_controller.rb +1 -1
- data/app/controllers/spud/admin/media_picker_controller.rb +28 -0
- data/app/models/spud_media.rb +6 -7
- data/app/views/spud/admin/media/edit.html.erb +1 -1
- data/app/views/spud/admin/media/index.html.erb +6 -2
- data/app/views/spud/admin/media_picker/_media.html.erb +19 -0
- data/app/views/spud/admin/media_picker/create.html.erb +1 -0
- data/app/views/spud/admin/media_picker/create.js.erb +1 -0
- data/app/views/spud/admin/media_picker/index.html.erb +103 -0
- data/config/routes.rb +1 -0
- data/lib/responds_to_parent.rb +69 -0
- data/lib/spud_media.rb +1 -0
- data/lib/spud_media/engine.rb +2 -5
- data/lib/spud_media/version.rb +1 -1
- metadata +61 -82
- data/app/views/layouts/spud/admin/media/detail.html.erb +0 -5
- data/test/dummy/README.rdoc +0 -261
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/assets/javascripts/application.js +0 -15
- data/test/dummy/app/assets/stylesheets/application.css +0 -13
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -56
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -37
- data/test/dummy/config/environments/production.rb +0 -67
- data/test/dummy/config/environments/test.rb +0 -37
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -15
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -4
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -25
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -6
@@ -1,5 +1,5 @@
|
|
1
1
|
class Spud::Admin::MediaController < Spud::Admin::ApplicationController
|
2
|
-
layout 'spud/admin/
|
2
|
+
layout 'layouts/spud/admin/detail'
|
3
3
|
add_breadcrumb "Media", :spud_admin_media_path
|
4
4
|
belongs_to_spud_app :media
|
5
5
|
before_filter :load_media,:only => [:edit,:update,:show,:destroy,:set_private,:set_access]
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class Spud::Admin::MediaPickerController < Spud::Admin::ApplicationController
|
2
|
+
|
3
|
+
include RespondsToParent
|
4
|
+
|
5
|
+
layout false
|
6
|
+
respond_to :html
|
7
|
+
|
8
|
+
def index
|
9
|
+
@media = SpudMedia.all
|
10
|
+
respond_with @media
|
11
|
+
end
|
12
|
+
|
13
|
+
def create
|
14
|
+
@media = SpudMedia.new(params[:spud_media])
|
15
|
+
if @media.save
|
16
|
+
if request.xhr?
|
17
|
+
render 'create', :status => 200
|
18
|
+
else
|
19
|
+
respond_to_parent do
|
20
|
+
render 'create.js', :status => 200
|
21
|
+
end
|
22
|
+
end
|
23
|
+
else
|
24
|
+
render nil, :status => 422
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
data/app/models/spud_media.rb
CHANGED
@@ -17,6 +17,7 @@ class SpudMedia < ActiveRecord::Base
|
|
17
17
|
validates_numericality_of :crop_x, :crop_y, :crop_w, :crop_h, :crop_s, :allow_nil => true
|
18
18
|
|
19
19
|
before_create :rename_file
|
20
|
+
#after_create :validate_permissions
|
20
21
|
before_update :validate_permissions
|
21
22
|
|
22
23
|
def rename_file
|
@@ -29,7 +30,7 @@ class SpudMedia < ActiveRecord::Base
|
|
29
30
|
def image_from_type
|
30
31
|
|
31
32
|
if self.is_image? || self.is_pdf?
|
32
|
-
return self.
|
33
|
+
return self.attachment_url(:small)
|
33
34
|
|
34
35
|
elsif self.attachment_content_type.blank?
|
35
36
|
return "spud/admin/files_thumbs/dat_thumb.png"
|
@@ -141,14 +142,12 @@ private
|
|
141
142
|
def validate_permissions_s3
|
142
143
|
if is_protected
|
143
144
|
attachment.s3_object(:original).acl = :private
|
144
|
-
if attachment.s3_object(:cropped).exists?
|
145
|
-
|
146
|
-
end
|
145
|
+
attachment.s3_object(:cropped).acl = :private if attachment.s3_object(:cropped).exists?
|
146
|
+
attachment.s3_object(:small).acl = :private if attachment.s3_object(:small).exists?
|
147
147
|
else
|
148
148
|
attachment.s3_object(:original).acl = :public_read
|
149
|
-
if attachment.s3_object(:cropped).exists?
|
150
|
-
|
151
|
-
end
|
149
|
+
attachment.s3_object(:cropped).acl = :public_read if attachment.s3_object(:cropped).exists?
|
150
|
+
attachment.s3_object(:small).acl = :public_read if attachment.s3_object(:small).exists?
|
152
151
|
end
|
153
152
|
end
|
154
153
|
|
@@ -7,8 +7,12 @@
|
|
7
7
|
<div class="page_row">
|
8
8
|
|
9
9
|
<span class="row_meta">
|
10
|
-
|
11
|
-
|
10
|
+
<% if media.is_protected && (media.is_image? || media.is_pdf?) %>
|
11
|
+
<img src="<%= media.image_from_type %>" class="size-50-thumb" />
|
12
|
+
<% else %>
|
13
|
+
<%= image_tag(media.image_from_type, :class => "size-50-thumb") %>
|
14
|
+
<% end %>
|
15
|
+
<%= link_to media.attachment.url.split("/").last, media.attachment_url %>
|
12
16
|
</span>
|
13
17
|
|
14
18
|
<span class="edit_controls">
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= content_tag :div, :class => 'spud_media_picker_item',
|
2
|
+
'data-id' => media.id,
|
3
|
+
'data-type' => (media.is_image? ? 'img' : 'file'),
|
4
|
+
'data-url' => media.attachment.url,
|
5
|
+
'data-name' => media.attachment_file_name,
|
6
|
+
'data-size' => media.attachment_file_size,
|
7
|
+
'data-lastmod' => media.attachment_updated_at.blank? == false ? media.attachment_updated_at.strftime("%l:%M %p, %D") : '',
|
8
|
+
'data-protected' => (media.is_protected ? 'Yes' : 'No') do %>
|
9
|
+
<span class="spud_media_picker_item_thumb">
|
10
|
+
<% if media.is_protected && (media.is_image? || media.is_pdf?) %>
|
11
|
+
<img src="<%= media.image_from_type %>"/>
|
12
|
+
<% else %>
|
13
|
+
<%= image_tag(media.image_from_type) %>
|
14
|
+
<% end %>
|
15
|
+
</span>
|
16
|
+
<span class="spud_media_picker_item_filename">
|
17
|
+
<%= media.attachment_file_name %>
|
18
|
+
</span>
|
19
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => 'media', :locals => {:media => @media} %>
|
@@ -0,0 +1 @@
|
|
1
|
+
spud.admin.mediapicker.onLegacyUploadComplete("<%= escape_javascript(render :partial => 'media', :locals => {:media => @media}) %>");
|
@@ -0,0 +1,103 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Spud Media Picker</title>
|
4
|
+
<%= stylesheet_link_tag *Spud::Core.config.admin_stylesheets %>
|
5
|
+
<%= javascript_include_tag *Spud::Core.config.admin_javascripts %>
|
6
|
+
<%= javascript_include_tag 'tiny_mce/tiny_mce_popup' %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body class="spud_media_picker">
|
10
|
+
|
11
|
+
<div class="spud_media_picker_container">
|
12
|
+
|
13
|
+
<div class="spud_media_picker_tabs">
|
14
|
+
<a class="spud_media_picker_tab" href="#spud_media_picker_tab_upload">Upload</a>
|
15
|
+
<a class="spud_media_picker_tab" href="#spud_media_picker_tab_choose">Choose</a>
|
16
|
+
<a class="spud_media_picker_tab" href="#spud_media_picker_tab_advanced">Advanced</a>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="spud_media_picker_tab_body spud_media_picker_tab_upload">
|
20
|
+
<%= form_for :spud_media, :html => {:class => 'spud_media_picker_upload_form', :target => 'spud_media_picker_upload_target'} do |f| %>
|
21
|
+
<%= f.label :attachment, 'Upload New File' %>
|
22
|
+
<%= f.file_field :attachment%>
|
23
|
+
<div class="progress progress-striped active spud_media_picker_upload_progress">
|
24
|
+
<div class="bar"></div>
|
25
|
+
</div>
|
26
|
+
<div class="spud_media_picker_buttons">
|
27
|
+
<%= f.submit 'Upload', :class => 'btn btn-mini btn-primary spud_media_picker_tab_upload_submit' %>
|
28
|
+
<%= link_to 'Cancel', '#', :class => 'btn btn-mini spud_media_picker_button_cancel' %>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="spud_media_picker_tab_body spud_media_picker_tab_choose">
|
34
|
+
<div class="spud_media_picker_list">
|
35
|
+
<%= render :partial => 'media', :collection => @media %>
|
36
|
+
</div>
|
37
|
+
<div class="spud_media_picker_details">
|
38
|
+
<img src="" class="spud_media_picker_details_thumb" />
|
39
|
+
<ul class="spud_media_picker_details_meta">
|
40
|
+
<li>File Name: <span class="spud_media_picker_details_name"></span></li>
|
41
|
+
<li>File Size: <span class="spud_media_picker_details_size"></span></li>
|
42
|
+
<li>Last Modified: <span class="spud_media_picker_details_lastmod"></span></li>
|
43
|
+
<li>Protected: <span class="spud_media_picker_details_protected"></span></li>
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
<div class="spud_media_picker_buttons">
|
47
|
+
<%= link_to 'Use Selected', '#', :class => 'btn btn-mini btn-primary spud_media_picker_button_use_selected' %>
|
48
|
+
<%= link_to 'Cancel', '#', :class => 'btn btn-mini spud_media_picker_button_cancel' %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div class="spud_media_picker_tab_body spud_media_picker_tab_advanced">
|
53
|
+
<div class="spud_media_picker_option spud_media_picker_option_selected_file">
|
54
|
+
<label>Selected File:</label>
|
55
|
+
<input name="spud_media_picker_option_selected_file" type="text" disabled="disabled" />
|
56
|
+
</div>
|
57
|
+
<div class="spud_media_picker_option spud_media_picker_option_type">
|
58
|
+
<label>Media Type:</label>
|
59
|
+
<input name="spud_media_picker_option_type" type="text" disabled="disabled" />
|
60
|
+
</div>
|
61
|
+
<div class="spud_media_picker_option spud_media_picker_option_target">
|
62
|
+
<label>Open Link In:</label>
|
63
|
+
<select name="spud_media_picker_option_target">
|
64
|
+
<option value="">Same Window</option>
|
65
|
+
<option value="_blank">New Window</option>
|
66
|
+
</select>
|
67
|
+
</div>
|
68
|
+
<div class="spud_media_picker_option spud_media_picker_option_text">
|
69
|
+
<label>Link Text:</label>
|
70
|
+
<input name="spud_media_picker_option_text" type="text" />
|
71
|
+
</div>
|
72
|
+
<div class="spud_media_picker_option spud_media_picker_option_float">
|
73
|
+
<label>Float Image:</label>
|
74
|
+
<select name="spud_media_picker_option_float">
|
75
|
+
<option value="none">Normal</option>
|
76
|
+
<option value="left">Left</option>
|
77
|
+
<option value="right">Right</option>
|
78
|
+
</select>
|
79
|
+
</div>
|
80
|
+
<div class="spud_media_picker_option spud_media_picker_option_title">
|
81
|
+
<label>Title:</label>
|
82
|
+
<input name="spud_media_picker_option_title" type="text" />
|
83
|
+
</div>
|
84
|
+
<div class="spud_media_picker_option spud_media_picker_option_dimensions">
|
85
|
+
<label>Dimensions:</label>
|
86
|
+
<input name="spud_media_picker_option_dimension_w" type="text" placeholder="auto" /> px by <input name="spud_media_picker_option_dimension_h" type="text" placeholder="auto" /> px
|
87
|
+
</div>
|
88
|
+
<div class="spud_media_picker_buttons">
|
89
|
+
<%= link_to 'Insert', '#', :class => 'btn btn-mini btn-primary spud_media_picker_button_insert' %>
|
90
|
+
<%= link_to 'Cancel', '#', :class => 'btn btn-mini spud_media_picker_button_cancel' %>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
<iframe id="spud_media_picker_upload_target" name="spud_media_picker_upload_target" style="display:none;"></iframe>
|
97
|
+
|
98
|
+
<script>
|
99
|
+
$(document).ready(spud.admin.mediapicker.init);
|
100
|
+
</script>
|
101
|
+
|
102
|
+
</body>
|
103
|
+
</html>
|
data/config/routes.rb
CHANGED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Copyright (c) 2006 Sean Treadway
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
22
|
+
|
23
|
+
# Module containing the methods useful for child IFRAME to parent window communication
|
24
|
+
module RespondsToParent
|
25
|
+
|
26
|
+
# Executes the response body as JavaScript in the context of the parent window.
|
27
|
+
# Use this method of you are posting a form to a hidden IFRAME or if you would like
|
28
|
+
# to use IFRAME base RPC.
|
29
|
+
def responds_to_parent(&block)
|
30
|
+
yield
|
31
|
+
|
32
|
+
if performed?
|
33
|
+
# We're returning HTML instead of JS or XML now
|
34
|
+
response.headers['Content-Type'] = 'text/html; charset=UTF-8'
|
35
|
+
|
36
|
+
# Either pull out a redirect or the request body
|
37
|
+
script = if response.headers['Location']
|
38
|
+
#TODO: erase_redirect_results is missing in rails 3.0 has to be implemented
|
39
|
+
# erase redirect
|
40
|
+
"document.location.href = #{location.to_s.inspect}"
|
41
|
+
else
|
42
|
+
response.body
|
43
|
+
end
|
44
|
+
|
45
|
+
# Escape quotes, linebreaks and slashes, maintaining previously escaped slashes
|
46
|
+
# Suggestions for improvement?
|
47
|
+
script = (script || '').
|
48
|
+
gsub('\\', '\\\\\\').
|
49
|
+
gsub(/\r\n|\r|\n/, '\\n').
|
50
|
+
gsub(/['"]/, '\\\\\&').
|
51
|
+
gsub('</script>','</scr"+"ipt>')
|
52
|
+
|
53
|
+
# Clear out the previous render to prevent double render
|
54
|
+
response.request.env['action_controller.instance'].instance_variable_set(:@_response_body, nil)
|
55
|
+
|
56
|
+
# Eval in parent scope and replace document location of this frame
|
57
|
+
# so back button doesn't replay action on targeted forms
|
58
|
+
# loc = document.location to be set after parent is updated for IE
|
59
|
+
# with(window.parent) - pull in variables from parent window
|
60
|
+
# setTimeout - scope the execution in the windows parent for safari
|
61
|
+
# window.eval - legal eval for Opera
|
62
|
+
render :text => "<html><body><script type='text/javascript' charset='utf-8'>
|
63
|
+
var loc = document.location;
|
64
|
+
with(window.parent) { setTimeout(function() { window.eval('#{script}'); if (typeof(loc) !== 'undefined') loc.replace('about:blank'); }, 1) };
|
65
|
+
</script></body></html>".html_safe
|
66
|
+
end
|
67
|
+
end
|
68
|
+
alias respond_to_parent responds_to_parent
|
69
|
+
end
|
data/lib/spud_media.rb
CHANGED
data/lib/spud_media/engine.rb
CHANGED
@@ -5,15 +5,12 @@ module Spud
|
|
5
5
|
class Engine < Rails::Engine
|
6
6
|
engine_name :spud_media
|
7
7
|
initializer :admin do
|
8
|
+
Spud::Core.append_admin_javascripts('spud/admin/media/application')
|
9
|
+
Spud::Core.append_admin_stylesheets('spud/admin/media/application')
|
8
10
|
Spud::Core.configure do |config|
|
9
11
|
config.admin_applications += [{:name => "Media",:thumbnail => "spud/admin/media_thumb.png",:url => "/spud/admin/media",:order => 3,:retina => true}]
|
10
12
|
end
|
11
13
|
end
|
12
|
-
initializer :assets do |config|
|
13
|
-
Rails.application.config.assets.precompile += [
|
14
|
-
"spud/admin/media*"
|
15
|
-
]
|
16
|
-
end
|
17
14
|
end
|
18
15
|
end
|
19
16
|
end
|
data/lib/spud_media/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spud_media
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -33,9 +33,6 @@ dependencies:
|
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
35
|
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: 0.8.0
|
38
|
-
- - <
|
39
36
|
- !ruby/object:Gem::Version
|
40
37
|
version: 0.9.0
|
41
38
|
type: :runtime
|
@@ -44,9 +41,6 @@ dependencies:
|
|
44
41
|
none: false
|
45
42
|
requirements:
|
46
43
|
- - ! '>='
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 0.8.0
|
49
|
-
- - <
|
50
44
|
- !ruby/object:Gem::Version
|
51
45
|
version: 0.9.0
|
52
46
|
- !ruby/object:Gem::Dependency
|
@@ -70,49 +64,65 @@ dependencies:
|
|
70
64
|
requirement: !ruby/object:Gem::Requirement
|
71
65
|
none: false
|
72
66
|
requirements:
|
73
|
-
- -
|
67
|
+
- - '='
|
74
68
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
69
|
+
version: 0.3.11
|
76
70
|
type: :development
|
77
71
|
prerelease: false
|
78
72
|
version_requirements: !ruby/object:Gem::Requirement
|
79
73
|
none: false
|
80
74
|
requirements:
|
81
|
-
- -
|
75
|
+
- - '='
|
82
76
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
77
|
+
version: 0.3.11
|
84
78
|
- !ruby/object:Gem::Dependency
|
85
79
|
name: rspec
|
86
80
|
requirement: !ruby/object:Gem::Requirement
|
87
81
|
none: false
|
88
82
|
requirements:
|
89
|
-
- -
|
83
|
+
- - '='
|
90
84
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
85
|
+
version: 2.8.0
|
92
86
|
type: :development
|
93
87
|
prerelease: false
|
94
88
|
version_requirements: !ruby/object:Gem::Requirement
|
95
89
|
none: false
|
96
90
|
requirements:
|
97
|
-
- -
|
91
|
+
- - '='
|
98
92
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
93
|
+
version: 2.8.0
|
100
94
|
- !ruby/object:Gem::Dependency
|
101
95
|
name: rspec-rails
|
102
96
|
requirement: !ruby/object:Gem::Requirement
|
103
97
|
none: false
|
104
98
|
requirements:
|
105
|
-
- -
|
99
|
+
- - '='
|
106
100
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
101
|
+
version: 2.8.1
|
108
102
|
type: :development
|
109
103
|
prerelease: false
|
110
104
|
version_requirements: !ruby/object:Gem::Requirement
|
111
105
|
none: false
|
112
106
|
requirements:
|
113
|
-
- -
|
107
|
+
- - '='
|
114
108
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
109
|
+
version: 2.8.1
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: shoulda
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 3.0.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 3.0.1
|
116
126
|
- !ruby/object:Gem::Dependency
|
117
127
|
name: factory_girl
|
118
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,6 +171,22 @@ dependencies:
|
|
161
171
|
- - '='
|
162
172
|
- !ruby/object:Gem::Version
|
163
173
|
version: 0.7.1
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: simplecov
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ~>
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: 0.6.4
|
182
|
+
type: :development
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ~>
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: 0.6.4
|
164
190
|
description: Spud Media allows you to upload files to your site and manage them in
|
165
191
|
the spud administrative panel. It also uses paperclip and supports s3 storage
|
166
192
|
email:
|
@@ -182,7 +208,10 @@ files:
|
|
182
208
|
- app/assets/images/spud/admin/media/checkers.jpg
|
183
209
|
- app/assets/images/spud/admin/media_thumb.png
|
184
210
|
- app/assets/images/spud/admin/media_thumb@2x.png
|
185
|
-
- app/assets/
|
211
|
+
- app/assets/images/spud/admin/media_tiny.png
|
212
|
+
- app/assets/javascripts/spud/admin/media/application.js
|
213
|
+
- app/assets/javascripts/spud/admin/media/picker.js
|
214
|
+
- app/assets/javascripts/spud/admin/media/plugin.js
|
186
215
|
- app/assets/libs/jcrop/css/Jcrop.gif
|
187
216
|
- app/assets/libs/jcrop/css/jquery.Jcrop.css
|
188
217
|
- app/assets/libs/jcrop/css/jquery.Jcrop.min.css
|
@@ -197,21 +226,27 @@ files:
|
|
197
226
|
- app/assets/libs/tiny_mce/plugins/spud_media/js/template.js
|
198
227
|
- app/assets/libs/tiny_mce/plugins/spud_media/langs/en_dlg.js
|
199
228
|
- app/assets/libs/tiny_mce/plugins/spud_media/template.htm
|
200
|
-
- app/assets/stylesheets/spud/admin/media.css
|
229
|
+
- app/assets/stylesheets/spud/admin/media/application.css
|
230
|
+
- app/assets/stylesheets/spud/admin/media/plugin.css
|
201
231
|
- app/controllers/protected_media_controller.rb
|
202
232
|
- app/controllers/spud/admin/media_controller.rb
|
233
|
+
- app/controllers/spud/admin/media_picker_controller.rb
|
203
234
|
- app/helpers/protected_media_helper.rb
|
204
235
|
- app/helpers/spud/admin/users_helper.rb
|
205
236
|
- app/helpers/spud/user_sessions_helper.rb
|
206
237
|
- app/models/spud_media.rb
|
207
|
-
- app/views/layouts/spud/admin/media/detail.html.erb
|
208
238
|
- app/views/spud/admin/media/edit.html.erb
|
209
239
|
- app/views/spud/admin/media/index.html.erb
|
210
240
|
- app/views/spud/admin/media/new.html.erb
|
241
|
+
- app/views/spud/admin/media_picker/_media.html.erb
|
242
|
+
- app/views/spud/admin/media_picker/create.html.erb
|
243
|
+
- app/views/spud/admin/media_picker/create.js.erb
|
244
|
+
- app/views/spud/admin/media_picker/index.html.erb
|
211
245
|
- config/routes.rb
|
212
246
|
- db/migrate/20120101194256_create_spud_media.rb
|
213
247
|
- db/migrate/20120501203325_add_protected_to_spud_media.rb
|
214
248
|
- db/migrate/20120508132153_add_cropping_to_spud_media.rb
|
249
|
+
- lib/responds_to_parent.rb
|
215
250
|
- lib/spud_media/configuration.rb
|
216
251
|
- lib/spud_media/engine.rb
|
217
252
|
- lib/spud_media/version.rb
|
@@ -220,34 +255,6 @@ files:
|
|
220
255
|
- MIT-LICENSE
|
221
256
|
- Rakefile
|
222
257
|
- Readme.markdown
|
223
|
-
- test/dummy/app/assets/javascripts/application.js
|
224
|
-
- test/dummy/app/assets/stylesheets/application.css
|
225
|
-
- test/dummy/app/controllers/application_controller.rb
|
226
|
-
- test/dummy/app/helpers/application_helper.rb
|
227
|
-
- test/dummy/app/views/layouts/application.html.erb
|
228
|
-
- test/dummy/config/application.rb
|
229
|
-
- test/dummy/config/boot.rb
|
230
|
-
- test/dummy/config/database.yml
|
231
|
-
- test/dummy/config/environment.rb
|
232
|
-
- test/dummy/config/environments/development.rb
|
233
|
-
- test/dummy/config/environments/production.rb
|
234
|
-
- test/dummy/config/environments/test.rb
|
235
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
236
|
-
- test/dummy/config/initializers/inflections.rb
|
237
|
-
- test/dummy/config/initializers/mime_types.rb
|
238
|
-
- test/dummy/config/initializers/secret_token.rb
|
239
|
-
- test/dummy/config/initializers/session_store.rb
|
240
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
241
|
-
- test/dummy/config/locales/en.yml
|
242
|
-
- test/dummy/config/routes.rb
|
243
|
-
- test/dummy/config.ru
|
244
|
-
- test/dummy/public/404.html
|
245
|
-
- test/dummy/public/422.html
|
246
|
-
- test/dummy/public/500.html
|
247
|
-
- test/dummy/public/favicon.ico
|
248
|
-
- test/dummy/Rakefile
|
249
|
-
- test/dummy/README.rdoc
|
250
|
-
- test/dummy/script/rails
|
251
258
|
homepage: http://www.github.com/davydotcom/spud_media
|
252
259
|
licenses: []
|
253
260
|
post_install_message:
|
@@ -262,7 +269,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
269
|
version: '0'
|
263
270
|
segments:
|
264
271
|
- 0
|
265
|
-
hash:
|
272
|
+
hash: 1098441516915304500
|
266
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
274
|
none: false
|
268
275
|
requirements:
|
@@ -271,39 +278,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
278
|
version: '0'
|
272
279
|
segments:
|
273
280
|
- 0
|
274
|
-
hash:
|
281
|
+
hash: 1098441516915304500
|
275
282
|
requirements: []
|
276
283
|
rubyforge_project:
|
277
284
|
rubygems_version: 1.8.24
|
278
285
|
signing_key:
|
279
286
|
specification_version: 3
|
280
287
|
summary: Spud File upload/management module
|
281
|
-
test_files:
|
282
|
-
- test/dummy/app/assets/javascripts/application.js
|
283
|
-
- test/dummy/app/assets/stylesheets/application.css
|
284
|
-
- test/dummy/app/controllers/application_controller.rb
|
285
|
-
- test/dummy/app/helpers/application_helper.rb
|
286
|
-
- test/dummy/app/views/layouts/application.html.erb
|
287
|
-
- test/dummy/config/application.rb
|
288
|
-
- test/dummy/config/boot.rb
|
289
|
-
- test/dummy/config/database.yml
|
290
|
-
- test/dummy/config/environment.rb
|
291
|
-
- test/dummy/config/environments/development.rb
|
292
|
-
- test/dummy/config/environments/production.rb
|
293
|
-
- test/dummy/config/environments/test.rb
|
294
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
295
|
-
- test/dummy/config/initializers/inflections.rb
|
296
|
-
- test/dummy/config/initializers/mime_types.rb
|
297
|
-
- test/dummy/config/initializers/secret_token.rb
|
298
|
-
- test/dummy/config/initializers/session_store.rb
|
299
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
300
|
-
- test/dummy/config/locales/en.yml
|
301
|
-
- test/dummy/config/routes.rb
|
302
|
-
- test/dummy/config.ru
|
303
|
-
- test/dummy/public/404.html
|
304
|
-
- test/dummy/public/422.html
|
305
|
-
- test/dummy/public/500.html
|
306
|
-
- test/dummy/public/favicon.ico
|
307
|
-
- test/dummy/Rakefile
|
308
|
-
- test/dummy/README.rdoc
|
309
|
-
- test/dummy/script/rails
|
288
|
+
test_files: []
|