sketchily 1.5.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +3 -1
  3. data/Rakefile +2 -20
  4. data/app/views/sketchily/_embed.html.erb +2 -1
  5. data/app/views/sketchily/_embed.html.erb~ +3 -1
  6. data/app/views/sketchily/_sketchily.html.erb +7 -4
  7. data/app/views/sketchily/_sketchily.html.erb~ +9 -5
  8. data/app/views/sketchily/_sketchily_tag.html.erb +0 -1
  9. data/app/views/sketchily/_sketchily_tag.html.erb~ +2 -3
  10. data/lib/sketchily.rb +2 -2
  11. data/lib/sketchily.rb~ +2 -2
  12. data/lib/sketchily/sketchily.rb +2 -6
  13. data/lib/sketchily/sketchily.rb~ +1 -4
  14. data/lib/sketchily/sketchily_tag.rb +1 -3
  15. data/lib/sketchily/sketchily_tag.rb~ +0 -1
  16. data/lib/sketchily/version.rb +1 -1
  17. data/lib/sketchily/version.rb~ +1 -1
  18. data/spec/app/helpers/sketchily_helper_spec.rb +8 -0
  19. data/spec/app/helpers/sketchily_helper_spec.rb~ +12 -0
  20. data/spec/dummy/README.md +3 -0
  21. data/spec/dummy/README.md~ +3 -0
  22. data/spec/dummy/app/controllers/drawings_controller.rb +18 -0
  23. data/spec/dummy/app/controllers/drawings_controller.rb~ +16 -0
  24. data/spec/dummy/app/views/{sketchily → drawings}/sketchily.html.erb +0 -0
  25. data/spec/dummy/app/views/drawings/sketchily_tag.html.erb +3 -0
  26. data/spec/dummy/app/views/drawings/sketchily_tag.html.erb~ +3 -0
  27. data/spec/dummy/config/application.rb +4 -36
  28. data/spec/dummy/config/application.rb~ +27 -0
  29. data/spec/dummy/config/boot.rb +4 -9
  30. data/spec/dummy/config/environment.rb +2 -2
  31. data/spec/dummy/config/environments/development.rb +11 -19
  32. data/spec/dummy/config/environments/development.rb~ +31 -0
  33. data/spec/dummy/config/environments/production.rb +40 -27
  34. data/spec/dummy/config/environments/production.rb~ +67 -0
  35. data/spec/dummy/config/environments/test.rb +13 -14
  36. data/spec/dummy/config/environments/test.rb~ +31 -0
  37. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  38. data/spec/dummy/config/initializers/inflections.rb +6 -5
  39. data/spec/dummy/config/initializers/secret_token.rb +7 -2
  40. data/spec/dummy/config/initializers/secret_token.rb~ +12 -0
  41. data/spec/dummy/config/initializers/session_store.rb +0 -5
  42. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  43. data/spec/dummy/config/locales/en.yml +20 -2
  44. data/spec/dummy/config/routes.rb +6 -3
  45. data/spec/dummy/config/routes.rb~ +6 -3
  46. data/spec/dummy/db/development.sqlite3 +0 -0
  47. data/spec/dummy/db/migrate/{20130211122120_create_drawings.rb → 0_create_drawings.rb} +0 -0
  48. data/spec/dummy/db/schema.rb +1 -1
  49. data/spec/dummy/db/test.sqlite3 +0 -0
  50. data/spec/dummy/log/development.log +102 -0
  51. data/spec/dummy/log/test.log +1538 -0
  52. data/spec/dummy/tmp/cache/assets/test/sprockets/13c49b43c248f57a4f30cdf2e6500d86 +0 -0
  53. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  54. data/spec/dummy/tmp/cache/assets/test/sprockets/1439175e31c3d335f43d739fcf88b900 +0 -0
  55. data/spec/dummy/tmp/cache/assets/test/sprockets/16bffd70b9ec9a2fffbb79d5043eef68 +0 -0
  56. data/spec/dummy/tmp/cache/assets/test/sprockets/2d62197a09bc4950eba778882fe761c2 +0 -0
  57. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  58. data/spec/dummy/tmp/cache/assets/test/sprockets/34ba754a656c01caa63fa519ae3d9908 +0 -0
  59. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  60. data/spec/dummy/tmp/cache/assets/test/sprockets/4095cf2b90e468974429e72b082b79f8 +0 -0
  61. data/spec/dummy/tmp/cache/assets/test/sprockets/413a1ea244e0c08b931057c16bfe0bc2 +0 -0
  62. data/spec/dummy/tmp/cache/assets/test/sprockets/56a18313459a66878cdaf82c4915f8f5 +0 -0
  63. data/spec/dummy/tmp/cache/assets/test/sprockets/a28f5450252c1cb0a43ba212cbda8096 +0 -0
  64. data/spec/dummy/tmp/cache/assets/test/sprockets/ad2d481af24a144625930160404410ce +0 -0
  65. data/spec/dummy/tmp/cache/assets/test/sprockets/c33d0ad7fc68a2a2103e528aa3ca347a +0 -0
  66. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  67. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  68. data/spec/dummy/tmp/cache/assets/test/sprockets/e5886a1047655979cb0a1c7622c6f7ad +0 -0
  69. data/spec/dummy/tmp/cache/assets/test/sprockets/ed868bc354161d40e454aa89cc181731 +0 -0
  70. data/spec/dummy/tmp/cache/assets/test/sprockets/ee457cb1087f657c1a865aad13dda147 +0 -0
  71. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  72. data/spec/dummy/tmp/cache/assets/test/sprockets/fe75486f6c3fa184617f1e14a6758ad7 +0 -0
  73. data/spec/features/sketchily_spec.rb +3 -3
  74. data/spec/features/sketchily_spec.rb~ +4 -3
  75. data/spec/features/sketchily_tag_spec.rb +3 -2
  76. data/spec/features/sketchily_tag_spec.rb~ +4 -2
  77. data/spec/lib/sketchily/sketchily.rb~ +15 -0
  78. data/spec/lib/sketchily/sketchily_spec.rb +27 -0
  79. data/spec/lib/sketchily/sketchily_spec.rb~ +28 -0
  80. data/spec/lib/sketchily/sketchily_tag.rb~ +20 -0
  81. data/spec/lib/sketchily/sketchily_tag_spec.rb +19 -0
  82. data/spec/lib/sketchily/sketchily_tag_spec.rb~ +20 -0
  83. data/spec/lib/sketchily_spec.rb +11 -0
  84. data/spec/lib/sketchily_spec.rb~ +9 -0
  85. data/spec/test_helper.rb +24 -0
  86. data/spec/test_helper.rb~ +25 -0
  87. data/vendor/assets/svg-edit-2.6/svgcanvas.js +2 -2
  88. data/vendor/assets/svg-edit-2.6/svgcanvas.js~ +5 -5
  89. data/vendor/assets/svg-edit-2.6/svgedit.compiled.js +2 -2
  90. data/vendor/assets/svg-edit-2.6/svgedit.compiled.js~ +2 -2
  91. metadata +113 -46
  92. data/spec/dummy/README.rdoc +0 -261
  93. data/spec/dummy/app/controllers/sketchily_controller.rb +0 -9
  94. data/spec/dummy/app/views/sketchily/sketchily_tag.html.erb +0 -3
  95. data/spec/minitest_helper.rb +0 -12
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 494ccf1bb3cc7f73e15b97ffe5abac1f58f36187
4
+ data.tar.gz: 7f5d9080442bb38447c9277111fd3cb4454fd3bc
5
+ SHA512:
6
+ metadata.gz: c8fe19a98e0b3752a01475557f5ea091db010e7aca516aedec4e832af46b80670ba54e36ff4d19d3c06cc4abcfa3d33f774b5044948447481593cbb258cf3004
7
+ data.tar.gz: 5687890cced694174de97afe510fa0e5913ea71da2caa70d976c01e0be0fd5ac6636ac31159a870fbb69b7f6e4672a1981be0a67e71feba5f1c5354c5b2c57c1
data/README.md CHANGED
@@ -18,7 +18,7 @@ And then execute:
18
18
  $ bundle
