mediaelement_rails 0.2

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.
Files changed (70) hide show
  1. data/.gitignore +8 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +97 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.md +29 -0
  6. data/Rakefile +39 -0
  7. data/app/assets/flash/mediaelement_rails/flashmediaelement.swf +0 -0
  8. data/app/assets/images/mediaelement_rails/background.png +0 -0
  9. data/app/assets/images/mediaelement_rails/bigplay.png +0 -0
  10. data/app/assets/images/mediaelement_rails/controls-ted.png +0 -0
  11. data/app/assets/images/mediaelement_rails/controls-wmp-bg.png +0 -0
  12. data/app/assets/images/mediaelement_rails/controls-wmp.png +0 -0
  13. data/app/assets/images/mediaelement_rails/controls.png +0 -0
  14. data/app/assets/images/mediaelement_rails/loading.gif +0 -0
  15. data/app/assets/javascripts/mediaelement_rails/index.js +3 -0
  16. data/app/assets/javascripts/mediaelement_rails/mediaelement.js +943 -0
  17. data/app/assets/javascripts/mediaelement_rails/mediaelementplayer.js +1703 -0
  18. data/app/assets/javascripts/mediaelement_rails/rails.js.erb +5 -0
  19. data/app/assets/silverlight/mediaelement_rails/silverlightmediaelement.xap +0 -0
  20. data/app/assets/stylesheets/mediaelement_rails/index.css +1 -0
  21. data/app/assets/stylesheets/mediaelement_rails/mediaelementplayer.css.erb +571 -0
  22. data/app/assets/stylesheets/mediaelement_rails/mejs-skins.css.erb +283 -0
  23. data/app/controllers/mediaelement_rails/application_controller.rb +4 -0
  24. data/app/helpers/mediaelement_rails/application_helper.rb +4 -0
  25. data/app/views/layouts/application.html.erb +14 -0
  26. data/app/views/layouts/mediaelement_rails/application.html.erb +14 -0
  27. data/config/routes.rb +2 -0
  28. data/lib/generators/mediaelement_update/USAGE +7 -0
  29. data/lib/generators/mediaelement_update/mediaelement_update_generator.rb +46 -0
  30. data/lib/mediaelement_rails/engine.rb +5 -0
  31. data/lib/mediaelement_rails/version.rb +3 -0
  32. data/lib/mediaelement_rails.rb +4 -0
  33. data/lib/tasks/mediaelement_rails_tasks.rake +4 -0
  34. data/mediaelement_rails.gemspec +20 -0
  35. data/script/rails +6 -0
  36. data/test/dummy/Rakefile +7 -0
  37. data/test/dummy/app/assets/javascripts/application.js +9 -0
  38. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  39. data/test/dummy/app/controllers/application_controller.rb +3 -0
  40. data/test/dummy/app/helpers/application_helper.rb +2 -0
  41. data/test/dummy/app/mailers/.gitkeep +0 -0
  42. data/test/dummy/app/models/.gitkeep +0 -0
  43. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  44. data/test/dummy/config/application.rb +45 -0
  45. data/test/dummy/config/boot.rb +10 -0
  46. data/test/dummy/config/database.yml +25 -0
  47. data/test/dummy/config/environment.rb +5 -0
  48. data/test/dummy/config/environments/development.rb +24 -0
  49. data/test/dummy/config/environments/production.rb +51 -0
  50. data/test/dummy/config/environments/test.rb +34 -0
  51. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  52. data/test/dummy/config/initializers/inflections.rb +10 -0
  53. data/test/dummy/config/initializers/mime_types.rb +5 -0
  54. data/test/dummy/config/initializers/secret_token.rb +7 -0
  55. data/test/dummy/config/initializers/session_store.rb +8 -0
  56. data/test/dummy/config/initializers/wrap_parameters.rb +12 -0
  57. data/test/dummy/config/locales/en.yml +5 -0
  58. data/test/dummy/config/routes.rb +4 -0
  59. data/test/dummy/config.ru +4 -0
  60. data/test/dummy/lib/assets/.gitkeep +0 -0
  61. data/test/dummy/log/.gitkeep +0 -0
  62. data/test/dummy/public/404.html +26 -0
  63. data/test/dummy/public/422.html +26 -0
  64. data/test/dummy/public/500.html +26 -0
  65. data/test/dummy/public/favicon.ico +0 -0
  66. data/test/dummy/script/rails +6 -0
  67. data/test/integration/navigation_test.rb +10 -0
  68. data/test/mediaelement_rails_test.rb +7 -0
  69. data/test/test_helper.rb +10 -0
  70. metadata +170 -0
