themes_for_rails 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ .bundle
2
+ pkg
3
+ tmp
4
+ .DS_Store
5
+ spec/dummy/db/*.sqlite3
6
+ spec/dummy/log/test.log
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/.rvmrc CHANGED
@@ -1,5 +1 @@
1
- if [[ -n "$rvm_environments_path" && -s "$rvm_environments_path/ruby-1.9.2-p180@theme_support" ]] ; then
2
- \. "$rvm_environments_path/ruby-1.9.2-p180@theme_support"
3
- else
4
- rvm --create use "ruby-1.9.2-p180@theme_support"
5
- fi
1
+ rvm use 1.9.3@themes_for_rails --create
data/Gemfile CHANGED
@@ -1,12 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
-
5
- group :development, :test do
6
- gem "sqlite3"
7
- gem "test-unit", :require => "test/unit"
8
- gem "rspec-rails", ">= 2.0.0.beta.20"
9
- gem "jeweler"
10
- gem "contest"
11
- gem "mocha"
12
- end
data/Gemfile.lock CHANGED
@@ -1,9 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- themes_for_rails (0.4.1)
5
- rails (~> 3.0.0)
6
- themes_for_rails
4
+ themes_for_rails (0.4.3)
5
+ rails (>= 3.0.0)
7
6
 
8
7
  GEM
9
8
  remote: http://rubygems.org/
@@ -35,26 +34,20 @@ GEM
35
34
  activemodel (= 3.0.5)
36
35
  activesupport (= 3.0.5)
37
36
  activesupport (3.0.5)
38
- arel (2.0.9)
37
+ arel (2.0.10)
39
38
  builder (2.1.2)
40
39
  contest (0.1.2)
41
- diff-lcs (1.1.2)
42
40
  erubis (2.6.6)
43
41
  abstract (>= 1.0.0)
44
- git (1.2.5)
45
42
  i18n (0.5.0)
46
- jeweler (1.5.2)
47
- bundler (~> 1.0.0)
48
- git (>= 1.2.5)
49
- rake
50
43
  mail (2.2.19)
51
44
  activesupport (>= 2.3.6)
52
45
  i18n (>= 0.4.0)
53
46
  mime-types (~> 1.16)
54
47
  treetop (~> 1.4.8)
55
- mime-types (1.16)
48
+ mime-types (1.17.2)
56
49
  mocha (0.9.12)
57
- polyglot (0.3.1)
50
+ polyglot (0.3.3)
58
51
  rack (1.2.1)
59
52
  rack-mount (0.6.13)
60
53
  rack (>= 1.0.0)
@@ -74,23 +67,11 @@ GEM
74
67
  rake (>= 0.8.7)
75
68
  thor (~> 0.14.4)
76
69
  rake (0.8.7)
77
- rspec (2.5.0)
78
- rspec-core (~> 2.5.0)
79
- rspec-expectations (~> 2.5.0)
80
- rspec-mocks (~> 2.5.0)
81
- rspec-core (2.5.1)
82
- rspec-expectations (2.5.0)
83
- diff-lcs (~> 1.1.2)
84
- rspec-mocks (2.5.0)
85
- rspec-rails (2.5.0)
86
- actionpack (~> 3.0)
87
- activesupport (~> 3.0)
88
- railties (~> 3.0)
89
- rspec (~> 2.5.0)
90
70
  sqlite3 (1.3.3)
91
71
  test-unit (2.2.0)
92
72
  thor (0.14.6)
93
- treetop (1.4.9)
73
+ treetop (1.4.10)
74
+ polyglot
94
75
  polyglot (>= 0.3.1)
95
76
  tzinfo (0.3.24)
96
77
 
@@ -99,9 +80,7 @@ PLATFORMS
99
80
 
100
81
  DEPENDENCIES
101
82
  contest
102
- jeweler
103
83
  mocha
104
- rspec-rails (>= 2.0.0.beta.20)
105
84
  sqlite3
106
85
  test-unit
107
86
  themes_for_rails!
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Lucas Florio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.textile CHANGED
@@ -102,6 +102,20 @@ class MyMailer < ActionMailer::Base
102
102
  end
103
103
  </pre>
104
104
 
105
+ Or set the theme by default like this (thanks to maxjgon):
106
+
107
+ <pre>
108
+ class MyMailer < ActionMailer::Base
109
+
110
+ default :theme => "blue"
111
+
112
+ def notify_someone
113
+ mail :to => "some@one.com"
114
+ end
115
+
116
+ end
117
+ </pre>
118
+
105
119
  h3. Url Helpers
106
120
 
107
121
  In your views you should be able to access your assets like this (given the theme 'default' is set):
@@ -253,6 +267,8 @@ h2. Authors and contributors
253
267
  * jbarreneche
254
268
  * kule
255
269
  * matheusmoreira
270
+ * rafaelss
271
+ * maxjgon
256
272
 
257
273
  h2. Last but not least
258
274
 
data/Rakefile CHANGED
@@ -1,33 +1,10 @@
1
- # require File.join(File.dirname(__FILE__), 'lib', 'themes_for_rails')
2
- require File.dirname(__FILE__) + "/lib/themes_for_rails/version.rb"
3
-
4
- require 'rake'
5
- require 'rake/testtask'
6
- require 'rake/rdoctask'
7
-
8
- desc 'Default: run tests for all ORMs.'
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
9
3
  task :default => :test
10
4
 
11
- desc 'Run unit tests.'
12
- Rake::TestTask.new(:test) do |t|
13
- t.libs << 'lib'
14
- t.libs << 'test'
15
- t.pattern = 'test/**/*_test.rb'
16
- t.verbose = true
17
- end
18
-
19
- begin
20
- require 'jeweler'
21
- Jeweler::Tasks.new do |gemspec|
22
- gemspec.name = "themes_for_rails"
23
- gemspec.summary = "Themes support for rails (3)"
24
- gemspec.description = "It allows an application to have many different ways of rendering static assets and dynamic views."
25
- gemspec.email = "lucasefe@gmail.com"
26
- gemspec.homepage = "http://github.com/lucasefe/themes_for_rails"
27
- gemspec.authors = ["Lucas Florio"]
28
- gemspec.version = ThemesForRails::VERSION
29
- gemspec.add_dependency "rails", "~> 3.0.0"
30
- end
31
- rescue LoadError
32
- puts "Jeweler not available. Install it with: gem install jeweler"
33
- end
5
+ require 'rake/testtask'
6
+ Rake::TestTask.new(:test) do |test|
7
+ test.libs << 'lib' << 'test'
8
+ test.pattern = 'test/**/*_test.rb'
9
+ test.verbose = true
10
+ end
@@ -6,11 +6,9 @@ namespace :themes do
6
6
  theme_dir = ThemesForRails.config.themes_dir