19
19
  ```
20
20
 
21
- Or install it yourself as:
21
+ Or install it yourself:
22
22
 
23
23
  ```sh
24
24
  $ gem install sketchily
@@ -80,6 +80,8 @@ Currently available options are:
80
80
  - `value` override the default value (the svg itself; can be useful when using form_for)
81
81
  - `index` override the default index (affects the tag name; can be useful when using form_for)
82
82
 
83
+ - `extensions` editor plugins (e.g. 'plugin.js' will load '/assets/extensions/plugin.js')
84
+
83
85
  - other standard html attributes for the input tag
84
86
 
85
87
  The `hyperlink tool` is disabled by default, as embedded links and scripts do not work with the display method used by sketchily_show.
data/Rakefile CHANGED
@@ -4,38 +4,20 @@ begin
4
4
  rescue LoadError
5
5
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
6
  end
7
- begin
8
- require 'rdoc/task'
9
- rescue LoadError
10
- require 'rdoc/rdoc'
11
- require 'rake/rdoctask'
12
- RDoc::Task = Rake::RDocTask
13
- end
14
-
15
- RDoc::Task.new(:rdoc) do |rdoc|
16
- rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'Sketchily'
18
- rdoc.options << '--line-numbers'
19
- rdoc.rdoc_files.include('README.md')
20
- rdoc.rdoc_files.include('lib/**/*.rb')
21
- end
22
7
 
