sprites 0.0.1.pre → 0.0.1.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. data/README.md +0 -0
  2. data/Rakefile +0 -1
  3. data/lib/sprites/cli/command_line_option_parser.rb +3 -4
  4. data/lib/sprites/configuration.rb +6 -0
  5. data/lib/sprites/rails/railtie.rb +27 -0
  6. data/lib/sprites/rails.rb +3 -0
  7. data/lib/sprites/sprite.rb +1 -3
  8. data/lib/sprites/version.rb +1 -1
  9. data/log/development.log +0 -0
  10. data/log/test.log +0 -0
  11. data/spec/fixtures/rails_project1/Rakefile +1 -0
  12. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/.DS_Store +0 -0
  13. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-default-28.png +0 -0
  14. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-default-cap-28.png +0 -0
  15. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-default-cap-long.png +0 -0
  16. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-default.png +0 -0
  17. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-onclick-28.png +0 -0
  18. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-onclick-cap-28.png +0 -0
  19. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-onclick-cap-long.png +0 -0
  20. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-onclick.png +0 -0
  21. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-rollover-28.png +0 -0
  22. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-rollover-cap-28.png +0 -0
  23. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-rollover-cap-long.png +0 -0
  24. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-black-rollover.png +0 -0
  25. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blackarrow-default.png +0 -0
  26. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blackarrow-onclick.png +0 -0
  27. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blackarrow-rollover.png +0 -0
  28. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-default-cap.png +0 -0
  29. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-default-drop.png +0 -0
  30. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-default-edge.png +0 -0
  31. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-default.png +0 -0
  32. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-onclick-cap.png +0 -0
  33. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-onclick-drop.png +0 -0
  34. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-onclick-edge.png +0 -0
  35. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-onclick.png +0 -0
  36. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-rollover-cap.png +0 -0
  37. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-rollover-drop.png +0 -0
  38. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-rollover-edge.png +0 -0
  39. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-blue-rollover.png +0 -0
  40. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-default-cap.png +0 -0
  41. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-default-drop.png +0 -0
  42. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-default-edge.png +0 -0
  43. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-default.png +0 -0
  44. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-onclick-cap.png +0 -0
  45. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-onclick-drop.png +0 -0
  46. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-onclick-edge.png +0 -0
  47. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-onclick.png +0 -0
  48. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-rollover-cap.png +0 -0
  49. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-rollover-drop.png +0 -0
  50. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-rollover-edge.png +0 -0
  51. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-green-rollover.png +0 -0
  52. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-default-cap.png +0 -0
  53. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-default-drop.png +0 -0
  54. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-default-edge.png +0 -0
  55. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-default.png +0 -0
  56. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-onclick-cap.png +0 -0
  57. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-onclick-drop.png +0 -0
  58. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-onclick-edge.png +0 -0
  59. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-onclick.png +0 -0
  60. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-rollover-cap.png +0 -0
  61. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-rollover-drop.png +0 -0
  62. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-rollover-edge.png +0 -0
  63. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-red-rollover.png +0 -0
  64. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-default-cap.png +0 -0
  65. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-default-drop.png +0 -0
  66. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-default-edge.png +0 -0
  67. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-default.png +0 -0
  68. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-onclick-cap.png +0 -0
  69. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-onclick-drop.png +0 -0
  70. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-onclick-edge.png +0 -0
  71. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-onclick.png +0 -0
  72. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-rollover-cap.png +0 -0
  73. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-rollover-drop.png +0 -0
  74. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-rollover-edge.png +0 -0
  75. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-trans-rollover.png +0 -0
  76. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-default-cap.png +0 -0
  77. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-default-drop.png +0 -0
  78. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-default-edge.png +0 -0
  79. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-default.png +0 -0
  80. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-onclick-cap.png +0 -0
  81. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-onclick-drop.png +0 -0
  82. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-onclick-edge.png +0 -0
  83. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-onclick.png +0 -0
  84. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-rollover-cap.png +0 -0
  85. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-rollover-drop.png +0 -0
  86. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-rollover-edge.png +0 -0
  87. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-white-rollover.png +0 -0
  88. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-default-cap.png +0 -0
  89. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-default-drop.png +0 -0
  90. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-default-edge.png +0 -0
  91. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-default.png +0 -0
  92. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-onclick-cap.png +0 -0
  93. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-onclick-drop.png +0 -0
  94. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-onclick-edge.png +0 -0
  95. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-onclick.png +0 -0
  96. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-rollover-cap.png +0 -0
  97. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-rollover-drop.png +0 -0
  98. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-rollover-edge.png +0 -0
  99. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/btn-yellow-rollover.png +0 -0
  100. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-black-default-28.png +0 -0
  101. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-black-default-cap-28.png +0 -0
  102. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-black-onclick-28.png +0 -0
  103. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-black-onclick-cap-28.png +0 -0
  104. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-black-rollover-28.png +0 -0
  105. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-black-rollover-cap-28.png +0 -0
  106. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-blue-default-cap.png +0 -0
  107. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-blue-default.png +0 -0
  108. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-blue-onclick-cap.png +0 -0
  109. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-blue-onclick.png +0 -0
  110. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-blue-rollover-cap.png +0 -0
  111. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-blue-rollover.png +0 -0
  112. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-default-cap.png +0 -0
  113. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-default-drop.png +0 -0
  114. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-default-edge.png +0 -0
  115. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-default.png +0 -0
  116. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-onclick-cap.png +0 -0
  117. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-onclick-drop.png +0 -0
  118. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-onclick-edge.png +0 -0
  119. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-onclick.png +0 -0
  120. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-rollover-cap.png +0 -0
  121. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-rollover-drop.png +0 -0
  122. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-rollover-edge.png +0 -0
  123. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-green-rollover.png +0 -0
  124. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-red-default-cap.png +0 -0
  125. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-red-default.png +0 -0
  126. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-red-onclick-cap.png +0 -0
  127. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-red-onclick.png +0 -0
  128. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-red-rollover-cap.png +0 -0
  129. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-red-rollover.png +0 -0
  130. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-default-cap.png +0 -0
  131. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-default-drop.png +0 -0
  132. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-default-edge.png +0 -0
  133. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-default.png +0 -0
  134. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-onclick-cap.png +0 -0
  135. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-onclick-drop.png +0 -0
  136. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-onclick-edge.png +0 -0
  137. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-onclick.png +0 -0
  138. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-rollover-cap.png +0 -0
  139. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-rollover-drop.png +0 -0
  140. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-rollover-edge.png +0 -0
  141. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-trans-rollover.png +0 -0
  142. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-white-default-cap.png +0 -0
  143. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-white-default.png +0 -0
  144. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-white-onclick-cap.png +0 -0
  145. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-white-onclick.png +0 -0
  146. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-white-rollover-cap.png +0 -0
  147. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-white-rollover.png +0 -0
  148. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-yellow-default-cap.png +0 -0
  149. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-yellow-default.png +0 -0
  150. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-yellow-onclick-cap.png +0 -0
  151. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-yellow-onclick.png +0 -0
  152. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-yellow-rollover-cap.png +0 -0
  153. data/spec/fixtures/rails_project1/app/assets/images/sprite_images/buttons/dark_background/btn-yellow-rollover.png +0 -0
  154. data/spec/fixtures/rails_project1/config/application.rb +58 -0
  155. data/spec/fixtures/rails_project1/config/boot.rb +6 -0
  156. data/spec/fixtures/rails_project1/config/environment.rb +9 -0
  157. data/spec/fixtures/rails_project1/config/sprites.rb +145 -0
  158. data/spec/fixtures/rails_project1/log/test.log +0 -0
  159. data/spec/integration/rails/rails_spec.rb +17 -0
  160. data/sprites.gemspec +2 -0
  161. metadata +344 -15
  162. data/lib/sprites/core_ext/pathname.rb +0 -7
  163. data/spec/lib/sprites/core_ext/pathname_spec.rb +0 -4
