attachment_magick 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,13 +4,15 @@ gem "rails", "3.0.10"
4
4
  gem "capybara", ">= 1.0.1"
5
5
  gem "sqlite3-ruby", :require => "sqlite3"
6
6
 
7
- gem "mongoid", "~> 2.0"
8
- gem "bson_ext", "~> 1.3"
7
+ gem "mongoid", "~> 2.2"
8
+ gem "bson_ext", "~> 1.4"
9
9
  gem "nokogiri"
10
10
  gem "hpricot"
11
11
  gem "colorific"
12
12
  gem "ruby-debug19"
13
- gem "simplecov"
13
+ gem "simplecov", :require => false
14
14
  gem "mime-types", ">=1.16"
15
- # Specify your gem"s dependencies in attachment_magick.gemspec
15
+
16
+
17
+ # Specify your gem's dependencies in attachment_magick.gemspec
16
18
  gemspec
data/Gemfile.lock CHANGED
@@ -4,13 +4,14 @@ PATH
4
4
  attachment_magick (0.3.1)
5
5
  dragonfly (>= 0.9.5)
6
6
  jquery-rails (>= 0.2.7)
7
- marcosinger-auto_html (>= 1.3.4)
7
+ marcosinger-auto_html (>= 1.3.6)
8
8
  marcosinger-css_parser (>= 1.3.0)
9
9
  rack-cache (>= 1.0)
10
10
 
11
11
  GEM
12
12
  remote: http://rubygems.org/
13
13
  specs:
14
+ RedCloth (4.2.8)
14
15
  abstract (1.0.0)
15
16
  actionmailer (3.0.10)
16
17
  actionpack (= 3.0.10)
@@ -40,10 +41,10 @@ GEM
40
41
  activesupport (3.0.10)
41
42
  archive-tar-minitar (0.5.2)
42
43
  arel (2.0.10)
43
- bson (1.3.0)
44
- bson_ext (1.3.0)
44
+ bson (1.4.0)
45
+ bson_ext (1.4.0)
45
46
  builder (2.1.2)
46
- capybara (1.0.1)
47
+ capybara (1.1.1)
47
48
  mime-types (>= 1.16)
48
49
  nokogiri (>= 1.3.3)
49
50
  rack (>= 1.0.0)
@@ -52,22 +53,21 @@ GEM
52
53
  xpath (~> 0.1.4)
53
54
  childprocess (0.2.2)
54
55
  ffi (~> 1.0.6)
55
- colorific (0.0.2)
56
- minitest (~> 2.0)
57
- ruby-progressbar (>= 0.0.9)
58
- columnize (0.3.2)
59
- dragonfly (0.9.5)
56
+ colorific (1.0.0)
57
+ minitest (~> 2.3.1)
58
+ ruby-progressbar (~> 0.0.10)
59
+ columnize (0.3.4)
60
+ dragonfly (0.9.8)
60
61
  rack
61
62
  erubis (2.6.6)
62
63
  abstract (>= 1.0.0)
63
- ffi (1.0.7)
64
- rake (>= 0.8.7)
64
+ ffi (1.0.9)
65
65
  hpricot (0.8.4)
66
66
  i18n (0.5.0)
67
- jquery-rails (1.0.13)
67
+ jquery-rails (1.0.14)
68
68
  railties (~> 3.0)
69
69
  thor (~> 0.14)
70
- json_pure (1.5.1)
70
+ json_pure (1.6.1)
71
71
  linecache19 (0.5.12)
72
72
  ruby_core_source (>= 0.1.4)
73
73
  mail (2.2.19)
@@ -75,22 +75,26 @@ GEM
75
75
  i18n (>= 0.4.0)
76
76
  mime-types (~> 1.16)
77
77
  treetop (~> 1.4.8)
78
- marcosinger-auto_html (1.3.5)
78
+ marcosinger-auto_html (1.3.6)
79
+ RedCloth
79
80
  hpricot (>= 0.8.4)
81
+ redcarpet
82
+ rinku
83
+ tag_helper
80
84
  marcosinger-css_parser (1.3.0)
81
85
  mime-types (1.16)
82
- minitest (2.1.0)
83
- mongo (1.3.0)
84
- bson (>= 1.3.0)
85
- mongoid (2.0.1)
86
+ minitest (2.3.1)
87
+ mongo (1.4.0)
88
+ bson (= 1.4.0)
89
+ mongoid (2.2.2)
86
90
  activemodel (~> 3.0)