23
8
  APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
24
9
  load 'rails/tasks/engine.rake'
25
10
 
26
-
27
-
28
11
  Bundler::GemHelper.install_tasks
29
12
 
30
13
  require 'rake/testtask'
31
14
 
32
- Rake::TestTask.new(:test) do |t|
33
- Rake::Task['app:db:test:prepare'].invoke
15
+ Rake::TestTask.new(:test => 'app:db:test:prepare') do |t|
34
16
  t.libs << 'lib'
35
17
  t.libs << 'spec'
36
18
  t.pattern = 'spec/**/*_spec.rb'
37
19
  t.verbose = false
38
20
  end
39
21
 
40
-
41
22
  task :default => :test
23
+
@@ -16,6 +16,7 @@
16
16
  show_hyperlink_tool ||= false
17
17
  show_layers ||= false
18
18
  url ||= nil
19
+ extensions ||= nil
19
20
  %>
20
21
 
21
22
  <% iframe_src = URI.parse("/assets/svg-editor.html")
@@ -28,6 +29,7 @@
28
29
  :showlayers => show_layers}
29
30
  query_hash[:url] = url if url
30
31
  query_hash[:source] = nil unless url
32
+ query_hash[:extensions] = extensions if extensions
31
33
 
32
34
  iframe_src.query = query_hash.map{|k,v| "#{k}=#{v}"}.join('&') %>
33
35
 
@@ -49,4 +51,3 @@
49
51
  <%= show_hyperlink_tool %>,
50
52
  "<%= url %>");
51
53
  </script>
52
-
@@ -16,6 +16,7 @@
16
16
  show_hyperlink_tool ||= false
17
17
  show_layers ||= false
18
18
  url ||= nil
19
+ extensions ||= nil
19
20
  %>
20
21
 
21
22
  <% iframe_src = URI.parse("/assets/svg-editor.html")
@@ -28,6 +29,7 @@
28
29
  :showlayers => show_layers}
29
30
  query_hash[:url] = url if url
30
31
  query_hash[:source] = nil unless url
32
+ query_hash[:extensions] = extensions if extensions
31
33
 
32
34
  iframe_src.query = query_hash.map{|k,v| "#{k}=#{v}"}.join('&') %>
33
35
 
@@ -47,6 +49,6 @@
47
49
  <%= hide_menu %>,
48
50
  <%= hide_image_tool %>,
49
51
  <%= show_hyperlink_tool %>,
50
- <%= url %>);
52
+ "<%= url %>");
51
53
  </script>
52
54
 
@@ -4,13 +4,16 @@
4
4
  # method
5
5
  # options %>
6
6
 