data/README.md ADDED
File without changes
data/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
2
  require 'rspec/core/rake_task'
3
3
 
4
-
5
4
  desc "Run specs"
6
5
  RSpec::Core::RakeTask.new do |t|
7
6
  t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
@@ -1,5 +1,4 @@
1
1
  require 'optparse'
2
- require 'pathname'
3
2
 
4
3
  module Sprites
5
4
  class CommandLineOptionParser < OptionParser
@@ -23,9 +22,9 @@ module Sprites
23
22
 
24
23
  def extract_sprite_definition_file_path(arguments)
25
24
  sprite_def_file_pathname = if arguments[0] =~ %r{^.+\.rb}
26
- Pathname.new(arguments.shift)
25
+ Pathname(arguments.shift)
27
26
  elsif file_exists?('config/sprites.rb')
28
- Pathname.new('config/sprites.rb')
27
+ Pathname('config/sprites.rb')
29
28
  else
30
29
  raise
31
30
  end
@@ -36,7 +35,7 @@ module Sprites
36
35
  end
37
36
 
38
37
  def file_exists?(path)
39
- Pathname.new(path).exist?
38
+ Pathname(path).exist?
40
39
  end
41
40
 
42
41
  def setup_parser(opts)
@@ -18,6 +18,12 @@ module Sprites
18
18
  self
19
19
  end
20
20
 
