gfdnavi 1.3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +10949 -0
- data/LICENCE.txt +57 -0
- data/Makefile +18 -0
- data/TODO +132 -0
- data/app/controllers/analysis_controller.rb +700 -0
- data/app/controllers/application.rb +41 -0
- data/app/controllers/draw_method_controller.rb +172 -0
- data/app/controllers/explorer_controller.rb +197 -0
- data/app/controllers/finder_controller.rb +331 -0
- data/app/controllers/function_controller.rb +204 -0
- data/app/controllers/group_controller.rb +115 -0
- data/app/controllers/keyword_attributes_controller.rb +52 -0
- data/app/controllers/knowledge_controller.rb +928 -0
- data/app/controllers/nodes_controller.rb +515 -0
- data/app/controllers/search_controller.rb +341 -0
- data/app/controllers/user_controller.rb +337 -0
- data/app/helpers/analysis_helper.rb +2 -0
- data/app/helpers/application_helper.rb +105 -0
- data/app/helpers/description_helper.rb +2 -0
- data/app/helpers/function_helper.rb +2 -0
- data/app/helpers/group_helper.rb +2 -0
- data/app/helpers/search_helper.rb +3 -0
- data/app/helpers/user_helper.rb +2 -0
- data/app/helpers/work_flow_helper.rb +92 -0
- data/app/models/actual_file.rb +3 -0
- data/app/models/analysis.rb +715 -0
- data/app/models/analysis_history.rb +42 -0
- data/app/models/cross_array.rb +22 -0
- data/app/models/cross_result.rb +254 -0
- data/app/models/derived_spatial_attribute.rb +3 -0
- data/app/models/diagram_cache.rb +16 -0
- data/app/models/diagram_cache_datum.rb +4 -0
- data/app/models/diagram_cache_session.rb +8 -0
- data/app/models/directory.rb +21 -0
- data/app/models/draw_method.rb +48 -0
- data/app/models/draw_method_attribute.rb +8 -0
- data/app/models/draw_parameter.rb +12 -0
- data/app/models/explorer_query.rb +354 -0
- data/app/models/explorer_result.rb +312 -0
- data/app/models/function.rb +75 -0
- data/app/models/function_argument.rb +6 -0
- data/app/models/function_output.rb +4 -0
- data/app/models/group.rb +153 -0
- data/app/models/image.rb +20 -0
- data/app/models/keyword_attribute.rb +179 -0
- data/app/models/knowledge.rb +94 -0
- data/app/models/knowledge_backup.rb +32 -0
- data/app/models/knowledge_figure.rb +16 -0
- data/app/models/knowledge_figure_backup.rb +16 -0
- data/app/models/knowledge_parser.rb +392 -0
- data/app/models/node.rb +605 -0
- data/app/models/node_entity_abstract.rb +112 -0
- data/app/models/node_lineage.rb +6 -0
- data/app/models/node_relation.rb +4 -0
- data/app/models/path_node.rb +60 -0
- data/app/models/query.rb +193 -0
- data/app/models/query_history.rb +12 -0
- data/app/models/results.rb +48 -0
- data/app/models/sign_up_user.rb +25 -0
- data/app/models/spatial_and_time_attribute.rb +11 -0
- data/app/models/user.rb +115 -0
- data/app/models/user_mailer.rb +48 -0
- data/app/models/value_type.rb +3 -0
- data/app/models/variable.rb +70 -0
- data/app/models/virtual_node.rb +457 -0
- data/app/views/analysis/__help_analysis_tab.en.html +57 -0
- data/app/views/analysis/__help_draw_share.en.html +12 -0
- data/app/views/analysis/__help_draw_tab.en.html +6 -0
- data/app/views/analysis/_analysis_function_settings.rhtml +61 -0
- data/app/views/analysis/_analysis_settings.rhtml +28 -0
- data/app/views/analysis/_diagram.rhtml +70 -0
- data/app/views/analysis/_dimension_option.rhtml +59 -0
- data/app/views/analysis/_draw_general_settings.rhtml +217 -0
- data/app/views/analysis/_draw_settings.rhtml +73 -0
- data/app/views/analysis/_history.rhtml +19 -0
- data/app/views/analysis/_popular_diagrams.rhtml +42 -0
- data/app/views/analysis/_save_form.rhtml +44 -0
- data/app/views/analysis/_variables.rhtml +66 -0
- data/app/views/analysis/_variables_order.rhtml +56 -0
- data/app/views/analysis/index.rhtml +195 -0
- data/app/views/analysis/preview.rhtml +3 -0
- data/app/views/analysis/save.rhtml +73 -0
- data/app/views/analysis/show_diagram.rhtml +42 -0
- data/app/views/cross/_display_map.rhtml +201 -0
- data/app/views/cross/_result.rhtml +205 -0
- data/app/views/cross/_show_result_tree.rhtml +40 -0
- data/app/views/cross/_show_results.rhtml +80 -0
- data/app/views/cross/_style.rhtml +21 -0
- data/app/views/cross/index.rhtml +271 -0
- data/app/views/draw_method/_edit_form.rhtml +110 -0
- data/app/views/draw_method/create.rhtml +8 -0
- data/app/views/draw_method/details.rhtml +113 -0
- data/app/views/draw_method/edit.rhtml +8 -0
- data/app/views/draw_method/list.rhtml +80 -0
- data/app/views/explorer/_display_map.rhtml +199 -0
- data/app/views/explorer/_show_result_tree.rhtml +40 -0
- data/app/views/explorer/_show_results.rhtml +101 -0
- data/app/views/explorer/_style.rhtml +21 -0
- data/app/views/explorer/index.rhtml +214 -0
- data/app/views/finder/_children.html.erb +84 -0
- data/app/views/finder/_children_details.html.erb +74 -0
- data/app/views/finder/_children_details_tr.html.erb +196 -0
- data/app/views/finder/create_tree.html.erb +15 -0
- data/app/views/finder/flex.html.erb +52 -0
- data/app/views/finder/index.html.erb +47 -0
- data/app/views/finder/show_details.html.erb +3 -0
- data/app/views/finder/show_images.html.erb +3 -0
- data/app/views/function/_edit_form.rhtml +106 -0
- data/app/views/function/create.rhtml +8 -0
- data/app/views/function/details.rhtml +96 -0
- data/app/views/function/edit.rhtml +8 -0
- data/app/views/function/list.rhtml +80 -0
- data/app/views/group/add_member.rhtml +13 -0
- data/app/views/group/change_owner.rhtml +15 -0
- data/app/views/group/create.rhtml +11 -0
- data/app/views/group/delete_member.rhtml +14 -0
- data/app/views/group/list.rhtml +63 -0
- data/app/views/knowledge/_backup.rhtml +135 -0
- data/app/views/knowledge/_category.rhtml +58 -0
- data/app/views/knowledge/_category_list.rhtml +34 -0
- data/app/views/knowledge/_category_table.rhtml +23 -0
- data/app/views/knowledge/_comment.rhtml +64 -0
- data/app/views/knowledge/_comment_input_form.rhtml +19 -0
- data/app/views/knowledge/_comments.rhtml +84 -0
- data/app/views/knowledge/_form.rhtml +139 -0
- data/app/views/knowledge/_group_figure_form.rhtml +187 -0
- data/app/views/knowledge/_layout_figure.rhtml +61 -0
- data/app/views/knowledge/_layout_figures_in_a_row_above_text.rhtml +42 -0
- data/app/views/knowledge/_layout_figures_under_text.rhtml +45 -0
- data/app/views/knowledge/_layout_one_figure_above_text.rhtml +28 -0
- data/app/views/knowledge/_summary.rhtml +21 -0
- data/app/views/knowledge/edit.rhtml +37 -0
- data/app/views/knowledge/list.rhtml +287 -0
- data/app/views/knowledge/new.rhtml +23 -0
- data/app/views/knowledge/new_from_analysis.rhtml +21 -0
- data/app/views/knowledge/show.rhtml +196 -0
- data/app/views/layouts/gfdnavi.rhtml +105 -0
- data/app/views/nodes/_ancestors.html.erb +89 -0
- data/app/views/nodes/_description_methods_table.html.erb +75 -0
- data/app/views/nodes/_mode.html.erb +16 -0
- data/app/views/nodes/description.html.erb +181 -0
- data/app/views/nodes/description_methods.html.erb +1 -0
- data/app/views/nodes/edit.html.erb +73 -0
- data/app/views/nodes/index.html.erb +25 -0
- data/app/views/nodes/show.html.erb +20 -0
- data/app/views/search/_children_details_mapsearch.rhtml +68 -0
- data/app/views/search/_children_details_tr.rhtml +205 -0
- data/app/views/search/_show_grouplist.rhtml +74 -0
- data/app/views/search/_show_results.rhtml +43 -0
- data/app/views/search/_show_results_global.rhtml +36 -0
- data/app/views/search/_show_results_partial.rhtml +39 -0
- data/app/views/search/_show_results_partial_groupbyfile.rhtml +50 -0
- data/app/views/search/_show_variablelist.rhtml +28 -0
- data/app/views/search/mapsearch.rhtml +176 -0
- data/app/views/search/remapsearch.rjs +18 -0
- data/app/views/search/show_details.rhtml +3 -0
- data/app/views/user/add_user.rhtml +30 -0
- data/app/views/user/change_password.rhtml +25 -0
- data/app/views/user/edit.html.erb +50 -0
- data/app/views/user/index.rhtml +162 -0
- data/app/views/user/login.rhtml +41 -0
- data/app/views/user/logout.rhtml +4 -0
- data/app/views/user/signup.rhtml +36 -0
- data/app/views/user/signup_succeeded.rhtml +36 -0
- data/app/views/user_mailer/authorization_inform.rhtml +15 -0
- data/app/views/user_mailer/signup_accepted.rhtml +12 -0
- data/app/views/user_mailer/signup_confirm.rhtml +14 -0
- data/app/views/user_mailer/signup_inform.rhtml +13 -0
- data/app/views/user_mailer/signup_rejected.rhtml +11 -0
- data/app/views/work_flow/_push_wsdls.rhtml +55 -0
- data/app/views/work_flow/index.rhtml +46 -0
- data/config/database.yml.example +35 -0
- data/config/environment.rb +68 -0
- data/config/gfdnavi.yml.example +95 -0
- data/config/load_config.rb +151 -0
- data/config/routes.rb +35 -0
- data/consistency_checker.rb +129 -0
- data/data/gfdnavi_docs/how_to_draw_multiple_images.knlge +68 -0
- data/data/gfdnavi_docs/how_to_knowledge.knlge +138 -0
- data/data/gfdnavi_docs/how_to_write_document_about_Gfdnavi.knlge +30 -0
- data/data/samples/jmadata.SIGEN +8 -0
- data/data/samples/jmadata.yml +6 -0
- data/data/samples/jmadata/MSM-P/2006.nc.yml +2 -0
- data/data/samples/jmadata/MSM-P/2006.yml +17 -0
- data/data/samples/jmadata/MSM-P/2006/0101.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/0101.nc.yml +13 -0
- data/data/samples/jmadata/MSM-P/2006/0102.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/0103.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/0104.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/0105.nc +0 -0
- data/data/samples/jmadata/MSM-P/2006/010[1-3].nc.yml +2 -0
- data/data/samples/jmadata/MSM-P/2006/skip_data.rb +96 -0
- data/data/samples/jmadata/MSM-P/2006/skip_data.sh +6 -0
- data/data/samples/reanalysis.SIGEN +8 -0
- data/data/samples/reanalysis/era40.SIGEN +8 -0
- data/data/samples/reanalysis/era40.yml +2 -0
- data/data/samples/reanalysis/era40/t.jan.nc +0 -0
- data/data/samples/reanalysis/era40/t.jan.nc.yml +1 -0
- data/data/samples/reanalysis/ncep.SIGEN +9 -0
- data/data/samples/reanalysis/ncep/T.jan.100hPa.png +0 -0
- data/data/samples/reanalysis/ncep/T.jan.100hPa.png.yml +43 -0
- data/data/samples/reanalysis/ncep/T.jan.nc +0 -0
- data/data/samples/reanalysis/ncep/T.jan.zonal_mean.nc +0 -0
- data/data/samples/reanalysis/ncep/T.jan.zonal_mean.nc.yml +8 -0
- data/data/samples/reanalysis/ncep/T.jan_only_root.nc +0 -0
- data/data/samples/reanalysis/ncep/T.jan_only_root.nc.yml +4 -0
- data/data/samples/reanalysis/ncep/UV.jan.nc +0 -0
- data/data/samples/reanalysis/ncep/UV.jan.nc.yml +10 -0
- data/data/samples/reanalysis/ncep/UV.jan.nc.yml.ja +11 -0
- data/data/samples/sonde_operational.yml +5 -0
- data/data/samples/sonde_operational/std_plev.yml +12 -0
- data/data/samples/sonde_operational/std_plev/41256.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/42410.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/43333.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/43346.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/48698.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/61641.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/63741.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/67083.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/72261.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/76805.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/82193.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/91165.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/91610.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/91948.spl.nc +0 -0
- data/data/samples/sonde_operational/std_plev/94294.spl.nc +0 -0
- data/db/NetCDFparser.rb +406 -0
- data/db/create_derived_spatial_attributes.sql +12 -0
- data/db/draw_methods/line.yml +6 -0
- data/db/draw_methods/scatter.yml +38 -0
- data/db/draw_methods/tone.yml +64 -0
- data/db/draw_methods/vector.yml +19 -0
- data/db/dump_db.rb +43 -0
- data/db/functions/additions.yml +10 -0
- data/db/functions/cut.yml +10 -0
- data/db/functions/division.yml +10 -0
- data/db/functions/mean.yml +28 -0
- data/db/functions/multiplication.yml +10 -0
- data/db/functions/stddev.yml +28 -0
- data/db/functions/subtraction.yml +10 -0
- data/db/migrate/001_initial_scheme.rb +289 -0
- data/db/migrate/002_add_open_id_authentication_tables.rb +20 -0
- data/db/register_directory_tree.rb +760 -0
- data/db/restore_db.rb +60 -0
- data/gfdnavi-install +828 -0
- data/install.rb +828 -0
- data/lib/activerecord_gfdnavi.rb +31 -0
- data/lib/basic_authorization.rb +50 -0
- data/lib/create_activeresources.rb +108 -0
- data/lib/execute_analysis.rb +472 -0
- data/lib/file_gfdnavi.rb +38 -0
- data/lib/gphys_gfdnavi.rb +81 -0
- data/lib/localdir.rb +110 -0
- data/lib/login_system.rb +110 -0
- data/lib/multibytes.rb +20 -0
- data/lib/narray_yaml.rb +58 -0
- data/lib/no_rdb_base.rb +40 -0
- data/lib/opendapdir.rb +171 -0
- data/lib/tar.rb +127 -0
- data/lib/tasks/clean.rake +65 -0
- data/lib/tasks/setup.rake +316 -0
- data/lib/tasks/update.rake +62 -0
- data/lib/vizshot_gfdnavi.rb +224 -0
- data/public/crossdomain.xml +4 -0
- data/public/flex/NodeTreeDescriptor.as +55 -0
- data/public/flex/TreeNode.as +253 -0
- data/public/flex/finder.mxml +304 -0
- data/public/flex/finder.swf +0 -0
- data/public/flex/gfdnavi.mxml +52 -0
- data/public/flex/gfdnavi.swf +0 -0
- data/public/images/Help_S-shots/dir_tree_with_add.jpg +0 -0
- data/public/images/analyze.gif +0 -0
- data/public/images/circle.gif +0 -0
- data/public/images/create_from_analysis_button.png +0 -0
- data/public/images/delete.png +0 -0
- data/public/images/down.png +0 -0
- data/public/images/drawbutton.gif +0 -0
- data/public/images/gfdnavi_home_logo.png +0 -0
- data/public/images/gfdnavi_logo_big.png +0 -0
- data/public/images/gfdnavi_logo_med.png +0 -0
- data/public/images/gfdnavi_logo_mini.png +0 -0
- data/public/images/gfdnavi_logo_nobg_big.png +0 -0
- data/public/images/gfdnavi_logo_nobg_med.png +0 -0
- data/public/images/gfdnavi_logo_nobg_small.png +0 -0
- data/public/images/gfdnavi_logo_small.png +0 -0
- data/public/images/gfdnavi_logo_xsmall.png +0 -0
- data/public/images/hbar.png +0 -0
- data/public/images/helpmark16.png +0 -0
- data/public/images/helpmark18.png +0 -0
- data/public/images/kikyu_g.gif +0 -0
- data/public/images/kikyu_r.gif +0 -0
- data/public/images/map_icon_g.gif +0 -0
- data/public/images/map_icon_r.gif +0 -0
- data/public/images/new_knowledge.png +0 -0
- data/public/images/openid.png +0 -0
- data/public/images/read_in_the_form.png +0 -0
- data/public/images/slider_f.gif +0 -0
- data/public/images/slider_f_red.gif +0 -0
- data/public/images/star1.gif +0 -0
- data/public/images/star2.gif +0 -0
- data/public/images/startanim.gif +0 -0
- data/public/images/stopanim.gif +0 -0
- data/public/images/tree/DL.png +0 -0
- data/public/images/tree/anal_viz.png +0 -0
- data/public/images/tree/analyze_visualize_checked_items.png +0 -0
- data/public/images/tree/binary.png +0 -0
- data/public/images/tree/details.png +0 -0
- data/public/images/tree/download_checked_items.png +0 -0
- data/public/images/tree/folder.png +0 -0
- data/public/images/tree/folder_close.gif +0 -0
- data/public/images/tree/image2.png +0 -0
- data/public/images/tree/knowledge.png +0 -0
- data/public/images/tree/knowledges.png +0 -0
- data/public/images/tree/last.gif +0 -0
- data/public/images/tree/last.png +0 -0
- data/public/images/tree/minus.gif +0 -0
- data/public/images/tree/minus_simple.gif +0 -0
- data/public/images/tree/none.gif +0 -0
- data/public/images/tree/none.png +0 -0
- data/public/images/tree/plus.gif +0 -0
- data/public/images/tree/plus_simple.gif +0 -0
- data/public/images/tree/show.png +0 -0
- data/public/images/tree/show_checked_items.png +0 -0
- data/public/images/tree/t.gif +0 -0
- data/public/images/tree/t.png +0 -0
- data/public/images/tree/tate.gif +0 -0
- data/public/images/tree/tate.png +0 -0
- data/public/images/up.png +0 -0
- data/public/images/vbar.png +0 -0
- data/public/images/white.bmp +0 -0
- data/public/images/x.gif +0 -0
- data/public/index.html +100 -0
- data/public/javascripts/AC_OETags.js +269 -0
- data/public/javascripts/analysis.js +751 -0
- data/public/javascripts/application.js +29 -0
- data/public/javascripts/directory_tree.js +102 -0
- data/public/javascripts/draw_method.js +83 -0
- data/public/javascripts/excanvas.js +704 -0
- data/public/javascripts/function.js +107 -0
- data/public/javascripts/gfdnavi.js +175 -0
- data/public/javascripts/knowledge.js +384 -0
- data/public/javascripts/mapsearch.js +313 -0
- data/public/javascripts/progress.js +42 -0
- data/public/javascripts/resizable_box.js +164 -0
- data/public/javascripts/slider.js +260 -0
- data/public/javascripts/tab.js +17 -0
- data/public/javascripts/work_flow.js +452 -0
- data/public/stylesheets/analysis.css +111 -0
- data/public/stylesheets/description.css +71 -0
- data/public/stylesheets/gfdnavi.css +141 -0
- data/public/stylesheets/knowledge.css +218 -0
- data/public/stylesheets/search.css +184 -0
- data/public/stylesheets/tree.css +45 -0
- data/public/stylesheets/tree_for_ie.css +3 -0
- data/public/stylesheets/work_flow.css +78 -0
- data/script/cleaner +11 -0
- data/script/server_ssl +131 -0
- data/test/fixtures/diagram_cache_data.yml +5 -0
- data/test/fixtures/diagram_cache_sessions.yml +6 -0
- data/test/fixtures/diagram_caches.yml +6 -0
- data/test/fixtures/directories.yml +57 -0
- data/test/fixtures/draw_parameters.yml +6 -0
- data/test/fixtures/function_arguments.yml +15 -0
- data/test/fixtures/function_outputs.yml +15 -0
- data/test/fixtures/functions.yml +29 -0
- data/test/fixtures/group_members.yml +33 -0
- data/test/fixtures/groups.yml +25 -0
- data/test/fixtures/images.yml +12 -0
- data/test/fixtures/keyword_attributes.yml +73 -0
- data/test/fixtures/knowledges.yml +10 -0
- data/test/fixtures/node_relations.yml +11 -0
- data/test/fixtures/nodes.yml +298 -0
- data/test/fixtures/sign_up_users.yml +8 -0
- data/test/fixtures/spatial_and_time_attributes.yml +29 -0
- data/test/fixtures/user_mailer/authorization_inform +11 -0
- data/test/fixtures/user_mailer/signup_accepted +10 -0
- data/test/fixtures/user_mailer/signup_confirm +17 -0
- data/test/fixtures/user_mailer/signup_inform +10 -0
- data/test/fixtures/user_mailer/signup_rejected +9 -0
- data/test/fixtures/users.yml +31 -0
- data/test/fixtures/value_types.yml +10 -0
- data/test/fixtures/variables.yml +17 -0
- data/test/functional/analysis_controller_test.rb +169 -0
- data/test/functional/description_controller_test.rb +18 -0
- data/test/functional/function_controller_test.rb +18 -0
- data/test/functional/group_controller_test.rb +18 -0
- data/test/functional/search_controller_test.rb +83 -0
- data/test/functional/user_controller_test.rb +77 -0
- data/test/functional/webservice_analysis_api_test.rb +12 -0
- data/test/functional/work_flow_controller_test.rb +18 -0
- data/test/test_helper.rb +28 -0
- data/test/unit/diagram_cache_datum_test.rb +10 -0
- data/test/unit/diagram_cache_session_test.rb +10 -0
- data/test/unit/diagram_cache_test.rb +10 -0
- data/test/unit/directory_test.rb +49 -0
- data/test/unit/draw_parameter_test.rb +10 -0
- data/test/unit/function_argument_test.rb +10 -0
- data/test/unit/function_output_test.rb +10 -0
- data/test/unit/function_test.rb +10 -0
- data/test/unit/group_test.rb +48 -0
- data/test/unit/image_test.rb +13 -0
- data/test/unit/keyword_attribute_test.rb +33 -0
- data/test/unit/knowledge_test.rb +13 -0
- data/test/unit/node_relation_test.rb +20 -0
- data/test/unit/node_test.rb +85 -0
- data/test/unit/sign_up_user_test.rb +20 -0
- data/test/unit/spatial_and_time_attribute_test.rb +29 -0
- data/test/unit/user_mailer_test.rb +101 -0
- data/test/unit/user_test.rb +134 -0
- data/test/unit/value_type_test.rb +10 -0
- data/test/unit/variable_test.rb +35 -0
- data/vendor/plugins/acts_as_list/README +23 -0
- data/vendor/plugins/acts_as_list/init.rb +3 -0
- data/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +256 -0
- data/vendor/plugins/acts_as_list/test/list_test.rb +332 -0
- data/vendor/plugins/acts_as_tree/README +26 -0
- data/vendor/plugins/acts_as_tree/Rakefile +22 -0
- data/vendor/plugins/acts_as_tree/init.rb +1 -0
- data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
- data/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
- data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
- data/vendor/plugins/will_paginate/CHANGELOG +92 -0
- data/vendor/plugins/will_paginate/LICENSE +18 -0
- data/vendor/plugins/will_paginate/README.rdoc +131 -0
- data/vendor/plugins/will_paginate/Rakefile +62 -0
- data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
- data/vendor/plugins/will_paginate/examples/index.haml +69 -0
- data/vendor/plugins/will_paginate/examples/index.html +92 -0
- data/vendor/plugins/will_paginate/examples/pagination.css +90 -0
- data/vendor/plugins/will_paginate/examples/pagination.sass +91 -0
- data/vendor/plugins/will_paginate/init.rb +1 -0
- data/vendor/plugins/will_paginate/lib/will_paginate.rb +86 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +16 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +145 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +32 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +247 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +132 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +39 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +9 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +373 -0
- data/vendor/plugins/will_paginate/will_paginate.gemspec +21 -0
- metadata +586 -0
@@ -0,0 +1,77 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'user_controller'
|
3
|
+
|
4
|
+
# Raise errors beyond the default web-based presentation
|
5
|
+
class UserController; def rescue_action(e) raise e end; end
|
6
|
+
|
7
|
+
class UserControllerTest < Test::Unit::TestCase
|
8
|
+
self.use_instantiated_fixtures = true
|
9
|
+
|
10
|
+
fixtures :users
|
11
|
+
|
12
|
+
def setup
|
13
|
+
|
14
|
+
@controller = UserController.new
|
15
|
+
@request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new
|
16
|
+
@request.host = "localhost"
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_auth_bob
|
20
|
+
@request.session['return-to'] = "/bogus/location"
|
21
|
+
|
22
|
+
post :login, "user_login" => "bob", "user_password" => "test"
|
23
|
+
assert_session_has "user"
|
24
|
+
|
25
|
+
assert_equal @bob, @response.session["user"]
|
26
|
+
|
27
|
+
assert_redirected_to "/bogus/location"
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_signup
|
31
|
+
|
32
|
+
post :login, "user_login" => "root", "user_password" => "rootroot"
|
33
|
+
|
34
|
+
@request.session['return-to'] = "/bogus/location"
|
35
|
+
|
36
|
+
post :signup, "user" => { "login" => "newbob", "password" => "newpassword", "password_confirmation" => "newpassword" }
|
37
|
+
assert_session_has "user"
|
38
|
+
|
39
|
+
assert_redirected_to "/bogus/location"
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_bad_signup
|
43
|
+
@request.session['return-to'] = "/bogus/location"
|
44
|
+
|
45
|
+
post :signup, "user" => { "login" => "newbob", "password" => "newpassword", "password_confirmation" => "wrong" }
|
46
|
+
# assert_invalid_column_on_record "user", "password"
|
47
|
+
assert_response 302
|
48
|
+
|
49
|
+
post :signup, "user" => { "login" => "yo", "password" => "newpassword", "password_confirmation" => "newpassword" }
|
50
|
+
# assert_invalid_column_on_record "user", "login"
|
51
|
+
assert_response 302
|
52
|
+
|
53
|
+
post :signup, "user" => { "login" => "yo", "password" => "newpassword", "password_confirmation" => "wrong" }
|
54
|
+
# assert_invalid_column_on_record "user", ["login", "password"]
|
55
|
+
assert_response 302
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_invalid_login
|
59
|
+
post :login, "user_login" => "bob", "user_password" => "not_correct"
|
60
|
+
|
61
|
+
assert_session_has_no "user"
|
62
|
+
|
63
|
+
# assert_template_has "message"
|
64
|
+
assert_template_has "login"
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_login_logoff
|
68
|
+
|
69
|
+
post :login, "user_login" => "bob", "user_password" => "test"
|
70
|
+
assert_session_has "user"
|
71
|
+
|
72
|
+
get :logout
|
73
|
+
assert_session_has_no "user"
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'webservice_analysis_controller'
|
3
|
+
|
4
|
+
class WebserviceAnalysisController; def rescue_action(e) raise e end; end
|
5
|
+
|
6
|
+
class WebserviceAnalysisControllerApiTest < Test::Unit::TestCase
|
7
|
+
def setup
|
8
|
+
@controller = WebserviceAnalysisController.new
|
9
|
+
@request = ActionController::TestRequest.new
|
10
|
+
@response = ActionController::TestResponse.new
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'work_flow_controller'
|
3
|
+
|
4
|
+
# Re-raise errors caught by the controller.
|
5
|
+
class WorkFlowController; def rescue_action(e) raise e end; end
|
6
|
+
|
7
|
+
class WorkFlowControllerTest < Test::Unit::TestCase
|
8
|
+
def setup
|
9
|
+
@controller = WorkFlowController.new
|
10
|
+
@request = ActionController::TestRequest.new
|
11
|
+
@response = ActionController::TestResponse.new
|
12
|
+
end
|
13
|
+
|
14
|
+
# Replace this with your real tests.
|
15
|
+
def test_truth
|
16
|
+
assert true
|
17
|
+
end
|
18
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
3
|
+
require 'test_help'
|
4
|
+
|
5
|
+
class Test::Unit::TestCase
|
6
|
+
# Transactional fixtures accelerate your tests by wrapping each test method
|
7
|
+
# in a transaction that's rolled back on completion. This ensures that the
|
8
|
+
# test database remains unchanged so your fixtures don't have to be reloaded
|
9
|
+
# between every test method. Fewer database queries means faster tests.
|
10
|
+
#
|
11
|
+
# Read Mike Clark's excellent walkthrough at
|
12
|
+
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
|
13
|
+
#
|
14
|
+
# Every Active Record database supports transactions except MyISAM tables
|
15
|
+
# in MySQL. Turn off transactional fixtures in this case; however, if you
|
16
|
+
# don't care one way or the other, switching from MyISAM to InnoDB tables
|
17
|
+
# is recommended.
|
18
|
+
self.use_transactional_fixtures = true
|
19
|
+
|
20
|
+
# Instantiated fixtures are slow, but give you @david where otherwise you
|
21
|
+
# would need people(:david). If you don't want to migrate your existing
|
22
|
+
# test cases which use the @david style and don't mind the speed hit (each
|
23
|
+
# instantiated fixtures translates to a database query per test method),
|
24
|
+
# then set this back to true.
|
25
|
+
self.use_instantiated_fixtures = false
|
26
|
+
|
27
|
+
# Add more helper methods to be used by all tests here...
|
28
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../lib/narray_yaml")
|
3
|
+
|
4
|
+
class DirectoryTest < Test::Unit::TestCase
|
5
|
+
fixtures :directories, :nodes, :users, :groups
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@dir_reanalysis = Directory.find(3) # reanalysis
|
9
|
+
@root = User.find_by_login("root")
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_db
|
13
|
+
reanalysis = directories(:reanalysis)
|
14
|
+
assert_kind_of Directory, @dir_reanalysis
|
15
|
+
assert_equal reanalysis.id, @dir_reanalysis.id
|
16
|
+
assert_equal reanalysis.plain_file, @dir_reanalysis.plain_file
|
17
|
+
assert_equal reanalysis.node, @dir_reanalysis.node
|
18
|
+
assert_equal reanalysis.name, @dir_reanalysis.name
|
19
|
+
assert_equal Node.find_by_path("/samples"), @dir_reanalysis.parent
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_create
|
23
|
+
dir = Directory.new
|
24
|
+
assert_equal Node::DIRECTORY, dir.node.node_type
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_update
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_children
|
31
|
+
ncep_jan = directories(:ncep_t_jan)
|
32
|
+
children = @dir_reanalysis.children(false,:user=>@root)
|
33
|
+
assert_equal 2, children.length
|
34
|
+
assert_kind_of Node, children[1]
|
35
|
+
assert_kind_of Directory, children[1].entity
|
36
|
+
assert children[1].children.include?( ncep_jan.node )
|
37
|
+
ncep = @dir_reanalysis.children.find(:first, :conditions => 'name = "ncep"')
|
38
|
+
assert_kind_of Directory, ncep.entity
|
39
|
+
assert_equal %w(T.jan.100hPa.png T.jan.nc T.jan.zonal_mean.nc UV.jan.nc).sort, ncep.children.collect{|n| n.name}.sort
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_variables
|
43
|
+
ncep = @dir_reanalysis.node.children.find(:first, :conditions => 'name = "ncep"')
|
44
|
+
ncep_jan = ncep.children.find(:first, :conditions => 'name = "T.jan.nc"')
|
45
|
+
assert_kind_of Directory, ncep_jan.entity
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class FunctionTest < Test::Unit::TestCase
|
4
|
+
fixtures :functions, :function_arguments, :function_outputs, :nodes, :value_types
|
5
|
+
|
6
|
+
# Replace this with your real tests.
|
7
|
+
def test_truth
|
8
|
+
assert true
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class GroupTest < Test::Unit::TestCase
|
4
|
+
fixtures :users, :groups
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@user_root = User.find_by_login("root")
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_create_groups
|
11
|
+
maxgid = Group.find_by_sql('select max(id) as id from groups').first.id
|
12
|
+
tg = Group.new(:name => 'test')
|
13
|
+
tg.owner = @user_root
|
14
|
+
assert tg.save
|
15
|
+
assert_equal @user_root.id, tg.owner_id
|
16
|
+
tg2 = Group.new(:name => 'test2')
|
17
|
+
tg2.owner = @user_root
|
18
|
+
assert tg2.save
|
19
|
+
assert_equal Group.find_by_name('test').id, maxgid+1
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_members
|
23
|
+
assert_equal ["root"], Group.find_by_name("root").members.collect{|gm| gm.login}
|
24
|
+
assert_equal ["bob","longbob","root"], Group.find_by_name("all").members.collect{|gm| gm.login}.sort
|
25
|
+
assert_equal ["bob"], Group.find_by_name("era").members.collect{|gm| gm.login}
|
26
|
+
bobsgroup = Group.find_by_bit_flag(User.find_by_login("bob").groups).collect{|g| g.name}.sort
|
27
|
+
assert_equal bobsgroup, ["all", "bob", "bobs", "era"]
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_add_del_members
|
31
|
+
bobs = Group.find_by_name("bobs")
|
32
|
+
mbs = ["bob","longbob"]
|
33
|
+
bobs.add_members( mbs )
|
34
|
+
assert_equal mbs, bobs.members.collect{|u| u.login}.sort
|
35
|
+
bobs.del_members(["longbob"])
|
36
|
+
assert_equal bobs.members.collect{|u| u.login}, ["bob"]
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_destroy
|
40
|
+
longbob = Group.find_by_name("longbob")
|
41
|
+
longbob.add_members( ["longbob"] )
|
42
|
+
lg1 = User.find_by_login("longbob").groups
|
43
|
+
longbob.destroy
|
44
|
+
lg2 = User.find_by_login("longbob").groups
|
45
|
+
assert_equal lg1 ^ lg2, longbob.bit_mask
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class KeywordAttributeTest < Test::Unit::TestCase
|
4
|
+
fixtures :keyword_attributes, :nodes, :directories, :variables
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@ka = KeywordAttribute.find(1)
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_db
|
11
|
+
rd = keyword_attributes(:reanalysis_description)
|
12
|
+
assert_kind_of KeywordAttribute, @ka
|
13
|
+
assert_equal rd.node_id, @ka.node_id
|
14
|
+
assert_equal rd.name, @ka.name
|
15
|
+
assert_equal rd.value, @ka.value
|
16
|
+
assert_equal rd.num_value, @ka.num_value
|
17
|
+
assert_kind_of Node, rd.node
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_stdname
|
21
|
+
ka = KeywordAttribute.find_by_stdname('title')
|
22
|
+
assert_equal 'long_name', ka.name
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_node
|
26
|
+
node = Node.find_by_path("/samples/reanalysis")
|
27
|
+
ka = node.keyword_attributes
|
28
|
+
assert_equal 1, ka.length
|
29
|
+
assert_kind_of KeywordAttribute, ka[0]
|
30
|
+
assert_kind_of KeywordAttribute, node.entity.keyword_attributes[0]
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class NodeRelationTest < Test::Unit::TestCase
|
4
|
+
fixtures :nodes, :variables, :images, :node_relations
|
5
|
+
|
6
|
+
# Replace this with your real tests.
|
7
|
+
|
8
|
+
def setup
|
9
|
+
@t = Node.find_by_path("/samples/reanalysis/ncep/T.jan.nc/T")
|
10
|
+
@t_mean = Node.find_by_path("/samples/reanalysis/ncep/T.jan.zonal_mean.nc/T_mean")
|
11
|
+
@t_image = Node.find_by_path("/samples/reanalysis/ncep/T.jan.100hPa.png")
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_relation
|
15
|
+
assert_equal [@t], @t_mean.references
|
16
|
+
assert_equal [@t], @t_image.references
|
17
|
+
assert_equal [@t_mean, @t_image].sort{|a,b| a.path<=>b.path}, @t.referenced_by.sort{|a,b| a.path<=>b.path}
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class NodeTest < Test::Unit::TestCase
|
4
|
+
fixtures :nodes, :users, :groups
|
5
|
+
#, :variables, :keyword_attributes,
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@node_reanalysis = Node.find_by_path('/samples/reanalysis')
|
9
|
+
@root = User.find_by_login("root")
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_permission
|
13
|
+
topnode = Node.find_by_path('/')
|
14
|
+
topnode.update
|
15
|
+
topnode.save!
|
16
|
+
#Node.find(:all, :user=>:all).each do |node|
|
17
|
+
# printf("%016x %s\n",node.groups_readable,node.path)
|
18
|
+
#end
|
19
|
+
n1 = Node.find_by_path('/samples/reanalysis/era40')
|
20
|
+
assert_equal n1.groups_readable, 32
|
21
|
+
n2 = Node.find_by_path('/samples/reanalysis/era40/t.nc')
|
22
|
+
assert_equal n2.groups_readable, 32
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_db
|
26
|
+
reanalysis = nodes(:reanalysis)
|
27
|
+
assert_kind_of Node, @node_reanalysis
|
28
|
+
assert_equal reanalysis.id, @node_reanalysis.id
|
29
|
+
assert_equal reanalysis.name, @node_reanalysis.name
|
30
|
+
assert_equal reanalysis.parent_id, @node_reanalysis.parent_id
|
31
|
+
assert_equal reanalysis.node_type, @node_reanalysis.node_type
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_tree
|
35
|
+
assert_equal '/samples', @node_reanalysis.parent.path
|
36
|
+
assert_equal ["ncep"], @node_reanalysis.children.collect{|node| node.name}
|
37
|
+
assert_equal ["era40","ncep"], @node_reanalysis.children(false,:user=>@root).collect{|node| node.name}
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_lineage
|
41
|
+
# this is rather to test the consistency of the fixture
|
42
|
+
upath = '/samples/reanalysis/ncep/UV.jan.nc/U'
|
43
|
+
assert_kind_of Node, ( u = Node.find_by_path(upath) )
|
44
|
+
path = u.file
|
45
|
+
assert_equal( (pr=u.parent).path, path )
|
46
|
+
while (path.sub!(/\/[^\/]*$/,'') != '')
|
47
|
+
assert_equal( (pr=pr.parent).path, path )
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_group
|
52
|
+
assert_equal Node.count, Node.find(:all, :user=>@root).length
|
53
|
+
|
54
|
+
bob = User.find_by_login("bob") # belongs to "era"
|
55
|
+
path = "/samples/reanalysis/era40"
|
56
|
+
assert_equal path, Node.find(:first, :conditions=>"path='#{path}'", :user=>bob).path
|
57
|
+
path = "/samples/reanalysis/era40/t.nc"
|
58
|
+
assert_equal path, Node.find(:first, :conditions=>"path='#{path}'", :user=>bob).path
|
59
|
+
path = "/samples/reanalysis/era40/t.nc/t"
|
60
|
+
assert_equal path, Node.find(:first, :conditions=>"path='#{path}'", :user=>bob).path
|
61
|
+
assert_equal 3, Node.find(:all, :conditions=>"path like '%era%'", :user=>bob).length
|
62
|
+
|
63
|
+
longbob = User.find_by_login("longbob") # "belongs to "bobs"
|
64
|
+
path = "/usr/bob/hidden_image.png"
|
65
|
+
assert_equal path, Node.find(:first, :conditions=>"path='#{path}'", :user=>@root).path
|
66
|
+
assert_equal path, Node.find(:first, :conditions=>"path='#{path}'", :user=>longbob).path
|
67
|
+
assert_equal 0, Node.find(:all, :conditions=>"path like '%era%'", :user=>longbob).length
|
68
|
+
|
69
|
+
path = "/samples/reanalysis/ncep/T.jan.nc/T"
|
70
|
+
assert_equal path, Node.find(:first, :conditions=>["path=?",path]).path
|
71
|
+
assert_equal @node_reanalysis, Node.find(@node_reanalysis.id)
|
72
|
+
assert_equal 0, Node.find(:all, :conditions=>"path like '%era%'").length
|
73
|
+
path = "/usr/bob/hidden_image.png"
|
74
|
+
assert_nil Node.find(:first, :conditions=>["path=?",path])
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_update
|
78
|
+
name = "changed_name"
|
79
|
+
@node_reanalysis.name = name
|
80
|
+
assert @node_reanalysis.save, @node_reanalysis.errors.full_messages.join("; ")
|
81
|
+
@node_reanalysis.reload
|
82
|
+
assert_equal name, @node_reanalysis.name
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|