7
- <% sketchily_tag = ActionView::Helpers::InstanceTag.new(object_name, method, template, options.delete(:object))
7
+ <% sketchily_tag = Rails::VERSION::MAJOR >= 4 ?
8
+ ActionView::Helpers::Tags::HiddenField.new(object_name, method, template, options.except(*Sketchily::SKETCHILY_OPTIONS)) :
9
+ ActionView::Helpers::InstanceTag.new(object_name, method, template, options.delete(:object))
10
+
8
11
  options = {:id => sketchily_tag.send(:tag_id),
9
- :value => sketchily_tag.value(sketchily_tag.object)}.merge(options) %>
12
+ :value => sketchily_tag.send(:value, sketchily_tag.object)}.merge(options) %>
10
13
 
11
14
  <%= render :partial => "sketchily/embed",
12
15
  :formats => :html,
13
16
  :locals => options.slice(*Sketchily::OPTIONS) %>
14
17
 
15
- <%= sketchily_tag.to_input_field_tag("hidden", options.except(*Sketchily::SKETCHILY_OPTIONS)) %>
16
-
18
+ <%= Rails::VERSION::MAJOR >= 4 ? sketchily_tag.render :
19
+ sketchily_tag.to_input_field_tag("hidden", options.except(*Sketchily::SKETCHILY_OPTIONS)) %>
@@ -4,14 +4,18 @@
4
4
  # method
5
5
  # options %>
6
6
 
7
- <% sketchily_tag = ActionView::Helpers::InstanceTag.new(object_name, method, template, options.delete(:object))
7
+ <% sketchily_tag = Rails::VERSION::MAJOR >= 4 ?
8
+ ActionView::Helpers::Tags::HiddenField.new(object_name, method, template,
9
+ options.except(*Sketchily::SKETCHILY_OPTIONS)).render :
10
+ ActionView::Helpers::InstanceTag.new(object_name, method, template, options.delete(:object))
11
+ .to_input_field_tag("hidden", options.except(*Sketchily::SKETCHILY_OPTIONS))
12
+
8
13
  options = {:id => sketchily_tag.send(:tag_id),
9
- :value => sketchily_tag.value(sketchily_tag.object)}.merge(
10
- options) %>
14
+ :value => sketchily_tag.send(:value, sketchily_tag.object)}.merge(options) %>
11
15
 
12
16
  <%= render :partial => "sketchily/embed",
13
17
  :formats => :html,
14
18
  :locals => options.slice(*Sketchily::OPTIONS) %>
15
19
 
16
- <%= sketchily_tag.to_input_field_tag("hidden", options.except(*Sketchily::SKETCHILY_OPTIONS)) %>
17
-
20
+ <%= Rails::VERSION::MAJOR >= 4 ? sketchily_tag.render :
21
+ sketchily_tag.to_input_field_tag("hidden", options.except(*Sketchily::SKETCHILY_OPTIONS)) %>
@@ -12,4 +12,3 @@
12
12
  :locals => options.slice(*Sketchily::OPTIONS) %>
13
13
 
14
14
  <%= tag :input, {"type" => "hidden", "name" => name}.update(options.except(*Sketchily::SKETCHILY_OPTIONS).stringify_keys) %>
15
-
@@ -5,12 +5,11 @@
5
5
  # options %>
6
6
 
7
7
  <% options = {:id => id,
8
- :value => value}.merge(
9
- options.slice(*Sketchily::OPTIONS)) %>
8
+ :value => value}.merge(options) %>
10
9
 
11
10
  <%= render :partial => "sketchily/embed",
12
11
  :formats => :html,
13
- :locals => options %>
12
+ :locals => options.slice(*Sketchily::OPTIONS) %>
14
13
 
15
14
  <%= tag :input, {"type" => "hidden", "name" => name}.update(options.except(*Sketchily::SKETCHILY_OPTIONS).stringify_keys) %>
16
15
 
@@ -5,12 +5,12 @@ require "sketchily/sketchily_tag"
5
5
  module Sketchily
6
6
  ASSET_FILES = %w(sketchily.css sketchily.js sketchily_embed.js canvg/canvg.js canvg/rgbcolor.js extensions/ext-*.js locale/lang.*.js)
7
7
 
8
- SKETCHILY_OPTIONS = [:width, :height, :bkgd_color, :bkgd_url, :canvas_width, :canvas_height, :canvas_expansion, :hide_rulers, :hide_menu, :hide_image_tool, :show_hyperlink_tool, :show_layers, :url]
8
+ SKETCHILY_OPTIONS = [:width, :height, :bkgd_color, :bkgd_url, :canvas_width, :canvas_height, :canvas_expansion, :hide_rulers, :hide_menu, :hide_image_tool, :show_hyperlink_tool, :show_layers, :url, :extensions]
9
9
  TAG_OPTIONS = [:id, :value, :index]
