motiro 0.6.9 → 0.6.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/Rakefile +2 -2
- data/app/core/version.rb +1 -1
- data/app/helpers/feed_helper.rb +2 -0
- data/app/reporters/darcs_reporter.rb +2 -3
- data/app/views/events/new.rhtml +14 -0
- data/app/views/feed/subversion.rhtml +26 -0
- data/app/views/report/events_detail.rhtml +12 -0
- data/build/build.rb +29 -0
- data/config/boot.rb +104 -14
- data/config/environment.rb +35 -38
- data/config/environments/development.rb +5 -7
- data/config/environments/production.rb +3 -3
- data/config/environments/test.rb +5 -2
- data/config/initializers/globalize.rb +5 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/motiro_core.rb +5 -0
- data/config/motiro.yml +4 -4
- data/config/report/subversion.yml +26 -0
- data/doc/README_FOR_APP +1 -1
- data/lib/login_system.rb +2 -2
- data/lib/tasks/packaging.rake +4 -4
- data/public/404.html +27 -5
- data/public/422.html +30 -0
- data/public/500.html +27 -5
- data/public/dispatch.rb +2 -2
- data/public/javascripts/application.js +2 -0
- data/public/javascripts/controls.js +532 -319
- data/public/javascripts/dragdrop.js +521 -133
- data/public/javascripts/effects.js +708 -442
- data/public/javascripts/prototype.js +3393 -953
- data/public/robots.txt +5 -1
- data/public/selenium/tests/TestMainPage.html +42 -0
- data/public/selenium/tests/TestReportHTML.html +42 -0
- data/public/selenium/tests/TestReportRSS.html +37 -0
- data/public/selenium/tests/TestSubversionOnMain.html +32 -0
- data/public/selenium/tests/TestSuite.html +26 -0
- data/script/about +1 -1
- data/script/console +1 -1
- data/script/destroy +1 -1
- data/script/generate +1 -1
- data/script/performance/request +3 -0
- data/script/plugin +1 -1
- data/script/process/inspector +3 -0
- data/script/runner +1 -1
- data/script/server +1 -1
- data/test/fixtures/headlines.yml +6 -6
- data/test/functional/report_controller_test.rb +18 -18
- data/test/functional/root_controller_test.rb +1 -1
- data/test/test_helper.rb +11 -1
- data/test/unit/chief_editor_test.rb +20 -26
- data/test/unit/darcs_reporter_test.rb +6 -0
- data/test/unit/headline_test.rb +25 -8
- data/vendor/plugins/cache_test-0.2/doc/classes/Cosinux/FragmentCacheTest/Assertions.html +364 -0
- data/vendor/plugins/cache_test-0.2/doc/classes/Cosinux/PageCacheTest/IntegrationTestMethods.html +261 -0
- data/vendor/plugins/cache_test-0.2/doc/created.rid +1 -0
- data/vendor/plugins/cache_test-0.2/doc/files/CHANGELOG.html +128 -0
- data/vendor/plugins/cache_test-0.2/doc/files/MIT-LICENSE.html +129 -0
- data/vendor/plugins/cache_test-0.2/doc/files/README.html +272 -0
- data/vendor/plugins/cache_test-0.2/doc/files/init_rb.html +109 -0
- data/vendor/plugins/cache_test-0.2/doc/files/lib/fragment_cache_test_rb.html +101 -0
- data/vendor/plugins/cache_test-0.2/doc/files/lib/page_cache_test_rb.html +101 -0
- data/vendor/plugins/cache_test-0.2/doc/fr_class_index.html +28 -0
- data/vendor/plugins/cache_test-0.2/doc/fr_file_index.html +32 -0
- data/vendor/plugins/cache_test-0.2/doc/fr_method_index.html +32 -0
- data/vendor/plugins/cache_test-0.2/doc/index.html +24 -0
- data/vendor/plugins/cache_test-0.2/doc/rdoc-style.css +208 -0
- data/vendor/plugins/caching_monkey_patch/init.rb +13 -0
- data/vendor/plugins/rails_cron/CHANGELOG +8 -0
- data/vendor/plugins/rails_cron/LICENSE +7 -0
- data/vendor/plugins/rails_cron/README +77 -0
- data/vendor/plugins/rails_cron/init.rb +16 -0
- data/vendor/plugins/rails_cron/lib/acts_as_background.rb +14 -0
- data/vendor/plugins/rails_cron/lib/rails_cron.rb +128 -0
- data/vendor/plugins/rails_cron/tasks/startup.rake +50 -0
- metadata +466 -406
data/README
CHANGED
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
|
|
15
15
|
along with this program; if not, write to the Free Software
|
16
16
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17
17
|
--------------------------------------------------------------------------------
|
18
|
-
Motiro version 0.6.
|
18
|
+
Motiro version 0.6.10 - March 2008
|
19
19
|
|
20
20
|
Please refer to your preferred language README. Every text file below this
|
21
21
|
directory is UTF-8 encoded. Please make sure to set up your reader accordingly.
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
-
# for example lib/tasks/
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
3
|
|
4
4
|
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
5
5
|
|
@@ -7,4 +7,4 @@ require 'rake'
|
|
7
7
|
require 'rake/testtask'
|
8
8
|
require 'rake/rdoctask'
|
9
9
|
|
10
|
-
require 'tasks/rails'
|
10
|
+
require 'tasks/rails'
|
data/app/core/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
MOTIRO_VERSION = '0.6.
|
1
|
+
MOTIRO_VERSION = '0.6.10'
|
@@ -41,8 +41,7 @@ class DarcsReporter < MotiroReporter
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def author_from_darcs_id(id)
|
44
|
-
|
45
|
-
return md.pre_match if md
|
44
|
+
id.sub(/@.*$/, '')
|
46
45
|
end
|
47
46
|
|
48
47
|
def time_from_darcs_date(date)
|
@@ -101,4 +100,4 @@ private
|
|
101
100
|
return remain, diff
|
102
101
|
end
|
103
102
|
|
104
|
-
end
|
103
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% @title = 'Motiro - ' + 'Events'.t
|
2
|
+
@destination = { :name => 'headline', :attr => 'description' } %>
|
3
|
+
<p style="float: left; padding-right: 2em;">
|
4
|
+
<label for="headline_happened_at"><%= 'Date'.t -%>:</label>
|
5
|
+
<%= date_select 'headline', 'happened_at' %>
|
6
|
+
</p>
|
7
|
+
<div>
|
8
|
+
<p>
|
9
|
+
<b><%= 'Note'.t -%>:</b>
|
10
|
+
<%= ('The first line on the event text will turn into a summary ' +
|
11
|
+
'displayed on the main page').t -%>
|
12
|
+
</p>
|
13
|
+
</div>
|
14
|
+
<div style="height: 0; clear: left;"> </div>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
|
3
|
+
<rss version="2.0">
|
4
|
+
<channel>
|
5
|
+
<title>Motiro | Subversion</title>
|
6
|
+
<link>http://www.motiro.org.br</link>
|
7
|
+
<description>null</description>
|
8
|
+
<language>en</language>
|
9
|
+
<generator>Motiro</generator>
|
10
|
+
<pubDate><%= Time.now %></pubDate>
|
11
|
+
<copyright></copyright>
|
12
|
+
<ttl>60</ttl>
|
13
|
+
<webmaster>webmaster@motiro.org.br</webmaster>
|
14
|
+
<% @headlines.each do |headline| %>
|
15
|
+
<item>
|
16
|
+
<title><%= h(headline.title) %></title>
|
17
|
+
<link>http://localhost:3000</link>
|
18
|
+
<description>null</description>
|
19
|
+
<pubDate><%= h(headline.event_date) %></pubDate>
|
20
|
+
<author><%= h(headline.author) %></author>
|
21
|
+
<guid></guid>
|
22
|
+
</item>
|
23
|
+
<% end%>
|
24
|
+
</channel>
|
25
|
+
</rss>
|
26
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% @title = "Motiro - #{'Event'.t}" %>
|
2
|
+
<% if ! @partial then %>
|
3
|
+
<div class="pagetext">
|
4
|
+
<h1><%= h(@headline.title(Translator.for(@locale))) -%></h1>
|
5
|
+
<% end %>
|
6
|
+
<%= Page.new(:text => @headline.description(Translator.for(@locale))).
|
7
|
+
render_html %>
|
8
|
+
<% if ! @partial then %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
|
data/build/build.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# build.rb - Build script for the motiro project
|
2
|
+
#
|
3
|
+
# Copyright (c) 2006-2007 Thiago Arrais
|
4
|
+
#
|
5
|
+
# This program is free software.
|
6
|
+
# You can distribute/modify this program under the terms of
|
7
|
+
# the GNU LGPL, Lesser General Public License version 2.1.
|
8
|
+
#
|
9
|
+
|
10
|
+
def do_real_build
|
11
|
+
`rails -s src`
|
12
|
+
end
|
13
|
+
|
14
|
+
def build(home)
|
15
|
+
old_wd = Dir.getwd
|
16
|
+
Dir.chdir home
|
17
|
+
|
18
|
+
do_real_build
|
19
|
+
|
20
|
+
Dir.chdir old_wd
|
21
|
+
end
|
22
|
+
|
23
|
+
motiro_home = File.dirname($0) + '/..'
|
24
|
+
|
25
|
+
build(motiro_home)
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
data/config/boot.rb
CHANGED
@@ -1,19 +1,109 @@
|
|
1
|
-
# Don't change this file
|
1
|
+
# Don't change this file!
|
2
|
+
# Configure your app in config/environment.rb and config/environments/*.rb
|
2
3
|
|
3
|
-
unless defined?(RAILS_ROOT)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
+
# FIXME : Ruby 1.9
|
28
|
+
def preinitialize
|
29
|
+
load(preinitializer_path) if File.exists?(preinitializer_path)
|
30
|
+
end
|
31
|
+
|
32
|
+
def preinitializer_path
|
33
|
+
"#{RAILS_ROOT}/config/preinitializer.rb"
|
34
|
+
end
|
8
35
|
end
|
9
|
-
RAILS_ROOT = root_path
|
10
|
-
end
|
11
36
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
37
|
+
class Boot
|
38
|
+
def run
|
39
|
+
load_initializer
|
40
|
+
Rails::Initializer.run(:set_load_path)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
class VendorBoot < Boot
|
45
|
+
def load_initializer
|
46
|
+
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
class GemBoot < Boot
|
51
|
+
def load_initializer
|
52
|
+
self.class.load_rubygems
|
53
|
+
load_rails_gem
|
54
|
+
require 'initializer'
|
55
|
+
end
|
56
|
+
|
57
|
+
def load_rails_gem
|
58
|
+
if version = self.class.gem_version
|
59
|
+
gem 'rails', version
|
60
|
+
else
|
61
|
+
gem 'rails'
|
62
|
+
end
|
63
|
+
rescue Gem::LoadError => load_error
|
64
|
+
$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.)
|
65
|
+
exit 1
|
66
|
+
end
|
67
|
+
|
68
|
+
class << self
|
69
|
+
def rubygems_version
|
70
|
+
Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
|
71
|
+
end
|
72
|
+
|
73
|
+
def gem_version
|
74
|
+
if defined? RAILS_GEM_VERSION
|
75
|
+
RAILS_GEM_VERSION
|
76
|
+
elsif ENV.include?('RAILS_GEM_VERSION')
|
77
|
+
ENV['RAILS_GEM_VERSION']
|
78
|
+
else
|
79
|
+
parse_gem_version(read_environment_rb)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def load_rubygems
|
84
|
+
require 'rubygems'
|
85
|
+
|
86
|
+
unless rubygems_version >= '0.9.4'
|
87
|
+
$stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
88
|
+
exit 1
|
89
|
+
end
|
90
|
+
|
91
|
+
rescue LoadError
|
92
|
+
$stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
93
|
+
exit 1
|
94
|
+
end
|
95
|
+
|
96
|
+
def parse_gem_version(text)
|
97
|
+
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
98
|
+
end
|
99
|
+
|
100
|
+
private
|
101
|
+
def read_environment_rb
|
102
|
+
File.read("#{RAILS_ROOT}/config/environment.rb")
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
17
106
|
end
|
18
107
|
|
19
|
-
|
108
|
+
# All that for this:
|
109
|
+
Rails.boot!
|
data/config/environment.rb
CHANGED
@@ -1,64 +1,61 @@
|
|
1
|
-
# Be sure to restart your
|
1
|
+
# Be sure to restart your server when you modify this file
|
2
2
|
|
3
|
-
# Uncomment below to force Rails into production mode when
|
3
|
+
# Uncomment below to force Rails into production mode when
|
4
4
|
# you don't control web/app server and can't set it the proper way
|
5
5
|
# ENV['RAILS_ENV'] ||= 'production'
|
6
6
|
|
7
|
+
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
|
+
RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
|
9
|
+
|
7
10
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
8
11
|
require File.join(File.dirname(__FILE__), 'boot')
|
9
12
|
|
10
13
|
TEMP_DIR = File.expand_path(RAILS_ROOT + '/tmp')
|
11
14
|
|
12
15
|
Rails::Initializer.run do |config|
|
13
|
-
# Settings in config/environments/* take precedence those specified here
|
14
|
-
|
15
|
-
#
|
16
|
-
#
|
16
|
+
# Settings in config/environments/* take precedence over those specified here.
|
17
|
+
# Application configuration should go into files in config/initializers
|
18
|
+
# -- all .rb files in that directory are automatically loaded.
|
19
|
+
# See Rails::Configuration for more options.
|
20
|
+
|
21
|
+
# Skip frameworks you're not going to use (only works if using vendor/rails).
|
22
|
+
# To use Rails without a database, you must remove the Active Record framework
|
23
|
+
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
|
24
|
+
|
25
|
+
# Only load the plugins named here, in the order given. By default, all plugins
|
26
|
+
# in vendor/plugins are loaded in alphabetical order.
|
27
|
+
# :all can be used as a placeholder for all plugins not explicitly named
|
28
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
17
29
|
|
18
30
|
# Add additional load paths for your own custom dirs
|
19
31
|
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
20
32
|
|
21
|
-
# Force all environments to use the same logger level
|
33
|
+
# Force all environments to use the same logger level
|
22
34
|
# (by default production uses :info, the others :debug)
|
23
35
|
# config.log_level = :debug
|
24
36
|
|
25
|
-
#
|
26
|
-
#
|
37
|
+
# Your secret key for verifying cookie session data integrity.
|
38
|
+
# If you change this key, all old sessions will become invalid!
|
39
|
+
# Make sure the secret is at least 30 characters and all random,
|
40
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
41
|
+
config.action_controller.session = {
|
42
|
+
:session_key => '_motiro_session',
|
43
|
+
:secret => 'fad926e717afc0fb597d2d81b0ab461e4daa740ab5ec61196f3cf3572fb6ed452091478f14ca19f642e6a113bfe812d1bf4ae265317a8afe7a90a2e33de69986'
|
44
|
+
}
|
45
|
+
|
46
|
+
# Use the database for sessions instead of the cookie-based default,
|
47
|
+
# which shouldn't be used to store highly confidential information
|
48
|
+
# (create the session table with 'rake db:sessions:create')
|
27
49
|
# config.action_controller.session_store = :active_record_store
|
28
50
|
|
29
|
-
#
|
30
|
-
#
|
31
|
-
|
51
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
52
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
53
|
+
# like if you have constraints or database-specific column types
|
54
|
+
# config.active_record.schema_format = :sql
|
32
55
|
|
33
56
|
# Activate observers that should always be running
|
34
57
|
config.active_record.observers = :feed_observer
|
35
58
|
|
36
59
|
# Make Active Record use UTC-base instead of local time
|
37
60
|
# config.active_record.default_timezone = :utc
|
38
|
-
|
39
|
-
# Use Active Record's schema dumper instead of SQL when creating the test database
|
40
|
-
# (enables use of different database adapters for development and test environments)
|
41
|
-
config.active_record.schema_format = :ruby
|
42
|
-
|
43
|
-
# See Rails::Configuration for more options
|
44
61
|
end
|
45
|
-
|
46
|
-
# Add new inflection rules using the following format
|
47
|
-
# (all these examples are active by default):
|
48
|
-
# Inflector.inflections do |inflect|
|
49
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
50
|
-
# inflect.singular /^(ox)en/i, '\1'
|
51
|
-
# inflect.irregular 'person', 'people'
|
52
|
-
# inflect.uncountable %w( fish sheep )
|
53
|
-
# end
|
54
|
-
|
55
|
-
# Include your application configuration below
|
56
|
-
include Globalize
|
57
|
-
|
58
|
-
require_dependency 'import_translations'
|
59
|
-
require_dependency 'relative_time'
|
60
|
-
|
61
|
-
require 'core/version'
|
62
|
-
require 'core/wiki_page_not_found'
|
63
|
-
|
64
|
-
ActiveRecord::Base.schema_format = :sql
|
@@ -3,18 +3,16 @@
|
|
3
3
|
# In the development environment your application's code is reloaded on
|
4
4
|
# every request. This slows down response time but is perfect for development
|
5
5
|
# since you don't have to restart the webserver when you make code changes.
|
6
|
-
config.cache_classes
|
6
|
+
config.cache_classes = false
|
7
7
|
|
8
8
|
# Log error messages when you accidentally call methods on nil.
|
9
|
-
config.whiny_nils
|
10
|
-
|
11
|
-
# Enable the breakpoint server that script/breakpointer connects to
|
12
|
-
config.breakpoint_server = true
|
9
|
+
config.whiny_nils = true
|
13
10
|
|
14
11
|
# Show full error reports and disable caching
|
15
12
|
config.action_controller.consider_all_requests_local = true
|
13
|
+
config.action_view.debug_rjs = true
|
16
14
|
config.action_controller.perform_caching = false
|
15
|
+
config.action_view.cache_template_extensions = false
|
17
16
|
|
18
17
|
# Don't care if the mailer can't send
|
19
|
-
config.action_mailer.raise_delivery_errors = false
|
20
|
-
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
@@ -5,15 +5,15 @@
|
|
5
5
|
config.cache_classes = true
|
6
6
|
|
7
7
|
# Use a different logger for distributed setups
|
8
|
-
# config.logger
|
9
|
-
|
8
|
+
# config.logger = SyslogLogger.new
|
10
9
|
|
11
10
|
# Full error reports are disabled and caching is turned on
|
12
11
|
config.action_controller.consider_all_requests_local = false
|
13
12
|
config.action_controller.perform_caching = true
|
13
|
+
config.action_view.cache_template_loading = true
|
14
14
|
|
15
15
|
# Enable serving of images, stylesheets, and javascripts from an asset server
|
16
16
|
# config.action_controller.asset_host = "http://assets.example.com"
|
17
17
|
|
18
|
-
# Disable delivery errors
|
18
|
+
# Disable delivery errors, bad email addresses will be ignored
|
19
19
|
# config.action_mailer.raise_delivery_errors = false
|
data/config/environments/test.rb
CHANGED
@@ -7,13 +7,16 @@
|
|
7
7
|
config.cache_classes = true
|
8
8
|
|
9
9
|
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils
|
10
|
+
config.whiny_nils = true
|
11
11
|
|
12
12
|
# Show full error reports and disable caching
|
13
13
|
config.action_controller.consider_all_requests_local = true
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
|
+
# Disable request forgery protection in test environment
|
17
|
+
config.action_controller.allow_forgery_protection = false
|
18
|
+
|
16
19
|
# Tell ActionMailer not to deliver emails to the real world.
|
17
20
|
# The :test delivery method accumulates sent emails in the
|
18
21
|
# ActionMailer::Base.deliveries array.
|
19
|
-
config.action_mailer.delivery_method = :test
|
22
|
+
config.action_mailer.delivery_method = :test
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|