brighter_planet_layout 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{brighter_planet_layout}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andy Rossmeissl"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-14}
|
13
13
|
s.description = %q{Layouts, partials, stylesheets, and images}
|
14
14
|
s.email = %q{andy@rossmeissl.net}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -1,10 +1,13 @@
|
|
1
1
|
module BrighterPlanetLayout
|
2
2
|
class Railtie < Rails::Railtie
|
3
|
-
config.app_middleware.use '::ActionDispatch::Static', File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'public'))
|
4
3
|
initializer 'brighter_planet_layout.add_paths' do |app|
|
5
|
-
app.paths.app.views
|
4
|
+
app.paths.app.views.push BrighterPlanetLayout.view_path
|
5
|
+
end
|
6
|
+
initializer 'brighter_planet_layout.copy_static_files_to_web_server_document_root' do |app|
|
7
|
+
BrighterPlanetLayout.copy_static_files_to_web_server_document_root
|
6
8
|
end
|
7
9
|
config.to_prepare do
|
10
|
+
require BrighterPlanetLayout.helper_file
|
8
11
|
ApplicationController.helper BrighterPlanetHelper
|
9
12
|
ApplicationController.layout 'brighter_planet'
|
10
13
|
end
|
@@ -1,4 +1,31 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module BrighterPlanetLayout
|
4
|
+
GEM_ROOT = File.expand_path File.join(File.dirname(__FILE__), '..')
|
5
|
+
|
6
|
+
def self.view_path
|
7
|
+
File.join GEM_ROOT, 'app', 'views'
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.helper_file
|
11
|
+
File.join GEM_ROOT, 'app', 'helpers', 'brighter_planet_helper.rb'
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.public_path
|
15
|
+
File.join GEM_ROOT, 'public'
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.copy_static_files_to_web_server_document_root
|
19
|
+
Dir[File.join(public_path, '*')].each do |source_path|
|
20
|
+
dest_path = File.join(Rails.root, 'public', source_path.gsub(public_path, ''))
|
21
|
+
if File.directory? source_path
|
22
|
+
FileUtils.cp_r source_path.concat('/.'), dest_path
|
23
|
+
else
|
24
|
+
FileUtils.cp source_path, dest_path
|
25
|
+
end
|
26
|
+
Rails.logger.info "[brighter_planet_layout gem] You might want to add this to .gitignore #{dest_path}"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
require 'brighter_planet_layout/railtie'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brighter_planet_layout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andy Rossmeissl
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-14 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|