ish_lib_engine 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/ish_lib_engine/application.js +13 -0
- data/app/assets/javascripts/ish_lib_engine/articles.js +2 -0
- data/app/assets/stylesheets/ish_lib_engine/application.css +15 -0
- data/app/assets/stylesheets/ish_lib_engine/articles.css +4 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/ish_lib_engine/application_controller.rb +4 -0
- data/app/controllers/ish_lib_engine/articles_controller.rb +62 -0
- data/app/controllers/ish_lib_engine/manager/cities_controller.rb +95 -0
- data/app/controllers/ish_lib_engine/manager/cities_controller.rb~ +95 -0
- data/app/controllers/ish_lib_engine/manager/features_controller.rb +122 -0
- data/app/controllers/ish_lib_engine/manager/features_controller.rb~ +122 -0
- data/app/controllers/ish_lib_engine/manager/galleries_controller.rb +78 -0
- data/app/controllers/ish_lib_engine/manager/galleries_controller.rb~ +78 -0
- data/app/controllers/ish_lib_engine/manager/manager_controller.rb +31 -0
- data/app/controllers/ish_lib_engine/manager/manager_controller.rb~ +31 -0
- data/app/controllers/ish_lib_engine/manager/newsitems_controller.rb +47 -0
- data/app/controllers/ish_lib_engine/manager/newsitems_controller.rb~ +47 -0
- data/app/controllers/ish_lib_engine/manager/photos_controller.rb +20 -0
- data/app/controllers/ish_lib_engine/manager/photos_controller.rb~ +20 -0
- data/app/controllers/ish_lib_engine/manager/reports_controller.rb +62 -0
- data/app/controllers/ish_lib_engine/manager/reports_controller.rb~ +62 -0
- data/app/controllers/ish_lib_engine/manager/sites_controller.rb +72 -0
- data/app/controllers/ish_lib_engine/manager/sites_controller.rb~ +72 -0
- data/app/controllers/ish_lib_engine/manager/tags_controller.rb +54 -0
- data/app/controllers/ish_lib_engine/manager/tags_controller.rb~ +54 -0
- data/app/controllers/ish_lib_engine/manager/users_controller.rb +13 -0
- data/app/controllers/ish_lib_engine/manager/users_controller.rb~ +13 -0
- data/app/controllers/ish_lib_engine/manager/welcome_controller.rb +8 -0
- data/app/controllers/ish_lib_engine/manager/welcome_controller.rb~ +9 -0
- data/app/helpers/ish_lib_engine/application_helper.rb +4 -0
- data/app/helpers/ish_lib_engine/articles_helper.rb +4 -0
- data/app/models/ability.rb +152 -0
- data/app/models/ability.rb~ +151 -0
- data/app/models/admin_user.rb +113 -0
- data/app/models/app_model2.rb +33 -0
- data/app/models/auth_token.rb +17 -0
- data/app/models/aux_model.rb +22 -0
- data/app/models/cities_user.rb +17 -0
- data/app/models/city.rb +117 -0
- data/app/models/country.rb +13 -0
- data/app/models/day.rb +21 -0
- data/app/models/decoded_auth_token.rb +6 -0
- data/app/models/event.rb +21 -0
- data/app/models/feature.rb +38 -0
- data/app/models/gallery.rb +59 -0
- data/app/models/ish_lib_engine/article.rb +4 -0
- data/app/models/ish_lib_engine/comment.rb +4 -0
- data/app/models/manager.rb +10 -0
- data/app/models/manager_city.rb +4 -0
- data/app/models/manager_feature.rb +4 -0
- data/app/models/manager_gallery.rb +3 -0
- data/app/models/manager_newsitem.rb +5 -0
- data/app/models/manager_photo.rb +3 -0
- data/app/models/manager_report.rb +4 -0
- data/app/models/manager_site.rb +4 -0
- data/app/models/manager_tag.rb +6 -0
- data/app/models/manager_user.rb +3 -0
- data/app/models/manager_venue.rb +4 -0
- data/app/models/message.rb +14 -0
- data/app/models/newsitem.rb +50 -0
- data/app/models/nodeitem.rb +18 -0
- data/app/models/photo.rb +68 -0
- data/app/models/rate_me.rb +13 -0
- data/app/models/report.rb +144 -0
- data/app/models/review.rb +4 -0
- data/app/models/site.rb +83 -0
- data/app/models/tag.rb +78 -0
- data/app/models/user.rb +122 -0
- data/app/models/user_profile.rb +20 -0
- data/app/models/venue.rb +69 -0
- data/app/models/video.rb +48 -0
- data/app/models/welcome.rb +6 -0
- data/app/models/wikitravel_page.rb +19 -0
- data/app/views/application/_flash_messages.haml +24 -0
- data/app/views/application/_flash_messages.haml~ +24 -0
- data/app/views/ish_lib_engine/articles/_form.html.erb +25 -0
- data/app/views/ish_lib_engine/articles/edit.html.erb +6 -0
- data/app/views/ish_lib_engine/articles/index.html.erb +29 -0
- data/app/views/ish_lib_engine/articles/new.html.erb +5 -0
- data/app/views/ish_lib_engine/articles/show.html.erb +14 -0
- data/app/views/layouts/ish_lib_engine/application.html.erb +14 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20160501041837_create_ish_lib_engine_articles.rb +10 -0
- data/db/migrate/20160501041940_create_ish_lib_engine_comments.rb +10 -0
- data/lib/addressbookitems_tasks.rb +33 -0
- data/lib/cities_tasks.rb +143 -0
- data/lib/core_extensions.rb +21 -0
- data/lib/features_tasks.rb +17 -0
- data/lib/float.rb +14 -0
- data/lib/galleries_tasks.rb +91 -0
- data/lib/ish_lib_engine.rb +4 -0
- data/lib/ish_lib_engine/engine.rb +5 -0
- data/lib/ish_lib_engine/version.rb +3 -0
- data/lib/reports_tasks.rb +53 -0
- data/lib/sitemaps_tasks.rb +108 -0
- data/lib/sites_tasks.rb +31 -0
- data/lib/string.rb +15 -0
- data/lib/tags_tasks.rb +104 -0
- data/lib/tasks/cities.rake +29 -0
- data/lib/tasks/galleries.rake +19 -0
- data/lib/tasks/ish_lib_engine_tasks.rake +4 -0
- data/lib/tasks/reports.rake +37 -0
- data/lib/tasks/resque.rake +8 -0
- data/lib/tasks/sitemaps.rake +12 -0
- data/lib/tasks/sites.rake +12 -0
- data/lib/tasks/tags.rake +17 -0
- data/lib/tasks/users.rake +14 -0
- data/lib/tasks/venues.rake +13 -0
- data/lib/tasks/videos.rake +18 -0
- data/lib/tasks/wikitravel_pages.rake +40 -0
- data/lib/test_extensions.rb +9 -0
- data/lib/u.rb +34 -0
- data/lib/users_tasks.rb +88 -0
- data/lib/venues_tasks.rb +15 -0
- data/lib/videos_tasks.rb +71 -0
- data/lib/wikitravel_tasks.rb +139 -0
- data/spec/factories/cities.rb +89 -0
- data/spec/factories/galleries.rb +133 -0
- data/spec/factories/photo.rb +20 -0
- data/spec/factories/reports.rb +379 -0
- data/spec/factories/site.rb +26 -0
- data/spec/factories/tag.rb +42 -0
- data/spec/factories/user.rb +87 -0
- data/spec/factories/user_profiles.rb +33 -0
- data/spec/factories/venues.rb +25 -0
- data/spec/factories/videos.rb +38 -0
- data/test/controllers/ish_lib_engine/articles_controller_test.rb +52 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +30 -0
- data/test/dummy/log/development.log +15 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fixtures/ish_lib_engine/articles.yml +9 -0
- data/test/fixtures/ish_lib_engine/comments.yml +9 -0
- data/test/integration/navigation_test.rb +8 -0
- data/test/ish_lib_engine_test.rb +7 -0
- data/test/models/ish_lib_engine/article_test.rb +9 -0
- data/test/models/ish_lib_engine/comment_test.rb +9 -0
- data/test/test_helper.rb +21 -0
- metadata +361 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :user do
|
5
|
+
email 'user@user.com'
|
6
|
+
username 'user'
|
7
|
+
name 'user'
|
8
|
+
group_id 3
|
9
|
+
password 's3cret123'
|
10
|
+
encrypted_password '$2a$10$PoBe1MvkoGJsjMVTEjKqgeBUp.xdfzWoiDjBzQhtLAj16NqIa2fOy'
|
11
|
+
end
|
12
|
+
|
13
|
+
factory :anon, :class => User do
|
14
|
+
email 'anon@gmail.com'
|
15
|
+
username 'anon'
|
16
|
+
name 'Anonymous'
|
17
|
+
group_id 3
|
18
|
+
password 's3cret123'
|
19
|
+
encrypted_password '$2a$10$PoBe1MvkoGJsjMVTEjKqgeBUp.xdfzWoiDjBzQhtLAj16NqIa2fOy'
|
20
|
+
end
|
21
|
+
|
22
|
+
factory :user_2, :class => User do
|
23
|
+
email 'user_2@user.com'
|
24
|
+
username 'user_2'
|
25
|
+
name 'user_2'
|
26
|
+
group_id 3
|
27
|
+
password 's3cret123'
|
28
|
+
encrypted_password '$2a$10$PoBe1MvkoGJsjMVTEjKqgeBUp.xdfzWoiDjBzQhtLAj16NqIa2fOy'
|
29
|
+
end
|
30
|
+
|
31
|
+
factory :piousbox, :class => User do
|
32
|
+
email 'piousbox@gmail.com'
|
33
|
+
username 'piousbox'
|
34
|
+
name 'simple'
|
35
|
+
|
36
|
+
group_id 3
|
37
|
+
password 's3cret123'
|
38
|
+
encrypted_password '$2a$10$PoBe1MvkoGJsjMVTEjKqgeBUp.xdfzWoiDjBzQhtLAj16NqIa2fOy'
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
factory :admin, :class => User do
|
43
|
+
email 'admin@gmail.com'
|
44
|
+
username 'admin'
|
45
|
+
name 'simple'
|
46
|
+
|
47
|
+
group_id 1
|
48
|
+
password 's3cret123'
|
49
|
+
encrypted_password '$2a$10$PoBe1MvkoGJsjMVTEjKqgeBUp.xdfzWoiDjBzQhtLAj16NqIa2fOy'
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
factory :simple, :class => User do
|
54
|
+
email 'simple@gmail.com'
|
55
|
+
username 'simple'
|
56
|
+
name 'simple'
|
57
|
+
|
58
|
+
group_id 3
|
59
|
+
password 's3cret123'
|
60
|
+
encrypted_password '$2a$10$PoBe1MvkoGJsjMVTEjKqgeBUp.xdfzWoiDjBzQhtLAj16NqIa2fOy'
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
factory :manager, :class => User do
|
65
|
+
email 'manager@gmail.com'
|
66
|
+
username 'manager'
|
67
|
+
name 'simple'
|
68
|
+
|
69
|
+
group_id 2
|
70
|
+
password 's3cret123'
|
71
|
+
encrypted_password '$2a$10$PoBe1MvkoGJsjMVTEjKqgeBUp.xdfzWoiDjBzQhtLAj16NqIa2fOy'
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
factory :feature_user, :class => User do
|
76
|
+
email 'feature_user@gmail.com'
|
77
|
+
username 'feature_user'
|
78
|
+
name 'Featured'
|
79
|
+
is_feature true
|
80
|
+
|
81
|
+
group_id 3
|
82
|
+
password 's3cret123'
|
83
|
+
encrypted_password '$2a$10$PoBe1MvkoGJsjMVTEjKqgeBUp.xdfzWoiDjBzQhtLAj16NqIa2fOy'
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
|
5
|
+
factory :pi_pt, :class => UserProfile do
|
6
|
+
|
7
|
+
lang 'pt'
|
8
|
+
after :create do |p|
|
9
|
+
p.user User.where( :username => 'piousbox' ).first
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
factory :pi_en, :class => UserProfile do
|
15
|
+
lang 'en'
|
16
|
+
education 'pi_en Education'
|
17
|
+
|
18
|
+
after :create do |p|
|
19
|
+
p.user User.where( :username => 'piousbox' ).first
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
factory :pi_ru, :class => UserProfile do
|
25
|
+
|
26
|
+
lang 'ru'
|
27
|
+
after :create do |p|
|
28
|
+
p.user User.where( :username => 'piousbox' ).first
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :venue, :class => Venue do
|
5
|
+
name 'blah'
|
6
|
+
name_seo 'blah'
|
7
|
+
is_public true
|
8
|
+
x '1.5'
|
9
|
+
y '1.5'
|
10
|
+
after(:build) do |v|
|
11
|
+
v.owner = User.first
|
12
|
+
v.city = City.where( :cityname => 'San_Francisco' ).first
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
factory :cac, :class => Venue do
|
17
|
+
name 'Computational Arts Corp'
|
18
|
+
name_seo 'cac'
|
19
|
+
after(:build) do |v|
|
20
|
+
v.owner = User.first
|
21
|
+
v.city = City.where( :cityname => 'San_Francisco' ).first
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
|
3
|
+
factory :video do
|
4
|
+
youtube_id '123'
|
5
|
+
is_public true
|
6
|
+
after(:build) do |v|
|
7
|
+
v.user = User.first
|
8
|
+
v.site = Site.first
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
factory :v1, :class => Video do
|
13
|
+
youtube_id '123455'
|
14
|
+
is_public true
|
15
|
+
after(:build) do |v|
|
16
|
+
v.user = User.first
|
17
|
+
v.site = Site.first
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
factory :v2, :class => Video do
|
22
|
+
youtube_id '123456'
|
23
|
+
is_public true
|
24
|
+
after(:build) do |v|
|
25
|
+
v.user = User.first
|
26
|
+
v.site = Site.first
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
factory :v3, :class => Video do
|
31
|
+
youtube_id '123457'
|
32
|
+
is_public true
|
33
|
+
after(:build) do |v|
|
34
|
+
v.user = User.first
|
35
|
+
v.site = Site.first
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module IshLibEngine
|
4
|
+
class ArticlesControllerTest < ActionController::TestCase
|
5
|
+
setup do
|
6
|
+
@article = ish_lib_engine_articles(:one)
|
7
|
+
@routes = Engine.routes
|
8
|
+
end
|
9
|
+
|
10
|
+
test "should get index" do
|
11
|
+
get :index
|
12
|
+
assert_response :success
|
13
|
+
assert_not_nil assigns(:articles)
|
14
|
+
end
|
15
|
+
|
16
|
+
test "should get new" do
|
17
|
+
get :new
|
18
|
+
assert_response :success
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should create article" do
|
22
|
+
assert_difference('Article.count') do
|
23
|
+
post :create, article: { body: @article.body, title: @article.title }
|
24
|
+
end
|
25
|
+
|
26
|
+
assert_redirected_to article_path(assigns(:article))
|
27
|
+
end
|
28
|
+
|
29
|
+
test "should show article" do
|
30
|
+
get :show, id: @article
|
31
|
+
assert_response :success
|
32
|
+
end
|
33
|
+
|
34
|
+
test "should get edit" do
|
35
|
+
get :edit, id: @article
|
36
|
+
assert_response :success
|
37
|
+
end
|
38
|
+
|
39
|
+
test "should update article" do
|
40
|
+
patch :update, id: @article, article: { body: @article.body, title: @article.title }
|
41
|
+
assert_redirected_to article_path(assigns(:article))
|
42
|
+
end
|
43
|
+
|
44
|
+
test "should destroy article" do
|
45
|
+
assert_difference('Article.count', -1) do
|
46
|
+
delete :destroy, id: @article
|
47
|
+
end
|
48
|
+
|
49
|
+
assert_redirected_to articles_path
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/test/dummy/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
+
|
7
|
+
Dir.chdir APP_ROOT do
|
8
|
+
# This script is a starting point to setup your application.
|
9
|
+
# Add necessary setup steps to this file:
|
10
|
+
|
11
|
+
puts "== Installing dependencies =="
|
12
|
+
system "gem install bundler --conservative"
|
13
|
+
system "bundle check || bundle install"
|
14
|
+
|
15
|
+
# puts "\n== Copying sample files =="
|
16
|
+
# unless File.exist?("config/database.yml")
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
18
|
+
# end
|
19
|
+
|
20
|
+
puts "\n== Preparing database =="
|
21
|
+
system "bin/rake db:setup"
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system "rm -f log/*"
|
25
|
+
system "rm -rf tmp/cache"
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system "touch tmp/restart.txt"
|
29
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "ish_lib_engine"
|
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
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
+
config.active_record.raise_in_transactional_callbacks = true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -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
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|