87
91
  mongo (~> 1.3)
88
92
  tzinfo (~> 0.3.22)
89
- will_paginate (~> 3.0.pre)
90
- nokogiri (1.4.4)
93
+ multi_json (1.0.3)
94
+ nokogiri (1.5.0)
91
95
  polyglot (0.3.2)
92
- rack (1.2.3)
93
- rack-cache (1.0.3)
96
+ rack (1.2.4)
97
+ rack-cache (1.1)
94
98
  rack (>= 0.4)
95
99
  rack-mount (0.6.14)
96
100
  rack (>= 1.0.0)
@@ -112,6 +116,8 @@ GEM
112
116
  thor (~> 0.14.4)
113
117
  rake (0.9.2)
114
118
  rdoc (3.9.4)
119
+ redcarpet (1.17.2)
120
+ rinku (1.2.2)
115
121
  ruby-debug-base19 (0.11.25)
116
122
  columnize (>= 0.3.1)
117
123
  linecache19 (>= 0.5.11)
@@ -124,23 +130,24 @@ GEM
124
130
  ruby_core_source (0.1.5)
125
131
  archive-tar-minitar (>= 0.5.2)
126
132
  rubyzip (0.9.4)
127
- selenium-webdriver (2.5.0)
133
+ selenium-webdriver (2.7.0)
128
134
  childprocess (>= 0.2.1)
129
135
  ffi (>= 1.0.7)
130
136
  json_pure
131
137
  rubyzip
132
- simplecov (0.4.2)
133
- simplecov-html (~> 0.4.4)
134
- simplecov-html (0.4.4)
135
- sqlite3 (1.3.3)
138
+ simplecov (0.5.3)
139
+ multi_json (~> 1.0.3)
140
+ simplecov-html (~> 0.5.3)
141
+ simplecov-html (0.5.3)
142
+ sqlite3 (1.3.4)
136
143
  sqlite3-ruby (1.3.3)
137
144
  sqlite3 (>= 1.3.3)
145
+ tag_helper (0.0.3)
138
146
  thor (0.14.6)
139
147
  treetop (1.4.10)
140
148
  polyglot
141
149
  polyglot (>= 0.3.1)
142
- tzinfo (0.3.29)
143
- will_paginate (3.0.pre2)
150
+ tzinfo (0.3.30)
144
151
  xpath (0.1.4)
145
152
  nokogiri (~> 1.3)
146
153
 
@@ -149,12 +156,12 @@ PLATFORMS
149
156
 
150
157
  DEPENDENCIES
151
158
  attachment_magick!
152
- bson_ext (~> 1.3)
159
+ bson_ext (~> 1.4)
153
160
  capybara (>= 1.0.1)
154
161
  colorific
155
162
  hpricot
156
163
  mime-types (>= 1.16)
157
- mongoid (~> 2.0)
164
+ mongoid (~> 2.2)
158
165
  nokogiri
159
166
  rails (= 3.0.10)
160
167
  ruby-debug19
@@ -3,7 +3,7 @@ require "mime/types"
3
3
  module AttachmentMagick
4
4
  class MongoidImage
5
5
  include Mongoid::Document
6
- include AutoHtml
6
+ # include AutoHtml
7
7
  include AutoHtmlFor
8
8
 
9
9
  before_create :set_content_type
@@ -16,13 +16,14 @@ module AttachmentMagick
16
16
  field :source
17
17
  field :content_type
18
18
  image_accessor :photo
19
- embedded_in :imageable, :inverse_of => :image
19
+
20
+ embedded_in :imageable, :polymorphic => true
20
21
 
21
22
  auto_html_for :source => "_to_html" do
22
23
  youtube(:width => 620, :height => 465)
23
24
  vimeo(:width => 620, :height => 465)
24
25
  end
25
-
26
+
26
27
  auto_html_for :source => "_to_image" do
27
28
  youtube_image
28
29
  vimeo_image(:size => :large)
@@ -21,6 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency "dragonfly", ">= 0.9.5"
22
22
  s.add_dependency "rack-cache", ">= 1.0"
23
23
  s.add_dependency "jquery-rails", ">= 0.2.7"