7
7
  theme_base = "#{Rails.public_path}/#{theme_dir}/#{theme_name}"
8
8
  puts "Creating #{theme_base}"
9
-
10
- FileUtils.mkdir_p "#{theme_base}"
11
- FileUtils.cp_r "#{theme}/images", "#{theme_base}/images", :verbose => true
12
- FileUtils.cp_r "#{theme}/stylesheets", "#{theme_base}/stylesheets", :verbose => true
13
- FileUtils.cp_r "#{theme}/javascripts", "#{theme_base}/javascripts", :verbose => true
9
+
10
+ FileUtils.mkdir_p "#{theme_base}"
11
+ FileUtils.cp_r Dir["#{theme}/{images,stylesheets,javascripts}"], theme_base, :verbose => true
14
12
  end
15
13
  end
16
14
  desc "Removes the cached (public) theme folders"
@@ -2,51 +2,66 @@ require "action_controller/metal"
2
2
 
3
3
  module ThemesForRails
4
4
  class AssetsController < ActionController::Base
5
-
5
+
6
6
  include ThemesForRails::CommonMethods
7
7
  include ThemesForRails::UrlHelpers
8
-
8
+
9
9
  def stylesheets
10
- render_asset asset_path_for(params[:asset], 'stylesheets'), mime_type_from(params[:asset])
10
+ handle_asset(params[:asset], params[:theme], "stylesheets")
11
11
  end
12
-
12
+
13
13
  def javascripts
14
- render_asset asset_path_for(params[:asset], 'javascripts'), mime_type_from(params[:asset])
14
+ handle_asset(params[:asset], params[:theme], "javascripts")
15
15
  end
16
-
16
+
17
17
  def images
18
- render_asset asset_path_for(params[:asset], 'images'), mime_type_from(params[:asset])
18
+ handle_asset(params[:asset], params[:theme], "images")
19
19
  end
20
-
20
+
21
21
  private
22
-
23
- def asset_path_for(asset_url, asset_prefix)
24
- File.join(theme_path_for(params[:theme]), asset_prefix, params[:asset])
25
- end
26
22
 
27
- def extract_filename_and_extension_from(asset)
28
- extension = File.extname(asset)
29
- filename = params[:asset].gsub(extension, '')
30
- return filename, extension[1..-1]
23
+ def handle_asset(asset, theme, prefix)
24
+ find_themed_asset(asset, theme, prefix) do |path, mime_type|
25
+ send_file path, :type => mime_type, :disposition => "inline"
26
+ end
31
27
  end
32
28
 
33
- def render_asset(asset, mime_type)
34
- unless File.exists?(asset)
35
- render :text => 'not found', :status => 404
29
+ def find_themed_asset(asset_name, asset_theme, asset_prefix, &block)
30
+ path = asset_path(asset_name, asset_theme, asset_prefix)
31
+ if File.exists?(path)
32
+ yield path, mime_type_for(request)
33
+ elsif File.extname(path).blank?
34
+ asset_name = "#{asset_name}.#{extension_from(request.path_info)}"
35
+ return find_themed_asset(asset_name, asset_theme, asset_prefix, &block)
36
36
  else
37
- send_file asset, :type => mime_type
37
+ render_not_found
38
38
  end
39
39
  end
40
-
41
- def mime_type_from(asset_path)
42
- extension = extract_filename_and_extension_from(asset_path).last
43
- if extension == 'css'
44
- "text/css"
45
- elsif extension == 'js'
46
- 'text/javascript'
40
+
41
+ def asset_path(asset_name, asset_theme, asset_prefix)
42
+ File.join(theme_path_for(asset_theme), asset_prefix, asset_name)
43
+ end
44
+
45
+ def render_not_found
46
+ render :text => 'not found', :status => 404
47
+ end
48
+
49
+ def mime_type_for(request)
50
+ existing_mime_type = mime_type_from_uri(request.path_info)
51
+ unless existing_mime_type.nil?
52
+ existing_mime_type.to_s
47
53
  else
48
- "image/#{extension}"
54
+ "image/#{extension_from(request.path_info)}"
49
55
  end
