beef-has_assets 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.7
1
+ 0.3.8
@@ -31,33 +31,24 @@ module Admin::AssetsHelper
31
31
  session_key = ActionController::Base.session_options[:key]
32
32
  replace_thumbnail_admin_asset_path(asset, session_key => cookies[session_key], request_forgery_protection_token => form_authenticity_token)
33
33
  end
34
-
35
- def flickr_select
36
- return unless defined?(Flickr) and File.exists?("#{RAILS_ROOT}/config/flickr.yml")
37
- flickr = Flickr.new("#{RAILS_ROOT}/config/flickr.yml")
38
- flickr_params = { :per_page => '12', :page => params[:page], :user_id => Settings.flickr_user_id, :sort => 'date-taken-desc', :tag_mode => 'all' }
39
- flickr_params[:tags] = params[:tags] unless params[:tags].blank?
40
- flickr_result = flickr.photos.search(flickr_params)
41
- render :partial => 'admin/flickrs/selector', :locals => { :flickr_images => flickr_result }
42
- end
43
34
 
44
35
 
45
36
  def lastest_flickr
46
- return if Settings.flickr_api_key.blank? or Settings.flickr_user_id.blank?
47
- Flickr::API.connect Settings.flickr_api_key, Settings.flickr_api_secret, Settings.flickr_auth_token
37
+ return unless defined?(Flickr) and File.exists?("#{RAILS_ROOT}/config/flickr.yml")
38
+ flickr = Flickr.new("#{RAILS_ROOT}/config/flickr.yml")
48
39
  flickr_params = { :per_page => '5', :page => params[:page], :user_id => Settings.flickr_user_id, :sort => 'date-taken-desc', :tag_mode => 'all' }
49
40
  flickr_params[:tags] = params[:tags] unless params[:tags].blank?
50
- flickr_result = Flickr::Photo.find(:all, flickr_params)
41
+ flickr_result = flickr.photos.search(flickr_params)
51
42
  render :partial => 'admin/shared/flickr_latest.html.erb', :locals => { :flickr_images => flickr_result }
52
43
  end
53
44
 
54
45
 
55
46
  def flickr_select
56
- return if Settings.flickr_api_key.blank? or Settings.flickr_user_id.blank?
57
- Flickr::API.connect Settings.flickr_api_key, Settings.flickr_api_secret, Settings.flickr_auth_token
47
+ return unless defined?(Flickr) and File.exists?("#{RAILS_ROOT}/config/flickr.yml")
48
+ flickr = Flickr.new("#{RAILS_ROOT}/config/flickr.yml")
58
49
  flickr_params = { :per_page => '12', :page => params[:page], :user_id => Settings.flickr_user_id, :sort => 'date-taken-desc', :tag_mode => 'all' }
59
50
  flickr_params[:tags] = params[:tags] unless params[:tags].blank?
60
- flickr_result = Flickr::Photo.find(:all, flickr_params)
51
+ flickr_result = flickr.photos.search(flickr_params)
61
52
  render :partial => 'admin/shared/flickr.html.erb', :locals => { :flickr_images => flickr_result }
62
53
  end
63
54
  end
@@ -1 +1 @@
1
- <img src="/images/admin/flickr_logo.jpg" flickr_src="<%= flickr_image.source('s') %>" alt="<%= flickr_image.description || flickr_image.title %>" title="<%= flickr_image.title %>" onclick="addLinkedImage('<%= flickr_image.source %>',this.alt)"/>
1
+ <img src="<%= flickr_image.url(:square) %>" flickr_src="<%= flickr_image.url(:square) %>" alt="<%= flickr_image.description || flickr_image.title %>" title="<%= flickr_image.title %>" onclick="addLinkedImage('<%= flickr_image.url(:medium) %>',this.alt)"/>
data/has_assets.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{has_assets}
8
- s.version = "0.3.7"
8
+ s.version = "0.3.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steve England"]
12
- s.date = %q{2009-09-14}
12
+ s.date = %q{2009-09-15}
13
13
  s.email = %q{steve@wearebeef.co.uk}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -73,8 +73,8 @@ Gem::Specification.new do |s|
73
73
  s.rubygems_version = %q{1.3.5}
74
74
  s.summary = %q{Rails Engine. Adds uploadable assets to a model and admin area for files}
75
75
  s.test_files = [
76
- "test/test_helper.rb",
77
- "test/has_assets_test.rb"
76
+ "test/has_assets_test.rb",
77
+ "test/test_helper.rb"
78
78
  ]
79
79
 
80
80
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beef-has_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve England
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-14 00:00:00 -07:00
12
+ date: 2009-09-15 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -75,6 +75,7 @@ files:
75
75
  - test/test_helper.rb
76
76
  has_rdoc: false
77
77
  homepage: http://github.com/beef/assets
78
+ licenses:
78
79
  post_install_message:
79
80
  rdoc_options:
80
81
  - --charset=UTF-8
@@ -95,10 +96,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
96
  requirements: []
96
97
 
97
98
  rubyforge_project:
98
- rubygems_version: 1.2.0
99
+ rubygems_version: 1.3.5
99
100
  signing_key:
100
101
  specification_version: 3
101
102
  summary: Rails Engine. Adds uploadable assets to a model and admin area for files
102
103
  test_files:
103
- - test/test_helper.rb
104
104
  - test/has_assets_test.rb
105
+ - test/test_helper.rb