effective_assets 1.3.2 → 1.4.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: 2754992e54dcb1a9d86e184f1584ddd0631f3a3f
4
- data.tar.gz: cc72cc93f2c212aeffedc815f64a3cd2642e295e
3
+ metadata.gz: 1b649c6f9b41d38fc33afb6d544d9647d3c715c9
4
+ data.tar.gz: dad8ac898260ea9affff90c095630fe03e6b1bef
5
5
  SHA512:
6
- metadata.gz: c7bbc6c099054662f6f2ff13afa097b38ae2c708e742297d0d1a75f6b51d55e66ed49453e0c3ad51a75a93eab8420a6c1ee76a2aab1c842cc702ac539d76f479
7
- data.tar.gz: 71724cb85e3c66a201cdb41324f150b6ef990fa7d6eca8d92a2738f04792e2fa7cac76710ac90dd3172e3017b477d991500fa07f8c3fc10cbd6b9eebf7a6c47f
6
+ metadata.gz: 47eb0c923377ea585157f6e4ec8b3ceb2bdec2f8bb651d8bc5d72759629b5c96f173e6b2a6ca3cb7108a236cb0003da5c9b1042dc950872fd95fc4e294b9052b
7
+ data.tar.gz: 620ef92e842acfe34937d4cf2410b59d676af875e82d3d4299bc8981213c813ed479bc45cfd4a83dc8907ab47a35198e9a6c7945d46889f3a74ac1835587f41a
@@ -13,14 +13,14 @@ module EffectiveAssetsHelper
13
13
  opts = {}
14
14
  end
15
15
 
16
- opts = opts.merge({:alt => asset.description || asset.title || asset.file_name}).merge(options)
16
+ opts = opts.merge({:alt => asset.title || asset.file_name}).merge(options)
17
17
 
18
18
  content_tag(:img, nil, opts.merge(:src => _effective_asset_image_url(asset, version))).gsub('"', "'").html_safe
19
19
  end
20
20
 
21
21
  def effective_asset_link_to(asset, version = nil, options = {})
22
22
  options_title = options.delete(:title)
23
- link_title = options_title || asset.title || asset.file_name || asset.description || "Asset ##{asset.id}"
23
+ link_title = options_title || asset.title || asset.file_name || "Asset ##{asset.id}"
24
24
 
25
25
  if asset.image?
26
26
  link_to(link_title, _effective_asset_image_url(asset, version), options).gsub('"', "'").html_safe # we need all ' quotes or it breaks Insert as functionality
@@ -36,8 +36,6 @@ module EffectiveAssetsHelper
36
36
  def effective_asset_title(asset)
37
37
  [
38
38
  asset.title,
39
- asset.description,
40
- asset.tags,
41
39
  "Size: #{number_to_human_size(asset.data_size)}",
42
40
  "Content Type: #{asset.content_type}"
43
41
  ].compact.join("\n")
@@ -21,9 +21,6 @@ module Effective
21
21
 
22
22
  structure do
23
23
  title :string
24
-
25
- description :text
26
- tags :string
27
24
  extra :text
28
25
 
29
26
  content_type :string, :validates => [:presence]
@@ -9,8 +9,6 @@
9
9
  - if defined? User
10
10
  = asset.try(:user)
11
11
  = f.input :title, :hint => "Give this asset a title"
12
- = f.input :description, :as => :string, :hint => "Give this asset a description"
13
- = f.input :tags, :hint => "Used for searching and filtering. Separate multiple tags with a comma (i.e. blue,car,ford)"
14
12
  = f.input :content_type, :hint => "The computer detected type of file. Be careful when changing this value as you may break things."
15
13
  %li
16
14
  %label.label Files
@@ -2,8 +2,6 @@ class CreateEffectiveAssets < ActiveRecord::Migration
2
2
  def self.up
3
3
  create_table <%= @assets_table_name %> do |t|
4
4
  t.string :title
5
- t.text :description
6
- t.string :tags
7
5
  t.text :extra
8
6
 
9
7
  t.integer :user_id
@@ -1,3 +1,3 @@
1
1
  module EffectiveAssets
2
- VERSION = '1.3.2'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
@@ -2,8 +2,6 @@ ActiveRecord::Schema.define do
2
2
 
3
3
  create_table "assets", :force => true do |t|
4
4
  t.string "title"
5
- t.text "description"
6
- t.string "tags"
7
5
  t.integer "user_id"
8
6
  t.string "content_type"
9
7
  t.string "upload_file"
@@ -24,7 +24,7 @@ describe Effective::Asset do
24
24
  end
25
25
 
26
26
  it 'should be creatable from URL' do
27
- asset = Effective::Asset.create_from_url(image_url, {:title => 'a title', :description => 'a description', :tags => 'a tags', :user_id => 1})
27
+ asset = Effective::Asset.create_from_url(image_url, {:title => 'a title', :user_id => 1})
28
28
 
29
29
  # A new asset should exist, and it should be unprocessed
30
30
  asset.should_not eq false
@@ -48,8 +48,6 @@ describe Effective::Asset do
48
48
  asset.processed.should eq true
49
49
  asset.data.kind_of?(TestAssetUploader).should eq true
50
50
  asset.title.should eq 'a title'
51
- asset.description.should eq 'a description'
52
- asset.tags.should eq 'a tags'
53
51
  asset.user_id.should eq 1
54
52
  asset.versions_info.present?.should eq true
55
53
  asset.content_type.should eq 'image/png'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.4.0
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: 2015-04-23 00:00:00.000000000 Z
11
+ date: 2015-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails