refinerycms 0.9.6.16 → 0.9.6.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/refinery-override +7 -7
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.6.16
1
+ 0.9.6.17
@@ -11,7 +11,7 @@ unless (override_path = ARGV.shift).nil? or (override_path.length == 0)
11
11
  rails_root = Pathname.new(app_path)
12
12
  end
13
13
 
14
- if rails_root.exists?
14
+ if rails_root.exist?
15
15
  # figure out what to override
16
16
  override_parts = override_path.downcase.split('/').compact.collect {|part| part if part.length > 0 }.compact
17
17
  admin = ""
@@ -27,15 +27,15 @@ unless (override_path = ARGV.shift).nil? or (override_path.length == 0)
27
27
 
28
28
  # controller is what's left.
29
29
  controller = override_parts.first
30
- controller_with_admin = [admin,override_parts].flatten.compact.join('/')
30
+ controller_with_admin = [admin,override_parts].flatten.compact.join('/').gsub(/^\//, '')
31
31
 
32
32
  # copy the controller
33
33
  unless controller_with_admin =~ /\*(\*)?/ and !action.nil?
34
- refinery_controllers = Dir[refinery_root.join("vendor", "plugins", "**", "app", "controllers", "#{controller_with_admin}_controller.rb")]
35
- if refinery_controllers.compact.any? # the controllers may not exist.
34
+ refinery_controllers = Dir[refinery_root.join("vendor", "plugins", "**", "app", "controllers", "#{controller_with_admin}_controller.rb")].compact
35
+ if refinery_controllers.any? # the controllers may not exist.
36
36
  refinery_controllers.each do |refinery_controller|
37
37
  # make the directories
38
- FileUtils.mkdir_p(copy_to = rails_root.join("app" "controllers", admin))
38
+ FileUtils.mkdir_p(copy_to = rails_root.join("app", "controllers", admin).to_s)
39
39
  FileUtils.cp(refinery_controller, copy_to)
40
40
  end
41
41
  else
@@ -46,7 +46,7 @@ unless (override_path = ARGV.shift).nil? or (override_path.length == 0)
46
46
  # copy the action, if it exists
47
47
  unless action.nil? or action.length == 0
48
48
  # get all the matching files
49
- looking_for = refinery_root.join("vendor", "plugins", "**", "app", "views", controller_with_admin.split('/'), "#{action}*.erb")
49
+ looking_for = refinery_root.join("vendor", "plugins", "**", "app", "views", controller_with_admin.split("/").join(File::SEPARATOR), "#{action}*.erb")
50
50
  action_files = Dir[looking_for]
51
51
 
52
52
  # copy in the action template
@@ -55,7 +55,7 @@ unless (override_path = ARGV.shift).nil? or (override_path.length == 0)
55
55
  action_file_dir = action_file_path.split('/')
56
56
  action_file_dir.pop # get rid of the file.
57
57
 
58
- FileUtils.mkdir_p(rails_root.join("app", "views", action_file_dir))
58
+ FileUtils.mkdir_p(rails_root.join("app", "views", action_file_dir.join(File::SEPARATOR)))
59
59
  FileUtils.cp action_file, rails_root.join("app", "views", action_file_path)
60
60
  end
61
61
  else
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 9
8
8
  - 6
9
- - 16
10
- version: 0.9.6.16
9
+ - 17
10
+ version: 0.9.6.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Resolve Digital
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-03-02 00:00:00 +13:00
20
+ date: 2010-03-03 00:00:00 +13:00
21
21
  default_executable:
22
22
  dependencies: []
23
23