50
56
  end
57
+
58
+ def mime_type_from_uri(path)
59
+ extension = extension_from(path)
60
+ Mime::Type.lookup_by_extension(extension)
61
+ end
62
+
63
+ def extension_from(path)
64
+ File.extname(path).to_s[1..-1]
65
+ end
51
66
  end
52
- end
67
+ end
@@ -1,3 +1,3 @@
1
1
  module ThemesForRails
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -1,4 +1,7 @@
1
1
  module ThemesForRails
2
+
3
+ VERSION = '0.4.3'
4
+
2
5
  class << self
3
6
 
4
7
  def config
@@ -51,4 +54,4 @@ require 'themes_for_rails/controller_methods'
51
54
  require 'themes_for_rails/mailer_methods'
52
55
  require 'themes_for_rails/railtie'
53
56
  require 'themes_for_rails/routes'
54
- require 'themes_for_rails/version'
57
+
@@ -25,6 +25,11 @@ module ThemesForRails
25
25
  assert_response :success
26
26
  assert_equal @response.content_type, 'text/javascript'
27
27
  end
28
+ should "respond with the right javascript file when requested (including multiple dot on the filename)" do
29
+ get 'javascripts', { :theme => 'default', :asset => 'app.min.js'}
30
+ assert_response :success
31
+ assert_equal @response.content_type, 'text/javascript'
32
+ end
28
33
  should "not be success when the javascript file is not found" do
29
34
  get 'javascripts', { :theme => 'default', :asset => 'oldapp.js'}
30
35
  assert_response :missing
File without changes
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require File.expand_path("test/test_helper.rb")
2
3
 
3
4
  class MyController < ActionController::Base
@@ -95,7 +96,7 @@ module ThemesForRails
95
96
  should "have a proper view path" do
96
97
  @controller.theme 'default'
97
98
  view_path = @controller.view_paths.first
98
- theme_path = File.join(File.expand_path(File.dirname(__FILE__)), "dummy_app", "themes", "default", "views")
99
+ theme_path = File.expand_path(File.join("test", "dummy_app", "themes", "default", "views"))
99
100
  assert_equal view_path.to_s, theme_path
100
101
  end
101
102
  end
File without changes
@@ -1,19 +1,18 @@
1
1
  require 'active_support/test_case'
2
2
 
3
3
  class ActiveSupport::TestCase
4
-
4
+
5
5
  def assert_named_route(result, name)
6
6
  assert_equal result, @routes.url_helpers.send(name)
7
7
  end
8
-
8
+
9
9
  def assert_send_file(result)
10
10
  assert(@response.body.is_a? Proc)
11
11
  require 'stringio'
12
12
  output = StringIO.new
13
13
  output.binmode
14
14
  assert_nothing_raised { @response.body.call(@response, output) }
15
- puts "OUT: #{output.output}"
16
15
  assert_equal(result, output.string)
17
16
  end
18
-
19
- end
17
+
18
+ end
data/test/test_helper.rb CHANGED
@@ -5,6 +5,7 @@ $:.unshift File.dirname(__FILE__)
5
5
  require "dummy_app/config/environment"
6
6
  require "rails/test_help"
7
7
  require 'mocha'
8
+ require 'contest'
8
9
 
9
10
  $:.unshift File.expand_path('../support', __FILE__)
10
11
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
@@ -1,213 +1,24 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
1
 
6
- Gem::Specification.new do |s|
7
- s.name = %q{themes_for_rails}
8
- s.version = "0.4.2"
2
+ # -*- encoding: utf-8 -*-
3
+ require File.expand_path('../lib/themes_for_rails/version', __FILE__)
9
4
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{Lucas Florio}]
12
- s.date = %q{2011-05-17}
13
- s.description = %q{It allows an application to have many different ways of rendering static assets and dynamic views.}
14
- s.email = %q{lucasefe@gmail.com}
15
- s.extra_rdoc_files = [
16
- "README.textile"
17
- ]
18
- s.files = [
19
- ".rvmrc",
20
- "Gemfile",
21
- "Gemfile.lock",
22
- "README.textile",
23
- "REVIEW_NOTES",
24
- "RMU_REVIEW",
25
- "Rakefile",
26
- "TODO.textile",
27
- "init.rb",
28
- "lib/generators/themes_for_rails/install_generator.rb",
29
- "lib/generators/themes_for_rails/templates/theme/images/.gitkeep",
30
- "lib/generators/themes_for_rails/templates/theme/javascripts/.gitkeep",
31
- "lib/generators/themes_for_rails/templates/theme/stylesheets/.gitkeep",
32
- "lib/generators/themes_for_rails/templates/theme/views/layouts/.gitkeep",
33
- "lib/generators/themes_for_rails/theme_generator.rb",
34
- "lib/tasks/themes_for_rails.rake",
35
- "lib/themes_for_rails.rb",
36
- "lib/themes_for_rails/assets_controller.rb",
37
- "lib/themes_for_rails/common_methods.rb",
38
- "lib/themes_for_rails/config.rb",
39
- "lib/themes_for_rails/controller_methods.rb",
40
- "lib/themes_for_rails/mailer_methods.rb",
41
- "lib/themes_for_rails/railtie.rb",
42
- "lib/themes_for_rails/routes.rb",
43
- "lib/themes_for_rails/url_helpers.rb",
44
- "lib/themes_for_rails/version.rb",
45
- "lib/themes_for_rails/view_helpers.rb",
46
- "test/assets_controller_test.rb",
47
- "test/common_methods_test.rb",
48
- "test/config_test.rb",
49
- "test/controller_methods_test.rb",
50
- "test/dummy_app/.gitignore",
51
- "test/dummy_app/Gemfile",
52
- "test/dummy_app/Rakefile",
53
- "test/dummy_app/another_themes/another_default/images/logo.png",
54
- "test/dummy_app/another_themes/another_default/images/nested/logo.png",
55
- "test/dummy_app/another_themes/another_default/javascripts/app.js",
56
- "test/dummy_app/another_themes/another_default/stylesheets/style.css",
57
- "test/dummy_app/another_themes/another_default/stylesheets/style2.css",
58
- "test/dummy_app/another_themes/another_default/views/layouts/default.html.erb",
59
- "test/dummy_app/another_themes/another_default/views/products/index.html.erb",
60
- "test/dummy_app/app/controllers/application_controller.rb",
61
- "test/dummy_app/app/helpers/application_helper.rb",
62
- "test/dummy_app/app/views/layouts/application.html.erb",
63
- "test/dummy_app/config.ru",
64
- "test/dummy_app/config/application.rb",
65
- "test/dummy_app/config/boot.rb",
66
- "test/dummy_app/config/database.yml",
67
- "test/dummy_app/config/environment.rb",
68
- "test/dummy_app/config/environments/development.rb",
69
- "test/dummy_app/config/environments/production.rb",
70
- "test/dummy_app/config/environments/test.rb",
71
- "test/dummy_app/config/initializers/backtrace_silencers.rb",
72
- "test/dummy_app/config/initializers/inflections.rb",
73
- "test/dummy_app/config/initializers/mime_types.rb",
74
- "test/dummy_app/config/initializers/secret_token.rb",
75
- "test/dummy_app/config/initializers/session_store.rb",
76
- "test/dummy_app/config/locales/en.yml",
77
- "test/dummy_app/config/routes.rb",
78
- "test/dummy_app/db/seeds.rb",
79
- "test/dummy_app/empty_themes/.gitkeep",
80
- "test/dummy_app/lib/tasks/.gitkeep",
81
- "test/dummy_app/public/404.html",
82
- "test/dummy_app/public/422.html",
83
- "test/dummy_app/public/500.html",
84
- "test/dummy_app/public/favicon.ico",
85
- "test/dummy_app/public/images/rails.png",
86
- "test/dummy_app/public/index.html",
87
- "test/dummy_app/public/javascripts/application.js",
88
- "test/dummy_app/public/javascripts/controls.js",
89
- "test/dummy_app/public/javascripts/dragdrop.js",
90
- "test/dummy_app/public/javascripts/effects.js",
91
- "test/dummy_app/public/javascripts/prototype.js",
92
- "test/dummy_app/public/javascripts/rails.js",
93
- "test/dummy_app/public/robots.txt",
94
- "test/dummy_app/public/stylesheets/.gitkeep",
95
- "test/dummy_app/script/rails",
96
- "test/dummy_app/themes/default/images/logo.png",
97
- "test/dummy_app/themes/default/images/nested/logo.png",
98
- "test/dummy_app/themes/default/javascripts/app.js",
99
- "test/dummy_app/themes/default/stylesheets/images/logo.png",
100
- "test/dummy_app/themes/default/stylesheets/style.css",
101
- "test/dummy_app/themes/default/stylesheets/style2.css",
102
- "test/dummy_app/themes/default/views/layouts/default.html.erb",
103
- "test/dummy_app/themes/default/views/products/index.html.erb",
104
- "test/mailer_methods_test.rb",
105
- "test/routes_test.rb",
106
- "test/support/extensions.rb",
107
- "test/test_helper.rb",
108
- "test/themes_for_rails_test.rb",
109
- "test/view_helpers_test.rb",
110
- "themes_for_rails.gemspec"
111
- ]
112
- s.homepage = %q{http://github.com/lucasefe/themes_for_rails}
113
- s.require_paths = [%q{lib}]
114
- s.rubygems_version = %q{1.8.2}
115
- s.summary = %q{Themes support for rails (3)}
116
- s.test_files = [
117
- "test/assets_controller_test.rb",
118
- "test/common_methods_test.rb",
119
- "test/config_test.rb",
120
- "test/controller_methods_test.rb",
121
- "test/dummy_app/app/controllers/application_controller.rb",
122
- "test/dummy_app/app/helpers/application_helper.rb",
123
- "test/dummy_app/config/application.rb",
124
- "test/dummy_app/config/boot.rb",
125
- "test/dummy_app/config/environment.rb",
126
- "test/dummy_app/config/environments/development.rb",
127
- "test/dummy_app/config/environments/production.rb",
128
- "test/dummy_app/config/environments/test.rb",
129
- "test/dummy_app/config/initializers/backtrace_silencers.rb",
130
- "test/dummy_app/config/initializers/inflections.rb",
131
- "test/dummy_app/config/initializers/mime_types.rb",
132
- "test/dummy_app/config/initializers/secret_token.rb",
133
- "test/dummy_app/config/initializers/session_store.rb",
134
- "test/dummy_app/config/routes.rb",
135
- "test/dummy_app/db/seeds.rb",
136
- "test/mailer_methods_test.rb",
137
- "test/routes_test.rb",
138
- "test/support/extensions.rb",
139
- "test/test_helper.rb",
140
- "test/themes_for_rails_test.rb",
141
- "test/view_helpers_test.rb"
142
- ]
5
+ Gem::Specification.new do |gem|
6
+ gem.authors = ["Lucas Florio"]
7
+ gem.email = ["lucasefe@gmail.com"]
8
+ gem.summary = "Theme Support for Rails 3"
9
+ gem.description = %q{It allows an application to have many different ways of rendering static assets and dynamic views.}
10
+ gem.homepage = "https://github.com/lucasefe/themes_for_rails"
143
11
 
144
- if s.respond_to? :specification_version then
145
- s.specification_version = 3
12
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
13
+ gem.files = `git ls-files`.split("\n")
14
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ gem.name = "themes_for_rails"
16
+ gem.require_paths = ["lib"]
17
+ gem.version = ThemesForRails::VERSION
146
18
 
147
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
148
- s.add_runtime_dependency(%q<themes_for_rails>, [">= 0"])
149
- s.add_development_dependency(%q<sqlite3>, [">= 0"])
150
- s.add_development_dependency(%q<test-unit>, [">= 0"])
151
- s.add_development_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
152
- s.add_development_dependency(%q<jeweler>, [">= 0"])
153
- s.add_development_dependency(%q<contest>, [">= 0"])
154
- s.add_development_dependency(%q<mocha>, [">= 0"])
155
- s.add_development_dependency(%q<sqlite3>, [">= 0"])
156
- s.add_development_dependency(%q<test-unit>, [">= 0"])
157
- s.add_development_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
158
- s.add_development_dependency(%q<jeweler>, [">= 0"])
159
- s.add_development_dependency(%q<contest>, [">= 0"])
160
- s.add_development_dependency(%q<mocha>, [">= 0"])
161
- s.add_development_dependency(%q<sqlite3>, [">= 0"])
162
- s.add_development_dependency(%q<test-unit>, [">= 0"])
163
- s.add_development_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
164
- s.add_development_dependency(%q<jeweler>, [">= 0"])
165
- s.add_development_dependency(%q<contest>, [">= 0"])
166
- s.add_development_dependency(%q<mocha>, [">= 0"])
167
- s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
168
- else
169
- s.add_dependency(%q<themes_for_rails>, [">= 0"])
170
- s.add_dependency(%q<sqlite3>, [">= 0"])
171
- s.add_dependency(%q<test-unit>, [">= 0"])
172
- s.add_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
173
- s.add_dependency(%q<jeweler>, [">= 0"])
174
- s.add_dependency(%q<contest>, [">= 0"])
175
- s.add_dependency(%q<mocha>, [">= 0"])
176
- s.add_dependency(%q<sqlite3>, [">= 0"])
177
- s.add_dependency(%q<test-unit>, [">= 0"])
178
- s.add_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
179
- s.add_dependency(%q<jeweler>, [">= 0"])
180
- s.add_dependency(%q<contest>, [">= 0"])
181
- s.add_dependency(%q<mocha>, [">= 0"])
182
- s.add_dependency(%q<sqlite3>, [">= 0"])
183
- s.add_dependency(%q<test-unit>, [">= 0"])
184
- s.add_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
185
- s.add_dependency(%q<jeweler>, [">= 0"])
186
- s.add_dependency(%q<contest>, [">= 0"])
187
- s.add_dependency(%q<mocha>, [">= 0"])
188
- s.add_dependency(%q<rails>, ["~> 3.0.0"])
189
- end
190
- else
191
- s.add_dependency(%q<themes_for_rails>, [">= 0"])
192
- s.add_dependency(%q<sqlite3>, [">= 0"])
193
- s.add_dependency(%q<test-unit>, [">= 0"])
194
- s.add_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
195
- s.add_dependency(%q<jeweler>, [">= 0"])
196
- s.add_dependency(%q<contest>, [">= 0"])
197
- s.add_dependency(%q<mocha>, [">= 0"])
198
- s.add_dependency(%q<sqlite3>, [">= 0"])
199
- s.add_dependency(%q<test-unit>, [">= 0"])
200
- s.add_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
201
- s.add_dependency(%q<jeweler>, [">= 0"])
202
- s.add_dependency(%q<contest>, [">= 0"])
203
- s.add_dependency(%q<mocha>, [">= 0"])
204
- s.add_dependency(%q<sqlite3>, [">= 0"])
205
- s.add_dependency(%q<test-unit>, [">= 0"])
206
- s.add_dependency(%q<rspec-rails>, [">= 2.0.0.beta.20"])
207
- s.add_dependency(%q<jeweler>, [">= 0"])
208
- s.add_dependency(%q<contest>, [">= 0"])
209
- s.add_dependency(%q<mocha>, [">= 0"])
210
- s.add_dependency(%q<rails>, ["~> 3.0.0"])
211
- end
19
+ gem.add_dependency('rails', [">= 3.0.0"])
20
+ gem.add_development_dependency "sqlite3"
21
+ gem.add_development_dependency "test-unit"
22
+ gem.add_development_dependency "contest"
23
+ gem.add_development_dependency "mocha"
212
24
  end
213
-
metadata CHANGED
@@ -1,321 +1,90 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: themes_for_rails
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.3
4
5
  prerelease:
5
- version: 0.4.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Lucas Florio
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-05-17 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: themes_for_rails
17
- requirement: &id001 !ruby/object:Gem::Requirement
12
+ date: 2012-01-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70284078427120 !ruby/object:Gem::Requirement
18
17
  none: false
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.0.0
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: sqlite3
28
- requirement: &id002 !ruby/object:Gem::Requirement
29
- none: false
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: "0"
34
- type: :development
35
- prerelease: false
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: test-unit
39
- requirement: &id003 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- version: "0"
45
- type: :development
46
- prerelease: false
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: rspec-rails
50
- requirement: &id004 !ruby/object:Gem::Requirement
51
- none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: 2.0.0.beta.20
56
- type: :development
57
- prerelease: false
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
60
- name: jeweler
61
- requirement: &id005 !ruby/object:Gem::Requirement
62
- none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: "0"
67
- type: :development
68
- prerelease: false
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
71
- name: contest
72
- requirement: &id006 !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: "0"
78
- type: :development
79
- prerelease: false
80
- version_requirements: *id006
81
- - !ruby/object:Gem::Dependency
82
- name: mocha
83
- requirement: &id007 !ruby/object:Gem::Requirement
84
- none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: "0"
89
- type: :development
90
- prerelease: false
91
- version_requirements: *id007
92
- - !ruby/object:Gem::Dependency
93
- name: sqlite3
94
- requirement: &id008 !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: "0"
100
- type: :development
101
- prerelease: false
102
- version_requirements: *id008
103
- - !ruby/object:Gem::Dependency
104
- name: test-unit
105
- requirement: &id009 !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: "0"
111
- type: :development
112
- prerelease: false
113
- version_requirements: *id009
114
- - !ruby/object:Gem::Dependency
115
- name: rspec-rails
116
- requirement: &id010 !ruby/object:Gem::Requirement
117
- none: false
118
- requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- version: 2.0.0.beta.20
122
- type: :development
123
- prerelease: false
124
- version_requirements: *id010
125
- - !ruby/object:Gem::Dependency
126
- name: jeweler
127
- requirement: &id011 !ruby/object:Gem::Requirement
128
- none: false
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: "0"
133
- type: :development
134
- prerelease: false
135
- version_requirements: *id011
136
- - !ruby/object:Gem::Dependency
137
- name: contest
138
- requirement: &id012 !ruby/object:Gem::Requirement
139
- none: false
140
- requirements:
141
- - - ">="
142
- - !ruby/object:Gem::Version
143
- version: "0"
144
- type: :development
145
- prerelease: false
146
- version_requirements: *id012
147
- - !ruby/object:Gem::Dependency
148
- name: mocha
149
- requirement: &id013 !ruby/object:Gem::Requirement
150
- none: false
151
- requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- version: "0"
155
- type: :development
156
- prerelease: false
157
- version_requirements: *id013
158
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *70284078427120
25
+ - !ruby/object:Gem::Dependency
159
26
  name: sqlite3
160
- requirement: &id014 !ruby/object:Gem::Requirement
27
+ requirement: &70284078426700 !ruby/object:Gem::Requirement
161
28
  none: false
162
- requirements:
163
- - - ">="
164
- - !ruby/object:Gem::Version
165
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
166
33
  type: :development
167
34
  prerelease: false
168
- version_requirements: *id014
169
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *70284078426700
36
+ - !ruby/object:Gem::Dependency
170
37
  name: test-unit
171
- requirement: &id015 !ruby/object:Gem::Requirement
172
- none: false
173
- requirements:
174
- - - ">="
175
- - !ruby/object:Gem::Version
176
- version: "0"
177
- type: :development
178
- prerelease: false
179
- version_requirements: *id015
180
- - !ruby/object:Gem::Dependency
181
- name: rspec-rails
182
- requirement: &id016 !ruby/object:Gem::Requirement
38
+ requirement: &70284078426220 !ruby/object:Gem::Requirement
183
39
  none: false
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: 2.0.0.beta.20
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
188
44
  type: :development
189
45
  prerelease: false
190
- version_requirements: *id016
191
- - !ruby/object:Gem::Dependency
192
- name: jeweler
193
- requirement: &id017 !ruby/object:Gem::Requirement
194
- none: false
195
- requirements:
196
- - - ">="
197
- - !ruby/object:Gem::Version
198
- version: "0"
199
- type: :development
200
- prerelease: false
201
- version_requirements: *id017
202
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *70284078426220
47
+ - !ruby/object:Gem::Dependency
203
48
  name: contest
204
- requirement: &id018 !ruby/object:Gem::Requirement
49
+ requirement: &70284078425800 !ruby/object:Gem::Requirement
205
50
  none: false
206
- requirements:
207
- - - ">="
208
- - !ruby/object:Gem::Version
209
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
210
55
  type: :development
211
56
  prerelease: false
212
- version_requirements: *id018
213
- - !ruby/object:Gem::Dependency
57
+ version_requirements: *70284078425800
58
+ - !ruby/object:Gem::Dependency
214
59
  name: mocha
215
- requirement: &id019 !ruby/object:Gem::Requirement
216
- none: false
217
- requirements:
218
- - - ">="
219
- - !ruby/object:Gem::Version
220
- version: "0"
221
- type: :development
222
- prerelease: false
223
- version_requirements: *id019
224
- - !ruby/object:Gem::Dependency
225
- name: sqlite3
226
- requirement: &id020 !ruby/object:Gem::Requirement
227
- none: false
228
- requirements:
229
- - - ">="
230
- - !ruby/object:Gem::Version
231
- version: "0"
232
- type: :development
233
- prerelease: false
234
- version_requirements: *id020
235
- - !ruby/object:Gem::Dependency
236
- name: test-unit
237
- requirement: &id021 !ruby/object:Gem::Requirement
60
+ requirement: &70284078425380 !ruby/object:Gem::Requirement
238
61
  none: false
239
- requirements:
240
- - - ">="
241
- - !ruby/object:Gem::Version
242
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
243
66
  type: :development
244
67
  prerelease: false
245
- version_requirements: *id021
246
- - !ruby/object:Gem::Dependency
247
- name: rspec-rails
248
- requirement: &id022 !ruby/object:Gem::Requirement
249
- none: false
250
- requirements:
251
- - - ">="
252
- - !ruby/object:Gem::Version
253
- version: 2.0.0.beta.20
254
- type: :development
255
- prerelease: false
256
- version_requirements: *id022
257
- - !ruby/object:Gem::Dependency
258
- name: jeweler
259
- requirement: &id023 !ruby/object:Gem::Requirement
260
- none: false
261
- requirements:
262
- - - ">="
263
- - !ruby/object:Gem::Version
264
- version: "0"
265
- type: :development
266
- prerelease: false
267
- version_requirements: *id023
268
- - !ruby/object:Gem::Dependency
269
- name: contest
270
- requirement: &id024 !ruby/object:Gem::Requirement
271
- none: false
272
- requirements:
273
- - - ">="
274
- - !ruby/object:Gem::Version
275
- version: "0"
276
- type: :development
277
- prerelease: false
278
- version_requirements: *id024
279
- - !ruby/object:Gem::Dependency
280
- name: mocha
281
- requirement: &id025 !ruby/object:Gem::Requirement
282
- none: false
283
- requirements:
284
- - - ">="
285
- - !ruby/object:Gem::Version
286
- version: "0"
287
- type: :development
288
- prerelease: false
289
- version_requirements: *id025
290
- - !ruby/object:Gem::Dependency
291
- name: rails
292
- requirement: &id026 !ruby/object:Gem::Requirement
293
- none: false
294
- requirements:
295
- - - ~>
296
- - !ruby/object:Gem::Version
297
- version: 3.0.0
298
- type: :runtime
299
- prerelease: false
300
- version_requirements: *id026
301
- description: It allows an application to have many different ways of rendering static assets and dynamic views.
302
- email: lucasefe@gmail.com
68
+ version_requirements: *70284078425380
69
+ description: It allows an application to have many different ways of rendering static
70
+ assets and dynamic views.
71
+ email:
72
+ - lucasefe@gmail.com
303
73
  executables: []
304
-
305
74
  extensions: []
306
-
307
- extra_rdoc_files:
308
- - README.textile
309
- files:
75
+ extra_rdoc_files: []
76
+ files:
77
+ - .gitignore
78
+ - .rspec
310
79
  - .rvmrc
311
80
  - Gemfile
312
81
  - Gemfile.lock
82
+ - LICENSE
313
83
  - README.textile
314
84
  - REVIEW_NOTES
315
85
  - RMU_REVIEW
316
86
  - Rakefile
317
87
  - TODO.textile
318
- - init.rb
319
88
  - lib/generators/themes_for_rails/install_generator.rb
320
89
  - lib/generators/themes_for_rails/templates/theme/images/.gitkeep
321
90
  - lib/generators/themes_for_rails/templates/theme/javascripts/.gitkeep
@@ -334,10 +103,6 @@ files:
334
103
  - lib/themes_for_rails/url_helpers.rb
335
104
  - lib/themes_for_rails/version.rb
336
105
  - lib/themes_for_rails/view_helpers.rb
337
- - test/assets_controller_test.rb
338
- - test/common_methods_test.rb
339
- - test/config_test.rb
340
- - test/controller_methods_test.rb
341
106
  - test/dummy_app/.gitignore
342
107
  - test/dummy_app/Gemfile
343
108
  - test/dummy_app/Rakefile
@@ -387,54 +152,65 @@ files:
387
152
  - test/dummy_app/themes/default/images/logo.png
388
153
  - test/dummy_app/themes/default/images/nested/logo.png
389
154
  - test/dummy_app/themes/default/javascripts/app.js
155
+ - test/dummy_app/themes/default/javascripts/app.min.js
390
156
  - test/dummy_app/themes/default/stylesheets/images/logo.png
391
157
  - test/dummy_app/themes/default/stylesheets/style.css
392
158
  - test/dummy_app/themes/default/stylesheets/style2.css
393
159
  - test/dummy_app/themes/default/views/layouts/default.html.erb
394
160
  - test/dummy_app/themes/default/views/products/index.html.erb
395
- - test/mailer_methods_test.rb
396
- - test/routes_test.rb
161
+ - test/lib/assets_controller_test.rb
162
+ - test/lib/common_methods_test.rb
163
+ - test/lib/config_test.rb
164
+ - test/lib/controller_methods_test.rb
165
+ - test/lib/mailer_methods_test.rb
166
+ - test/lib/routes_test.rb
167
+ - test/lib/themes_for_rails_test.rb
168
+ - test/lib/view_helpers_test.rb
397
169
  - test/support/extensions.rb
398
170
  - test/test_helper.rb
399
- - test/themes_for_rails_test.rb
400
- - test/view_helpers_test.rb
401
171
  - themes_for_rails.gemspec
402
- homepage: http://github.com/lucasefe/themes_for_rails
172
+ homepage: https://github.com/lucasefe/themes_for_rails
403
173
  licenses: []
404
-
405
174
  post_install_message:
406
175
  rdoc_options: []
407
-
408
- require_paths:
176
+ require_paths:
409
177
  - lib
410
- required_ruby_version: !ruby/object:Gem::Requirement
178
+ required_ruby_version: !ruby/object:Gem::Requirement
411
179
  none: false
412
- requirements:
413
- - - ">="
414
- - !ruby/object:Gem::Version
415
- version: "0"
416
- required_rubygems_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ! '>='
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
184
+ required_rubygems_version: !ruby/object:Gem::Requirement
417
185
  none: false
418
- requirements:
419
- - - ">="
420
- - !ruby/object:Gem::Version
421
- version: "0"
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
422
190
  requirements: []
423
-
424
191
  rubyforge_project:
425
- rubygems_version: 1.8.2
192
+ rubygems_version: 1.8.15
426
193
  signing_key:
427
194
  specification_version: 3
428
- summary: Themes support for rails (3)
429
- test_files:
430
- - test/assets_controller_test.rb
431
- - test/common_methods_test.rb
432
- - test/config_test.rb
433
- - test/controller_methods_test.rb
195
+ summary: Theme Support for Rails 3
196
+ test_files:
197
+ - test/dummy_app/.gitignore
198
+ - test/dummy_app/Gemfile
199
+ - test/dummy_app/Rakefile
200
+ - test/dummy_app/another_themes/another_default/images/logo.png
201
+ - test/dummy_app/another_themes/another_default/images/nested/logo.png
202
+ - test/dummy_app/another_themes/another_default/javascripts/app.js
203
+ - test/dummy_app/another_themes/another_default/stylesheets/style.css
204
+ - test/dummy_app/another_themes/another_default/stylesheets/style2.css
205
+ - test/dummy_app/another_themes/another_default/views/layouts/default.html.erb
206
+ - test/dummy_app/another_themes/another_default/views/products/index.html.erb
434
207
  - test/dummy_app/app/controllers/application_controller.rb
435
208
  - test/dummy_app/app/helpers/application_helper.rb
209
+ - test/dummy_app/app/views/layouts/application.html.erb
210
+ - test/dummy_app/config.ru
436
211
  - test/dummy_app/config/application.rb
437
212
  - test/dummy_app/config/boot.rb
213
+ - test/dummy_app/config/database.yml
438
214
  - test/dummy_app/config/environment.rb
439
215
  - test/dummy_app/config/environments/development.rb
440
216
  - test/dummy_app/config/environments/production.rb
@@ -444,11 +220,42 @@ test_files:
444
220
  - test/dummy_app/config/initializers/mime_types.rb
445
221
  - test/dummy_app/config/initializers/secret_token.rb
446
222
  - test/dummy_app/config/initializers/session_store.rb
223
+ - test/dummy_app/config/locales/en.yml
447
224
  - test/dummy_app/config/routes.rb
448
225
  - test/dummy_app/db/seeds.rb
449
- - test/mailer_methods_test.rb
450
- - test/routes_test.rb
226
+ - test/dummy_app/empty_themes/.gitkeep
227
+ - test/dummy_app/lib/tasks/.gitkeep
228
+ - test/dummy_app/public/404.html
229
+ - test/dummy_app/public/422.html
230
+ - test/dummy_app/public/500.html
231
+ - test/dummy_app/public/favicon.ico
232
+ - test/dummy_app/public/images/rails.png
233
+ - test/dummy_app/public/index.html
234
+ - test/dummy_app/public/javascripts/application.js
235
+ - test/dummy_app/public/javascripts/controls.js
236
+ - test/dummy_app/public/javascripts/dragdrop.js
237
+ - test/dummy_app/public/javascripts/effects.js
238
+ - test/dummy_app/public/javascripts/prototype.js
239
+ - test/dummy_app/public/javascripts/rails.js
240
+ - test/dummy_app/public/robots.txt
241
+ - test/dummy_app/public/stylesheets/.gitkeep
242
+ - test/dummy_app/script/rails
243
+ - test/dummy_app/themes/default/images/logo.png
244
+ - test/dummy_app/themes/default/images/nested/logo.png
245
+ - test/dummy_app/themes/default/javascripts/app.js
246
+ - test/dummy_app/themes/default/javascripts/app.min.js
247
+ - test/dummy_app/themes/default/stylesheets/images/logo.png
248
+ - test/dummy_app/themes/default/stylesheets/style.css
249
+ - test/dummy_app/themes/default/stylesheets/style2.css
250
+ - test/dummy_app/themes/default/views/layouts/default.html.erb
251
+ - test/dummy_app/themes/default/views/products/index.html.erb
252
+ - test/lib/assets_controller_test.rb
253
+ - test/lib/common_methods_test.rb
254
+ - test/lib/config_test.rb
255
+ - test/lib/controller_methods_test.rb
256
+ - test/lib/mailer_methods_test.rb
257
+ - test/lib/routes_test.rb
258
+ - test/lib/themes_for_rails_test.rb
259
+ - test/lib/view_helpers_test.rb
451
260
  - test/support/extensions.rb
452
261
  - test/test_helper.rb
453
- - test/themes_for_rails_test.rb
454
- - test/view_helpers_test.rb
data/init.rb DELETED
@@ -1 +0,0 @@
1
- require "themes_for_rails"