refinerycms-theming 0.9.9.2 → 1.0.0

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.
data/lib/gemspec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- version = '0.9.9.2'
2
+ version = '1.0.0'
3
3
  raise "Could not get version so gemspec can not be built" if version.nil?
4
4
  files = Dir[%q{**/*}].flatten.reject{|f| f =~ /\.gem$/}
5
5
 
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  '#{Dir.glob("test/**/*.rb").join("',\n '")}'
24
24
  ]" if File.directory?("test")}
25
25
 
26
- s.add_dependency('refinerycms', '>= 0.9.9')
26
+ s.add_dependency('refinerycms-core', '>= 0.9.9.1')
27
27
  end
28
28
  EOF
29
29
 
@@ -1,4 +1,4 @@
1
- # Serves theme files from the theme directory without touching Rails too much
1
+ # Serves theme files from the theme directory without touching Rails.
2
2
  module Refinery
3
3
  class ThemeServer
4
4
 
@@ -1,4 +1,7 @@
1
+ require 'refinerycms-core'
2
+
1
3
  require File.expand_path('../theming', __FILE__)
4
+ require File.expand_path('../theme', __FILE__)
2
5
 
3
6
  module Refinery
4
7
  class ThemingEngine < ::Rails::Engine
@@ -77,13 +80,13 @@ module Refinery
77
80
  config.after_initialize do
78
81
  ::Refinery::Plugin.register do |plugin|
79
82
  plugin.name = "refinerycms_theming_plugin"
80
- plugin.version = '0.9.9.2'
83
+ plugin.version = '1.0.0'
81
84
  plugin.hide_from_menu = true
82
85
  end
83
86
  end
84
87
 
85
88
  initializer 'themes.middleware' do |app|
86
- app.config.middleware.insert_before ::ActionDispatch::Static, ::Refinery::ThemeServer
89
+ app.config.middleware.insert_after ::Rack::Lock, ::Refinery::ThemeServer
87
90
  end
88
91
 
89
92
  end
data/lib/theme.rb ADDED
@@ -0,0 +1,18 @@
1
+ module Theme
2
+ class << self
3
+ def current_theme(env = nil)
4
+ ::RefinerySetting[:theme]
5
+ end
6
+
7
+ def root
8
+ Pathname.new( File.expand_path('../../', __FILE__) )
9
+ end
10
+
11
+ def current_theme_dir
12
+ theme = self.current_theme
13
+ theme_dir = Rails.root.join("themes",theme)
14
+ theme_dir = self.root.join('themes', theme) unless theme_dir.directory?
15
+ theme_dir
16
+ end
17
+ end
18
+ end
data/lib/theming.rb CHANGED
@@ -1,2 +1,2 @@
1
1
  # Before the application gets setup this will fail badly if there's no database.
2
- require File.expand_path('../theme_server', __FILE__)
2
+ require File.expand_path('../refinery/theme_server', __FILE__)
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{refinerycms-theming}
3
- s.version = %q{0.9.9.2}
3
+ s.version = %q{1.0.0}
4
4
  s.description = %q{Theming functionality for the Refinery CMS project, extracted from Refinery CMS core.}
5
- s.date = %q{2011-02-16}
5
+ s.date = %q{2011-03-19}
6
6
  s.summary = %q{Theming functionality for the Refinery CMS project.}
7
7
  s.email = %q{info@refinerycms.com}
8
8
  s.homepage = %q{http://refinerycms.com}
@@ -11,9 +11,6 @@ Gem::Specification.new do |s|
11
11
  s.require_paths = %w(lib)
12
12
 
13
13
  s.files = [
14
- 'app',
15
- 'app/models',
16
- 'app/models/theme.rb',
17
14
  'features',
18
15
  'features/step_definitions',
19
16
  'features/step_definitions/theme_generator_steps.rb',
@@ -39,8 +36,10 @@ Gem::Specification.new do |s|
39
36
  'lib/generators/refinery_theme/templates/views/pages/home.html.erb',
40
37
  'lib/generators/refinery_theme/templates/views/pages/show.html.erb',
41
38
  'lib/generators/refinery_theme/USAGE',
39
+ 'lib/refinery',
40
+ 'lib/refinery/theme_server.rb',
42
41
  'lib/refinerycms-theming.rb',
43
- 'lib/theme_server.rb',
42
+ 'lib/theme.rb',
44
43
  'lib/theming.rb',
45
44
  'license.md',
46
45
  'readme.md',
@@ -85,5 +84,5 @@ Gem::Specification.new do |s|
85
84
  ]
86
85
 
87
86
 
88
- s.add_dependency('refinerycms', '>= 0.9.9')
87
+ s.add_dependency('refinerycms-core', '>= 0.9.9.1')
89
88
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: refinerycms-theming
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.9.2
5
+ version: 1.0.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Resolve Digital
@@ -10,18 +10,18 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-16 00:00:00 +13:00
13
+ date: 2011-03-19 00:00:00 +13:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: refinerycms
17
+ name: refinerycms-core
18
18
  prerelease: false
19
19
  requirement: &id001 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: 0.9.9
24
+ version: 0.9.9.1
25
25
  type: :runtime
26
26
  version_requirements: *id001
27
27
  description: Theming functionality for the Refinery CMS project, extracted from Refinery CMS core.
@@ -33,7 +33,6 @@ extensions: []
33
33
  extra_rdoc_files: []
34
34
 
35
35
  files:
36
- - app/models/theme.rb
37
36
  - features/step_definitions/theme_generator_steps.rb
38
37
  - features/theme_generator.feature
39
38
  - lib/gemspec.rb
@@ -48,8 +47,9 @@ files:
48
47
  - lib/generators/refinery_theme/templates/views/pages/home.html.erb
49
48
  - lib/generators/refinery_theme/templates/views/pages/show.html.erb
50
49
  - lib/generators/refinery_theme/USAGE
50
+ - lib/refinery/theme_server.rb
51
51
  - lib/refinerycms-theming.rb
52
- - lib/theme_server.rb
52
+ - lib/theme.rb
53
53
  - lib/theming.rb
54
54
  - license.md
55
55
  - readme.md
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  requirements: []
104
104
 
105
105
  rubyforge_project:
106
- rubygems_version: 1.5.2
106
+ rubygems_version: 1.6.1
107
107
  signing_key:
108
108
  specification_version: 3
109
109
  summary: Theming functionality for the Refinery CMS project.
data/app/models/theme.rb DELETED
@@ -1,18 +0,0 @@
1
- class Theme
2
-
3
- def self.current_theme(env = nil)
4
- ::RefinerySetting[:theme]
5
- end
6
-
7
- def self.root
8
- Pathname.new( File.expand_path('../../../', __FILE__) )
9
- end
10
-
11
- def self.current_theme_dir
12
- theme = self.current_theme
13
- theme_dir = Rails.root.join("themes",theme)
14
- theme_dir = self.root.join('themes', theme) unless theme_dir.directory?
15
- theme_dir
16
- end
17
-
18
- end