refinerycms-portfolio 0.9.8.rc7 → 0.9.8.rc8

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,29 +2,18 @@ User.find(:all).each do |user|
2
2
  user.plugins.create({
3
3
  :name => "portfolio",
4
4
  :position => (user.plugins.maximum(:position) || -1) +1
5
- })
6
- end
7
-
8
- page = Page.create({
9
- :title => "Portfolio",
10
- :link_url => "/portfolio",
11
- :menu_match => "\/portfolio(|\/.+?)",
12
- :deletable => false,
13
- :position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1)
14
- })
15
- Page.default_parts.each do |default_page_part|
16
- page.parts.create(:title => default_page_part, :body => nil)
5
+ }) unless user.plugins.find_by_name('portfolio').any?
17
6
  end
18
7
 
19
- # we need to retrieve the value, merge it in and then save it back because it's a frozen hash.
20
- image_thumbnails = RefinerySetting.find_or_set(:image_thumbnails, {}).dup
21
- new_thumbnails = image_thumbnails.merge({
22
- :portfolio_thumb => '96x96#c',
23
- :portfolio => '600x512'
24
- })
25
- # handles a change in Refinery API
26
- if RefinerySetting.methods.map(&:to_sym).include?(:set)
27
- RefinerySetting.set(:image_thumbnails, new_thumbnails)
28
- else
29
- RefinerySetting[:image_thumbnails] = new_thumbnails
30
- end
8
+ unless Page.find_by_link_url('/portfolio').present?
9
+ page = Page.create({
10
+ :title => "Portfolio",
11
+ :link_url => "/portfolio",
12
+ :menu_match => "\/portfolio(|\/.+?)",
13
+ :deletable => false,
14
+ :position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1)
15
+ })
16
+ Page.default_parts.each do |default_page_part|
17
+ page.parts.create(:title => default_page_part, :body => nil)
18
+ end
19
+ end
@@ -1,7 +1,7 @@
1
1
  module Refinery
2
2
  module Portfolio
3
3
  def self.version
4
- %q{0.9.8.rc7}
4
+ %q{0.9.8.rc8}
5
5
  end
6
6
  end
7
7
  end
data/readme.md CHANGED
@@ -4,9 +4,11 @@ By: [Resolve Digital](http://www.resolvedigital.com)
4
4
 
5
5
  ## Gem Installation
6
6
 
7
+ Ensure you have created your application's database before adding this engine (with ``rake db:setup``).
8
+
7
9
  Open your ``Gemfile`` and add this line to the bottom:
8
10
 
9
- gem 'refinerycms-portfolio', '~> 0.9.8.rc7'
11
+ gem 'refinerycms-portfolio', '~> 0.9.8.rc8'
10
12
 
11
13
  Now run ``bundle install`` and once bundler has installed the gem run:
12
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-portfolio
3
3
  version: !ruby/object:Gem::Version
4
- hash: 977940512
4
+ hash: 977940513
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 8
10
- - rc7
11
- version: 0.9.8.rc7
10
+ - rc8
11
+ version: 0.9.8.rc8
12
12
  platform: ruby
13
13
  authors:
14
14
  - Resolve Digital