10
10
  OPTIONS = SKETCHILY_OPTIONS + TAG_OPTIONS
11
11
 
12
12
  ActiveSupport.on_load(:before_initialize) do
13
- Rails.configuration.assets.precompile += Sketchily::ASSET_FILES
13
+ Rails.configuration.assets.precompile += ASSET_FILES
14
14
  end
15
15
  end
16
16
 
@@ -5,12 +5,12 @@ require "sketchily/sketchily_tag"
5
5
  module Sketchily
6
6
  ASSET_FILES = %w(sketchily.css sketchily.js sketchily_embed.js canvg/canvg.js canvg/rgbcolor.js extensions/ext-*.js locale/lang.*.js)
7
7
 
8
- SKETCHILY_OPTIONS = [:width, :height, :bkgd_color, :bkgd_url, :canvas_width, :canvas_height, :canvas_expansion, :hide_rulers, :hide_menu, :show_hyperlink_tool, :hide_image_tool, :show_layers, :url]
8
+ SKETCHILY_OPTIONS = [:width, :height, :bkgd_color, :bkgd_url, :canvas_width, :canvas_height, :canvas_expansion, :hide_rulers, :hide_menu, :hide_image_tool, :show_hyperlink_tool, :show_layers, :url, ]
9
9
  TAG_OPTIONS = [:id, :value, :index]
10
10
  OPTIONS = SKETCHILY_OPTIONS + TAG_OPTIONS
11
11
 
12
12
  ActiveSupport.on_load(:before_initialize) do
13
- Rails.configuration.assets.precompile += Sketchily::ASSET_FILES
13
+ Rails.configuration.assets.precompile += ASSET_FILES
14
14
  end
15
15
  end
16
16
 
@@ -12,9 +12,7 @@ module Sketchily
12
12
  )
13
13
  end
14
14
 
15
- def svg_edit(method, options = {})
16
- sketchily(method, options)
17
- end
15
+ alias_method :svg_edit, :sketchily
18
16
  end
19
17
 
20
18
  module ActionViewBaseInstanceMethods
@@ -30,9 +28,7 @@ module Sketchily
30
28
  )
31
29
  end
32
30
 
33
- def svg_edit(object_name, method, options = {})
34
- sketchily(object_name, method, options)
35
- end
31
+ alias_method :svg_edit, :sketchily
36
32
  end
37
33
  end
38
34
 
@@ -1,7 +1,6 @@
1
1
  module Sketchily
2
2
  module FormBuilderInstanceMethods
3
3
  def sketchily(method, options = {})
4
- @template ||= self
5
4
  @template.render(
6
5
  :partial => "sketchily/sketchily",
7
6
  :locals => {
@@ -13,9 +12,7 @@ module Sketchily
13
12
  )
14
13
  end
15
14
 
16
- def svg_edit(method, options = {})
17
- sketchily(method, options)
18
- end
15
+ alias_method :svg_edit, :sketchily
19
16
  end
20
17
 
21
18
  module ActionViewBaseInstanceMethods
@@ -12,9 +12,7 @@ module SketchilyTag
12
12
  )
13
13
  end
14
14
 
15
- def svg_edit_tag(name, value = nil, options = {})
16
- sketchily_tag(name, value, options)
17
- end
15
+ alias_method :svg_edit_tag, :sketchily_tag
18
16
  end
19
17
  end
20
18
 