@@ -0,0 +1,283 @@
1
+ /* TED player */
2
+ .mejs-container.mejs-ted {
3
+
4
+ }
5
+ .mejs-ted .mejs-controls {
6
+ background: #eee;
7
+ height: 65px;
8
+ }
9
+
10
+ .mejs-ted .mejs-button,
11
+ .mejs-ted .mejs-time {
12
+ position: absolute;
13
+ background: #ddd;
14
+ }
15
+ .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-total {
16
+ background-color: none;
17
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) repeat-x 0 -52px;
18
+ height: 6px;
19
+ }
20
+ .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-loaded {
21
+ background-color: none;
22
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) repeat-x 0 -52px;
23
+ width: 0;
24
+ height: 6px;
25
+ }
26
+ .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-current {
27
+ width: 0;
28
+ height: 6px;
29
+ background-color: none;
30
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) repeat-x 0 -59px;
31
+ }
32
+ .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-handle {
33
+ display: block;
34
+ margin: 0;
35
+ width: 14px;
36
+ height: 21px;
37
+ top: -7px;
38
+ border: 0;
39
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) no-repeat 0 0;
40
+ }
41
+ .mejs-ted .mejs-controls .mejs-time-rail .mejs-time-float {
42
+ display: none;
43
+ }
44
+ .mejs-ted .mejs-controls .mejs-playpause-button {
45
+ top: 29px;
46
+ left: 9px;
47
+ width: 49px;
48
+ height: 28px;
49
+ }
50
+ .mejs-ted .mejs-controls .mejs-playpause-button button {
51
+ width: 49px;
52
+ height: 28px;
53
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) no-repeat -50px -23px;
54
+ margin: 0;
55
+ padding: 0;
56
+ }
57
+ .mejs-ted .mejs-controls .mejs-pause button {
58
+ background-position: 0 -23px;
59
+ }
60
+
61
+ .mejs-ted .mejs-controls .mejs-fullscreen-button {
62
+ top: 34px;
63
+ right: 9px;
64
+ width: 17px;
65
+ height: 15px;
66
+ background : none;
67
+ }
68
+ .mejs-ted .mejs-controls .mejs-fullscreen-button button {
69
+ width: 19px;
70
+ height: 17px;
71
+ background: transparent url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) no-repeat 0 -66px;
72
+ margin: 0;
73
+ padding: 0;
74
+ }
75
+ .mejs-ted .mejs-controls .mejs-unfullscreen button {
76
+ background: transparent url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) no-repeat -21px -66px;
77
+ margin: 0;
78
+ padding: 0;
79
+ }
80
+ .mejs-ted .mejs-controls .mejs-volume-button {
81
+ top: 30px;
82
+ right: 35px;
83
+ width: 24px;
84
+ height: 22px;
85
+ }
86
+ .mejs-ted .mejs-controls .mejs-mute button {
87
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) no-repeat -15px 0;
88
+ width: 24px;
89
+ height: 22px;
90
+ margin: 0;
91
+ padding: 0;
92
+ }
93
+ .mejs-ted .mejs-controls .mejs-unmute button {
94
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) no-repeat -40px 0;
95
+ width: 24px;
96
+ height: 22px;
97
+ margin: 0;
98
+ padding: 0;
99
+ }
100
+ .mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-slider {
101
+ background: #fff;
102
+ border: solid 1px #aaa;
103
+ border-width: 1px 1px 0 1px;
104
+ width: 22px;
105
+ height: 65px;
106
+ top: -65px;
107
+ }
108
+ .mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-total {
109
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) repeat-y -41px -66px;
110
+ left: 8px;
111
+ width: 6px;
112
+ height: 50px;
113
+ }
114
+ .mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-current {
115
+ left: 8px;
116
+ width: 6px;
117
+ background: url(<%= asset_path('mediaelement_rails/controls-ted.png') %>) repeat-y -48px -66px;
118
+ height: 50px;
119
+ }
120
+
121
+ .mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-handle {
122
+ display: none;
123
+ }
124
+
125
+ .mejs-ted .mejs-controls .mejs-time span {
126
+ color: #333;
127
+ }
128
+ .mejs-ted .mejs-controls .mejs-currenttime-container {
129
+ position: absolute;
130
+ top: 32px;
131
+ right: 100px;
132
+ border: solid 1px #999;
133
+ background: #fff;
134
+ color: #333;
135
+ padding-top: 2px;
136
+ border-radius: 3px;
137
+ color: #333;
138
+ }
139
+ .mejs-ted .mejs-controls .mejs-duration-container {
140
+
141
+ position: absolute;
142
+ top: 32px;
143
+ right: 65px;
144
+ border: solid 1px #999;
145
+ background: #fff;
146
+ color: #333;
147
+ padding-top: 2px;
148
+ border-radius: 3px;
149
+ color: #333;
150
+ }
151
+
152
+ .mejs-ted .mejs-controls .mejs-time button{
153
+ color: #333;
154
+ }
155
+ .mejs-ted .mejs-controls .mejs-captions-button {
156
+ display: none;
157
+ }
158
+ /* END: TED player */
159
+
160
+
161
+ /* WMP player */
162
+ .mejs-container.mejs-wmp {
163
+
164
+ }
165
+ .mejs-wmp .mejs-controls {
166
+ background: transparent url(<%= asset_path('mediaelement_rails/controls-wmp-bg.png') %>) center 16px no-repeat;
167
+ height: 65px;
168
+ }
169
+
170
+ .mejs-wmp .mejs-button,
171
+ .mejs-wmp .mejs-time {
172
+ position: absolute;
173
+ background: transparent;
174
+ }
175
+ .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-total {
176
+ background-color: transparent;
177
+ border: solid 1px #ccc;
178
+ height: 3px;
179
+ }
180
+ .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-loaded {
181
+ background-color: rgba(255,255,255,0.3);
182
+ width: 0;
183
+ height: 3px;
184
+ }
185
+ .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-current {
186
+ width: 0;
187
+ height: 1px;
188
+ background-color: #014CB6;
189
+ border: solid 1px #7FC9FA;
190
+ border-width: 1px 0;
191
+ border-color: #7FC9FA #fff #619FF2 #fff;
192
+ }
193
+ .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-handle {
194
+ display: block;
195
+ margin: 0;
196
+ width: 16px;
197
+ height: 9px;
198
+ top: -3px;
199
+ border: 0;
200
+ background: url(<%= asset_path('mediaelement_rails/controls-wmp.png') %>) no-repeat 0 -80px;
201
+ }
202
+ .mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-float {
203
+ display: none;
204
+ }
205
+ .mejs-wmp .mejs-controls .mejs-playpause-button {
206
+ top: 10px;
207
+ left: 50%;
208
+ margin: 10px 0 0 -20px;
209
+ width: 40px;
210
+ height: 40px;
211
+
212
+ }
213
+ .mejs-wmp .mejs-controls .mejs-playpause-button button {
214
+ width: 40px;
215
+ height: 40px;
216
+ background: url(<%= asset_path('mediaelement_rails/controls-wmp.png') %>) no-repeat 0 0;
217
+ margin: 0;
218
+ padding: 0;
219
+ }
220
+ .mejs-wmp .mejs-controls .mejs-pause button {
221
+ background-position: 0 -40px;
222
+ }
223
+
224
+ .mejs-wmp .mejs-controls .mejs-currenttime-container {
225
+ position: absolute;
226
+ top: 25px;
227
+ left: 50%;
228
+ margin-left: -93px;
229
+ }
230
+ .mejs-wmp .mejs-controls .mejs-duration-container {
231
+ position: absolute;
232
+ top: 25px;
233
+ left: 50%;
234
+ margin-left: -58px;
235
+ }
236
+
237
+
238
+ .mejs-wmp .mejs-controls .mejs-volume-button {
239
+ top: 32px;
240
+ right: 50%;
241
+ margin-right: -55px;
242
+ width: 20px;
243
+ height: 15px;
244
+ }
245
+ .mejs-wmp .mejs-controls .mejs-volume-button button {
246
+ margin: 0;
247
+ padding: 0;
248
+ background: url(<%= asset_path('mediaelement_rails/controls-wmp.png') %>) no-repeat -42px -17px;
249
+ width: 20px;
250
+ height: 15px;
251
+ }
252
+ .mejs-wmp .mejs-controls .mejs-unmute button {
253
+ margin: 0;
254
+ padding: 0;
255
+ background: url(<%= asset_path('mediaelement_rails/controls-wmp.png') %>) no-repeat -42px 0;
256
+ width: 20px;
257
+ height: 15px;
258
+ }
259
+ .mejs-wmp .mejs-controls .mejs-volume-button .mejs-volume-slider {
260
+ background: rgba(102,102,102,0.6);
261
+ }
262
+
263
+ .mejs-wmp .mejs-controls .mejs-fullscreen-button {
264
+ top: 32px;
265
+ right: 50%;
266
+ margin-right: -82px;
267
+ width: 15px;
268
+ height: 14px;
269
+ }
270
+ .mejs-wmp .mejs-controls .mejs-fullscreen-button button {
271
+ margin: 0;
272
+ padding: 0;
273
+ background: url(<%= asset_path('mediaelement_rails/controls-wmp.png') %>) no-repeat -63px 0;
274
+ width: 15px;
275
+ height: 14px;
276
+ }
277
+ .mejs-wmp .mejs-controls .mejs-captions-button {
278
+ display: none;
279
+ }
280
+ /* END: WMP player */
281
+
282
+
283
+
@@ -0,0 +1,4 @@
1
+ module MediaelementRails
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module MediaelementRails
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>MediaelementRails</title>
5
+ <%= stylesheet_link_tag "mediaelement_rails/application" %>
6
+ <%= javascript_include_tag "mediaelement_rails/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>MediaelementRails</title>
5
+ <%= stylesheet_link_tag "mediaelement_rails/application" %>
6
+ <%= javascript_include_tag "mediaelement_rails/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ MediaelementRails::Engine.routes.draw do
2
+ end
@@ -0,0 +1,7 @@
1
+ Description:
2
+ Explain the generator
3
+
4
+ Example:
5
+ rails generate mediaelement_update
6
+
7
+ This will create all assets from mediaelementc
@@ -0,0 +1,46 @@
1
+ # encoding: utf-8
2
+
3
+ class MediaelementUpdateGenerator < Rails::Generators::NamedBase
4
+ source_root File.expand_path('../templates', __FILE__)
5
+
6
+ def update_mediaelement
7
+ # clone git repository
8
+ git :clone => "https://github.com/johndyer/mediaelement.git #{self.class.source_root}/mediaelement"
9
+
10
+ # copy all template files
11
+ build_path = File.join(self.class.source_root, "mediaelement", "build")
12
+ {
13
+ '*.png' => { :path => 'images' },
14
+ '*.gif' => { :path => 'images' },
15
+ 'mediaelementplayer.css' => { :path => 'stylesheets', :extension => '.css.erb' },
16
+ 'mejs-skins.css' => { :path => 'stylesheets', :extension => '.css.erb' },
17
+ '*.swf' => { :path => 'flash' },
18
+ '*.xap' => { :path => 'silverlight' },
19
+ 'mediaelement.js' => { :path => 'javascripts' },
20
+ 'mediaelementplayer.js' => { :path => 'javascripts' }
21
+ }.each do |matcher, options|
22
+ Dir[ File.join(build_path, matcher) ].each do |file|
23
+ old_extension = File.extname(file)
24
+ basename = File.basename(file, old_extension)
25
+ extension = options.key?(:extension) ? options[:extension] : old_extension
26
+ new_name = File.join("app","assets", options[:path], "mediaelement_rails", "#{basename}#{extension}")
27
+ old_name = File.join("mediaelement", "build", "#{basename}#{old_extension}")
28
+ copy_file old_name, new_name
29
+ end
30
+ end
31
+
32
+ asset_base_path = File.join(Rails.root, 'app', 'assets', '*', 'mediaelement_rails')
33
+ {
34
+ '*.css.erb' => Proc.new{ |fp| fp.read.gsub(/([^(]+\.(png|gif))/m, "<%= asset_path('mediaelement_rails/\\1') %>") },
35
+ '*.js' => Proc.new{ |fp| fp.read.gsub(//, '') }
36
+ }.each do |matcher, proc|
37
+ Dir[ File.join(asset_base_path, matcher) ].each do |file|
38
+ File.open(file, "r+") do |fp|
39
+ new_content = proc.call(fp)
40
+ fp.rewind
41
+ fp.write(new_content)
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,5 @@
1
+ module MediaelementRails
2
+ class Engine < Rails::Engine
3
+ isolate_namespace MediaelementRails
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module MediaelementRails
2
+ VERSION = '0.2'
3
+ end
@@ -0,0 +1,4 @@
1
+ require "mediaelement_rails/engine"
2
+
3
+ module MediaelementRails
4
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :mediaelement_rails do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "mediaelement_rails/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "mediaelement_rails"
7
+ s.version = MediaelementRails::VERSION
8
+ s.authors = ["Tobias Schlottke"]
9
+ s.email = ["tobias.schlottke@gmail.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{MediaElement.js for rails}
12
+ s.description = %q{a MediaElement gem(engine) for rails. Makes embedding HTML5 video easy}
13
+
14
+ s.add_development_dependency 'rails', '>=3.1.rc.5'
15
+ s.add_development_dependency 'jquery-rails'
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+ end
data/script/rails ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ #!/usr/bin/env ruby
3
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
4
+
5
+ ENGINE_PATH = File.expand_path('../..', __FILE__)
6
+ load File.expand_path('../../test/dummy/script/rails', __FILE__)
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ Dummy::Application.load_tasks
@@ -0,0 +1,9 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,45 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'active_support/railtie'
4
+ require 'action_controller/railtie'
5
+ require 'rails/test_unit/railtie'
6
+ require 'sprockets/railtie'
7
+
8
+ Bundler.require
9
+ require "mediaelement_rails"
10
+
11
+ module Dummy
12
+ class Application < Rails::Application
13
+ # Settings in config/environments/* take precedence over those specified here.
14
+ # Application configuration should go into files in config/initializers
15
+ # -- all .rb files in that directory are automatically loaded.
16
+
17
+ # Custom directories with classes and modules you want to be autoloadable.
18
+ # config.autoload_paths += %W(#{config.root}/extras)
19
+
20
+ # Only load the plugins named here, in the order given (default is alphabetical).
21
+ # :all can be used as a placeholder for all plugins not explicitly named.
22
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
23
+
24
+ # Activate observers that should always be running.
25
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
26
+
27
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
28
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
29
+ # config.time_zone = 'Central Time (US & Canada)'
30
+
31
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
32
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
33
+ # config.i18n.default_locale = :de
34
+
35
+ # Configure the default encoding used in templates for Ruby 1.9.
36
+ config.encoding = "utf-8"
37
+
38
+ # Configure sensitive parameters which will be filtered from the log file.
39
+ config.filter_parameters += [:password]
40
+
41
+ # Enable the asset pipeline
42
+ config.assets.enabled = true
43
+ end
44
+ end
45
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,24 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Print deprecation notices to the Rails logger
17
+ config.active_support.deprecation = :log
18
+
19
+ # Only use best-standards-support built into browsers
20
+ config.action_dispatch.best_standards_support = :builtin
21
+
22
+ # Do not compress assets
23
+ config.assets.compress = false
24
+ end
@@ -0,0 +1,51 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Specifies the header that your server uses for sending files
18
+ # (comment out if your front-end server doesn't support this)
19
+ config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
20
+
21
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
22
+ # config.force_ssl = true
23
+
24
+ # See everything in the log (default is :info)
25
+ # config.log_level = :debug
26
+
27
+ # Use a different logger for distributed setups
28
+ # config.logger = SyslogLogger.new
29
+
30
+ # Use a different cache store in production
31
+ # config.cache_store = :mem_cache_store
32
+
33
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
34
+ # config.action_controller.asset_host = "http://assets.example.com"
35
+
36
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
37
+ # config.assets.precompile += %w( search.js )
38
+
39
+ # Disable delivery errors, bad email addresses will be ignored
40
+ # config.action_mailer.raise_delivery_errors = false
41
+
42
+ # Enable threaded mode
43
+ # config.threadsafe!
44
+
45
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
46
+ # the I18n.default_locale when a translation can not be found)
47
+ config.i18n.fallbacks = true
48
+
49
+ # Send deprecation notices to registered listeners
50
+ config.active_support.deprecation = :notify
51
+ end