21
+ def configured?
22
+ FIELDS.any? do |field|
23
+ send(field) != DEFAULT_CONFIGURATION[field]
24
+ end
25
+ end
26
+
21
27
  FIELDS.each do |meth|
22
28
  eval <<-EVAL
23
29
  def #{meth}(*args)
@@ -0,0 +1,27 @@
1
+ require 'rails/railtie'
2
+ require 'sprites'
3
+
4
+ module Sprites
5
+ class Railtie < Rails::Railtie
6
+ rake_tasks do
7
+ desc "Generate sprites and stylesheets"
8
+ task :sprites => :environment do
9
+ assets_root = Rails.application.config.assets[:enabled] ? 'app/assets' : 'public'
10
+
11
+ ::Sprites.configure do
12
+ sprites_path Rails.root.join(assets_root, 'images/sprites')
13
+ sprite_stylesheets_path Rails.root.join(assets_root, 'stylesheets/sprites')
14
+ sprite_pieces_path Rails.root.join(assets_root, 'images/sprite_images')
15
+ end unless ::Sprites.configuration.configured?
16
+
17
+ unless (def_file_path = Rails.root.join('config/sprites.rb')).exist?
18
+ raise CliApplication::DefinitionFileNotFound
19
+ end
20
+
21
+ load def_file_path
22
+ sprite_generator = ChunkyPngGenerator.new(::Sprites.configuration)
23
+ sprite_generator.generate(::Sprites.application.sprites)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ module Sprites
2
+ require 'sprites/rails/railtie'
3
+ end
@@ -1,6 +1,4 @@
1
1
  require 'fileutils'
2
- require 'pathname'
3
- require 'sprites/core_ext/pathname'
4
2
  require 'active_support/core_ext/array/extract_options'
5
3
  require 'active_support/core_ext/object/try'
6
4
  require 'sprites/sprite_pieces'
@@ -32,7 +30,7 @@ module Sprites
32
30
 
33
31
  def define(*args, &blk)
34
32
  @options = @options.merge args.extract_options!
35
- @path ||= Pathname.wrap(path_for_arguments(@options, *args))
33
+ @path ||= Pathname(path_for_arguments(@options, *args))
36
34
  @stylesheet ||= Stylesheet.new(css_path, self)
37
35
  @options.delete(@path.to_s)
38
36
  set_options
@@ -1,3 +1,3 @@
1
1
  module Sprites
2
- VERSION = "0.0.1.pre"
2
+ VERSION = "0.0.1.pre2"
3
3
  end
File without changes
data/log/test.log ADDED
File without changes
@@ -0,0 +1 @@
1
+ require File.expand_path('../config/application', __FILE__)
@@ -0,0 +1,58 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ # require "action_mailer/railtie"
7
+ # require "active_resource/railtie"
8
+ require "sprockets/railtie"
9
+ require 'sprites/rails'
10
+
11
+ if defined?(Bundler)
12
+ # If you precompile assets before deploying to production, use this line
13
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
14
+ # If you want your assets lazily compiled in production, use this line
15
+ # Bundler.require(:default, :assets, Rails.env)
16
+ end
17
+
18
+ module SpritesRailsTestApp
19
+ class Application < Rails::Application
20
+ config.root = File.expand_path('../..', __FILE__)
21
+ config.cache_classes = false
22
+
23
+ # Settings in config/environments/* take precedence over those specified here.
24
+ # Application configuration should go into files in config/initializers
25
+ # -- all .rb files in that directory are automatically loaded.
26
+
27
+ # Custom directories with classes and modules you want to be autoloadable.
28
+ # config.autoload_paths += %W(#{config.root}/lib)
29
+
30
+ # Only load the plugins named here, in the order given (default is alphabetical).
31
+ # :all can be used as a placeholder for all plugins not explicitly named.
32
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
33
+
34
+ # Activate observers that should always be running.
35
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
36
+
37
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
38
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
39
+ # config.time_zone = 'Central Time (US & Canada)'
40
+
41
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
42
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
43
+ # config.i18n.default_locale = :de
44
+
45
+ # Configure the default encoding used in templates for Ruby 1.9.
46
+ config.encoding = "utf-8"
47
+
48
+ # Configure sensitive parameters which will be filtered from the log file.
49
+ config.filter_parameters += [:password, :password_confirmation]
50
+
51
+ # Enable the asset pipeline
52
+ config.assets.enabled = true
53
+
54
+ # Version of your assets, change this if you want to expire all your assets
55
+ config.assets.version = '1.0'
56
+ config.active_support.deprecation = :log
57
+ end
58
+ end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,9 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ # SpritesRailsTestApp::Application.initialize!
6
+
7
+ require 'rake'
8
+ include Rake::DSL
9
+ SpritesRailsTestApp::Application.load_tasks