@@ -4,7 +4,6 @@ module SketchilyTag
4
4
  self.render(
5
5
  :partial => "sketchily/sketchily_tag",
6
6
  :locals => {
7
- :template => self,
8
7
  :name => name,
9
8
  :id => sanitize_to_id(name),
10
9
  :value => value,
@@ -1,3 +1,3 @@
1
1
  module Sketchily
2
- VERSION = "1.5.0"
2
+ VERSION = "4.0.0"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Sketchily
2
- VERSION = "1.4.1"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+
3
+ describe SketchilyHelper do
4
+ it 'must show svg image' do
5
+ uri = 'test'
6
+ sketchily_show(uri).must_equal "<img src='data:image/svg+xml;base64,#{uri}' />"
7
+ end
8
+ end
@@ -0,0 +1,12 @@
1
+ require 'test_helper'
2
+
3
+ describe SketchilyHelper do
4
+ before do
5
+ @uri = 'test'
6
+ end
7
+
8
+ it 'must show svg image' do
9
+ uri = 'test'
10
+ sketchily_show(uri).must_equal "<img src='data:image/svg+xml;base64,#{uri}' />"
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ ## Dummy
2
+
3
+ A dummy application used to test the Sketchily engine.
@@ -0,0 +1,3 @@
1
+ ## Dummy
2
+
3
+ A dummy application used to test the sketchily engine.
@@ -0,0 +1,18 @@
1
+ class DrawingsController < ApplicationController
2
+ before_filter :get_drawing
3
+
4
+ def show
5
+ end
6
+
7
+ def sketchily
8
+ end
9
+
10
+ def sketchily_tag
11
+ end
12
+
13
+ protected
14
+
15
+ def get_drawing
16
+ @drawing = Drawing.find(params[:id])
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ class DrawingsController < ApplicationController
2
+ def show
3
+ end
4
+
5
+ def sketchily
6
+ end
7
+
8
+ def sketchily_tag
9
+ end
10
+
11
+ protected
12
+
13
+ def get_drawing
14
+ @drawing = Drawing.find(params[:id])
15
+ end
16
+ end
@@ -0,0 +1,3 @@
1
+ <%= form_tag drawing_path(@drawing) do %>
2
+ <%= sketchily_tag 'drawing' %>
3
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <%= form_tag drawing_path(@drawing), :method => :patch do %>
2
+ <%= sketchily_tag 'drawing' %>
3
+ <% end %>
@@ -2,7 +2,7 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
- Bundler.require
5
+ Bundler.require(*Rails.groups)
6
6
  require "sketchily"
7
7
 
8
8
  module Dummy
@@ -11,16 +11,6 @@ module Dummy
11
11
  # Application configuration should go into files in config/initializers
12
12
  # -- all .rb files in that directory are automatically loaded.
13
13
 
14
- # Custom directories with classes and modules you want to be autoloadable.
15
- # config.autoload_paths += %W(#{config.root}/extras)
16
-
17
- # Only load the plugins named here, in the order given (default is alphabetical).
18
- # :all can be used as a placeholder for all plugins not explicitly named.
19
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
-
21
- # Activate observers that should always be running.
22
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
-
24
14
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
15
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
16
  # config.time_zone = 'Central Time (US & Canada)'
@@ -29,31 +19,9 @@ module Dummy
29
19
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
20
  # config.i18n.default_locale = :de
31
21
 
32
- # Configure the default encoding used in templates for Ruby 1.9.
33
- config.encoding = "utf-8"
34
-
35
- # Configure sensitive parameters which will be filtered from the log file.
36
- config.filter_parameters += [:password]
37
-
38
- # Enable escaping HTML in JSON.
39
- config.active_support.escape_html_entities_in_json = true
40
-
41
- # Use SQL instead of Active Record's schema dumper when creating the database.
42
- # This is necessary if your schema can't be completely dumped by the schema dumper,
43
- # like if you have constraints or database-specific column types
44
- # config.active_record.schema_format = :sql
45
-
46
- # Enforce whitelist mode for mass assignment.
47
- # This will create an empty whitelist of attributes available for mass-assignment for all models
48
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
- # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = true
51
-
52
- # Enable the asset pipeline
53
- config.assets.enabled = true
54
-
55
- # Version of your assets, change this if you want to expire all your assets
56
- config.assets.version = '1.0'
22
+ config.generators do |g|
23
+ g.test_framework :mini_test, :spec => true, :fixture => false
24
+ end
57
25
  end
58
26
  end
59
27
 
@@ -0,0 +1,27 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "commontator"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
+ # config.i18n.default_locale = :de
21
+
22
+ config.generators do |g|
23
+ g.test_framework :mini_test, :spec => true, :fixture => false
24
+ end
25
+ end
26
+ end
27
+