rich_cms 2.1.7 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{CHANGELOG → CHANGELOG.rdoc} +24 -0
- data/README.textile +49 -33
- data/Rakefile +92 -10
- data/VERSION +1 -1
- data/app/controllers/rich/cms_controller.rb +10 -39
- data/app/controllers/rich/cms_sessions_controller.rb +31 -0
- data/app/views/rich/cms/dock/_menu.html.erb +10 -8
- data/app/views/rich/cms/dock/_panel.html.erb +1 -1
- data/app/views/rich/cms/dock/panel/edit/_rails2.html.erb +5 -3
- data/app/views/rich/cms/dock/panel/edit/_rails3.html.erb +4 -2
- data/app/views/rich/cms/dock/panel/login/_rails2.html.erb +18 -12
- data/app/views/rich/cms/dock/panel/login/_rails3.html.erb +18 -12
- data/app/views/rich_cms.html.erb +1 -1
- data/assets/jzip/jquery/cleditor.js +1132 -1132
- data/assets/jzip/jquery/extensions/browser_detect.js +1 -2
- data/assets/jzip/native/extensions.js +41 -0
- data/assets/jzip/rich/cms/editor.js +41 -7
- data/assets/jzip/rich_cms.jz +2 -1
- data/assets/sass/rich_cms/_panel.sass +11 -1
- data/config/routes.rb +12 -11
- data/lib/generators/rich/cms_admin/cms_admin_generator.rb +82 -0
- data/lib/generators/rich/{authlogic_user/templates → cms_admin/templates/authlogic}/migration.rb +0 -0
- data/lib/generators/rich/{authlogic_user/templates → cms_admin/templates/authlogic}/model.rb +0 -0
- data/lib/generators/rich/{authlogic_user/templates → cms_admin/templates/authlogic}/session.rb +0 -0
- data/lib/rich/cms/actionpack/action_controller/base.rb +3 -44
- data/lib/rich/cms/actionpack/action_view/base.rb +32 -10
- data/lib/rich/cms/actionpack.rb +1 -2
- data/lib/rich/cms/auth.rb +110 -0
- data/lib/rich/cms/content/group.rb +1 -2
- data/lib/rich/cms/content/item.rb +2 -3
- data/lib/rich/cms/core/string/html_safe.rb +1 -2
- data/lib/rich/cms/core/string.rb +1 -2
- data/lib/rich/cms/engine.rb +23 -51
- data/lib/rich/cms/rails/engine.rb +1 -2
- data/lib/rich/cms/version.rb +11 -0
- data/lib/rich_cms.rb +2 -2
- data/rails_generators/rich_cms_admin/lib/devise/route_devise.rb +32 -0
- data/rails_generators/rich_cms_admin/rich_cms_admin_generator.rb +113 -0
- data/rails_generators/{rich_authlogic_user/templates → rich_cms_admin/templates/authlogic}/migration.rb +0 -0
- data/rails_generators/{rich_authlogic_user/templates → rich_cms_admin/templates/authlogic}/model.rb +0 -0
- data/rails_generators/{rich_authlogic_user/templates → rich_cms_admin/templates/authlogic}/session.rb +0 -0
- data/rails_generators/{rich_authlogic_user → rich_cms_admin}/templates/config.rb +0 -0
- data/rails_generators/rich_cms_admin/templates/devise/README +23 -0
- data/rails_generators/rich_cms_admin/templates/devise/devise.rb +105 -0
- data/rails_generators/rich_cms_admin/templates/devise/en.yml +35 -0
- data/rails_generators/rich_cms_admin/templates/devise/migration.rb +23 -0
- data/rails_generators/rich_cms_admin/templates/devise/model.rb +9 -0
- data/rails_generators/rich_cms_content/rich_cms_content_generator.rb +18 -12
- data/rich_cms.gemspec +295 -105
- data/test/integrator.rb +89 -0
- data/test/rails-2/dummy/.bundle/config +2 -0
- data/test/rails-2/dummy/Gemfile +15 -0
- data/test/rails-2/dummy/Gemfile.lock +97 -0
- data/test/rails-2/dummy/Rakefile +10 -0
- data/test/rails-2/dummy/app/controllers/application_controller.rb +10 -0
- data/test/rails-2/dummy/app/helpers/application_helper.rb +3 -0
- data/test/rails-2/dummy/config/boot.rb +124 -0
- data/test/rails-2/dummy/config/database.yml +23 -0
- data/test/rails-2/dummy/config/environment.rb +41 -0
- data/test/rails-2/dummy/config/environments/development.rb +17 -0
- data/test/rails-2/dummy/config/environments/production.rb +28 -0
- data/test/rails-2/dummy/config/environments/test.rb +28 -0
- data/test/rails-2/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails-2/dummy/config/initializers/cookie_verification_secret.rb +7 -0
- data/test/rails-2/dummy/config/initializers/devise.rb +105 -0
- data/test/rails-2/dummy/config/initializers/enrichments.rb +5 -0
- data/test/rails-2/dummy/config/initializers/inflections.rb +10 -0
- data/test/rails-2/dummy/config/initializers/mime_types.rb +5 -0
- data/test/rails-2/dummy/config/initializers/new_rails_defaults.rb +21 -0
- data/test/rails-2/dummy/config/initializers/session_store.rb +15 -0
- data/test/rails-2/dummy/config/locales/en.yml +5 -0
- data/test/rails-2/dummy/config/preinitializer.rb +20 -0
- data/test/rails-2/dummy/config/routes.rb +44 -0
- data/test/rails-2/dummy/db/schema.rb +49 -0
- data/test/rails-2/dummy/db/seeds.rb +10 -0
- data/test/rails-2/dummy/public/404.html +30 -0
- data/test/rails-2/dummy/public/422.html +30 -0
- data/test/rails-2/dummy/public/500.html +30 -0
- data/test/rails-2/dummy/public/favicon.ico +0 -0
- data/test/rails-2/dummy/public/images/rails.png +0 -0
- data/test/rails-2/dummy/public/images/rich/cms/cleditor/buttons.gif +0 -0
- data/test/rails-2/dummy/public/images/rich/cms/cleditor/toolbar.gif +0 -0
- data/test/rails-2/dummy/public/javascripts/jquery/core.js +158 -0
- data/test/rails-2/dummy/public/javascripts/jquery/ui/rich_cms/core.js +1207 -0
- data/test/rails-2/dummy/public/javascripts/jquery/ui/rich_cms/draggable.js +798 -0
- data/test/rails-2/dummy/public/javascripts/jquery/ui/rich_cms/mouse.js +950 -0
- data/test/rails-2/dummy/public/javascripts/jquery/ui/rich_cms/widget.js +1188 -0
- data/test/rails-2/dummy/public/javascripts/rich_cms.js +1746 -0
- data/test/rails-2/dummy/public/robots.txt +5 -0
- data/test/rails-2/dummy/script/about +4 -0
- data/test/rails-2/dummy/script/console +3 -0
- data/test/rails-2/dummy/script/dbconsole +3 -0
- data/test/rails-2/dummy/script/destroy +3 -0
- data/test/rails-2/dummy/script/generate +3 -0
- data/test/rails-2/dummy/script/performance/benchmarker +3 -0
- data/test/rails-2/dummy/script/performance/profiler +3 -0
- data/test/rails-2/dummy/script/plugin +3 -0
- data/test/rails-2/dummy/script/runner +3 -0
- data/test/rails-2/dummy/script/server +3 -0
- data/test/rails-2/dummy/test/fixtures/authlogic_users.yml +6 -0
- data/test/rails-2/dummy/test/fixtures/devise_users.yml +5 -0
- data/test/rails-2/pending.rb +88 -0
- data/test/rails-2/test_helper.rb +13 -0
- data/test/rails-3/dummy/.bundle/config +2 -0
- data/test/rails-3/dummy/Gemfile +15 -0
- data/test/rails-3/dummy/Gemfile.lock +139 -0
- data/test/rails-3/dummy/Rakefile +7 -0
- data/test/rails-3/dummy/app/controllers/application_controller.rb +3 -0
- data/test/rails-3/dummy/app/helpers/application_helper.rb +2 -0
- data/test/rails-3/dummy/config/application.rb +42 -0
- data/test/rails-3/dummy/config/boot.rb +13 -0
- data/test/rails-3/dummy/config/database.yml +23 -0
- data/test/rails-3/dummy/config/environment.rb +5 -0
- data/test/rails-3/dummy/config/environments/development.rb +26 -0
- data/test/rails-3/dummy/config/environments/production.rb +49 -0
- data/test/rails-3/dummy/config/environments/test.rb +35 -0
- data/test/rails-3/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails-3/dummy/config/initializers/devise.rb +142 -0
- data/test/rails-3/dummy/config/initializers/enrichments.rb +5 -0
- data/test/rails-3/dummy/config/initializers/inflections.rb +10 -0
- data/test/rails-3/dummy/config/initializers/mime_types.rb +5 -0
- data/test/rails-3/dummy/config/initializers/secret_token.rb +7 -0
- data/test/rails-3/dummy/config/initializers/session_store.rb +8 -0
- data/test/rails-3/dummy/config/locales/en.yml +5 -0
- data/test/rails-3/dummy/config/routes.rb +59 -0
- data/test/rails-3/dummy/config.ru +4 -0
- data/test/rails-3/dummy/db/schema.rb +49 -0
- data/test/rails-3/dummy/db/seeds.rb +10 -0
- data/test/rails-3/dummy/public/404.html +26 -0
- data/test/rails-3/dummy/public/422.html +26 -0
- data/test/rails-3/dummy/public/500.html +26 -0
- data/test/rails-3/dummy/public/favicon.ico +0 -0
- data/test/rails-3/dummy/public/images/rich/cms/cleditor/buttons.gif +0 -0
- data/test/rails-3/dummy/public/images/rich/cms/cleditor/toolbar.gif +0 -0
- data/test/rails-3/dummy/public/javascripts/jquery/core.js +158 -0
- data/test/rails-3/dummy/public/javascripts/jquery/ui/rich_cms/core.js +1207 -0
- data/test/rails-3/dummy/public/javascripts/jquery/ui/rich_cms/draggable.js +798 -0
- data/test/rails-3/dummy/public/javascripts/jquery/ui/rich_cms/mouse.js +950 -0
- data/test/rails-3/dummy/public/javascripts/jquery/ui/rich_cms/widget.js +1188 -0
- data/test/rails-3/dummy/public/javascripts/rich_cms.js +1746 -0
- data/test/rails-3/dummy/script/rails +6 -0
- data/test/rails-3/dummy/test/fixtures/authlogic_users.yml +6 -0
- data/test/rails-3/dummy/test/fixtures/devise_users.yml +5 -0
- data/test/rails-3/test_helper.rb +17 -0
- data/test/shared/dummy/db/schema.rb +49 -0
- data/test/shared/dummy/db/seeds.rb +10 -0
- data/test/shared/dummy/fixtures/authlogic_users.yml +6 -0
- data/test/shared/dummy/models/authlogic_user.rb +8 -0
- data/test/shared/dummy/models/authlogic_user_session.rb +10 -0
- data/test/shared/dummy/models/cms_content.rb +2 -0
- data/test/shared/dummy/models/devise_user.rb +3 -0
- data/test/shared/dummy/stylesheets/app.css +100 -0
- data/test/shared/dummy/stylesheets/rich_cms.css +159 -0
- data/test/shared/dummy/views/application/index.html.erb +13 -0
- data/test/shared/dummy/views/layouts/application.html.erb +12 -0
- data/test/shared/support/action_controller/integration.rb +55 -0
- data/test/shared/support/action_controller/test_case.rb +28 -0
- data/test/shared/support/capybara/setup.rb +14 -0
- data/test/shared/support/test_helper.rb +1 -0
- data/test/shared/tests/actionpack/action_controller/base_test.rb +14 -0
- data/test/shared/tests/actionpack/action_view/base_test.rb +19 -0
- data/test/shared/tests/activesupport/active_support/dependencies_test.rb +15 -0
- data/test/shared/tests/app/integration/authenticated/authlogic.rb +88 -0
- data/test/shared/tests/app/integration/authenticated/devise_test.rb +89 -0
- data/test/shared/tests/app/integration/non_authenticated.rb +63 -0
- data/test/shared/tests/app/routing_test.rb +31 -0
- data/test/shared/tests/auth_test.rb +11 -0
- data/test/shared/tests/content/group.rb +10 -0
- data/test/shared/tests/content/item.rb +10 -0
- data/test/shared/tests/core/string/html_safe.rb +15 -0
- data/test/shared/tests/dummy_app.rb +228 -0
- data/test/shared/tests/engine_test.rb +19 -0
- data/test/shared/tests/rails/engine_test.rb +13 -0
- data/test/shared/tests/readme_test.rb +13 -0
- metadata +231 -63
- data/.gitignore +0 -2
- data/lib/generators/rich/authlogic_user/authlogic_user_generator.rb +0 -64
- data/rails_generators/rich_authlogic_user/rich_authlogic_user_generator.rb +0 -64
- data/test/test_helper.rb +0 -6
@@ -0,0 +1,88 @@
|
|
1
|
+
# https://github.com/jm/pending/blob/master/lib/pending.rb
|
2
|
+
|
3
|
+
module Test
|
4
|
+
module Unit
|
5
|
+
class TestCase
|
6
|
+
@@pending_cases = []
|
7
|
+
@@at_exit = false
|
8
|
+
|
9
|
+
# The pending method lets you define a block of test code that is currently "pending"
|
10
|
+
# functionality.
|
11
|
+
#
|
12
|
+
# You can use it two ways. One is simply put a string as the parameter:
|
13
|
+
#
|
14
|
+
# def test_web_service_integration
|
15
|
+
# pending "This is not done yet..."
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# This will output a "P" in the test output alerting there is pending functionality.
|
19
|
+
#
|
20
|
+
# You can also supply a block of code:
|
21
|
+
#
|
22
|
+
# def test_new_helpers
|
23
|
+
# pending "New helpers for database display" do
|
24
|
+
# output = render_record(User.first)
|
25
|
+
# assert_equal "Jerry User (jerry@users.com)", output
|
26
|
+
# end
|
27
|
+
# end
|
28
|
+
#
|
29
|
+
# If the block doesn't fail, then the test will flunk with output like:
|
30
|
+
#
|
31
|
+
# <New helpers for database display> did not fail.
|
32
|
+
#
|
33
|
+
# If the test fails (i.e., the functionality isn't implemented), then it will
|
34
|
+
# not fail the surrounding test.
|
35
|
+
#
|
36
|
+
def pending(description = "", &block)
|
37
|
+
if block_given?
|
38
|
+
failed = false
|
39
|
+
|
40
|
+
begin
|
41
|
+
block.call
|
42
|
+
rescue
|
43
|
+
failed = true
|
44
|
+
end
|
45
|
+
|
46
|
+
flunk("<#{description}> did not fail.") unless failed
|
47
|
+
end
|
48
|
+
|
49
|
+
caller[0] =~ (/(.*):(.*):in `(.*)'/)
|
50
|
+
@@pending_cases << "#{$3} at #{$1}, line #{$2}"
|
51
|
+
print "P"
|
52
|
+
|
53
|
+
@@at_exit ||= begin
|
54
|
+
at_exit do
|
55
|
+
puts "\nPending Cases:"
|
56
|
+
@@pending_cases.each do |test_case|
|
57
|
+
puts test_case
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# This method will define a test method using the description as the test name
|
64
|
+
# ("pending function" => "test_pending_function")
|
65
|
+
#
|
66
|
+
# Instead of doing this:
|
67
|
+
#
|
68
|
+
# def test_function_is_pending
|
69
|
+
# pending "this test is pending"
|
70
|
+
# end
|
71
|
+
#
|
72
|
+
# You can just do this:
|
73
|
+
#
|
74
|
+
# pending "function is pending"
|
75
|
+
#
|
76
|
+
# This method can be called with a block passed, the same as the instance method
|
77
|
+
#
|
78
|
+
def self.pending(description, &block)
|
79
|
+
test_name = "test_#{description.gsub(/\s+/,'_')}".to_sym
|
80
|
+
defined = instance_method(test_name) rescue false
|
81
|
+
raise "#{test_name} is already defined in #{self}" if defined
|
82
|
+
define_method(test_name) do
|
83
|
+
pending(description) {self.instance_eval(&block)}
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
|
3
|
+
`cd #{File.expand_path("../dummy", __FILE__)} && rake db:test:load`
|
4
|
+
|
5
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
6
|
+
require "test_help"
|
7
|
+
|
8
|
+
Dir[File.expand_path("../../shared/support/**/*.rb", __FILE__)].each do |file|
|
9
|
+
require file
|
10
|
+
end
|
11
|
+
require File.expand_path("../pending", __FILE__)
|
12
|
+
|
13
|
+
puts "\nRunning Rails #{Rails::VERSION::STRING}\n\n"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
gem "rails", "3.0.3"
|
4
|
+
gem "jeweler"
|
5
|
+
gem "sqlite3-ruby", :require => "sqlite3"
|
6
|
+
|
7
|
+
gem "authlogic"
|
8
|
+
gem "devise", "~> 1.1.5"
|
9
|
+
gem "rich_cms", :path => File.join(File.dirname(__FILE__), "..", "..", "..")
|
10
|
+
|
11
|
+
gem "mysql2"
|
12
|
+
gem "shoulda"
|
13
|
+
gem "mocha"
|
14
|
+
gem "capybara"
|
15
|
+
gem "launchy"
|
@@ -0,0 +1,139 @@
|
|
1
|
+
PATH
|
2
|
+
remote: /Users/paulengel/Sites/enrichments/vendor/foo/rich_cms
|
3
|
+
specs:
|
4
|
+
rich_cms (3.0.0)
|
5
|
+
haml (~> 3.0.25)
|
6
|
+
jzip (~> 1.0.11)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
abstract (1.0.0)
|
12
|
+
actionmailer (3.0.3)
|
13
|
+
actionpack (= 3.0.3)
|
14
|
+
mail (~> 2.2.9)
|
15
|
+
actionpack (3.0.3)
|
16
|
+
activemodel (= 3.0.3)
|
17
|
+
activesupport (= 3.0.3)
|
18
|
+
builder (~> 2.1.2)
|
19
|
+
erubis (~> 2.6.6)
|
20
|
+
i18n (~> 0.4)
|
21
|
+
rack (~> 1.2.1)
|
22
|
+
rack-mount (~> 0.6.13)
|
23
|
+
rack-test (~> 0.5.6)
|
24
|
+
tzinfo (~> 0.3.23)
|
25
|
+
activemodel (3.0.3)
|
26
|
+
activesupport (= 3.0.3)
|
27
|
+
builder (~> 2.1.2)
|
28
|
+
i18n (~> 0.4)
|
29
|
+
activerecord (3.0.3)
|
30
|
+
activemodel (= 3.0.3)
|
31
|
+
activesupport (= 3.0.3)
|
32
|
+
arel (~> 2.0.2)
|
33
|
+
tzinfo (~> 0.3.23)
|
34
|
+
activeresource (3.0.3)
|
35
|
+
activemodel (= 3.0.3)
|
36
|
+
activesupport (= 3.0.3)
|
37
|
+
activesupport (3.0.3)
|
38
|
+
arel (2.0.7)
|
39
|
+
authlogic (2.1.6)
|
40
|
+
activesupport
|
41
|
+
bcrypt-ruby (2.1.4)
|
42
|
+
builder (2.1.2)
|
43
|
+
capybara (0.4.1.1)
|
44
|
+
celerity (>= 0.7.9)
|
45
|
+
culerity (>= 0.2.4)
|
46
|
+
mime-types (>= 1.16)
|
47
|
+
nokogiri (>= 1.3.3)
|
48
|
+
rack (>= 1.0.0)
|
49
|
+
rack-test (>= 0.5.4)
|
50
|
+
selenium-webdriver (>= 0.0.27)
|
51
|
+
xpath (~> 0.1.3)
|
52
|
+
celerity (0.8.7)
|
53
|
+
childprocess (0.1.6)
|
54
|
+
ffi (~> 0.6.3)
|
55
|
+
configuration (1.2.0)
|
56
|
+
culerity (0.2.15)
|
57
|
+
devise (1.1.5)
|
58
|
+
bcrypt-ruby (~> 2.1.2)
|
59
|
+
warden (~> 1.0.2)
|
60
|
+
erubis (2.6.6)
|
61
|
+
abstract (>= 1.0.0)
|
62
|
+
ffi (0.6.3)
|
63
|
+
rake (>= 0.8.7)
|
64
|
+
git (1.2.5)
|
65
|
+
haml (3.0.25)
|
66
|
+
i18n (0.5.0)
|
67
|
+
jeweler (1.5.2)
|
68
|
+
bundler (~> 1.0.0)
|
69
|
+
git (>= 1.2.5)
|
70
|
+
rake
|
71
|
+
json_pure (1.5.1)
|
72
|
+
jzip (1.0.11)
|
73
|
+
launchy (0.3.7)
|
74
|
+
configuration (>= 0.0.5)
|
75
|
+
rake (>= 0.8.1)
|
76
|
+
mail (2.2.15)
|
77
|
+
activesupport (>= 2.3.6)
|
78
|
+
i18n (>= 0.4.0)
|
79
|
+
mime-types (~> 1.16)
|
80
|
+
treetop (~> 1.4.8)
|
81
|
+
mime-types (1.16)
|
82
|
+
mocha (0.9.10)
|
83
|
+
rake
|
84
|
+
mysql2 (0.2.6)
|
85
|
+
nokogiri (1.4.4)
|
86
|
+
polyglot (0.3.1)
|
87
|
+
rack (1.2.1)
|
88
|
+
rack-mount (0.6.13)
|
89
|
+
rack (>= 1.0.0)
|
90
|
+
rack-test (0.5.7)
|
91
|
+
rack (>= 1.0)
|
92
|
+
rails (3.0.3)
|
93
|
+
actionmailer (= 3.0.3)
|
94
|
+
actionpack (= 3.0.3)
|
95
|
+
activerecord (= 3.0.3)
|
96
|
+
activeresource (= 3.0.3)
|
97
|
+
activesupport (= 3.0.3)
|
98
|
+
bundler (~> 1.0)
|
99
|
+
railties (= 3.0.3)
|
100
|
+
railties (3.0.3)
|
101
|
+
actionpack (= 3.0.3)
|
102
|
+
activesupport (= 3.0.3)
|
103
|
+
rake (>= 0.8.7)
|
104
|
+
thor (~> 0.14.4)
|
105
|
+
rake (0.8.7)
|
106
|
+
rubyzip (0.9.4)
|
107
|
+
selenium-webdriver (0.1.2)
|
108
|
+
childprocess (~> 0.1.5)
|
109
|
+
ffi (~> 0.6.3)
|
110
|
+
json_pure
|
111
|
+
rubyzip
|
112
|
+
shoulda (2.11.3)
|
113
|
+
sqlite3 (1.3.3)
|
114
|
+
sqlite3-ruby (1.3.3)
|
115
|
+
sqlite3 (>= 1.3.3)
|
116
|
+
thor (0.14.6)
|
117
|
+
treetop (1.4.9)
|
118
|
+
polyglot (>= 0.3.1)
|
119
|
+
tzinfo (0.3.24)
|
120
|
+
warden (1.0.3)
|
121
|
+
rack (>= 1.0.0)
|
122
|
+
xpath (0.1.3)
|
123
|
+
nokogiri (~> 1.3)
|
124
|
+
|
125
|
+
PLATFORMS
|
126
|
+
ruby
|
127
|
+
|
128
|
+
DEPENDENCIES
|
129
|
+
authlogic
|
130
|
+
capybara
|
131
|
+
devise (~> 1.1.5)
|
132
|
+
jeweler
|
133
|
+
launchy
|
134
|
+
mocha
|
135
|
+
mysql2
|
136
|
+
rails (= 3.0.3)
|
137
|
+
rich_cms!
|
138
|
+
shoulda
|
139
|
+
sqlite3-ruby
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require File.expand_path('../config/application', __FILE__)
|
5
|
+
require 'rake'
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# If you have a Gemfile, require the gems listed there, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
+
|
9
|
+
module Dummy
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
+
|
18
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
+
|
22
|
+
# Activate observers that should always be running.
|
23
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
+
|
25
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
+
|
29
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
+
# config.i18n.default_locale = :de
|
32
|
+
|
33
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
34
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
35
|
+
|
36
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
+
config.encoding = "utf-8"
|
38
|
+
|
39
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
+
config.filter_parameters += [:password]
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
# Set up gems listed in the Gemfile.
|
4
|
+
gemfile = File.expand_path('../../Gemfile', __FILE__)
|
5
|
+
begin
|
6
|
+
ENV['BUNDLE_GEMFILE'] = gemfile
|
7
|
+
require 'bundler'
|
8
|
+
Bundler.setup
|
9
|
+
rescue Bundler::GemNotFound => e
|
10
|
+
STDERR.puts e.message
|
11
|
+
STDERR.puts "Try running `bundle install`."
|
12
|
+
exit!
|
13
|
+
end if File.exist?(gemfile)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test:
|
13
|
+
adapter: mysql2
|
14
|
+
database: rich_cms_test
|
15
|
+
username: root
|
16
|
+
password:
|
17
|
+
host: 127.0.0.1
|
18
|
+
|
19
|
+
production:
|
20
|
+
adapter: sqlite3
|
21
|
+
database: db/production.sqlite3
|
22
|
+
pool: 5
|
23
|
+
timeout: 5000
|
@@ -0,0 +1,26 @@
|
|
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 webserver 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_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Only use best-standards-support built into browsers
|
24
|
+
config.action_dispatch.best_standards_support = :builtin
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
|
43
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
+
# the I18n.default_locale when a translation can not be found)
|
45
|
+
config.i18n.fallbacks = true
|
46
|
+
|
47
|
+
# Send deprecation notices to registered listeners
|
48
|
+
config.active_support.deprecation = :notify
|
49
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|