24
- s.add_dependency "marcosinger-auto_html", ">= 1.3.4"
24
+ s.add_dependency "marcosinger-auto_html", ">= 1.3.6"
25
25
  s.add_dependency "marcosinger-css_parser", ">= 1.3.0"
26
26
  end
@@ -19,8 +19,8 @@ module AttachmentMagick
19
19
  included do
20
20
  cattr_accessor :attachment_magick_default_options
21
21
 
22
- if AttachmentMagick.configuration.orms.include?("Mongoid")
23
- embeds_many :images, :class_name => "AttachmentMagick::MongoidImage", :polymorphic => true if self.include?(Mongoid::Document)
22
+ if AttachmentMagick.configuration.orms.include?("Mongoid")
23
+ embeds_many :images, :as => :imageable, :class_name => "AttachmentMagick::MongoidImage" if self.include?(Mongoid::Document)
24
24
  end
25
25
 
26
26
  if AttachmentMagick.configuration.orms.include?("ActiveRecord")
@@ -1,3 +1,3 @@
1
1
  module AttachmentMagick
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -26,12 +26,16 @@
26
26
  </div>
27
27
  <div class="grid_19 tpush_2">
28
28
  <%artist.images.each do |image|%>
29
- <%= image_tag image.photo.thumb(Artist.style_thumb).url, :class => "attachment-thumb hide"%>
30
- <%= image_tag image.photo.thumb(Artist.style_grid_1).url, :class => "attachment-grid_1 hide"%>
31
- <%= image_tag image.photo.thumb(Artist.style_grid_10).url, :class => "attachment-grid_10"%>
32
- <%= image_tag image.photo.thumb(Artist.style_grid_15).url, :class => "attachment-grid_15 hide"%>
33
- <%= image_tag image.photo.thumb(Artist.style_grid_16).url, :class => "attachment-grid_16 hide"%>
34
- <%= image_tag image.photo.thumb(Artist.style_publisher).url, :class => "attachment-publisher hide"%>
29
+ <% if image.source.nil? %>
30
+ <%= image_tag image.photo.thumb(Artist.style_thumb).url, :class => "attachment-thumb hide"%>
31
+ <%= image_tag image.photo.thumb(Artist.style_grid_1).url, :class => "attachment-grid_1 hide"%>
32
+ <%= image_tag image.photo.thumb(Artist.style_grid_10).url, :class => "attachment-grid_10"%>
33
+ <%= image_tag image.photo.thumb(Artist.style_grid_15).url, :class => "attachment-grid_15 hide"%>
34
+ <%= image_tag image.photo.thumb(Artist.style_grid_16).url, :class => "attachment-grid_16 hide"%>
35
+ <%= image_tag image.photo.thumb(Artist.style_publisher).url, :class => "attachment-publisher hide"%>
36
+ <% else %>
37
+ <%= image_tag image.source_to_image %>
38
+ <% end %>
35
39
  <% end %>
36
40
  </div>
37
41
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attachment_magick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,12 +11,12 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-08-31 00:00:00.000000000 -03:00
14
+ date: 2011-10-04 00:00:00.000000000 -03:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: dragonfly
19
- requirement: &2155959540 !ruby/object:Gem::Requirement
19
+ requirement: &2168762480 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 0.9.5
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *2155959540
27
+ version_requirements: *2168762480
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rack-cache
30
- requirement: &2155958400 !ruby/object:Gem::Requirement
30
+ requirement: &2168761860 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: '1.0'
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *2155958400
38
+ version_requirements: *2168761860
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: jquery-rails
41
- requirement: &2155957120 !ruby/object:Gem::Requirement
41
+ requirement: &2168761300 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,21 +46,21 @@ dependencies:
46
46
  version: 0.2.7
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *2155957120
49
+ version_requirements: *2168761300
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: marcosinger-auto_html
52
- requirement: &2155955560 !ruby/object:Gem::Requirement
52
+ requirement: &2168760800 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
56
56
  - !ruby/object:Gem::Version
57
- version: 1.3.4
57
+ version: 1.3.6
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *2155955560
60
+ version_requirements: *2168760800
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: marcosinger-css_parser
63
- requirement: &2155954640 !ruby/object:Gem::Requirement
63
+ requirement: &2168759340 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: 1.3.0
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *2155954640
71
+ version_requirements: *2168759340
72
72
  description:
73
73
  email:
74
74
  - markaum@gmail.com