wontomedia 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +661 -0
- data/COPYING.DOCUMENTATION +450 -0
- data/LICENSE +661 -0
- data/README.markdown +56 -0
- data/Rakefile +185 -0
- data/VERSION.yml +4 -0
- data/app/controllers/admin_controller.rb +144 -0
- data/app/controllers/application_controller.rb +29 -0
- data/app/controllers/connections_controller.rb +150 -0
- data/app/controllers/items_controller.rb +365 -0
- data/app/helpers/connections_helper.rb +67 -0
- data/app/helpers/format_helper.rb +154 -0
- data/app/helpers/items_helper.rb +105 -0
- data/app/models/category_item.rb +23 -0
- data/app/models/connection.rb +210 -0
- data/app/models/individual_item.rb +23 -0
- data/app/models/item.rb +86 -0
- data/app/models/property_item.rb +23 -0
- data/app/models/qualified_item.rb +23 -0
- data/app/views/admin/index.html.erb +74 -0
- data/app/views/connections/_index_outbound_links.html.erb +48 -0
- data/app/views/connections/_spo_select_controls.html.erb +151 -0
- data/app/views/connections/edit.html.erb +70 -0
- data/app/views/connections/index.html.erb +84 -0
- data/app/views/connections/new.html.erb +61 -0
- data/app/views/connections/show.html.erb +110 -0
- data/app/views/items/_active_content.html.erb +26 -0
- data/app/views/items/_content_examples.html.erb +55 -0
- data/app/views/items/_core_tasks.html.erb +23 -0
- data/app/views/items/_form_fields.html.erb +69 -0
- data/app/views/items/_list_outbound_links.html.erb +58 -0
- data/app/views/items/_screen_select.html.erb +24 -0
- data/app/views/items/_show_outbound_links.html.erb +70 -0
- data/app/views/items/_topic_list.html.erb +26 -0
- data/app/views/items/_type_select.html.erb +47 -0
- data/app/views/items/edit.html.erb +63 -0
- data/app/views/items/index.html.erb +74 -0
- data/app/views/items/new.html.erb +124 -0
- data/app/views/items/newpop.html.erb +58 -0
- data/app/views/items/show.html.erb +209 -0
- data/app/views/layouts/_amazon_ads.html.erb +55 -0
- data/app/views/layouts/_glossary_help_box.html.erb +43 -0
- data/app/views/layouts/_google_ads.html.erb +40 -0
- data/app/views/layouts/_language_select.html.erb +24 -0
- data/app/views/layouts/_login_controls.html.erb +24 -0
- data/app/views/layouts/_master_help.html.erb +24 -0
- data/app/views/layouts/_navigation_menu.html.erb +39 -0
- data/app/views/layouts/_search_box.html.erb +27 -0
- data/app/views/layouts/_status_msgs.html.erb +25 -0
- data/app/views/layouts/application.html.erb +67 -0
- data/app/views/layouts/base.html.erb +93 -0
- data/app/views/layouts/home.html.erb +67 -0
- data/app/views/layouts/popup.html.erb +23 -0
- data/assets/wontomedia-sample.rb +47 -0
- data/config/asset_packages.yml +44 -0
- data/config/boot.rb +110 -0
- data/config/cucumber.yml +65 -0
- data/config/database-mysql-development.yml +47 -0
- data/config/database-mysql.yml +26 -0
- data/config/environment.rb +94 -0
- data/config/environments/cucumber.rb +29 -0
- data/config/environments/development.rb +26 -0
- data/config/environments/production.rb +33 -0
- data/config/environments/test.rb +31 -0
- data/config/initializers/inflections.rb +19 -0
- data/config/initializers/mime_types.rb +14 -0
- data/config/initializers/new_rails_defaults.rb +26 -0
- data/config/locales/en.yml +14 -0
- data/config/routes.rb +37 -0
- data/db/fixtures/connections.yml +96 -0
- data/db/fixtures/items.yml +277 -0
- data/db/migrate/20090312212805_create_items.rb +31 -0
- data/db/migrate/20090406221320_create_connections.rb +32 -0
- data/db/migrate/20090411014503_add_type_for_item_subclasses.rb +29 -0
- data/db/migrate/20090415142152_rename_item_type.rb +31 -0
- data/db/migrate/20090518022918_rename_object_and_self.rb +33 -0
- data/db/migrate/20090529171442_add_flags_to_items.rb +27 -0
- data/db/migrate/20090529171508_add_flags_to_connections.rb +27 -0
- data/db/migrate/20090605213800_flags_columns_not_null.rb +29 -0
- data/db/migrate/20090605215028_flags_columns_default_zero.rb +29 -0
- data/db/schema.rb +30 -0
- data/default-custom/app/views/items/_home_extern_list.html.erb +32 -0
- data/default-custom/app/views/items/_home_introductory_text.html.erb +70 -0
- data/default-custom/app/views/items/home.html.erb +77 -0
- data/default-custom/public/images/logo.png +0 -0
- data/default-custom/public/images/logo.svg +74 -0
- data/default-custom/public/stylesheets/wm.css +301 -0
- data/doc/README.markdown +44 -0
- data/doc/README_FOR_APP +82 -0
- data/doc/customization.markdown +93 -0
- data/doc/scripts/rake-customize.markdown +83 -0
- data/lib/helpers/connection_helper.rb +41 -0
- data/lib/helpers/item_helper.rb +141 -0
- data/lib/helpers/tripple_navigation.rb +158 -0
- data/lib/tasks/cucumber.rake +83 -0
- data/lib/tasks/customize.rake +70 -0
- data/lib/tasks/db.rake +65 -0
- data/lib/tasks/javascript_testing_tasks.rake +176 -0
- data/public/404.html +50 -0
- data/public/422.html +50 -0
- data/public/500.html +53 -0
- data/public/dispatch.cgi +20 -0
- data/public/dispatch.fcgi +34 -0
- data/public/dispatch.rb +20 -0
- data/public/favicon.ico +0 -0
- data/public/images/blank_error_icon.png +0 -0
- data/public/images/blank_status_icon.png +0 -0
- data/public/images/error_error_icon.png +0 -0
- data/public/images/error_status_icon.png +0 -0
- data/public/images/good_status_icon.png +0 -0
- data/public/images/help_icon.png +0 -0
- data/public/images/twitter_icon.png +0 -0
- data/public/images/warn_error_icon.png +0 -0
- data/public/images/working_status_icon.gif +0 -0
- data/public/javascripts/application.js +56 -0
- data/public/javascripts/controls.js +963 -0
- data/public/javascripts/dragdrop.js +973 -0
- data/public/javascripts/effects.js +1128 -0
- data/public/javascripts/event.simulate.js +64 -0
- data/public/javascripts/fancybox.js +43 -0
- data/public/javascripts/forConnectionsForms.js +218 -0
- data/public/javascripts/forItemsForms.js +511 -0
- data/public/javascripts/itemCreatePopup.js +115 -0
- data/public/javascripts/itemTitleToName.js +119 -0
- data/public/javascripts/jquery.js +4376 -0
- data/public/javascripts/modalbox.js +502 -0
- data/public/javascripts/prototype.js +4320 -0
- data/public/javascripts/reconcileJQueryAndPrototype.js +19 -0
- data/public/robots.txt +7 -0
- data/public/stylesheets/blank.gif +0 -0
- data/public/stylesheets/fancy_close.png +0 -0
- data/public/stylesheets/fancy_loading.png +0 -0
- data/public/stylesheets/fancy_nav_left.png +0 -0
- data/public/stylesheets/fancy_nav_right.png +0 -0
- data/public/stylesheets/fancy_shadow_e.png +0 -0
- data/public/stylesheets/fancy_shadow_n.png +0 -0
- data/public/stylesheets/fancy_shadow_ne.png +0 -0
- data/public/stylesheets/fancy_shadow_nw.png +0 -0
- data/public/stylesheets/fancy_shadow_s.png +0 -0
- data/public/stylesheets/fancy_shadow_se.png +0 -0
- data/public/stylesheets/fancy_shadow_sw.png +0 -0
- data/public/stylesheets/fancy_shadow_w.png +0 -0
- data/public/stylesheets/fancy_title_left.png +0 -0
- data/public/stylesheets/fancy_title_main.png +0 -0
- data/public/stylesheets/fancy_title_over.png +0 -0
- data/public/stylesheets/fancy_title_right.png +0 -0
- data/public/stylesheets/fancybox.css +333 -0
- data/public/stylesheets/modalbox.css +110 -0
- data/public/stylesheets/scaffold.css +36 -0
- data/public/stylesheets/spinner.gif +0 -0
- data/script/about +4 -0
- data/script/console +3 -0
- data/script/cucumber +10 -0
- data/script/dbconsole +3 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/performance/request +3 -0
- data/script/plugin +3 -0
- data/script/process/inspector +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/vendor/plugins/asset_packager/CHANGELOG +122 -0
- data/vendor/plugins/asset_packager/README +178 -0
- data/vendor/plugins/asset_packager/Rakefile +22 -0
- data/vendor/plugins/asset_packager/about.yml +8 -0
- data/vendor/plugins/asset_packager/init.rb +2 -0
- data/vendor/plugins/asset_packager/install.rb +1 -0
- data/vendor/plugins/asset_packager/lib/jsmin.rb +205 -0
- data/vendor/plugins/asset_packager/lib/synthesis/asset_package.rb +212 -0
- data/vendor/plugins/asset_packager/lib/synthesis/asset_package_helper.rb +39 -0
- data/vendor/plugins/asset_packager/tasks/asset_packager_tasks.rake +23 -0
- data/vendor/plugins/asset_packager/test/asset_package_helper_development_test.rb +100 -0
- data/vendor/plugins/asset_packager/test/asset_package_helper_production_test.rb +140 -0
- data/vendor/plugins/asset_packager/test/asset_packager_test.rb +92 -0
- data/vendor/plugins/asset_packager/test/asset_packages.yml +20 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/application.js +2 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/bar.js +4 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/controls.js +815 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/dragdrop.js +913 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/effects.js +958 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/foo.js +4 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/prototype.js +2006 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/bar.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/foo.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/header.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/screen.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/subdir/bar.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/subdir/foo.css +16 -0
- metadata +265 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
<%
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful, but
|
11
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see "http://www.gnu.org/licenses/".
|
18
|
+
%>
|
19
|
+
|
20
|
+
|
21
|
+
<% content_for :page_body do %>
|
22
|
+
<div id="tag-line" style="position: absolute; top: 0; left: 15.5%;">
|
23
|
+
<h1><%= WontoMedia.site_tagline -%></h1>
|
24
|
+
</div>
|
25
|
+
<div id="float-center-right"
|
26
|
+
style="float: right; width: 85%; margin-top: 8ex;">
|
27
|
+
<div id="column-content" class="content"
|
28
|
+
style="float: left; width: 81.8%; position: relative; z-index: 99;">
|
29
|
+
<%= render :partial => "layouts/status_msgs" %>
|
30
|
+
<%= yield( :content_full ) %>
|
31
|
+
<div id="content-lower-wide" class="content" style="float: left; width: 61%;">
|
32
|
+
<%= yield( :content_lower_wide ) %>
|
33
|
+
</div>
|
34
|
+
<div id="content-lower-narrow" class="content" style="float: right; width: 37%;">
|
35
|
+
<%= yield( :content_lower_narrow ) %>
|
36
|
+
</div>
|
37
|
+
<div id="content-bottom" style="clear: both; text-align: center;">
|
38
|
+
<%= yield( :content_bottom ) %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div id="column-right" style="float: right; width: 16.9%;">
|
42
|
+
<%= yield( :right_column ) %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="float-left" style="float: left; width: 14.4%;">
|
47
|
+
<div id="container-absolutes">
|
48
|
+
<div id="block-search"
|
49
|
+
style="width: 19%; position: absolute; top: 0; right: 0;">
|
50
|
+
<%= render :partial => "layouts/search_box" %>
|
51
|
+
</div>
|
52
|
+
<div id="page-top-controls"
|
53
|
+
style="position: absolute; top: 0; right: 16.9%;">
|
54
|
+
<%= render :partial => "layouts/master_help" %>
|
55
|
+
<%= render :partial => "layouts/language_select" %>
|
56
|
+
<%= render :partial => "layouts/login_controls" %>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
<div id="column-left" style="width: 98%">
|
60
|
+
<%= image_tag '/images/logo.png', :alt=>'Logo', :width=>'100%',
|
61
|
+
:style=>'margin-bottom: 0.7ex;' %>
|
62
|
+
<%= yield( :left_column ) %>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
<% end -%>
|
66
|
+
|
67
|
+
<%= render :file => 'layouts/base' %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful, but
|
11
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see "http://www.gnu.org/licenses/".
|
18
|
+
%>
|
19
|
+
|
20
|
+
<div id="popup-content">
|
21
|
+
<%= render :partial => "layouts/status_msgs" %>
|
22
|
+
<%= yield(:page_body) or yield %>
|
23
|
+
</div>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
|
19
|
+
require "ostruct"
|
20
|
+
|
21
|
+
WontoMedia = OpenStruct.new({
|
22
|
+
:site_title => "", # last element in page <title>
|
23
|
+
:site_tagline => "", # top of home page
|
24
|
+
|
25
|
+
# change these if you use a local wiki, but will work to use public
|
26
|
+
:help_url_prefix => "http://wiki.wontology.org/wiki/help.php?title=",
|
27
|
+
:popup_url_prefix => "http://wiki.wontology.org/wiki/popup.php?title=",
|
28
|
+
|
29
|
+
:ads => OpenStruct.new({
|
30
|
+
# :amazon => OpenStruct.new({
|
31
|
+
# :associate_id => "your-amazon-id-here"
|
32
|
+
# }),
|
33
|
+
# :google => OpenStruct.new({
|
34
|
+
# :publisher_id => "your-google-id-here",
|
35
|
+
# # "data page" is used in the partial common/_google_ads,
|
36
|
+
# # which is used in [items or connections]/[index or show] pages
|
37
|
+
# :data_page_slot => "your-google-slot-number-here"
|
38
|
+
# # create additional _slot variables for different Google ad units
|
39
|
+
# })
|
40
|
+
}),
|
41
|
+
|
42
|
+
:analytics => OpenStruct.new({
|
43
|
+
# :google => OpenStruct.new({
|
44
|
+
# :profile_id => "your-UA-number-here"
|
45
|
+
# })
|
46
|
+
})
|
47
|
+
})
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
---
|
18
|
+
javascripts:
|
19
|
+
- top:
|
20
|
+
- jquery
|
21
|
+
- fancybox
|
22
|
+
- reconcileJQueryAndPrototype
|
23
|
+
- prototype
|
24
|
+
- topAfterJQuery:
|
25
|
+
- fancybox
|
26
|
+
- reconcileJQueryAndPrototype
|
27
|
+
- prototype
|
28
|
+
- bottomJS:
|
29
|
+
- effects
|
30
|
+
- controls
|
31
|
+
- dragdrop
|
32
|
+
- application
|
33
|
+
- forConnectionsForms
|
34
|
+
- itemCreatePopup
|
35
|
+
- itemTitleToName
|
36
|
+
- forItemsForms
|
37
|
+
- event.simulate
|
38
|
+
- modalbox
|
39
|
+
stylesheets:
|
40
|
+
- base:
|
41
|
+
- scaffold
|
42
|
+
- modalbox
|
43
|
+
- fancybox
|
44
|
+
- wm
|
data/config/boot.rb
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
# Don't change this file!
|
2
|
+
# Configure your app in config/environment.rb and config/environments/*.rb
|
3
|
+
|
4
|
+
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
5
|
+
|
6
|
+
module Rails
|
7
|
+
class << self
|
8
|
+
def boot!
|
9
|
+
unless booted?
|
10
|
+
preinitialize
|
11
|
+
pick_boot.run
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def booted?
|
16
|
+
defined? Rails::Initializer
|
17
|
+
end
|
18
|
+
|
19
|
+
def pick_boot
|
20
|
+
(vendor_rails? ? VendorBoot : GemBoot).new
|
21
|
+
end
|
22
|
+
|
23
|
+
def vendor_rails?
|
24
|
+
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
25
|
+
end
|
26
|
+
|
27
|
+
def preinitialize
|
28
|
+
load(preinitializer_path) if File.exist?(preinitializer_path)
|
29
|
+
end
|
30
|
+
|
31
|
+
def preinitializer_path
|
32
|
+
"#{RAILS_ROOT}/config/preinitializer.rb"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class Boot
|
37
|
+
def run
|
38
|
+
load_initializer
|
39
|
+
Rails::Initializer.run(:set_load_path)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class VendorBoot < Boot
|
44
|
+
def load_initializer
|
45
|
+
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
46
|
+
Rails::Initializer.run(:install_gem_spec_stubs)
|
47
|
+
Rails::GemDependency.add_frozen_gem_path
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
class GemBoot < Boot
|
52
|
+
def load_initializer
|
53
|
+
self.class.load_rubygems
|
54
|
+
load_rails_gem
|
55
|
+
require 'initializer'
|
56
|
+
end
|
57
|
+
|
58
|
+
def load_rails_gem
|
59
|
+
if version = self.class.gem_version
|
60
|
+
gem 'rails', version
|
61
|
+
else
|
62
|
+
gem 'rails'
|
63
|
+
end
|
64
|
+
rescue Gem::LoadError => load_error
|
65
|
+
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
66
|
+
exit 1
|
67
|
+
end
|
68
|
+
|
69
|
+
class << self
|
70
|
+
def rubygems_version
|
71
|
+
Gem::RubyGemsVersion rescue nil
|
72
|
+
end
|
73
|
+
|
74
|
+
def gem_version
|
75
|
+
if defined? RAILS_GEM_VERSION
|
76
|
+
RAILS_GEM_VERSION
|
77
|
+
elsif ENV.include?('RAILS_GEM_VERSION')
|
78
|
+
ENV['RAILS_GEM_VERSION']
|
79
|
+
else
|
80
|
+
parse_gem_version(read_environment_rb)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def load_rubygems
|
85
|
+
require 'rubygems'
|
86
|
+
min_version = '1.3.1'
|
87
|
+
unless rubygems_version >= min_version
|
88
|
+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
89
|
+
exit 1
|
90
|
+
end
|
91
|
+
|
92
|
+
rescue LoadError
|
93
|
+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
94
|
+
exit 1
|
95
|
+
end
|
96
|
+
|
97
|
+
def parse_gem_version(text)
|
98
|
+
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
99
|
+
end
|
100
|
+
|
101
|
+
private
|
102
|
+
def read_environment_rb
|
103
|
+
File.read("#{RAILS_ROOT}/config/environment.rb")
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# All that for this:
|
110
|
+
Rails.boot!
|
data/config/cucumber.yml
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
<%
|
19
|
+
uber_common = "--color --strict "
|
20
|
+
common = uber_common + "--format progress "
|
21
|
+
tags_common = "--tags ~@invalid"
|
22
|
+
tags_rake = "--tags ~@extended"
|
23
|
+
static = "-r features/support/local.rb " +
|
24
|
+
"-r features/support/static.rb -r features/step_definitions "
|
25
|
+
dynamic = "-r features/support/local.rb " +
|
26
|
+
"-r features/support/dynamic.rb -r features/step_definitions "
|
27
|
+
static_only = "--exclude=dynamic features "
|
28
|
+
dynamic_only = "--exclude=static features "
|
29
|
+
%>
|
30
|
+
|
31
|
+
default: <%= uber_common + dynamic %>
|
32
|
+
<%= tags_common + " " +
|
33
|
+
tags_rake + " --tags ~@not_for_selenium" %>
|
34
|
+
--format pretty features
|
35
|
+
|
36
|
+
selenium: <%= common + dynamic %>
|
37
|
+
<%= tags_common + " " +
|
38
|
+
tags_rake + " --tags ~@not_for_selenium" %>
|
39
|
+
features
|
40
|
+
|
41
|
+
manual: <%= uber_common + dynamic %>
|
42
|
+
<%= tags_common + " --tags ~@not_for_selenium" %>
|
43
|
+
--format pretty
|
44
|
+
|
45
|
+
|
46
|
+
# profiles to be used from rake
|
47
|
+
static_acceptance:
|
48
|
+
<%= common + static %>
|
49
|
+
<%= tags_common+" "+tags_rake+" --tags ~@wip " + static_only %>
|
50
|
+
static_unfinished:
|
51
|
+
<%= common + static %>
|
52
|
+
<%= tags_common+" "+tags_rake+" --tags @wip " + static_only %>
|
53
|
+
dynamic_acceptance:
|
54
|
+
<%= common + dynamic %>
|
55
|
+
<%= tags_common+" "+tags_rake+" --tags ~@wip " + dynamic_only %>
|
56
|
+
dynamic_unfinished:
|
57
|
+
<%= common + dynamic %>
|
58
|
+
<%= tags_common+" "+tags_rake+" --tags @wip " + dynamic_only %>
|
59
|
+
|
60
|
+
autotest:
|
61
|
+
<%= common + static %>
|
62
|
+
<%= tags_common+" "+tags_rake+" --tags ~@wip -r lib " + static_only %>
|
63
|
+
autotest-all:
|
64
|
+
<%= common + static %>
|
65
|
+
<%= tags_common+" "+tags_rake+" -r lib " + static_only %>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
|
19
|
+
production:
|
20
|
+
adapter: mysql
|
21
|
+
encoding: utf8
|
22
|
+
database: wontomedia_production
|
23
|
+
pool: 5
|
24
|
+
username: wontomedia-user
|
25
|
+
password: replace-bad-passwd
|
26
|
+
socket: /var/run/mysqld/mysqld.sock
|
27
|
+
|
28
|
+
development:
|
29
|
+
adapter: mysql
|
30
|
+
encoding: utf8
|
31
|
+
database: wontomedia_development
|
32
|
+
pool: 5
|
33
|
+
username: wontomedia-user
|
34
|
+
password: replace-bad-passwd
|
35
|
+
socket: /var/run/mysqld/mysqld.sock
|
36
|
+
|
37
|
+
# Warning: The database defined as "test" will be erased and
|
38
|
+
# re-generated from your development database when you run "rake".
|
39
|
+
# Do not set this db to the same as development or production.
|
40
|
+
test:
|
41
|
+
adapter: mysql
|
42
|
+
encoding: utf8
|
43
|
+
database: wontomedia_test
|
44
|
+
pool: 5
|
45
|
+
username: wontomedia-user
|
46
|
+
password: replace-bad-passwd
|
47
|
+
socket: /var/run/mysqld/mysqld.sock
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
|
19
|
+
production:
|
20
|
+
adapter: mysql
|
21
|
+
encoding: utf8
|
22
|
+
database: wontomedia_production
|
23
|
+
pool: 5
|
24
|
+
username: wontomedia-user
|
25
|
+
password: replace-bad-passwd
|
26
|
+
socket: /var/run/mysqld/mysqld.sock
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
# Be sure to restart your server when you modify this file
|
21
|
+
|
22
|
+
# Uncomment below to force Rails into production mode when
|
23
|
+
# you don't control web/app server and can't set it the proper way
|
24
|
+
# ENV['RAILS_ENV'] ||= 'production'
|
25
|
+
|
26
|
+
# Specifies gem version of Rails to use when vendor/rails is not present
|
27
|
+
RAILS_GEM_VERSION = '~> 2.3' unless defined? RAILS_GEM_VERSION
|
28
|
+
|
29
|
+
# Bootstrap the Rails environment, frameworks, and default configuration
|
30
|
+
require File.join(File.dirname(__FILE__), 'boot')
|
31
|
+
|
32
|
+
Rails::Initializer.run do |config|
|
33
|
+
# Settings in config/environments/* take precedence over those specified here.
|
34
|
+
# Application configuration should go into files in config/initializers
|
35
|
+
# -- all .rb files in that directory are automatically loaded.
|
36
|
+
# See Rails::Configuration for more options.
|
37
|
+
|
38
|
+
# Skip frameworks you're not going to use. To use Rails without a database
|
39
|
+
# you must remove the Active Record framework.
|
40
|
+
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
|
41
|
+
|
42
|
+
# Specify gems that this application depends on.
|
43
|
+
# They can then be installed with "rake gems:install" on new installations.
|
44
|
+
# You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
|
45
|
+
# config.gem "bj"
|
46
|
+
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
|
47
|
+
# config.gem "sqlite3-ruby", :lib => "sqlite3"
|
48
|
+
# config.gem "aws-s3", :lib => "aws/s3"
|
49
|
+
|
50
|
+
# Only load the plugins named here, in the order given. By default, all
|
51
|
+
# plugins in vendor/plugins are loaded in alphabetical order.
|
52
|
+
# :all can be used as a placeholder for all plugins not explicitly named
|
53
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
54
|
+
|
55
|
+
# Add additional load paths for your own custom dirs
|
56
|
+
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
57
|
+
|
58
|
+
# Force all environments to use the same logger level
|
59
|
+
# (by default production uses :info, the others :debug)
|
60
|
+
# config.log_level = :debug
|
61
|
+
|
62
|
+
# Make Time.zone default to the specified zone, and make Active Record store time values
|
63
|
+
# in the database in UTC, and return them converted to the specified local zone.
|
64
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time.
|
65
|
+
config.time_zone = 'UTC'
|
66
|
+
|
67
|
+
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
68
|
+
# All files from config/locales/*.rb,yml are added automatically.
|
69
|
+
# config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
|
70
|
+
# config.i18n.default_locale = :de
|
71
|
+
|
72
|
+
# Your secret key for verifying cookie session data integrity.
|
73
|
+
# If you change this key, all old sessions will become invalid!
|
74
|
+
# Make sure the secret is at least 30 characters and all random,
|
75
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
76
|
+
config.action_controller.session = {
|
77
|
+
:session_key => '_wontomedia_session',
|
78
|
+
:secret => '1f59de398da7f80aca3f4a943eae6e8f5759efe7ec9e7690c57a4f485012f4f487ccf4530d4885a70fb20f51801306ddc50688b00bb3616da44303238cb15a64'
|
79
|
+
}
|
80
|
+
|
81
|
+
# Use the database for sessions instead of the cookie-based default,
|
82
|
+
# which shouldn't be used to store highly confidential information
|
83
|
+
# (create the session table with "rake db:sessions:create")
|
84
|
+
# config.action_controller.session_store = :active_record_store
|
85
|
+
|
86
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
87
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
88
|
+
# like if you have constraints or database-specific column types
|
89
|
+
# config.active_record.schema_format = :sql
|
90
|
+
|
91
|
+
# Activate observers that should always be running
|
92
|
+
# Please note that observers generated using script/generate observer need to have an _observer suffix
|
93
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
94
|
+
end
|