From: <zn...@us...> - 2009-03-06 14:04:16
|
Revision: 850 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=850&view=rev Author: znz Date: 2009-03-06 14:04:04 +0000 (Fri, 06 Mar 2009) Log Message: ----------- use named route for /cjk Modified Paths: -------------- trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/app/views/document/tutorial_en.html.erb trunk/viewsite/app/views/document/tutorial_ja.html.erb trunk/viewsite/app/views/layouts/document.html.erb trunk/viewsite/config/routes.rb Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-03-06 12:40:20 UTC (rev 849) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-03-06 14:04:04 UTC (rev 850) @@ -1,7 +1,7 @@ <%- @title ||= 'Kernels' -%> <ul> - <li><%= link_to 'Distribution Kernels', :row => nil, :col => nil %></li> + <li><%= link_to 'Distribution Kernels', cjk_path %></li> <li><%= link_to 'Vanilla Kernels', :row => '!d', :col => '!d' %></li> <li><%= link_to 'All Kernels', :row => 'all', :col => 'all' %></li> </ul> Modified: trunk/viewsite/app/views/document/tutorial_en.html.erb =================================================================== --- trunk/viewsite/app/views/document/tutorial_en.html.erb 2009-03-06 12:40:20 UTC (rev 849) +++ trunk/viewsite/app/views/document/tutorial_en.html.erb 2009-03-06 14:04:04 UTC (rev 850) @@ -12,7 +12,7 @@ <div class="content-cell"> <h1>Tutorial</h1> <h5> compatibility Table</h5> - <p>Please see <%= link_to 'Regression results', :controller => "compare_results", :action => "index", :row => nil, :col => nil %>. This table, Linux-Kernel System Call in between represents the compatibility. </p> + <p>Please see <%= link_to 'Regression results', cjk_path %>. This table, Linux-Kernel System Call in between represents the compatibility. </p> <p>Longitudinal axis of the table, with the horizontal axis indicates the Linux-Kernel version. Each is compatible with Linux-Kernel, is shown in the cell of the intersection. </p> <p>Appear in green if there is compatibility, incompatible if there is a System Call is displayed in red. </p> Modified: trunk/viewsite/app/views/document/tutorial_ja.html.erb =================================================================== --- trunk/viewsite/app/views/document/tutorial_ja.html.erb 2009-03-06 12:40:20 UTC (rev 849) +++ trunk/viewsite/app/views/document/tutorial_ja.html.erb 2009-03-06 14:04:04 UTC (rev 850) @@ -13,7 +13,7 @@ <div class="content-cell"> <h1>Tutorial</h1> <h5>互換性の表</h5> - <p><%= link_to 'リグレッション結果', :controller => "compare_results", :action => "index", :row => nil, :col => nil %>を見てください。この表は、Linux-Kernel間でのSystem Callの互換性を表しています。</p> + <p><%= link_to 'リグレッション結果', cjk_path %>を見てください。この表は、Linux-Kernel間でのSystem Callの互換性を表しています。</p> <p>表の縦軸、横軸共にLinux-Kernelのバージョンを示しています。各々のLinux-Kernelの互換性は、その交点のセルに表示されています。</p> <p>全てのSystem Callについて互換性があれば緑色で表示され、互換性のないSystem Callがある場合には赤色で表示されています。</p> Modified: trunk/viewsite/app/views/layouts/document.html.erb =================================================================== --- trunk/viewsite/app/views/layouts/document.html.erb 2009-03-06 12:40:20 UTC (rev 849) +++ trunk/viewsite/app/views/layouts/document.html.erb 2009-03-06 14:04:04 UTC (rev 850) @@ -93,7 +93,7 @@ </ul> <!-- Navigation item --> <ul> - <li><%= link_to 'Regression Results', :controller => 'compare_results', :action => 'index' %></li> + <li><%= link_to 'Regression Results', cjk_path %></li> </ul> <!-- Navigation item --> <ul> Modified: trunk/viewsite/config/routes.rb =================================================================== --- trunk/viewsite/config/routes.rb 2009-03-06 12:40:20 UTC (rev 849) +++ trunk/viewsite/config/routes.rb 2009-03-06 14:04:04 UTC (rev 850) @@ -35,7 +35,7 @@ map.root :controller => "document", :action => "index_en" # See how all your routes lay out with "rake routes" - map.connect 'cjk', :controller => "compare_results", :action => "index" + map.cjk 'cjk', :controller => "compare_results", :action => "index" # Install the default routes as the lowest priority. map.connect ':controller/:action/:id' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-03-19 07:07:47
|
Revision: 854 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=854&view=rev Author: znz Date: 2009-03-19 07:07:41 +0000 (Thu, 19 Mar 2009) Log Message: ----------- rails 2.2.2 -> 2.3.2 Modified Paths: -------------- trunk/viewsite/config/boot.rb trunk/viewsite/config/environment.rb Added Paths: ----------- trunk/viewsite/app/controllers/application_controller.rb Removed Paths: ------------- trunk/viewsite/app/controllers/application.rb Deleted: trunk/viewsite/app/controllers/application.rb =================================================================== --- trunk/viewsite/app/controllers/application.rb 2009-03-17 10:30:40 UTC (rev 853) +++ trunk/viewsite/app/controllers/application.rb 2009-03-19 07:07:41 UTC (rev 854) @@ -1,28 +0,0 @@ -# Filters added to this controller apply to all controllers in the application. -# Likewise, all the methods added will be available for all controllers. - -class ApplicationController < ActionController::Base - helper :all # include all helpers, all the time - - # See ActionController::RequestForgeryProtection for details - # Uncomment the :secret if you're not using the cookie session store - protect_from_forgery # :secret => 'a1fa903c40853ae126cd5743e772b00b' - - # do not use session as default - #session :disabled => true - - private - - # validate params[key] includes safe characters only - def check_params(*keys) - keys.each do |key| - case key - when :syscall - re = /\A[\w\-\/]+\z/ - else - re = /\A[\w\-.]+\z/ - end - raise "invalid #{key} parameter" if re !~ params[key] - end - end -end Copied: trunk/viewsite/app/controllers/application_controller.rb (from rev 853, trunk/viewsite/app/controllers/application.rb) =================================================================== --- trunk/viewsite/app/controllers/application_controller.rb (rev 0) +++ trunk/viewsite/app/controllers/application_controller.rb 2009-03-19 07:07:41 UTC (rev 854) @@ -0,0 +1,28 @@ +# Filters added to this controller apply to all controllers in the application. +# Likewise, all the methods added will be available for all controllers. + +class ApplicationController < ActionController::Base + helper :all # include all helpers, all the time + + # See ActionController::RequestForgeryProtection for details + # Uncomment the :secret if you're not using the cookie session store + protect_from_forgery # :secret => 'a1fa903c40853ae126cd5743e772b00b' + + # do not use session as default + #session :disabled => true + + private + + # validate params[key] includes safe characters only + def check_params(*keys) + keys.each do |key| + case key + when :syscall + re = /\A[\w\-\/]+\z/ + else + re = /\A[\w\-.]+\z/ + end + raise "invalid #{key} parameter" if re !~ params[key] + end + end +end Modified: trunk/viewsite/config/boot.rb =================================================================== --- trunk/viewsite/config/boot.rb 2009-03-17 10:30:40 UTC (rev 853) +++ trunk/viewsite/config/boot.rb 2009-03-19 07:07:41 UTC (rev 854) @@ -44,6 +44,7 @@ def load_initializer require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" Rails::Initializer.run(:install_gem_spec_stubs) + Rails::GemDependency.add_frozen_gem_path end end Modified: trunk/viewsite/config/environment.rb =================================================================== --- trunk/viewsite/config/environment.rb 2009-03-17 10:30:40 UTC (rev 853) +++ trunk/viewsite/config/environment.rb 2009-03-19 07:07:41 UTC (rev 854) @@ -5,7 +5,7 @@ # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present -RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION +RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-03-19 07:08:17
|
Revision: 855 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=855&view=rev Author: znz Date: 2009-03-19 07:08:13 +0000 (Thu, 19 Mar 2009) Log Message: ----------- add compare_result.compared_by Modified Paths: -------------- trunk/viewsite/app/views/compare_results/show.html.erb trunk/viewsite/script/crackerjack/create_compare_result Added Paths: ----------- trunk/viewsite/db/migrate/20090318123628_add_compared_by.rb Modified: trunk/viewsite/app/views/compare_results/show.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/show.html.erb 2009-03-19 07:07:41 UTC (rev 854) +++ trunk/viewsite/app/views/compare_results/show.html.erb 2009-03-19 07:08:13 UTC (rev 855) @@ -36,7 +36,7 @@ <li> Compared by: <span class="version"> - testcases version <%=h Crackerjack::Info::VERSION %> + testcases version <%=h @compare_result.compared_by %> </span> </li> </ul> Added: trunk/viewsite/db/migrate/20090318123628_add_compared_by.rb =================================================================== --- trunk/viewsite/db/migrate/20090318123628_add_compared_by.rb (rev 0) +++ trunk/viewsite/db/migrate/20090318123628_add_compared_by.rb 2009-03-19 07:08:13 UTC (rev 855) @@ -0,0 +1,19 @@ +class AddComparedBy < ActiveRecord::Migration + def self.up + change_table :compare_results do |t| + t.string :compared_by, :default => Crackerjack::Info::VERSION, :null => false + end + CompareResult.reset_column_information + CompareResult.all.each do |compare_result| + compare_result.compared_by = "2.1.0" # Crackerjack::Info::VERSION + compare_result.save! + end + change_column :compare_results, :compared_by, :string, :default => nil + end + + def self.down + change_table :compare_results do |t| + t.remove :compared_by + end + end +end Modified: trunk/viewsite/script/crackerjack/create_compare_result =================================================================== --- trunk/viewsite/script/crackerjack/create_compare_result 2009-03-19 07:07:41 UTC (rev 854) +++ trunk/viewsite/script/crackerjack/create_compare_result 2009-03-19 07:08:13 UTC (rev 855) @@ -27,6 +27,7 @@ c_result = CompareResult.create!({ :a_execute_result => a_result, :b_execute_result => b_result, + :compared_by => Crackerjack::Info::VERSION, }) end a_result.execute_logs.each do |a_log| This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-03-19 08:04:02
|
Revision: 856 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=856&view=rev Author: znz Date: 2009-03-19 08:03:56 +0000 (Thu, 19 Mar 2009) Log Message: ----------- merge diff of generated between rails 2.2.2 and 2.3.2 Modified Paths: -------------- trunk/viewsite/README trunk/viewsite/app/controllers/application_controller.rb trunk/viewsite/config/environment.rb trunk/viewsite/config/environments/production.rb trunk/viewsite/config/environments/test.rb trunk/viewsite/config/initializers/inflections.rb trunk/viewsite/doc/README_FOR_APP trunk/viewsite/public/500.html trunk/viewsite/public/images/rails.png trunk/viewsite/test/test_helper.rb Added Paths: ----------- trunk/viewsite/config/initializers/backtrace_silencers.rb trunk/viewsite/config/initializers/new_rails_defaults.rb trunk/viewsite/config/initializers/session_store.rb trunk/viewsite/config.ru trunk/viewsite/public/index.html Removed Paths: ------------- trunk/viewsite/public/dispatch.cgi trunk/viewsite/public/dispatch.fcgi trunk/viewsite/public/dispatch.rb trunk/viewsite/script/performance/request trunk/viewsite/script/process/ Modified: trunk/viewsite/README =================================================================== --- trunk/viewsite/README 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/README 2009-03-19 08:03:56 UTC (rev 856) @@ -1,15 +1,15 @@ == Welcome to Rails -Rails is a web-application and persistence framework that includes everything -needed to create database-backed web-applications according to the -Model-View-Control pattern of separation. This pattern splits the view (also -called the presentation) into "dumb" templates that are primarily responsible -for inserting pre-built data in between HTML tags. The model contains the -"smart" domain objects (such as Account, Product, Person, Post) that holds all -the business logic and knows how to persist themselves to a database. The -controller handles the incoming requests (such as Save New Account, Update -Product, Show Post) by manipulating the model and directing data to the view. +Rails is a web-application framework that includes everything needed to create +database-backed web applications according to the Model-View-Control pattern. +This pattern splits the view (also called the presentation) into "dumb" templates +that are primarily responsible for inserting pre-built data in between HTML tags. +The model contains the "smart" domain objects (such as Account, Product, Person, +Post) that holds all the business logic and knows how to persist themselves to +a database. The controller handles the incoming requests (such as Save New Account, +Update Product, Show Post) by manipulating the model and directing data to the view. + In Rails, the model is handled by what's called an object-relational mapping layer entitled Active Record. This layer allows you to present the data from database rows as objects and embellish these data objects with business logic @@ -29,39 +29,69 @@ 1. At the command prompt, start a new Rails application using the <tt>rails</tt> command and your application name. Ex: rails myapp - (If you've downloaded Rails in a complete tgz or zip, this step is already done) 2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options) -3. Go to http://localhost:3000/ and get "Welcome aboard: You’re riding the Rails!" +3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!" 4. Follow the guidelines to start developing your application == Web Servers -By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise -Rails will use WEBrick, the webserver that ships with Ruby. When you run script/server, -Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures -that you can always get up and running quickly. +By default, Rails will try to use Mongrel if it's are installed when started with script/server, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails +with a variety of other web servers. Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is suitable for development and deployment of Rails applications. If you have Ruby Gems installed, getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>. More info at: http://mongrel.rubyforge.org -If Mongrel is not installed, Rails will look for lighttpd. It's considerably faster than -Mongrel and WEBrick and also suited for production use, but requires additional -installation and currently only works well on OS X/Unix (Windows users are encouraged -to start with Mongrel). We recommend version 1.4.11 and higher. You can download it from -http://www.lighttpd.net. +Say other Ruby web servers like Thin and Ebb or regular web servers like Apache or LiteSpeed or +Lighttpd or IIS. The Ruby web servers are run through Rack and the latter can either be setup to use +FCGI or proxy to a pack of Mongrels/Thin/Ebb servers. -And finally, if neither Mongrel or lighttpd are installed, Rails will use the built-in Ruby -web server, WEBrick. WEBrick is a small Ruby web server suitable for development, but not -for production. +== Apache .htaccess example for FCGI/CGI -But of course its also possible to run Rails on any platform that supports FCGI. -Apache, LiteSpeed, IIS are just a few. For more information on FCGI, -please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI +# General Apache options +AddHandler fastcgi-script .fcgi +AddHandler cgi-script .cgi +Options +FollowSymLinks +ExecCGI +# If you don't want Rails to look in certain directories, +# use the following rewrite rules so that Apache won't rewrite certain requests +# +# Example: +# RewriteCond %{REQUEST_URI} ^/notrails.* +# RewriteRule .* - [L] +# Redirect all requests not available on the filesystem to Rails +# By default the cgi dispatcher is used which is very slow +# +# For better performance replace the dispatcher with the fastcgi one +# +# Example: +# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] +RewriteEngine On + +# If your Rails application is accessed via an Alias directive, +# then you MUST also set the RewriteBase in this htaccess file. +# +# Example: +# Alias /myrailsapp /path/to/myrailsapp/public +# RewriteBase /myrailsapp + +RewriteRule ^$ index.html [QSA] +RewriteRule ^([^.]+)$ $1.html [QSA] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.*)$ dispatch.cgi [QSA,L] + +# In case Rails experiences terminal errors +# Instead of displaying this message you can supply a file here which will be rendered instead +# +# Example: +# ErrorDocument 500 /500.html + +ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" + + == Debugging Rails Sometimes your application goes wrong. Fortunately there are a lot of tools that @@ -102,7 +132,9 @@ Debugger support is available through the debugger command when you start your Mongrel or Webrick server with --debugger. This means that you can break out of execution at any point -in the code, investigate and change the model, AND then resume execution! Example: +in the code, investigate and change the model, AND then resume execution! +You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug' +Example: class WeblogController < ActionController::Base def index @@ -140,7 +172,14 @@ To reload your controllers and models after launching the console run <tt>reload!</tt> +== dbconsole +You can go to the command line of your database directly through <tt>script/dbconsole</tt>. +You would be connected to the database with the credentials defined in database.yml. +Starting the script without arguments will connect you to the development database. Passing an +argument will connect you to a different database, like <tt>script/dbconsole production</tt>. +Currently works for mysql, postgresql and sqlite. + == Description of Contents app @@ -157,13 +196,13 @@ app/views Holds the template files for the view that should be named like - weblogs/index.erb for the WeblogsController#index action. All views use eRuby + weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby syntax. app/views/layouts Holds the template files for layouts to be used with views. This models the common header/footer method of wrapping views. In your views, define a layout using the - <tt>layout :default</tt> and create a file named default.erb. Inside default.erb, + <tt>layout :default</tt> and create a file named default.html.erb. Inside default.html.erb, call <% yield %> to render the view using this layout. app/helpers @@ -200,4 +239,5 @@ vendor External libraries that the application depends on. Also includes the plugins subdirectory. + If the app has frozen rails, those gems also go here, under vendor/rails/. This directory is in the load path. Modified: trunk/viewsite/app/controllers/application_controller.rb =================================================================== --- trunk/viewsite/app/controllers/application_controller.rb 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/app/controllers/application_controller.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -3,10 +3,10 @@ class ApplicationController < ActionController::Base helper :all # include all helpers, all the time + protect_from_forgery # See ActionController::RequestForgeryProtection for details - # See ActionController::RequestForgeryProtection for details - # Uncomment the :secret if you're not using the cookie session store - protect_from_forgery # :secret => 'a1fa903c40853ae126cd5743e772b00b' + # Scrub sensitive parameters from your log + # filter_parameter_logging :password # do not use session as default #session :disabled => true Modified: trunk/viewsite/config/environment.rb =================================================================== --- trunk/viewsite/config/environment.rb 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/config/environment.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -1,93 +1,42 @@ # Be sure to restart your server when you modify this file -# Uncomment below to force Rails into production mode when -# you don't control web/app server and can't set it the proper way -# ENV['RAILS_ENV'] ||= 'production' - # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') -secret = nil -secret_path = Pathname.new(RAILS_ROOT) + 'config/secret.txt' -begin - secret = secret_path.read.chomp -rescue Errno::ENOENT - begin - require "securerandom" - rescue LoadError - # copy from ruby_1_8 - require "fallback/securerandom" - end - secret_path.open("wb", 0600) do |f| - f.write SecureRandom.hex(64) - end - retry -end - Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. - # See Rails::Configuration for more options. - # Skip frameworks you're not going to use. To use Rails without a database - # you must remove the Active Record framework. - #config.frameworks -= [ :active_record, :active_resource, :action_mailer ] - config.frameworks -= [ :action_mailer ] + # Add additional load paths for your own custom dirs + # config.load_paths += %W( #{RAILS_ROOT}/extras ) - # Specify gems that this application depends on. - # They can then be installed with "rake gems:install" on new installations. - # You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3) + # Specify gems that this application depends on and have them installed with rake gems:install # config.gem "bj" # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net" # config.gem "sqlite3-ruby", :lib => "sqlite3" # config.gem "aws-s3", :lib => "aws/s3" - # Only load the plugins named here, in the order given. By default, all plugins - # in vendor/plugins are loaded in alphabetical order. + # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - # Add additional load paths for your own custom dirs - # config.load_paths += %W( #{RAILS_ROOT}/extras ) + # Skip frameworks you're not going to use. To use Rails without a database, + # you must remove the Active Record framework. + # config.frameworks -= [ :active_record, :active_resource, :action_mailer ] + config.frameworks -= [ :action_mailer ] - # Force all environments to use the same logger level - # (by default production uses :info, the others :debug) - # config.log_level = :debug + # Activate observers that should always be running + # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - # Make Time.zone default to the specified zone, and make Active Record store time values - # in the database in UTC, and return them converted to the specified local zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time. + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. + # Run "rake -D time" for a list of tasks for finding time zone names. config.time_zone = 'UTC' - # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths. - # All files from config/locales/*.rb,yml are added automatically. - # config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')] + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. + # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')] # config.i18n.default_locale = :de - - # Your secret key for verifying cookie session data integrity. - # If you change this key, all old sessions will become invalid! - # Make sure the secret is at least 30 characters and all random, - # no regular words or you'll be exposed to dictionary attacks. - config.action_controller.session = { - :session_key => '_crackerjack_session', - :secret => secret - } - - # Use the database for sessions instead of the cookie-based default, - # which shouldn't be used to store highly confidential information - # (create the session table with "rake db:sessions:create") - # config.action_controller.session_store = :active_record_store - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Activate observers that should always be running - # Please note that observers generated using script/generate observer need to have an _observer suffix - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer end Modified: trunk/viewsite/config/environments/production.rb =================================================================== --- trunk/viewsite/config/environments/production.rb 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/config/environments/production.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -4,18 +4,25 @@ # Code is not reloaded between requests config.cache_classes = true -# Enable threaded mode -# config.threadsafe! +# Full error reports are disabled and caching is turned on +config.action_controller.consider_all_requests_local = false +config.action_controller.perform_caching = true +config.action_view.cache_template_loading = true +# See everything in the log (default is :info) +# config.log_level = :debug + # Use a different logger for distributed setups # config.logger = SyslogLogger.new -# Full error reports are disabled and caching is turned on -config.action_controller.consider_all_requests_local = false -config.action_controller.perform_caching = true +# Use a different cache store in production +# config.cache_store = :mem_cache_store # Enable serving of images, stylesheets, and javascripts from an asset server -# config.action_controller.asset_host = "http://assets.example.com" +# config.action_controller.asset_host = "http://assets.example.com" # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false + +# Enable threaded mode +# config.threadsafe! Modified: trunk/viewsite/config/environments/test.rb =================================================================== --- trunk/viewsite/config/environments/test.rb 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/config/environments/test.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -12,11 +12,17 @@ # Show full error reports and disable caching config.action_controller.consider_all_requests_local = true config.action_controller.perform_caching = false +config.action_view.cache_template_loading = true # Disable request forgery protection in test environment config.action_controller.allow_forgery_protection = false -# Tell ActionMailer not to deliver emails to the real world. +# Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + +# Use SQL instead of Active Record's schema dumper when creating the test database. +# This is necessary if your schema can't be completely dumped by the schema dumper, +# like if you have constraints or database-specific column types +# config.active_record.schema_format = :sql Added: trunk/viewsite/config/initializers/backtrace_silencers.rb =================================================================== --- trunk/viewsite/config/initializers/backtrace_silencers.rb (rev 0) +++ trunk/viewsite/config/initializers/backtrace_silencers.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code. +# Rails.backtrace_cleaner.remove_silencers! \ No newline at end of file Modified: trunk/viewsite/config/initializers/inflections.rb =================================================================== --- trunk/viewsite/config/initializers/inflections.rb 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/config/initializers/inflections.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -2,7 +2,7 @@ # Add new inflection rules using the following format # (all these examples are active by default): -# Inflector.inflections do |inflect| +# ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' Added: trunk/viewsite/config/initializers/new_rails_defaults.rb =================================================================== --- trunk/viewsite/config/initializers/new_rails_defaults.rb (rev 0) +++ trunk/viewsite/config/initializers/new_rails_defaults.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -0,0 +1,19 @@ +# Be sure to restart your server when you modify this file. + +# These settings change the behavior of Rails 2 apps and will be defaults +# for Rails 3. You can remove this initializer when Rails 3 is released. + +if defined?(ActiveRecord) + # Include Active Record class name as root for JSON serialized output. + ActiveRecord::Base.include_root_in_json = true + + # Store the full class name (including module namespace) in STI type column. + ActiveRecord::Base.store_full_sti_class = true +end + +# Use ISO 8601 format for JSON serialized times and dates. +ActiveSupport.use_standard_json_time_format = true + +# Don't escape HTML entities in JSON, leave that for the #json_escape helper. +# if you're including raw json in an HTML page. +ActiveSupport.escape_html_entities_in_json = false \ No newline at end of file Added: trunk/viewsite/config/initializers/session_store.rb =================================================================== --- trunk/viewsite/config/initializers/session_store.rb (rev 0) +++ trunk/viewsite/config/initializers/session_store.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -0,0 +1,32 @@ +# Be sure to restart your server when you modify this file. + +secret = nil +secret_path = Pathname.new(RAILS_ROOT) + 'config/secret.txt' +begin + secret = secret_path.read.chomp +rescue Errno::ENOENT + begin + require "securerandom" + rescue LoadError + # copy from ruby_1_8 + require "fallback/securerandom" + end + secret_path.open("wb", 0600) do |f| + f.write SecureRandom.hex(64) + end + retry +end + +# Your secret key for verifying cookie session data integrity. +# If you change this key, all old sessions will become invalid! +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +ActionController::Base.session = { + :key => '_crackerjack_session', + :secret => secret +} + +# Use the database for sessions instead of the cookie-based default, +# which shouldn't be used to store highly confidential information +# (create the session table with "rake db:sessions:create") +# ActionController::Base.session_store = :active_record_store Added: trunk/viewsite/config.ru =================================================================== --- trunk/viewsite/config.ru (rev 0) +++ trunk/viewsite/config.ru 2009-03-19 08:03:56 UTC (rev 856) @@ -0,0 +1,7 @@ +# Rack Dispatcher + +# Require your environment file to bootstrap Rails +require File.dirname(__FILE__) + '/config/environment' + +# Dispatch the request +run ActionController::Dispatcher.new Modified: trunk/viewsite/doc/README_FOR_APP =================================================================== --- trunk/viewsite/doc/README_FOR_APP 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/doc/README_FOR_APP 2009-03-19 08:03:56 UTC (rev 856) @@ -1,5 +1,2 @@ -To build the guides: - -* Install source-highlighter (http://www.gnu.org/software/src-highlite/source-highlight.html) -* Install the mizuho gem (http://github.com/FooBarWidget/mizuho/tree/master) -* Run `rake guides` from the railties directory \ No newline at end of file +Use this README file to introduce your application and point to useful places in the API for learning more. +Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. Modified: trunk/viewsite/public/500.html =================================================================== --- trunk/viewsite/public/500.html 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/public/500.html 2009-03-19 08:03:56 UTC (rev 856) @@ -25,9 +25,6 @@ <div class="dialog"> <h1>We're sorry, but something went wrong.</h1> <p>We've been notified about this issue and we'll take a look at it shortly.</p> - <p><small>(If you're the administrator of this website, then please read - the log file "<%=h RAILS_ENV %>.log" - to find out what went wrong.)</small></p> </div> </body> </html> Deleted: trunk/viewsite/public/dispatch.cgi =================================================================== --- trunk/viewsite/public/dispatch.cgi 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/public/dispatch.cgi 2009-03-19 08:03:56 UTC (rev 856) @@ -1,10 +0,0 @@ -#!/home/kazu/opt/ruby18/bin/ruby18 - -require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) - -# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: -# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired -require "dispatcher" - -ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) -Dispatcher.dispatch Deleted: trunk/viewsite/public/dispatch.fcgi =================================================================== --- trunk/viewsite/public/dispatch.fcgi 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/public/dispatch.fcgi 2009-03-19 08:03:56 UTC (rev 856) @@ -1,24 +0,0 @@ -#!/home/kazu/opt/ruby18/bin/ruby18 -# -# You may specify the path to the FastCGI crash log (a log of unhandled -# exceptions which forced the FastCGI instance to exit, great for debugging) -# and the number of requests to process before running garbage collection. -# -# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log -# and the GC period is nil (turned off). A reasonable number of requests -# could range from 10-100 depending on the memory footprint of your app. -# -# Example: -# # Default log path, normal GC behavior. -# RailsFCGIHandler.process! -# -# # Default log path, 50 requests between GC. -# RailsFCGIHandler.process! nil, 50 -# -# # Custom log path, normal GC behavior. -# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log' -# -require File.dirname(__FILE__) + "/../config/environment" -require 'fcgi_handler' - -RailsFCGIHandler.process! Deleted: trunk/viewsite/public/dispatch.rb =================================================================== --- trunk/viewsite/public/dispatch.rb 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/public/dispatch.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -1,10 +0,0 @@ -#!/home/kazu/opt/ruby18/bin/ruby18 - -require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) - -# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: -# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired -require "dispatcher" - -ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) -Dispatcher.dispatch Modified: trunk/viewsite/public/images/rails.png =================================================================== (Binary files differ) Added: trunk/viewsite/public/index.html =================================================================== --- trunk/viewsite/public/index.html (rev 0) +++ trunk/viewsite/public/index.html 2009-03-19 08:03:56 UTC (rev 856) @@ -0,0 +1,275 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> + <title>Ruby on Rails: Welcome aboard</title> + <style type="text/css" media="screen"> + body { + margin: 0; + margin-bottom: 25px; + padding: 0; + background-color: #f0f0f0; + font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana"; + font-size: 13px; + color: #333; + } + + h1 { + font-size: 28px; + color: #000; + } + + a {color: #03c} + a:hover { + background-color: #03c; + color: white; + text-decoration: none; + } + + + #page { + background-color: #f0f0f0; + width: 750px; + margin: 0; + margin-left: auto; + margin-right: auto; + } + + #content { + float: left; + background-color: white; + border: 3px solid #aaa; + border-top: none; + padding: 25px; + width: 500px; + } + + #sidebar { + float: right; + width: 175px; + } + + #footer { + clear: both; + } + + + #header, #about, #getting-started { + padding-left: 75px; + padding-right: 30px; + } + + + #header { + background-image: url("images/rails.png"); + background-repeat: no-repeat; + background-position: top left; + height: 64px; + } + #header h1, #header h2 {margin: 0} + #header h2 { + color: #888; + font-weight: normal; + font-size: 16px; + } + + + #about h3 { + margin: 0; + margin-bottom: 10px; + font-size: 14px; + } + + #about-content { + background-color: #ffd; + border: 1px solid #fc0; + margin-left: -11px; + } + #about-content table { + margin-top: 10px; + margin-bottom: 10px; + font-size: 11px; + border-collapse: collapse; + } + #about-content td { + padding: 10px; + padding-top: 3px; + padding-bottom: 3px; + } + #about-content td.name {color: #555} + #about-content td.value {color: #000} + + #about-content.failure { + background-color: #fcc; + border: 1px solid #f00; + } + #about-content.failure p { + margin: 0; + padding: 10px; + } + + + #getting-started { + border-top: 1px solid #ccc; + margin-top: 25px; + padding-top: 15px; + } + #getting-started h1 { + margin: 0; + font-size: 20px; + } + #getting-started h2 { + margin: 0; + font-size: 14px; + font-weight: normal; + color: #333; + margin-bottom: 25px; + } + #getting-started ol { + margin-left: 0; + padding-left: 0; + } + #getting-started li { + font-size: 18px; + color: #888; + margin-bottom: 25px; + } + #getting-started li h2 { + margin: 0; + font-weight: normal; + font-size: 18px; + color: #333; + } + #getting-started li p { + color: #555; + font-size: 13px; + } + + + #search { + margin: 0; + padding-top: 10px; + padding-bottom: 10px; + font-size: 11px; + } + #search input { + font-size: 11px; + margin: 2px; + } + #search-text {width: 170px} + + + #sidebar ul { + margin-left: 0; + padding-left: 0; + } + #sidebar ul h3 { + margin-top: 25px; + font-size: 16px; + padding-bottom: 10px; + border-bottom: 1px solid #ccc; + } + #sidebar li { + list-style-type: none; + } + #sidebar ul.links li { + margin-bottom: 5px; + } + + </style> + <script type="text/javascript" src="javascripts/prototype.js"></script> + <script type="text/javascript" src="javascripts/effects.js"></script> + <script type="text/javascript"> + function about() { + if (Element.empty('about-content')) { + new Ajax.Updater('about-content', 'rails/info/properties', { + method: 'get', + onFailure: function() {Element.classNames('about-content').add('failure')}, + onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})} + }); + } else { + new Effect[Element.visible('about-content') ? + 'BlindUp' : 'BlindDown']('about-content', {duration: 0.25}); + } + } + + window.onload = function() { + $('search-text').value = ''; + $('search').onsubmit = function() { + $('search-text').value = 'site:rubyonrails.org ' + $F('search-text'); + } + } + </script> + </head> + <body> + <div id="page"> + <div id="sidebar"> + <ul id="sidebar-items"> + <li> + <form id="search" action="http://www.google.com/search" method="get"> + <input type="hidden" name="hl" value="en" /> + <input type="text" id="search-text" name="q" value="site:rubyonrails.org " /> + <input type="submit" value="Search" /> the Rails site + </form> + </li> + + <li> + <h3>Join the community</h3> + <ul class="links"> + <li><a href="http://www.rubyonrails.org/">Ruby on Rails</a></li> + <li><a href="http://weblog.rubyonrails.org/">Official weblog</a></li> + <li><a href="http://wiki.rubyonrails.org/">Wiki</a></li> + </ul> + </li> + + <li> + <h3>Browse the documentation</h3> + <ul class="links"> + <li><a href="http://api.rubyonrails.org/">Rails API</a></li> + <li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li> + <li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li> + <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li> + </ul> + </li> + </ul> + </div> + + <div id="content"> + <div id="header"> + <h1>Welcome aboard</h1> + <h2>You’re riding Ruby on Rails!</h2> + </div> + + <div id="about"> + <h3><a href="rails/info/properties" onclick="about(); return false">About your application’s environment</a></h3> + <div id="about-content" style="display: none"></div> + </div> + + <div id="getting-started"> + <h1>Getting started</h1> + <h2>Here’s how to get rolling:</h2> + + <ol> + <li> + <h2>Use <tt>script/generate</tt> to create your models and controllers</h2> + <p>To see all available options, run it without parameters.</p> + </li> + + <li> + <h2>Set up a default route and remove or rename this file</h2> + <p>Routes are set up in config/routes.rb.</p> + </li> + + <li> + <h2>Create your database</h2> + <p>Run <tt>rake db:migrate</tt> to create your database. If you're not using SQLite (the default), edit <tt>config/database.yml</tt> with your username and password.</p> + </li> + </ol> + </div> + </div> + + <div id="footer"> </div> + </div> + </body> +</html> \ No newline at end of file Deleted: trunk/viewsite/script/performance/request =================================================================== --- trunk/viewsite/script/performance/request 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/script/performance/request 2009-03-19 08:03:56 UTC (rev 856) @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/performance/request' Modified: trunk/viewsite/test/test_helper.rb =================================================================== --- trunk/viewsite/test/test_helper.rb 2009-03-19 07:08:13 UTC (rev 855) +++ trunk/viewsite/test/test_helper.rb 2009-03-19 08:03:56 UTC (rev 856) @@ -8,7 +8,7 @@ # ignore end -class Test::Unit::TestCase +class ActiveSupport::TestCase # Transactional fixtures accelerate your tests by wrapping each test method # in a transaction that's rolled back on completion. This ensures that the # test database remains unchanged so your fixtures don't have to be reloaded This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-03-19 08:04:34
|
Revision: 857 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=857&view=rev Author: znz Date: 2009-03-19 08:04:33 +0000 (Thu, 19 Mar 2009) Log Message: ----------- set compared_by in before_validation_on_create Modified Paths: -------------- trunk/viewsite/app/models/compare_result.rb trunk/viewsite/script/crackerjack/create_compare_result trunk/viewsite/test/fixtures/compare_results.yml Modified: trunk/viewsite/app/models/compare_result.rb =================================================================== --- trunk/viewsite/app/models/compare_result.rb 2009-03-19 08:03:56 UTC (rev 856) +++ trunk/viewsite/app/models/compare_result.rb 2009-03-19 08:04:33 UTC (rev 857) @@ -6,6 +6,12 @@ validates_associated :a_execute_result validates_associated :b_execute_result + validates_presence_of :compared_by + + def before_validation_on_create + self.compared_by = Crackerjack::Info::VERSION + end + def to_result a = [] a << "SAME:#{ok_count}" if 0< ok_count.to_i Modified: trunk/viewsite/script/crackerjack/create_compare_result =================================================================== --- trunk/viewsite/script/crackerjack/create_compare_result 2009-03-19 08:03:56 UTC (rev 856) +++ trunk/viewsite/script/crackerjack/create_compare_result 2009-03-19 08:04:33 UTC (rev 857) @@ -27,7 +27,6 @@ c_result = CompareResult.create!({ :a_execute_result => a_result, :b_execute_result => b_result, - :compared_by => Crackerjack::Info::VERSION, }) end a_result.execute_logs.each do |a_log| Modified: trunk/viewsite/test/fixtures/compare_results.yml =================================================================== --- trunk/viewsite/test/fixtures/compare_results.yml 2009-03-19 08:03:56 UTC (rev 856) +++ trunk/viewsite/test/fixtures/compare_results.yml 2009-03-19 08:04:33 UTC (rev 857) @@ -6,6 +6,7 @@ error_count: 0 a_execute_result: centos52 b_execute_result: centos52 + compared_by: 2.1.0 c_u: ok_count: 0 @@ -13,6 +14,7 @@ error_count: 0 a_execute_result: centos52 b_execute_result: ubuntu804 + compared_by: 2.1.0 u_c: ok_count: 0 @@ -20,6 +22,7 @@ error_count: 1 a_execute_result: ubuntu804 b_execute_result: centos52 + compared_by: 2.1.0 u_u: ok_count: 1 @@ -27,3 +30,4 @@ error_count: 0 a_execute_result: ubuntu804 b_execute_result: ubuntu804 + compared_by: 2.1.0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-04-30 04:02:11
|
Revision: 869 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=869&view=rev Author: znz Date: 2009-04-30 04:02:05 +0000 (Thu, 30 Apr 2009) Log Message: ----------- split application.css Modified Paths: -------------- trunk/viewsite/app/views/layouts/application.html.erb Added Paths: ----------- trunk/viewsite/public/stylesheets/application.css Modified: trunk/viewsite/app/views/layouts/application.html.erb =================================================================== --- trunk/viewsite/app/views/layouts/application.html.erb 2009-04-30 04:01:36 UTC (rev 868) +++ trunk/viewsite/app/views/layouts/application.html.erb 2009-04-30 04:02:05 UTC (rev 869) @@ -5,32 +5,9 @@ <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <%- @title ||= "#{controller.controller_name.humanize}: #{controller.action_name}" -%> <title><%=h @title %></title> - <%#= stylesheet_link_tag 'scaffold' %> + <%= stylesheet_link_tag 'application' %> <link rel="icon" type="image/x-icon" href="<%= image_path 'favicon.ico' %>" /> <link rel="canonical" href="<%= url_for {} %>" /> - <style type="text/css"> - .version { - font-size: small; - } - table { - border-collapse: collapse; - } - th, td { - border: 2px solid lightgrey; - } - pre { - font-family: monospace; - border: 2px solid lightgrey; - white-space: pre-wrap; - } - .footer { - font-size: small; - text-align: right; - } - a { - text-decoration: none; - } - </style> </head> <body> <h2 class="header"> Added: trunk/viewsite/public/stylesheets/application.css =================================================================== --- trunk/viewsite/public/stylesheets/application.css (rev 0) +++ trunk/viewsite/public/stylesheets/application.css 2009-04-30 04:02:05 UTC (rev 869) @@ -0,0 +1,21 @@ +.version { + font-size: small; +} +table { + border-collapse: collapse; +} +th, td { + border: 2px solid lightgrey; +} +pre { + font-family: monospace; + border: 2px solid lightgrey; + white-space: pre-wrap; +} +.footer { + font-size: small; + text-align: right; +} +a { + text-decoration: none; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-04-30 04:03:30
|
Revision: 872 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=872&view=rev Author: znz Date: 2009-04-30 04:03:21 +0000 (Thu, 30 Apr 2009) Log Message: ----------- add removed item to select Modified Paths: -------------- trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/public/javascripts/application.js Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-04-30 04:02:53 UTC (rev 871) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-04-30 04:03:21 UTC (rev 872) @@ -23,7 +23,7 @@ <tr> <th>A \ B</th> <%- @cols.each do |col| -%> - <th class="col_<%= col.id %>"> + <th class="col_<%= col.id %>" id="col_name_<%= col.id %>"> <%=h col.display_name %> </th> <%- end -%> @@ -31,7 +31,7 @@ <%- @rows.each do |row| -%> <tr id="row_<%= row.id %>"> - <th> + <th id="row_name_<%= row.id %>"> <%=h row.display_name %> </th> <%- @cols.each do |col| -%> @@ -44,7 +44,7 @@ <%- end -%> <%- end -%> <td> - <button onclick="$('row_<%= row.id %>').remove()">Delete</button> + <button onclick="App.removeRow(<%= row.id %>)">Delete</button> </td> </tr> <%- end -%> @@ -53,7 +53,7 @@ <th></th> <%- @cols.each do |col| -%> <th class="col_<%= col.id %>"> - <button onclick="$$('.col_<%= col.id %>').each(function(e){e.remove();})">Delete</button> + <button onclick="App.removeCol(<%= col.id %>)">Delete</button> </th> <%- end -%> </tr> Modified: trunk/viewsite/public/javascripts/application.js =================================================================== --- trunk/viewsite/public/javascripts/application.js 2009-04-30 04:02:53 UTC (rev 871) +++ trunk/viewsite/public/javascripts/application.js 2009-04-30 04:03:21 UTC (rev 872) @@ -1,2 +1,17 @@ // Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults + +App = {}; +App.removeRow = function(row_id) { + var row_name = $('row_name_' + row_id).innerHTML.strip(); + $("row_add").insert("<option value='" + row_id+">" + row_name + "</option>"); + var row = $('row_' + row_id); + row.remove(); +}; +App.removeCol = function(col_id) { + var col_name = $('col_name_' + col_id).innerHTML.strip(); + $("col_add").insert("<option value='" + col_id+">" + col_name + "</option>"); + $$('.col_' + col_id).each(function(e){ + e.remove(); + }) +}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-04-30 04:03:57
|
Revision: 873 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=873&view=rev Author: znz Date: 2009-04-30 04:03:51 +0000 (Thu, 30 Apr 2009) Log Message: ----------- implement add button Modified Paths: -------------- trunk/viewsite/app/controllers/compare_results_controller.rb trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/public/javascripts/application.js Modified: trunk/viewsite/app/controllers/compare_results_controller.rb =================================================================== --- trunk/viewsite/app/controllers/compare_results_controller.rb 2009-04-30 04:03:21 UTC (rev 872) +++ trunk/viewsite/app/controllers/compare_results_controller.rb 2009-04-30 04:03:51 UTC (rev 873) @@ -11,6 +11,11 @@ case params[key] when 'all' @title = "All Kernels" + when /\d/ + ids = params[key].split(/\D+/).map{|s|s.to_i} + opts["#{key}_ids"] = ids + opts[key][:conditions] = ["id in (?)", ids] + opts[key].delete(:order) when '!d' @title = "Vanilla Kernels" opts[key][:conditions] = ["distribution_kernel = ?", false] @@ -20,8 +25,19 @@ end end @rows = ExecuteResult.find(:all, opts[:row]) + if opts.key?("row_ids") + h = @rows.inject({}){|memo, row| memo[row.id] = row; memo } + @rows = opts["row_ids"].map{|n| h[n]}.compact + end @cols = ExecuteResult.find(:all, opts[:col]) - @compare_results = CompareResult.find(:all) + if opts.key?("col_ids") + h = @cols.inject({}){|memo, col| memo[col.id] = col; memo } + @cols = opts["col_ids"].map{|n| h[n]}.compact + end + @compare_results = CompareResult.find(:all, :conditions => [ + "a_execute_result_id in (?) AND b_execute_result_id in (?)", + @rows, @cols + ]) @compare_results_hash = Hash.new{|h,k| h[k] = Hash.new } @compare_results.each do |r| @@ -31,6 +47,7 @@ respond_to do |format| format.html # index.html.erb format.xml { render :xml => @compare_results } + format.json { render :json => @compare_results.to_json } end end Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-04-30 04:03:21 UTC (rev 872) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-04-30 04:03:51 UTC (rev 873) @@ -11,19 +11,19 @@ <tr> <th>A</th> <td><%= collection_select :row, :add, all - @rows, :id, :display_name%></td> - <td><button>Add</button></td> + <td><button onclick="App.addRow($('row_add'))">Add</button></td> <th>B</th> <td><%= collection_select :col, :add, all - @cols, :id, :display_name%></td> - <td><button>Add</button></td> + <td><button onclick="App.addCol($('col_add'))">Add</button></td> </tr> </table> -<table border="1"> - <tr> +<table border="1" id="compare_results"> + <tr id="col_names"> <th>A \ B</th> <%- @cols.each do |col| -%> - <th class="col_<%= col.id %>" id="col_name_<%= col.id %>"> + <th class="col_<%= col.id %> col_name" id="col_name_<%= col.id %>"> <%=h col.display_name %> </th> <%- end -%> @@ -31,25 +31,25 @@ <%- @rows.each do |row| -%> <tr id="row_<%= row.id %>"> - <th id="row_name_<%= row.id %>"> + <th class="row_name" id="row_name_<%= row.id %>"> <%=h row.display_name %> </th> <%- @cols.each do |col| -%> <%- if compare_result = @compare_results_hash[row.id][col.id] -%> - <td<%= compare_result.to_style %> class="col_<%= col.id %>"> + <td class="col_<%= col.id %>"<%= compare_result.to_style %>> <%= link_to h(compare_result.to_result), compare_result %> </td> <%- else -%> <td class="col_<%= col.id %>"></td> <%- end -%> <%- end -%> - <td> + <td class="delete_row"> <button onclick="App.removeRow(<%= row.id %>)">Delete</button> </td> </tr> <%- end -%> - <tr> + <tr id="deleteColButtons"> <th></th> <%- @cols.each do |col| -%> <th class="col_<%= col.id %>"> Modified: trunk/viewsite/public/javascripts/application.js =================================================================== --- trunk/viewsite/public/javascripts/application.js 2009-04-30 04:03:21 UTC (rev 872) +++ trunk/viewsite/public/javascripts/application.js 2009-04-30 04:03:51 UTC (rev 873) @@ -15,3 +15,87 @@ e.remove(); }) }; +App.getIds = function(css){ + var ids = $$(css).map(function(e){ + return e.id.gsub(/[^0-9]+/, "") + }).join("."); + if (ids.empty()) { + return 0; + } + return ids; +}; +App.addRow = function(row_add) { + if (row_add.selectedIndex < 0) return; + var option = row_add.options[row_add.selectedIndex]; + var row = option.value; + var col = App.getIds(".col_name"); + var ajaxRequest = new Ajax.Request( + window.location.pathname, + { + method: 'get', + parameters: { + col: col, + row: row + }, + onComplete: function(originalRequest){ + try { + var text = originalRequest.responseText; + App.text = text; + var matched = text.match('<tr id="row_'+row+'">[\\s\\S]+?</tr>'); + var compare_results = $("compare_results"); + var delete_col_buttons = $("deleteColButtons"); + delete_col_buttons.remove(); + compare_results.insert(matched[0]); + compare_results.insert(delete_col_buttons); + option.remove(); + } catch(e) { + alert(e); + } + } + }); +}; +App.addCol = function(col_add) { + if (col_add.selectedIndex < 0) return; + var option = col_add.options[col_add.selectedIndex]; + var col = option.value; + var row = App.getIds(".row_name"); + var ajaxRequest = new Ajax.Request( + window.location.pathname, + { + method: 'get', + parameters: { + col: col, + row: row + }, + onComplete: function(originalRequest){ + try { + var text = originalRequest.responseText; + App.text = text; + var matched = []; + text.scan('<(t[hd]) class="col_'+col+'[ \"][\\s\\S]+?</\\1>', + function(e){matched.push(e[0])}); + var compare_results = $("compare_results"); + $A(compare_results.rows).each(function(row, idx){ + var row = $(row); + var cells = row.cells; + var last_cell = cells[cells.length-1]; + if (last_cell.className == "delete_row") { + last_cell.remove(); + } else { + last_cell = false; + } + console.log(row); + console.log(idx); + console.log(matched[idx]); + row.insert(matched[idx]); + if (last_cell) { + row.insert(last_cell); + } + }); + option.remove(); + } catch(e) { + alert(e); + } + } + }); +}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-05-19 10:33:51
|
Revision: 881 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=881&view=rev Author: znz Date: 2009-05-19 10:33:39 +0000 (Tue, 19 May 2009) Log Message: ----------- remove unused files Removed Paths: ------------- trunk/viewsite/Capfile trunk/viewsite/config/deploy.rb Deleted: trunk/viewsite/Capfile =================================================================== --- trunk/viewsite/Capfile 2009-05-12 09:54:33 UTC (rev 880) +++ trunk/viewsite/Capfile 2009-05-19 10:33:39 UTC (rev 881) @@ -1,3 +0,0 @@ -load 'deploy' if respond_to?(:namespace) # cap2 differentiator -Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } -load 'config/deploy' \ No newline at end of file Deleted: trunk/viewsite/config/deploy.rb =================================================================== --- trunk/viewsite/config/deploy.rb 2009-05-12 09:54:33 UTC (rev 880) +++ trunk/viewsite/config/deploy.rb 2009-05-19 10:33:39 UTC (rev 881) @@ -1,76 +0,0 @@ -set :application, "crackerjack-viewsite" -set :repository, "http://crackerjack.svn.sourceforge.net/svnroot/crackerjack/trunk/testtools/viewsite" - -set :user, "crackerjack" -# If you aren't deploying to /u/apps/#{application} on the target -# servers (which is the default), you can specify the actual location -# via the :deploy_to variable: -# set :deploy_to, "/var/www/#{application}" - -# If you aren't using Subversion to manage your source code, specify -# your SCM below: -#set :scm, :subversion -#set :scm_user, "Your SCM user name" -#set :scm_password, "Your SCM Password" - -set :use_sudo, false -set :default_environment, { - "PATH" => "/home/kazu/opt:/home/kazu/opt/ruby18/bin:$PATH", -} - -crackerjack_viewsite = "crackerjack.good-day.net" -#crackerjack_viewsite = "localhost" -set :crackerjack_testcases_version, "20080225h" -role :app, crackerjack_viewsite -role :web, crackerjack_viewsite -role :db, crackerjack_viewsite, :primary => true - -task :after_update_code do - #compared_symlink - results_symlink - secret_symlink - extract_testcases - #send_uncommitted -end - -#set :compared_dir, "#{deploy_to}/#{shared_dir}/compared" -set :results_dir, "#{deploy_to}/#{shared_dir}/results" -set :secret_txt, "#{deploy_to}/#{shared_dir}/secret.txt" - -#task :compared_symlink do -# run "mkdir -p #{compared_dir}" -# run "ln -sf #{compared_dir} #{release_path}/data/compared" -#end - -task :results_symlink do - run "mkdir -p #{results_dir}" - run "ln -sf #{results_dir} #{release_path}/data/results" -end - -task :secret_symlink do - run "ln -sf #{secret_txt} #{release_path}/config/" -end - -task :extract_testcases do - archive = "public/download/testcases-#{crackerjack_testcases_version}.tar.bz2" - run [ - "cd #{release_path}/data", - "VER=`tar --bzip2 -xf ../#{archive} --to-stdout testcases/VERSION`", - "ln -s $VER/testcases testcases", - "mkdir $VER", - "cd $VER", - "tar --bzip2 -xf ../../#{archive}", - "cd ..", - ].join(" && ") -end - -task :send_uncommitted do - %w"script/spin".each do |uncommited| - put(File.read(uncommited), "#{release_path}/#{uncommited}", :mode => 0755) - end -end - -task :remove_compared do - run "ls -ald #{deploy_to}/#{shared_dir}/results/*/*/compared" - run "rm -r #{deploy_to}/#{shared_dir}/results/*/*/compared" -end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-05-26 09:38:41
|
Revision: 889 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=889&view=rev Author: znz Date: 2009-05-26 09:38:28 +0000 (Tue, 26 May 2009) Log Message: ----------- use jquery instead of prototype.js Modified Paths: -------------- trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/app/views/layouts/application.html.erb trunk/viewsite/public/javascripts/application.js Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-05-26 09:37:48 UTC (rev 888) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-05-26 09:38:28 UTC (rev 889) @@ -11,11 +11,11 @@ <tr> <th>A</th> <td><%= collection_select :row, :add, all - @rows, :id, :display_name%></td> - <td><button onclick="App.addRow($('row_add'))">Add</button></td> + <td><button onclick="App.addRow('row_add')">Add</button></td> <th>B</th> <td><%= collection_select :col, :add, all - @cols, :id, :display_name%></td> - <td><button onclick="App.addCol($('col_add'))">Add</button></td> + <td><button onclick="App.addCol('col_add')">Add</button></td> </tr> </table> Modified: trunk/viewsite/app/views/layouts/application.html.erb =================================================================== --- trunk/viewsite/app/views/layouts/application.html.erb 2009-05-26 09:37:48 UTC (rev 888) +++ trunk/viewsite/app/views/layouts/application.html.erb 2009-05-26 09:38:28 UTC (rev 889) @@ -22,7 +22,9 @@ <%= link_to "Crackerjack", :controller => "compare_results", :action => "index", :row => '!d', :col => '!d' %> <%= link_to "[About Page]", :controller => "document", :action => "index_en" %> - <%= javascript_include_tag :defaults %> + <%= javascript_include_tag "jquery-1.3.2.min" %> + <%#= javascript_include_tag :defaults %> + <%= javascript_include_tag "application" %> </h2> <h1><%=h @title %></h1> Modified: trunk/viewsite/public/javascripts/application.js =================================================================== --- trunk/viewsite/public/javascripts/application.js 2009-05-26 09:37:48 UTC (rev 888) +++ trunk/viewsite/public/javascripts/application.js 2009-05-26 09:38:28 UTC (rev 889) @@ -3,99 +3,58 @@ App = {}; App.removeRow = function(row_id) { - var row_name = $('row_name_' + row_id).innerHTML.strip(); - $("row_add").insert("<option value='" + row_id+">" + row_name + "</option>"); - var row = $('row_' + row_id); - row.remove(); + var row_name = jQuery.trim(jQuery('#row_name_' + row_id).html()); + jQuery("#row_add").append("<option value='" + row_id+">" + row_name + "</option>"); + jQuery('#row_' + row_id).remove(); }; App.removeCol = function(col_id) { - var col_name = $('col_name_' + col_id).innerHTML.strip(); - $("col_add").insert("<option value='" + col_id+">" + col_name + "</option>"); - $$('.col_' + col_id).each(function(e){ - e.remove(); - }) + var col_name = jQuery.trim(jQuery('#col_name_' + col_id).html()); + jQuery("#col_add").append("<option value='" + col_id+">" + col_name + "</option>"); + jQuery('.col_' + col_id).remove(); }; App.getIds = function(css){ - var ids = $$(css).map(function(e){ - return e.id.gsub(/[^0-9]+/, "") - }).join("."); - if (ids.empty()) { + var ids = []; + jQuery(css).each(function(i,e){ + ids.push(e.id.match(/[0-9]+/g)); + }) + if (ids.length == 0) { return 0; } - return ids; + return ids.join("."); }; -App.addRow = function(row_add) { +App.addRow = function(row_add_id) { + var row_add = jQuery("#"+row_add_id)[0]; if (row_add.selectedIndex < 0) return; var option = row_add.options[row_add.selectedIndex]; var row = option.value; var col = App.getIds(".col_name"); - var ajaxRequest = new Ajax.Request( - window.location.pathname, - { - method: 'get', - parameters: { - col: col, - row: row - }, - onComplete: function(originalRequest){ - try { - var text = originalRequest.responseText; - App.text = text; - var matched = text.match('<tr id="row_'+row+'">[\\s\\S]+?</tr>'); - var compare_results = $("compare_results"); - var delete_col_buttons = $("deleteColButtons"); - delete_col_buttons.remove(); - compare_results.insert(matched[0]); - compare_results.insert(delete_col_buttons); - option.remove(); - } catch(e) { - alert(e); - } + jQuery.get(window.location.pathname, { col: col, row: row }, function(text) { + try { + var matched = text.match('<tr id="row_'+row+'">[\\s\\S]+?</tr>'); + var delete_col_buttons = jQuery("#deleteColButtons"); + jQuery(matched[0]).insertBefore(delete_col_buttons); + jQuery(option).remove(); + } catch(e) { + alert(e); } }); }; -App.addCol = function(col_add) { +App.addCol = function(col_add_id) { + var col_add = jQuery("#"+col_add_id)[0]; if (col_add.selectedIndex < 0) return; var option = col_add.options[col_add.selectedIndex]; var col = option.value; var row = App.getIds(".row_name"); - var ajaxRequest = new Ajax.Request( - window.location.pathname, - { - method: 'get', - parameters: { - col: col, - row: row - }, - onComplete: function(originalRequest){ - try { - var text = originalRequest.responseText; - App.text = text; - var matched = []; - text.scan('<(t[hd]) class="col_'+col+'[ \"][\\s\\S]+?</\\1>', - function(e){matched.push(e[0])}); - var compare_results = $("compare_results"); - $A(compare_results.rows).each(function(row, idx){ - var row = $(row); - var cells = row.cells; - var last_cell = cells[cells.length-1]; - if (last_cell.className == "delete_row") { - last_cell.remove(); - } else { - last_cell = false; - } - console.log(row); - console.log(idx); - console.log(matched[idx]); - row.insert(matched[idx]); - if (last_cell) { - row.insert(last_cell); - } - }); - option.remove(); - } catch(e) { - alert(e); - } + jQuery.get(window.location.pathname, { col: col, row: row }, function(text) { + try { + var matched = text.match('<(t[hd]) class="col_'+col+'[ \"][\\s\\S]+?</\\1>', 'g'); + jQuery("#col_names :last").after(matched.shift()); + jQuery(".delete_row").each(function(i,e){ + jQuery(e).before(matched[i]); + }); + jQuery(option).remove(); + } catch(e) { + alert(e); } }); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-05-26 09:39:07
|
Revision: 890 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=890&view=rev Author: znz Date: 2009-05-26 09:38:58 +0000 (Tue, 26 May 2009) Log Message: ----------- add permalink after changed Modified Paths: -------------- trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/public/javascripts/application.js Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-05-26 09:38:28 UTC (rev 889) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-05-26 09:38:58 UTC (rev 890) @@ -4,8 +4,10 @@ <li><%= link_to 'Distribution Kernels', cjk_path %></li> <li><%= link_to 'Vanilla Kernels', :row => '!d', :col => '!d' %></li> <li><%= link_to 'All Kernels', :row => 'all', :col => 'all' %></li> + <li id="permalink_container" style="display:none"><%= link_to 'Permalink', { :row => nil, :col => nil }, { :id => "permalink" } %></li> </ul> + <%- all = ExecuteResult.all -%> <table style="margin: 1em"> <tr> Modified: trunk/viewsite/public/javascripts/application.js =================================================================== --- trunk/viewsite/public/javascripts/application.js 2009-05-26 09:38:28 UTC (rev 889) +++ trunk/viewsite/public/javascripts/application.js 2009-05-26 09:38:58 UTC (rev 890) @@ -2,15 +2,25 @@ // This file is automatically included by javascript_include_tag :defaults App = {}; +App.updatePermalink = function() { + if (!App.permalink_base) { + App.permalink_base = jQuery("#permalink").attr("href"); + } + var href = App.permalink_base + '?col=' + App.getIds(".col_name") + '&row=' + App.getIds(".row_name"); + jQuery("#permalink").attr("href", href); + jQuery("#permalink_container").show(); +}; App.removeRow = function(row_id) { var row_name = jQuery.trim(jQuery('#row_name_' + row_id).html()); jQuery("#row_add").append("<option value='" + row_id+">" + row_name + "</option>"); jQuery('#row_' + row_id).remove(); + App.updatePermalink(); }; App.removeCol = function(col_id) { var col_name = jQuery.trim(jQuery('#col_name_' + col_id).html()); jQuery("#col_add").append("<option value='" + col_id+">" + col_name + "</option>"); jQuery('.col_' + col_id).remove(); + App.updatePermalink(); }; App.getIds = function(css){ var ids = []; @@ -34,6 +44,7 @@ var delete_col_buttons = jQuery("#deleteColButtons"); jQuery(matched[0]).insertBefore(delete_col_buttons); jQuery(option).remove(); + App.updatePermalink(); } catch(e) { alert(e); } @@ -53,6 +64,7 @@ jQuery(e).before(matched[i]); }); jQuery(option).remove(); + App.updatePermalink(); } catch(e) { alert(e); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-05-29 09:06:34
|
Revision: 893 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=893&view=rev Author: znz Date: 2009-05-29 09:06:25 +0000 (Fri, 29 May 2009) Log Message: ----------- editable compare_log.comment Modified Paths: -------------- trunk/viewsite/app/controllers/compare_logs_controller.rb trunk/viewsite/app/models/compare_log.rb trunk/viewsite/app/views/compare_logs/show.html.erb trunk/viewsite/public/stylesheets/application.css trunk/viewsite/test/unit/compare_log_test.rb Modified: trunk/viewsite/app/controllers/compare_logs_controller.rb =================================================================== --- trunk/viewsite/app/controllers/compare_logs_controller.rb 2009-05-26 09:39:41 UTC (rev 892) +++ trunk/viewsite/app/controllers/compare_logs_controller.rb 2009-05-29 09:06:25 UTC (rev 893) @@ -22,4 +22,29 @@ format.xml { render :xml => @compare_log } end end + + # PUT /compare_logs/1 + # PUT /compare_logs/1.xml + def update + @compare_log = CompareLog.find(params[:id]) + + comment = params[:compare_log][:comment] + @compare_log.comment = comment + + respond_to do |format| + if @compare_log.save + flash[:notice] = 'compare_log was successfully updated.' + format.html { redirect_to(@compare_log) } + format.xml { head :ok } + else + format.html { + @a_execute_log = @compare_log.a_execute_log + @b_execute_log = @compare_log.b_execute_log + render :action => "show" + } + format.xml { render :xml => @compare_log.errors, :status => :unprocessable_ent +ity } + end + end + end end Modified: trunk/viewsite/app/models/compare_log.rb =================================================================== --- trunk/viewsite/app/models/compare_log.rb 2009-05-26 09:39:41 UTC (rev 892) +++ trunk/viewsite/app/models/compare_log.rb 2009-05-29 09:06:25 UTC (rev 893) @@ -23,6 +23,14 @@ # validates_presence_of :c_out_log, :c_err_log # can be empty validates_inclusion_of :compare_status, :in => 0...STATUS_MAX + #validates_length_of :comment, :maximum => 1000 + validates_each :comment do |record, attr, value| + count = record.comment_was.to_s.split(//).size + 1000 + if count < value.to_s.split(//).size + record.errors.add attr, "is too long (maximum is #{count} characters)" + end + end + delegate :test_name, :to => :system_call delegate :default_compare?, :to => :system_call Modified: trunk/viewsite/app/views/compare_logs/show.html.erb =================================================================== --- trunk/viewsite/app/views/compare_logs/show.html.erb 2009-05-26 09:39:41 UTC (rev 892) +++ trunk/viewsite/app/views/compare_logs/show.html.erb 2009-05-29 09:06:25 UTC (rev 893) @@ -1,5 +1,6 @@ <%- @title = "Compare Log" -%> +<%- unless @compare_log.invalid? -%> <p> <b>A result:</b> <%=link_to h(@a_execute_log.execute_result.to_summary), @a_execute_log %> @@ -43,13 +44,26 @@ <b>Compare status:</b> <%=h @compare_log.to_status %> </p> +<%- end -%> +<%- if true -%> + <%- form_for(@compare_log) do |f| -%> + <%= f.error_messages %> + + <p> + <%= f.label :comment %><br /> + <%= f.text_area :comment, :size => "80x5" %><br /> + <%= f.submit 'Update' %> + </p> + <%- end -%> +<%- else -%> <p> <b>Comment:</b> <%=h @compare_log.comment %> </p> +<%- end -%> -<%- if false -%> +<%- if !@compare_log.invalid? && @a_execute_log && @b_execute_log -%> <table border="1"> <tr> <th>A execute log</th> Modified: trunk/viewsite/public/stylesheets/application.css =================================================================== --- trunk/viewsite/public/stylesheets/application.css 2009-05-26 09:39:41 UTC (rev 892) +++ trunk/viewsite/public/stylesheets/application.css 2009-05-29 09:06:25 UTC (rev 893) @@ -19,3 +19,41 @@ a { text-decoration: none; } + +body { background-color: #fff; color: #333; } + +.fieldWithErrors { + padding: 2px; + background-color: red; + display: table; +} + +#errorExplanation { + width: 400px; + border: 2px solid red; + padding: 7px; + padding-bottom: 12px; + margin-bottom: 20px; + background-color: #f0f0f0; +} + +#errorExplanation h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + background-color: #c00; + color: #fff; +} + +#errorExplanation p { + color: #333; + margin-bottom: 0; + padding: 5px; +} + +#errorExplanation ul li { + font-size: 12px; + list-style: square; +} Modified: trunk/viewsite/test/unit/compare_log_test.rb =================================================================== --- trunk/viewsite/test/unit/compare_log_test.rb 2009-05-26 09:39:41 UTC (rev 892) +++ trunk/viewsite/test/unit/compare_log_test.rb 2009-05-29 09:06:25 UTC (rev 893) @@ -1,8 +1,9 @@ require 'test_helper' class CompareLogTest < ActiveSupport::TestCase - # Replace this with your real tests. - test "the truth" do - assert true + test "too long is invalid" do + log = CompareLog.first + log.comment = " "*10000 + assert log.invalid? end end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-05-29 09:07:34
|
Revision: 894 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=894&view=rev Author: znz Date: 2009-05-29 09:07:08 +0000 (Fri, 29 May 2009) Log Message: ----------- use tab and do not use ajax to update customized URL Modified Paths: -------------- trunk/viewsite/app/controllers/compare_results_controller.rb trunk/viewsite/app/helpers/compare_results_helper.rb trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/app/views/layouts/application.html.erb trunk/viewsite/public/javascripts/application.js trunk/viewsite/public/stylesheets/application.css Modified: trunk/viewsite/app/controllers/compare_results_controller.rb =================================================================== --- trunk/viewsite/app/controllers/compare_results_controller.rb 2009-05-29 09:06:25 UTC (rev 893) +++ trunk/viewsite/app/controllers/compare_results_controller.rb 2009-05-29 09:07:08 UTC (rev 894) @@ -7,19 +7,25 @@ :order => "hostname ASC, kernel_version ASC, testcases_version ASC", } opts[:col] = opts[:row].dup + @selected_tab = nil + @custom_table = false [:row, :col].each do |key| case params[key] when 'all' + @selected_tab = :all @title = "All Kernels" when /\d/ + @custom_table = true ids = params[key].split(/\D+/).map{|s|s.to_i} opts["#{key}_ids"] = ids opts[key][:conditions] = ["id in (?)", ids] opts[key].delete(:order) when '!d' + @selected_tab = :vanilla @title = "Vanilla Kernels" opts[key][:conditions] = ["distribution_kernel = ?", false] else + @selected_tab = :distro @title = "Distribution Kernels" opts[key][:conditions] = ["distribution_kernel = ?", true] end Modified: trunk/viewsite/app/helpers/compare_results_helper.rb =================================================================== --- trunk/viewsite/app/helpers/compare_results_helper.rb 2009-05-29 09:06:25 UTC (rev 893) +++ trunk/viewsite/app/helpers/compare_results_helper.rb 2009-05-29 09:07:08 UTC (rev 894) @@ -1,2 +1,7 @@ module CompareResultsHelper + def tab_class(tab) + if @selected_tab == tab + ' class="ui-tabs-selected"' + end + end end Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-05-29 09:06:25 UTC (rev 893) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-05-29 09:07:08 UTC (rev 894) @@ -1,15 +1,19 @@ <%- @title ||= 'Kernels' -%> -<ul> - <li><%= link_to 'Distribution Kernels', cjk_path %></li> - <li><%= link_to 'Vanilla Kernels', :row => '!d', :col => '!d' %></li> +<div class="ui-tabs"> +<ul class="ui-tabs-nav"> + <li<%= tab_class(:distro) %>><%= link_to 'Distribution Kernels', cjk_path %></li> + <li<%= tab_class(:vanilla) %>><%= link_to 'Vanilla Kernels', :row => '!d', :col => '!d' %></li> <%- if false -%> - <li><%= link_to 'All Kernels', :row => 'all', :col => 'all' %></li> + <li<%= tab_class(:all) %>><%= link_to 'All Kernels', :row => 'all', :col => 'all' %></li> <%- end -%> +<%- if @custom_table -%> + <li class="ui-tabs-selected"><%= link_to 'Customized', :row => params[:row], :col => params[:col] %></li> +<%- end -%> <li id="permalink_container" style="display:none"><%= link_to 'Permalink', { :row => nil, :col => nil }, { :id => "permalink" } %></li> </ul> - +<div class="ui-tabs-panel"> <%- all = ExecuteResult.all -%> <table style="margin: 1em"> <tr> @@ -63,3 +67,5 @@ </tr> </table> +</div> +</div> Modified: trunk/viewsite/app/views/layouts/application.html.erb =================================================================== --- trunk/viewsite/app/views/layouts/application.html.erb 2009-05-29 09:06:25 UTC (rev 893) +++ trunk/viewsite/app/views/layouts/application.html.erb 2009-05-29 09:07:08 UTC (rev 894) @@ -10,6 +10,9 @@ <%- if @canonical_url -%> <link rel="canonical" href="<%=h @canonical_url %>" /> <%- end -%> + <%= javascript_include_tag "jquery-1.3.2.min" %> + <%#= javascript_include_tag :defaults %> + <%= javascript_include_tag "application" %> </head> <body> <h2 class="header"> @@ -22,9 +25,6 @@ <%= link_to "Crackerjack", :controller => "compare_results", :action => "index", :row => '!d', :col => '!d' %> <%= link_to "[About Page]", :controller => "document", :action => "index_en" %> - <%= javascript_include_tag "jquery-1.3.2.min" %> - <%#= javascript_include_tag :defaults %> - <%= javascript_include_tag "application" %> </h2> <h1><%=h @title %></h1> Modified: trunk/viewsite/public/javascripts/application.js =================================================================== --- trunk/viewsite/public/javascripts/application.js 2009-05-29 09:06:25 UTC (rev 893) +++ trunk/viewsite/public/javascripts/application.js 2009-05-29 09:07:08 UTC (rev 894) @@ -2,11 +2,16 @@ // This file is automatically included by javascript_include_tag :defaults App = {}; +App.use_ajax = false; App.updatePermalink = function() { if (!App.permalink_base) { App.permalink_base = jQuery("#permalink").attr("href"); } var href = App.permalink_base + '?col=' + App.getIds(".col_name") + '&row=' + App.getIds(".row_name"); + if (!App.use_ajax) { + location.href = href; + return; + } jQuery("#permalink").attr("href", href); jQuery("#permalink_container").show(); }; @@ -37,6 +42,12 @@ if (row_add.selectedIndex < 0) return; var option = row_add.options[row_add.selectedIndex]; var row = option.value; + if (!App.use_ajax) { + // add dummy + $("<span style='display:none' class='row_name' id='row_"+row+"'></span>").insertAfter("#compare_results"); + App.updatePermalink(); + return; + } var col = App.getIds(".col_name"); jQuery.get(window.location.pathname, { col: col, row: row }, function(text) { try { @@ -55,6 +66,12 @@ if (col_add.selectedIndex < 0) return; var option = col_add.options[col_add.selectedIndex]; var col = option.value; + if (!App.use_ajax) { + // add dummy + $("<span style='display:none' class='col_name' id='"+col+"'></span>").insertAfter("#compare_results"); + App.updatePermalink(); + return; + } var row = App.getIds(".row_name"); jQuery.get(window.location.pathname, { col: col, row: row }, function(text) { try { Modified: trunk/viewsite/public/stylesheets/application.css =================================================================== --- trunk/viewsite/public/stylesheets/application.css 2009-05-29 09:06:25 UTC (rev 893) +++ trunk/viewsite/public/stylesheets/application.css 2009-05-29 09:07:08 UTC (rev 894) @@ -20,6 +20,7 @@ text-decoration: none; } +/* scaffold */ body { background-color: #fff; color: #333; } .fieldWithErrors { @@ -57,3 +58,15 @@ font-size: 12px; list-style: square; } + +/* Tabs +----------------------------------*/ +.ui-tabs { padding: .2em; zoom: 1; } +.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } +.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; background-color: #ccc } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-06-02 08:56:07
|
Revision: 897 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=897&view=rev Author: znz Date: 2009-06-02 08:55:52 +0000 (Tue, 02 Jun 2009) Log Message: ----------- add jquery.cookie.js Modified Paths: -------------- trunk/viewsite/app/views/layouts/application.html.erb Added Paths: ----------- trunk/viewsite/public/javascripts/jquery.cookie.js Modified: trunk/viewsite/app/views/layouts/application.html.erb =================================================================== --- trunk/viewsite/app/views/layouts/application.html.erb 2009-06-02 08:55:23 UTC (rev 896) +++ trunk/viewsite/app/views/layouts/application.html.erb 2009-06-02 08:55:52 UTC (rev 897) @@ -11,10 +11,12 @@ <link rel="canonical" href="<%=h @canonical_url %>" /> <%- end -%> <%= javascript_include_tag "jquery-1.3.2.min" %> + <%= javascript_include_tag "jquery.cookie" %> <%#= javascript_include_tag :defaults %> <%= javascript_include_tag "application" %> </head> <body> + <h2 class="header"> <%- if "crackerjack.good-day.net" == request.host -%> <%= link_to "Functional", "http://test.kernel.org/tko/compose_query.cgi" %> Added: trunk/viewsite/public/javascripts/jquery.cookie.js =================================================================== --- trunk/viewsite/public/javascripts/jquery.cookie.js (rev 0) +++ trunk/viewsite/public/javascripts/jquery.cookie.js 2009-06-02 08:55:52 UTC (rev 897) @@ -0,0 +1,96 @@ +/** + * Cookie plugin + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * Create a cookie with the given name and value and other optional parameters. + * + * @example $.cookie('the_cookie', 'the_value'); + * @desc Set the value of a cookie. + * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); + * @desc Create a cookie with all available options. + * @example $.cookie('the_cookie', 'the_value'); + * @desc Create a session cookie. + * @example $.cookie('the_cookie', null); + * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain + * used when the cookie was set. + * + * @param String name The name of the cookie. + * @param String value The value of the cookie. + * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. + * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. + * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. + * If set to null or omitted, the cookie will be a session cookie and will not be retained + * when the the browser exits. + * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). + * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). + * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will + * require a secure protocol (like HTTPS). + * @type undefined + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/kla...@st... + */ + +/** + * Get the value of a cookie with the given name. + * + * @example $.cookie('the_cookie'); + * @desc Get the value of a cookie. + * + * @param String name The name of the cookie. + * @return The value of the cookie. + * @type String + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/kla...@st... + */ +jQuery.cookie = function(name, value, options) { + if (typeof value != 'undefined') { // name and value given, set cookie + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE + } + // CAUTION: Needed to parenthesize options.path and options.domain + // in the following expressions, otherwise they evaluate to undefined + // in the packed version for some reason... + var path = options.path ? '; path=' + (options.path) : ''; + var domain = options.domain ? '; domain=' + (options.domain) : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { // only name given, get cookie + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + } +}; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-06-02 08:56:42
|
Revision: 898 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=898&view=rev Author: znz Date: 2009-06-02 08:56:23 +0000 (Tue, 02 Jun 2009) Log Message: ----------- save added/deleted rows/columns to session cookies Modified Paths: -------------- trunk/viewsite/app/controllers/compare_results_controller.rb trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/public/javascripts/application.js Modified: trunk/viewsite/app/controllers/compare_results_controller.rb =================================================================== --- trunk/viewsite/app/controllers/compare_results_controller.rb 2009-06-02 08:55:52 UTC (rev 897) +++ trunk/viewsite/app/controllers/compare_results_controller.rb 2009-06-02 08:56:23 UTC (rev 898) @@ -7,28 +7,44 @@ :order => "hostname ASC, kernel_version ASC, testcases_version ASC", } opts[:col] = opts[:row].dup - @selected_tab = nil @custom_table = false @distro_title = "Difference between Distributions" @vanilla_title = "Difference between Distributions and Vanilla Kernels" - [:row, :col].each do |key| - case params[key] + if params[:row] == params[:col] + case params[:col] when 'all' @selected_tab = :all @title = "All Kernels" when /\d/ + @selected_tab = nil + when '!d' + @selected_tab = :vanilla + @title = @vanilla_title + else + @selected_tab = :distro + @title = @distro_title + end + end + if @selected_tab + [:row, :col].each do |key| + value = cookies["#{@selected_tab}_#{key}"] + if value && /\d/ !~ params[key] + params[key] = value + end + end + end + [:row, :col].each do |key| + case params[key] + when 'all' + when /\d/ @custom_table = true ids = params[key].split(/\D+/).map{|s|s.to_i} opts["#{key}_ids"] = ids opts[key][:conditions] = ["id in (?)", ids] opts[key].delete(:order) when '!d' - @selected_tab = :vanilla - @title = @vanilla_title opts[key][:conditions] = ["distribution_kernel = ?", false] else - @selected_tab = :distro - @title = @distro_title opts[key][:conditions] = ["distribution_kernel = ?", true] end end Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-06-02 08:55:52 UTC (rev 897) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-06-02 08:56:23 UTC (rev 898) @@ -2,15 +2,11 @@ <div class="ui-tabs"> <ul class="ui-tabs-nav"> - <li<%= tab_class(:distro) %>><%= link_to @distro_title, cjk_path %></li> - <li<%= tab_class(:vanilla) %>><%= link_to @vanilla_title, :row => '!d', :col => '!d' %></li> + <li<%= tab_class(:distro) %>><%= link_to @distro_title, cjk_path, :class => :distro %></li> + <li<%= tab_class(:vanilla) %>><%= link_to @vanilla_title, { :row => '!d', :col => '!d' }, :class => :vanilla %></li> <%- if false -%> <li<%= tab_class(:all) %>><%= link_to 'All Kernels', :row => 'all', :col => 'all' %></li> <%- end -%> -<%- if @custom_table -%> - <li class="ui-tabs-selected"><%= link_to 'Customized', :row => params[:row], :col => params[:col] %></li> -<%- end -%> - <li id="permalink_container" style="display:none"><%= link_to 'Permalink', { :row => nil, :col => nil }, { :id => "permalink" } %></li> </ul> <div class="ui-tabs-panel"> Modified: trunk/viewsite/public/javascripts/application.js =================================================================== --- trunk/viewsite/public/javascripts/application.js 2009-06-02 08:55:52 UTC (rev 897) +++ trunk/viewsite/public/javascripts/application.js 2009-06-02 08:56:23 UTC (rev 898) @@ -2,18 +2,16 @@ // This file is automatically included by javascript_include_tag :defaults App = {}; -App.use_ajax = false; +App.use_ajax = true; App.updatePermalink = function() { + var col_ids = App.getIds(".col_name"); + var row_ids = App.getIds(".row_name"); + var selected_tab = jQuery(".ui-tabs-selected a").attr("class"); + jQuery.cookie(selected_tab + "_col", col_ids); + jQuery.cookie(selected_tab + "_row", row_ids); if (!App.permalink_base) { - App.permalink_base = jQuery("#permalink").attr("href"); - } - var href = App.permalink_base + '?col=' + App.getIds(".col_name") + '&row=' + App.getIds(".row_name"); - if (!App.use_ajax) { - location.href = href; return; } - jQuery("#permalink").attr("href", href); - jQuery("#permalink_container").show(); }; App.removeRow = function(row_id) { var row_name = jQuery.trim(jQuery('#row_name_' + row_id).html()); @@ -66,12 +64,6 @@ if (col_add.selectedIndex < 0) return; var option = col_add.options[col_add.selectedIndex]; var col = option.value; - if (!App.use_ajax) { - // add dummy - $("<span style='display:none' class='col_name' id='"+col+"'></span>").insertAfter("#compare_results"); - App.updatePermalink(); - return; - } var row = App.getIds(".row_name"); jQuery.get(window.location.pathname, { col: col, row: row }, function(text) { try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-06-03 07:29:29
|
Revision: 902 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=902&view=rev Author: znz Date: 2009-06-03 07:29:26 +0000 (Wed, 03 Jun 2009) Log Message: ----------- import css from jQuery UI Modified Paths: -------------- trunk/viewsite/app/helpers/compare_results_helper.rb trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/app/views/layouts/application.html.erb trunk/viewsite/public/stylesheets/application.css Added Paths: ----------- trunk/viewsite/public/stylesheets/base/ trunk/viewsite/public/stylesheets/base/images/ trunk/viewsite/public/stylesheets/base/images/ui-bg_flat_0_aaaaaa_40x100.png trunk/viewsite/public/stylesheets/base/images/ui-bg_glass_55_fbf9ee_1x400.png trunk/viewsite/public/stylesheets/base/images/ui-bg_glass_65_ffffff_1x400.png trunk/viewsite/public/stylesheets/base/images/ui-bg_glass_75_dadada_1x400.png trunk/viewsite/public/stylesheets/base/images/ui-bg_glass_75_e6e6e6_1x400.png trunk/viewsite/public/stylesheets/base/images/ui-bg_glass_75_ffffff_1x400.png trunk/viewsite/public/stylesheets/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png trunk/viewsite/public/stylesheets/base/images/ui-bg_inset-soft_95_fef1ec_1x100.png trunk/viewsite/public/stylesheets/base/images/ui-icons_222222_256x240.png trunk/viewsite/public/stylesheets/base/images/ui-icons_2e83ff_256x240.png trunk/viewsite/public/stylesheets/base/images/ui-icons_454545_256x240.png trunk/viewsite/public/stylesheets/base/images/ui-icons_888888_256x240.png trunk/viewsite/public/stylesheets/base/images/ui-icons_cd0a0a_256x240.png trunk/viewsite/public/stylesheets/base/ui.all.css trunk/viewsite/public/stylesheets/base/ui.base.css trunk/viewsite/public/stylesheets/base/ui.core.css trunk/viewsite/public/stylesheets/base/ui.tabs.css trunk/viewsite/public/stylesheets/base/ui.theme.css Modified: trunk/viewsite/app/helpers/compare_results_helper.rb =================================================================== --- trunk/viewsite/app/helpers/compare_results_helper.rb 2009-06-02 08:57:34 UTC (rev 901) +++ trunk/viewsite/app/helpers/compare_results_helper.rb 2009-06-03 07:29:26 UTC (rev 902) @@ -1,7 +1,9 @@ module CompareResultsHelper def tab_class(tab) if @selected_tab == tab - ' class="ui-tabs-selected"' + ' class="ui-state-default ui-corner-all ui-tabs-selected ui-state-active"' + else + ' class="ui-state-default ui-corner-all"' end end end Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-06-02 08:57:34 UTC (rev 901) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-06-03 07:29:26 UTC (rev 902) @@ -1,6 +1,6 @@ <%- @title ||= 'Kernels' -%> -<div class="ui-tabs"> +<div class="ui-tabs ui-corner-top"> <ul class="ui-tabs-nav"> <li<%= tab_class(:distro) %>><%= link_to @distro_title, cjk_path, :class => :distro %></li> <li<%= tab_class(:vanilla) %>><%= link_to @vanilla_title, { :row => '!d', :col => '!d' }, :class => :vanilla %></li> @@ -9,7 +9,7 @@ <%- end -%> </ul> -<div class="ui-tabs-panel"> +<div class="ui-tabs-panel ui-corner-bottom"> <%- all = ExecuteResult.all -%> <table style="margin: 1em"> <tr> Modified: trunk/viewsite/app/views/layouts/application.html.erb =================================================================== --- trunk/viewsite/app/views/layouts/application.html.erb 2009-06-02 08:57:34 UTC (rev 901) +++ trunk/viewsite/app/views/layouts/application.html.erb 2009-06-03 07:29:26 UTC (rev 902) @@ -6,6 +6,9 @@ <%- @title ||= "#{controller.controller_name.humanize}: #{controller.action_name}" -%> <title><%=h @title %></title> <%= stylesheet_link_tag 'application' %> + <%= stylesheet_link_tag 'base/ui.core' %> + <%= stylesheet_link_tag 'base/ui.theme' %> + <%= stylesheet_link_tag 'base/ui.tabs' %> <link rel="icon" type="image/x-icon" href="<%=h image_path 'favicon.ico' %>" /> <%- if @canonical_url -%> <link rel="canonical" href="<%=h @canonical_url %>" /> Modified: trunk/viewsite/public/stylesheets/application.css =================================================================== --- trunk/viewsite/public/stylesheets/application.css 2009-06-02 08:57:34 UTC (rev 901) +++ trunk/viewsite/public/stylesheets/application.css 2009-06-03 07:29:26 UTC (rev 902) @@ -58,15 +58,3 @@ font-size: 12px; list-style: square; } - -/* Tabs -----------------------------------*/ -.ui-tabs { padding: .2em; zoom: 1; } -.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } -.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; background-color: #ccc } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } Added: trunk/viewsite/public/stylesheets/base/images/ui-bg_flat_0_aaaaaa_40x100.png =================================================================== --- trunk/viewsite/public/stylesheets/base/images/ui-bg_flat_0_aaaaaa_40x100.png (rev 0) +++ trunk/viewsite/public/stylesheets/base/images/ui-bg_flat_0_aaaaaa_40x100.png 2009-06-03 07:29:26 UTC (rev 902) @@ -0,0 +1,4 @@ +\x89PNG + + |
From: <zn...@us...> - 2009-06-03 07:29:57
|
Revision: 903 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=903&view=rev Author: znz Date: 2009-06-03 07:29:55 +0000 (Wed, 03 Jun 2009) Log Message: ----------- add (for ...) messages in tab Modified Paths: -------------- trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/public/stylesheets/application.css Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-06-03 07:29:26 UTC (rev 902) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-06-03 07:29:55 UTC (rev 903) @@ -2,8 +2,8 @@ <div class="ui-tabs ui-corner-top"> <ul class="ui-tabs-nav"> - <li<%= tab_class(:distro) %>><%= link_to @distro_title, cjk_path, :class => :distro %></li> - <li<%= tab_class(:vanilla) %>><%= link_to @vanilla_title, { :row => '!d', :col => '!d' }, :class => :vanilla %></li> + <li<%= tab_class(:distro) %>><%= link_to "#{@distro_title}<br />(for Application Developer)", cjk_path, :class => :distro %></li> + <li<%= tab_class(:vanilla) %>><%= link_to "#{@vanilla_title}<br />(for Kernel Developer)", { :row => '!d', :col => '!d' }, :class => :vanilla %></li> <%- if false -%> <li<%= tab_class(:all) %>><%= link_to 'All Kernels', :row => 'all', :col => 'all' %></li> <%- end -%> Modified: trunk/viewsite/public/stylesheets/application.css =================================================================== --- trunk/viewsite/public/stylesheets/application.css 2009-06-03 07:29:26 UTC (rev 902) +++ trunk/viewsite/public/stylesheets/application.css 2009-06-03 07:29:55 UTC (rev 903) @@ -58,3 +58,7 @@ font-size: 12px; list-style: square; } + +.ui-state-default { + text-align: center; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-06-03 07:30:25
|
Revision: 904 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=904&view=rev Author: znz Date: 2009-06-03 07:30:23 +0000 (Wed, 03 Jun 2009) Log Message: ----------- move filter list into select Modified Paths: -------------- trunk/viewsite/app/views/compare_results/show.html.erb trunk/viewsite/public/javascripts/application.js Modified: trunk/viewsite/app/views/compare_results/show.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/show.html.erb 2009-06-03 07:29:55 UTC (rev 903) +++ trunk/viewsite/app/views/compare_results/show.html.erb 2009-06-03 07:30:23 UTC (rev 904) @@ -41,19 +41,21 @@ </li> </ul> -<ul class="filter_list"> +<ul id="filter-list"> <li><%= link_to "all", compare_result_path(@compare_result, :q => nil) %></li> - <li><%= link_to "SAME", compare_result_path(@compare_result, :q => "SAME") %></li> + <li><%= link_to "same", compare_result_path(@compare_result, :q => "SAME") %></li> <!-- <li><%= link_to "not SAME", compare_result_path(@compare_result, :q => "!SAME") %></li> --> - <li><%= link_to "DIFF", compare_result_path(@compare_result, :q => "DIFF") %></li> + <li><%= link_to "difference", compare_result_path(@compare_result, :q => "DIFF") %></li> <!-- <li><%= link_to "not DIFF", compare_result_path(@compare_result, :q => "!DIFF") %></li> --> +<!-- <li><%= link_to "ERROR", compare_result_path(@compare_result, :q => "ERROR") %></li> <li><%= link_to "A not found", compare_result_path(@compare_result, :q => "A_NOT_FOUND") %></li> <li><%= link_to "B not found", compare_result_path(@compare_result, :q => "B_NOT_FOUND") %></li> +--> <li><%= link_to "nonsense", compare_result_path(@compare_result, :q => "NONSENSE") %></li> </ul> @@ -61,7 +63,7 @@ <tr> <th>Syscall</th> <th>Test name</th> - <th>Compare result</th> + <th id="filter-container">Compare result</th> <th>Comment</th> </tr> <%- @syscall_list.each do |syscall_number, syscall_name| -%> @@ -99,5 +101,6 @@ </tr> <%- end -%> </table> +<%= javascript_tag("App.move_filter_list('#filter-list', '#filter-container')") %> <%= link_to 'Back', compare_results_path %> Modified: trunk/viewsite/public/javascripts/application.js =================================================================== --- trunk/viewsite/public/javascripts/application.js 2009-06-03 07:29:55 UTC (rev 903) +++ trunk/viewsite/public/javascripts/application.js 2009-06-03 07:30:23 UTC (rev 904) @@ -79,3 +79,22 @@ } }); }; + +App.move_filter_list = function(list, container) { + var list = jQuery(list); + list.hide(); + list = jQuery("a", list); + var container = jQuery(container); + var select = jQuery("<select>"); + list.each(function(i,e){ + var option = jQuery("<option value='" + e.href + "'>" + e.text + "</option>"); + if (location.href == e.href) { + option.attr("selected", "selected"); + } + select.append(option); + }); + select.change(function(e){ + location.href = e.target.value; + }); + container.append(select); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-06-26 11:04:13
|
Revision: 937 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=937&view=rev Author: znz Date: 2009-06-26 11:04:09 +0000 (Fri, 26 Jun 2009) Log Message: ----------- remove border around delete buttons Modified Paths: -------------- trunk/viewsite/README trunk/viewsite/app/views/compare_results/index.html.erb trunk/viewsite/public/stylesheets/application.css Modified: trunk/viewsite/README =================================================================== --- trunk/viewsite/README 2009-06-24 09:13:38 UTC (rev 936) +++ trunk/viewsite/README 2009-06-26 11:04:09 UTC (rev 937) @@ -28,8 +28,7 @@ mysql> CREATE DATABASE crackerjack_production CHARACTER SET utf8; Query OK, 1 row affected (0.01 sec) - mysql> grant all privileges on crackerjack_production.* TO 'crackerjack_p'@'loca - lhost' IDENTIFIED BY 'XXXXXXXX'; + mysql> grant all privileges on crackerjack_production.* TO 'crackerjack_p'@'localhost' IDENTIFIED BY 'XXXXXXXX'; Query OK, 0 rows affected (0.22 sec) mysql> \q Modified: trunk/viewsite/app/views/compare_results/index.html.erb =================================================================== --- trunk/viewsite/app/views/compare_results/index.html.erb 2009-06-24 09:13:38 UTC (rev 936) +++ trunk/viewsite/app/views/compare_results/index.html.erb 2009-06-26 11:04:09 UTC (rev 937) @@ -31,6 +31,7 @@ <%=h col.display_name %> </th> <%- end -%> + <th class="delete_row_head"></th> </tr> <%- @rows.each do |row| -%> @@ -60,6 +61,7 @@ <button onclick="App.removeCol(<%= col.id %>)">Delete</button> </th> <%- end -%> + <th></th> </tr> </table> Modified: trunk/viewsite/public/stylesheets/application.css =================================================================== --- trunk/viewsite/public/stylesheets/application.css 2009-06-24 09:13:38 UTC (rev 936) +++ trunk/viewsite/public/stylesheets/application.css 2009-06-26 11:04:09 UTC (rev 937) @@ -5,6 +5,14 @@ border-collapse: collapse; border: 2px solid lightgrey; } +.delete_row_head, .delete_row { + border-style: hidden; + border-left: 2px solid lightgrey; +} +#deleteColButtons th { + border-style: hidden; + border-top: 2px solid lightgrey; +} pre { font-family: monospace; border: 2px solid lightgrey; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-07-10 10:02:32
|
Revision: 940 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=940&view=rev Author: znz Date: 2009-07-10 10:02:28 +0000 (Fri, 10 Jul 2009) Log Message: ----------- add vertical-align Modified Paths: -------------- trunk/viewsite/app/views/compare_logs/show.html.erb trunk/viewsite/public/stylesheets/application.css Modified: trunk/viewsite/app/views/compare_logs/show.html.erb =================================================================== --- trunk/viewsite/app/views/compare_logs/show.html.erb 2009-07-10 06:14:38 UTC (rev 939) +++ trunk/viewsite/app/views/compare_logs/show.html.erb 2009-07-10 10:02:28 UTC (rev 940) @@ -58,13 +58,13 @@ <th>B execute log</th> </tr> <tr> - <td> + <td class="execute_log"> <%- if @a_execute_log -%> <%= render :partial => "/execute_log", :object => @a_execute_log %> <%- end -%> </td> - <td> + <td class="execute_log"> <%- if @b_execute_log -%> <%= render :partial => "/execute_log", :object => @b_execute_log %> <%- end -%> Modified: trunk/viewsite/public/stylesheets/application.css =================================================================== --- trunk/viewsite/public/stylesheets/application.css 2009-07-10 06:14:38 UTC (rev 939) +++ trunk/viewsite/public/stylesheets/application.css 2009-07-10 10:02:28 UTC (rev 940) @@ -26,6 +26,10 @@ text-decoration: none; } +td.execute_log { + vertical-align: top; +} + .ui-state-default { text-align: center; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-07-13 11:53:44
|
Revision: 942 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=942&view=rev Author: znz Date: 2009-07-13 11:53:40 +0000 (Mon, 13 Jul 2009) Log Message: ----------- align execute logs in compare_logs/show Modified Paths: -------------- trunk/viewsite/app/views/compare_logs/show.html.erb trunk/viewsite/public/stylesheets/application.css Modified: trunk/viewsite/app/views/compare_logs/show.html.erb =================================================================== --- trunk/viewsite/app/views/compare_logs/show.html.erb 2009-07-10 10:03:34 UTC (rev 941) +++ trunk/viewsite/app/views/compare_logs/show.html.erb 2009-07-13 11:53:40 UTC (rev 942) @@ -57,19 +57,73 @@ <th>A execute log</th> <th>B execute log</th> </tr> +<%- + td_procs = [ + proc{|execute_log| +%Q[<p> + <b>Execute result:</b> + #{execute_log.execute_result.to_summary} +</p>] + }, + proc{|execute_log| +%Q[<p> + <b>Test name:</b> + #{link_to h(execute_log.test_name), execute_log.system_call} +</p>] + }, + proc{|execute_log| +%Q[<p> + <b>T out log:</b> +</p> +<pre>#{h execute_log.t_out_log}</pre>] + }, + proc{|execute_log| +%Q[<p> + <b>T err log:</b> +</p> +<pre>#{h execute_log.t_err_log}</pre>] + }, + proc{|execute_log| +%Q[<p> + <b>Execute status:</b> + #{h execute_log.to_status} +</p>] + }, + proc{|execute_log| +%Q[<p> + <b>Comment:</b> + #{h execute_log.comment} +</p>] + }, + ] + last_idx = td_procs.size - 1 + td_procs.each_with_index do |td_proc, idx| + case idx + when 0 + td_class = "execute_log execute_log_first" + when last_idx + td_class = "execute_log execute_log_last" + else + td_class = "execute_log" + end + -%> <tr> - <td class="execute_log"> + <td class="<%= td_class %>"> <%- if @a_execute_log -%> -<%= render :partial => "/execute_log", :object => @a_execute_log %> +<%= td_proc.call(@a_execute_log) %> <%- end -%> </td> - <td class="execute_log"> + <td class="<%= td_class %>"> <%- if @b_execute_log -%> -<%= render :partial => "/execute_log", :object => @b_execute_log %> +<%= td_proc.call(@b_execute_log) %> <%- end -%> </td> </tr> +<%- + end + -%> + </tr> </table> <%- end -%> Modified: trunk/viewsite/public/stylesheets/application.css =================================================================== --- trunk/viewsite/public/stylesheets/application.css 2009-07-10 10:03:34 UTC (rev 941) +++ trunk/viewsite/public/stylesheets/application.css 2009-07-13 11:53:40 UTC (rev 942) @@ -28,8 +28,17 @@ td.execute_log { vertical-align: top; + border-style: hidden none; } +td.execute_log_first { + border-style: none none hidden; +} + +td.execute_log_last { + border-style: hidden none none; +} + .ui-state-default { text-align: center; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-09-07 04:15:46
|
Revision: 952 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=952&view=rev Author: znz Date: 2009-09-07 04:15:17 +0000 (Mon, 07 Sep 2009) Log Message: ----------- use rails 2.3.4 instead of 2.3.2 Modified Paths: -------------- trunk/viewsite/config/boot.rb trunk/viewsite/config/environment.rb trunk/viewsite/config/initializers/new_rails_defaults.rb trunk/viewsite/config/routes.rb trunk/viewsite/script/about trunk/viewsite/script/console trunk/viewsite/script/dbconsole trunk/viewsite/script/destroy trunk/viewsite/script/generate trunk/viewsite/script/performance/benchmarker trunk/viewsite/script/performance/profiler trunk/viewsite/script/plugin trunk/viewsite/script/runner trunk/viewsite/script/server Added Paths: ----------- trunk/viewsite/db/seeds.rb Modified: trunk/viewsite/config/boot.rb =================================================================== --- trunk/viewsite/config/boot.rb 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/config/boot.rb 2009-09-07 04:15:17 UTC (rev 952) @@ -82,8 +82,8 @@ end def load_rubygems + min_version = '1.3.2' require 'rubygems' - min_version = '1.3.1' unless rubygems_version >= min_version $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.) exit 1 Modified: trunk/viewsite/config/environment.rb =================================================================== --- trunk/viewsite/config/environment.rb 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/config/environment.rb 2009-09-07 04:15:17 UTC (rev 952) @@ -1,7 +1,7 @@ # Be sure to restart your server when you modify this file # Specifies gem version of Rails to use when vendor/rails is not present -RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION +RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Modified: trunk/viewsite/config/initializers/new_rails_defaults.rb =================================================================== --- trunk/viewsite/config/initializers/new_rails_defaults.rb 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/config/initializers/new_rails_defaults.rb 2009-09-07 04:15:17 UTC (rev 952) @@ -11,6 +11,8 @@ ActiveRecord::Base.store_full_sti_class = true end +ActionController::Routing.generate_best_match = false + # Use ISO 8601 format for JSON serialized times and dates. ActiveSupport.use_standard_json_time_format = true Modified: trunk/viewsite/config/routes.rb =================================================================== --- trunk/viewsite/config/routes.rb 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/config/routes.rb 2009-09-07 04:15:17 UTC (rev 952) @@ -25,6 +25,12 @@ # Sample resource route with sub-resources: # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller + # Sample resource route with more complex sub-resources + # map.resources :products do |products| + # products.resources :comments + # products.resources :sales, :collection => { :recent => :get } + # end + # Sample resource route within a namespace: # map.namespace :admin do |admin| # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) @@ -38,6 +44,8 @@ map.cjk 'cjk', :controller => "compare_results", :action => "index" # Install the default routes as the lowest priority. + # Note: These default routes make all actions in every controller accessible via GET requests. You should + # consider removing or commenting them out if you're using named routes and resources. map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end Added: trunk/viewsite/db/seeds.rb =================================================================== --- trunk/viewsite/db/seeds.rb (rev 0) +++ trunk/viewsite/db/seeds.rb 2009-09-07 04:15:17 UTC (rev 952) @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). +# +# Examples: +# +# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) +# Major.create(:name => 'Daley', :city => cities.first) Modified: trunk/viewsite/script/about =================================================================== --- trunk/viewsite/script/about 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/about 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,4 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) +$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info" require 'commands/about' Modified: trunk/viewsite/script/console =================================================================== --- trunk/viewsite/script/console 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/console 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/console' Modified: trunk/viewsite/script/dbconsole =================================================================== --- trunk/viewsite/script/dbconsole 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/dbconsole 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/dbconsole' Modified: trunk/viewsite/script/destroy =================================================================== --- trunk/viewsite/script/destroy 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/destroy 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/destroy' Modified: trunk/viewsite/script/generate =================================================================== --- trunk/viewsite/script/generate 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/generate 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/generate' Modified: trunk/viewsite/script/performance/benchmarker =================================================================== --- trunk/viewsite/script/performance/benchmarker 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/performance/benchmarker 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../../config/boot', __FILE__) require 'commands/performance/benchmarker' Modified: trunk/viewsite/script/performance/profiler =================================================================== --- trunk/viewsite/script/performance/profiler 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/performance/profiler 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../../config/boot', __FILE__) require 'commands/performance/profiler' Modified: trunk/viewsite/script/plugin =================================================================== --- trunk/viewsite/script/plugin 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/plugin 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/plugin' Modified: trunk/viewsite/script/runner =================================================================== --- trunk/viewsite/script/runner 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/runner 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/runner' Modified: trunk/viewsite/script/server =================================================================== --- trunk/viewsite/script/server 2009-08-03 09:03:53 UTC (rev 951) +++ trunk/viewsite/script/server 2009-09-07 04:15:17 UTC (rev 952) @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/server' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zn...@us...> - 2009-09-08 02:50:26
|
Revision: 956 http://crackerjack.svn.sourceforge.net/crackerjack/?rev=956&view=rev Author: znz Date: 2009-09-08 02:50:19 +0000 (Tue, 08 Sep 2009) Log Message: ----------- fix 500 Internal Server Error of compare_logs/show when STATUS_[AB]_NOT_FOUND Modified Paths: -------------- trunk/viewsite/app/views/compare_logs/show.html.erb trunk/viewsite/test/fixtures/compare_logs.yml trunk/viewsite/test/functional/compare_logs_controller_test.rb Modified: trunk/viewsite/app/views/compare_logs/show.html.erb =================================================================== --- trunk/viewsite/app/views/compare_logs/show.html.erb 2009-09-07 04:17:29 UTC (rev 955) +++ trunk/viewsite/app/views/compare_logs/show.html.erb 2009-09-08 02:50:19 UTC (rev 956) @@ -3,13 +3,21 @@ <%- unless @compare_log.invalid? -%> <p> <b>A result:</b> - <%=link_to h(@a_execute_log.execute_result.to_summary), @a_execute_log %> + <%- if @a_execute_log -%> + <%=link_to h(@a_execute_log.execute_result.to_summary), @a_execute_log %> + <%- else -%> + (not found) + <%- end -%> </p> <p> <p> <b>B result:</b> - <%=link_to h(@b_execute_log.execute_result.to_summary), @b_execute_log %> + <%- if @b_execute_log -%> + <%=link_to h(@b_execute_log.execute_result.to_summary), @b_execute_log %> + <%- else -%> + (not found) + <%- end -%> </p> <p> Modified: trunk/viewsite/test/fixtures/compare_logs.yml =================================================================== --- trunk/viewsite/test/fixtures/compare_logs.yml 2009-09-07 04:17:29 UTC (rev 955) +++ trunk/viewsite/test/fixtures/compare_logs.yml 2009-09-08 02:50:19 UTC (rev 956) @@ -35,3 +35,21 @@ c_out_log: "u_u_access out" c_err_log: "u_u_access err" compare_status: <%= CompareLog::STATUS_OK %> + +n_u_access: + compare_result: u_u # dummy + a_execute_log: ~ + b_execute_log: ubuntu804_access + system_call: access + c_out_log: ~ + c_err_log: ~ + compare_status: <%= CompareLog::STATUS_A_NOT_FOUND %> + +u_n_access: + compare_result: u_u # dummy + a_execute_log: ubuntu804_access + b_execute_log: ~ + system_call: access + c_out_log: ~ + c_err_log: ~ + compare_status: <%= CompareLog::STATUS_B_NOT_FOUND %> Modified: trunk/viewsite/test/functional/compare_logs_controller_test.rb =================================================================== --- trunk/viewsite/test/functional/compare_logs_controller_test.rb 2009-09-07 04:17:29 UTC (rev 955) +++ trunk/viewsite/test/functional/compare_logs_controller_test.rb 2009-09-08 02:50:19 UTC (rev 956) @@ -55,4 +55,14 @@ # assert_redirected_to compare_logs_path end + + test "should show compare_log of STATUS_A_NOT_FOUND" do + get :show, :id => compare_logs(:n_u_access).id + assert_response :success + end + + test "should show compare_log of STATUS_B_NOT_FOUND" do + get :show, :id => compare_logs(:u_n_access).id + assert_response :success + end end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |