refinerycms 0.9.5 → 0.9.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -20,12 +20,12 @@ http://groups.google.com/group/refinery-cms
20
20
  Step One: Getting the Refinery code!
21
21
  ------------------------------------
22
22
 
23
- Method One -- Via RubyGems:
23
+ Method One -- RubyGems:
24
24
 
25
25
  gem install refinerycms --source http://gemcutter.org
26
26
  refinery /path/to/project
27
27
 
28
- Method Two -- Via git:
28
+ Method Two -- git:
29
29
 
30
30
  git clone git://github.com/resolve/refinerycms.git mynewsite.com
31
31
  cd ./mynewsite.com
@@ -60,3 +60,16 @@ Refinery runs using a number of gems which (as of Refinery version 0.9.5) are ou
60
60
  - "rails", :version => ">= 2.3.4"
61
61
  - "rubyist-aasm", :version => ">= 2.1.3"
62
62
  - "unicode", :version => ">= 0.1"
63
+
64
+ == Updates to core files
65
+
66
+ If you are running Refinery as a gem, updates are simple to incorporate into your project.
67
+ Simply run the command 'refinery-update-core /path/to/project' and the up-to-date core files will be copied from the latest gem into your project's directory.
68
+ Note: the directory that you specify here must be the Rails root for the project.
69
+
70
+ If you are running using a git clone, you can update by running these commands:
71
+
72
+ git remote add refinerycms git://github.com/resolve/refinerycms.git
73
+ git pull refinerycms master
74
+
75
+ This will pull in all of the updated files in the project and may result in some merge conflicts which you will need to resolve.
@@ -4,20 +4,25 @@ REFINERY_ROOT = File.expand_path(File.dirname(__FILE__) << "/..")
4
4
  RAILS_ROOT = ARGV.first unless defined? RAILS_ROOT
5
5
  unless RAILS_ROOT.nil? or RAILS_ROOT.length == 0
6
6
  # ensure asset directories exist.
7
- dirs = [%w(public stylesheets), %w(public javascripts)]
8
- dirs.each do |dir|
9
- FileUtils::makedirs File.join(RAILS_ROOT, dir)
10
- end
7
+ dirs = [%w(public stylesheets), %w(public javascripts), %w(db migrate), %w(lib tasks)]
8
+ FileUtils::makedirs dirs.map {|dir| File.join(RAILS_ROOT, dir) }
11
9
 
12
- # copy in the new assets
10
+ # copy in the new assets.
13
11
  assets = [%w(public stylesheets refinery), %w(public javascripts refinery)]
14
12
  assets.each do |asset|
15
13
  FileUtils::rm_rf File.join(RAILS_ROOT, asset), :secure => true # ensure the destination is clear.
16
14
  FileUtils::cp_r File.join(REFINERY_ROOT, asset), File.join(RAILS_ROOT, asset) # copy the new assets into the project.
17
15
  end
16
+
17
+ # copy in any new migrations.
18
+ FileUtils::cp Dir[File.join(REFINERY_ROOT, %w(db migrate *.rb))], File.join(RAILS_ROOT, %w(db migrate))
19
+
20
+ # copy any rake tasks from plugins to the main lib directory so they can be run.
21
+ FileUtils::cp Dir[File.join(REFINERY_ROOT, %w(** tasks *.rake))], File.join(RAILS_ROOT, %w(lib tasks))
18
22
 
19
23
  puts "---------"
20
24
  puts "Copied new Refinery core assets."
25
+ puts "Please run rake db:migrate to ensure your database is at the correct version."
21
26
  else
22
27
  puts "Please specify the path of the refinery project that you want to update, i.e. refinery-update-core /path/to/project"
23
28
  end
@@ -6,6 +6,8 @@
6
6
 
7
7
  # Specifies gem version of Rails to use when vendor/rails is not present
8
8
  RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
9
+ # Freeze to a specific version of refinerycms when running as a gem
10
+ # REFINERY_GEM_VERSION = 0.9.5.1 unless defined? REFINERY_GEM_VERSION
9
11
 
10
12
  # Bootstrap the Rails environment, frameworks, and default configuration
11
13
  require File.join(File.dirname(__FILE__), 'boot')
@@ -0,0 +1,9 @@
1
+ class RemoveBlurbFromNewsItems < ActiveRecord::Migration
2
+ def self.up
3
+ remove_column :news_items, :blurb
4
+ end
5
+
6
+ def self.down
7
+ add_column :news_items, :blurb, :text
8
+ end
9
+ end
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
3
  <head>
4
- <%= stylesheet_link_tag 'refinery' %>
4
+ <%= stylesheet_link_tag 'refinery/refinery' %>
5
5
  <% unless local_request? %>
6
6
  <script type='text/javascript' src="http://www.google.com/jsapi"></script>
7
7
  <script type='text/javascript'>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Resolve Digital
@@ -43,11 +43,7 @@ files:
43
43
  - config/preinitializer.rb
44
44
  - config/rackspace_cloudfiles.yml
45
45
  - config/routes.rb
46
- - db/migrate/20090903030652_remove_title_from_resources.rb
47
- - db/migrate/20090914025122_change_default_image_thumbnails.rb
48
- - db/migrate/20090916025552_resave_refinery_settings_through_serializer.rb
49
- - db/migrate/20090916045536_create_user_plugins.rb
50
- - db/migrate/20090916055243_add_position_to_user_plugins.rb
46
+ - db/migrate/20091029034951_remove_blurb_from_news_items.rb
51
47
  - db/schema.rb
52
48
  - db/seeds.rb
53
49
  - public/.htaccess
@@ -1,9 +0,0 @@
1
- class RemoveTitleFromResources < ActiveRecord::Migration
2
- def self.up
3
- remove_column :resources, :title
4
- end
5
-
6
- def self.down
7
- add_column :resources, :title, :string
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class ChangeDefaultImageThumbnails < ActiveRecord::Migration
2
- def self.up
3
- RefinerySetting[:image_thumbnails] = RefinerySetting[:image_thumbnails].merge({:grid => 'c135x135'})
4
- end
5
-
6
- def self.down
7
- RefinerySetting[:image_thumbnails] = RefinerySetting[:image_thumbnails].delete_if {|key, value| key == :grid }
8
- end
9
- end
@@ -1,13 +0,0 @@
1
- class ResaveRefinerySettingsThroughSerializer < ActiveRecord::Migration
2
- def self.up
3
- RefinerySetting.all.each do |rs|
4
- rs.update_attribute(:value, rs[:value])
5
- end
6
- end
7
-
8
- def self.down
9
- RefinerySetting.all.each do |rs|
10
- rs.update_attribute(:value, rs[:value])
11
- end
12
- end
13
- end
@@ -1,41 +0,0 @@
1
- class CreateUserPlugins < ActiveRecord::Migration
2
- def self.up
3
- rename_column :users, :plugins, :plugins_column
4
-
5
- create_table :user_plugins do |t|
6
- t.integer :user_id
7
- t.string :title
8
- end
9
-
10
- add_index :user_plugins, :title
11
- add_index :user_plugins, [:user_id, :title], :unique => true, :name => "index_unique_user_plugins"
12
-
13
- User.find(:all).each do |user|
14
- p = user[:plugins_column].is_a?(String) ? user[:plugins_column].split(',') : user[:plugins_column]
15
-
16
- p.each do |plugin_title|
17
- user.plugins.create(:title => plugin_title)
18
- end
19
- end
20
-
21
- remove_column :users, :plugins_column
22
- end
23
-
24
- def self.down
25
- add_column :users, :plugins_column, :string
26
-
27
- User.find(:all).each do |user|
28
- plugins_for_user = []
29
-
30
- UserPlugin.find(:all, :conditions => "user_id = #{user.id}").each do |plugin|
31
- plugins_for_user.push(plugin.title)
32
- end
33
-
34
- user.update_attribute(:plugins_column, plugins_for_user)
35
- end
36
-
37
- drop_table :user_plugins
38
-
39
- rename_column :users, :plugins_column, :plugins
40
- end
41
- end
@@ -1,9 +0,0 @@
1
- class AddPositionToUserPlugins < ActiveRecord::Migration
2
- def self.up
3
- add_column :user_plugins, :position, :integer
4
- end
5
-
6
- def self.down
7
- remove_column :user_plugins, :position
8
- end
9
- end