gfdnavi 1.3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
data/lib/file_gfdnavi.rb
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
class File
|
|
2
|
+
DIR_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-."
|
|
3
|
+
|
|
4
|
+
class << self
|
|
5
|
+
|
|
6
|
+
=begin
|
|
7
|
+
alias :_rename :rename
|
|
8
|
+
private :_rename
|
|
9
|
+
def rename(from, to)
|
|
10
|
+
raise("cannot move file from #{from} to #{to}: file #{to} already exists.") if File.exist?(to)
|
|
11
|
+
_rename(from,to)
|
|
12
|
+
end
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
def temp_name(path, suffix = nil, length = 32, count = 0)
|
|
16
|
+
path += "/" unless path[-1..-1] == "/"
|
|
17
|
+
# name = [Digest::MD5.digest(salt)].pack("m").gsub!(/+/,"_").gsub!(/\n/,"").gsub!(/=/,"")
|
|
18
|
+
name = ""
|
|
19
|
+
max = DIR_CHARS.length
|
|
20
|
+
length.times{|i|
|
|
21
|
+
r = rand(max)
|
|
22
|
+
name += DIR_CHARS[r..r]
|
|
23
|
+
}
|
|
24
|
+
name = path + name
|
|
25
|
+
name += suffix if suffix
|
|
26
|
+
if File.exist?(name)
|
|
27
|
+
if count < 10
|
|
28
|
+
return temp_name(path, suffix, length, count+1)
|
|
29
|
+
else
|
|
30
|
+
raise "cannot create temporary path name"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
return name
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Extension of GPhys class for Gfdnavi
|
|
2
|
+
|
|
3
|
+
require "numru/gphys"
|
|
4
|
+
|
|
5
|
+
module NumRu
|
|
6
|
+
class GPhys
|
|
7
|
+
|
|
8
|
+
# == Parameters @@read_size_limit_1 and @@read_size_limit_2
|
|
9
|
+
#
|
|
10
|
+
# By default, both are nil, so no restriction is made
|
|
11
|
+
# on the size of data to read in onto run-time memory.
|
|
12
|
+
# To limit it, set these parameters explicitly by calling
|
|
13
|
+
# the class methods read_size_limit_1= and/or read_size_limit_2=.
|
|
14
|
+
#
|
|
15
|
+
# It's up to the programmer how to use the
|
|
16
|
+
# two limits. It's OK to use only one of them.
|
|
17
|
+
# If both are set, it is recommended to set as
|
|
18
|
+
# @@read_size_limit_2 > @@read_size_limit_1, because
|
|
19
|
+
# of the order of judgements (the former is evaluated first).
|
|
20
|
+
|
|
21
|
+
@@read_size_limit_1 = nil # e.g., 2000000
|
|
22
|
+
@@read_size_limit_2 = nil # e.g., 10000000
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Read_Size_Limit_2_Exceeded < StandardError
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class Read_Size_Limit_1_Exceeded < StandardError
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# class method definitions:
|
|
32
|
+
class << self
|
|
33
|
+
|
|
34
|
+
alias :__new__ :new
|
|
35
|
+
|
|
36
|
+
# Limit the size of data to read in with GPhys#val.
|
|
37
|
+
# This is implemented by defining singletone method
|
|
38
|
+
# for the VArray that represent the main data array.
|
|
39
|
+
# (Note that no restriction is made for coordinate varaibles,
|
|
40
|
+
# which is practically unnecessary.)
|
|
41
|
+
def new(*argv)
|
|
42
|
+
gp = __new__(*argv)
|
|
43
|
+
data = gp.data
|
|
44
|
+
def data.val
|
|
45
|
+
if @@read_size_limit_2 && length > @@read_size_limit_2
|
|
46
|
+
raise Read_Size_Limit_2_Exceeded, "Exceeded the maximum array size to read in (length=#{@@read_size_limit_2}). Reduce the size by using the 'axes' window, and try again. (Or perhaps you may get around the error by programming with GPhys::each_along_dims.)"
|
|
47
|
+
elsif @@read_size_limit_1 && length > @@read_size_limit_1
|
|
48
|
+
raise Read_Size_Limit_1_Exceeded, "Exceeded the maximum array size to read in (length=#{@@read_size_limit_1}). Reduce the size by using the 'axes' window, and try again. (Or perhaps you may get around the error by programming with GPhys::each_along_dims.)"
|
|
49
|
+
end
|
|
50
|
+
super
|
|
51
|
+
end
|
|
52
|
+
gp
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Set internal parameter @@read_size_limit_1
|
|
56
|
+
def read_size_limit_1= (limit)
|
|
57
|
+
return if limit.nil?
|
|
58
|
+
raise(ArgumentError,"Expect an integer") if !limit.is_a?(Integer)
|
|
59
|
+
@@read_size_limit_1 = limit
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Set internal parameter @@read_size_limit_2
|
|
63
|
+
def read_size_limit_2= (limit)
|
|
64
|
+
return if limit.nil?
|
|
65
|
+
raise(ArgumentError,"Expect an integer") if !limit.is_a?(Integer)
|
|
66
|
+
@@read_size_limit_2 = limit
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def read_size_limit_1
|
|
70
|
+
@@read_size_limit_1
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def read_size_limit_2
|
|
74
|
+
@@read_size_limit_1
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
data/lib/localdir.rb
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
require 'numru/gphys'
|
|
2
|
+
|
|
3
|
+
module NumRu
|
|
4
|
+
class LocalDir
|
|
5
|
+
|
|
6
|
+
def initialize(path)
|
|
7
|
+
@dir = Dir.new(path)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
class << self
|
|
11
|
+
alias open new
|
|
12
|
+
|
|
13
|
+
=begin
|
|
14
|
+
def open(path)
|
|
15
|
+
file = File.open(path)
|
|
16
|
+
if block_given?
|
|
17
|
+
yield(file)
|
|
18
|
+
file.close
|
|
19
|
+
nil
|
|
20
|
+
else
|
|
21
|
+
file
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
=end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def path
|
|
28
|
+
@dir.path
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def name
|
|
32
|
+
File.basename(path)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def entries
|
|
36
|
+
@dir.entries
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def each_dir
|
|
40
|
+
@dir.each do |name|
|
|
41
|
+
path = File.join(self.path,name)
|
|
42
|
+
if name!='.' && name!='..' && File.directory?(path)
|
|
43
|
+
dir = self.class.new(path)
|
|
44
|
+
mtime = File.mtime(path)
|
|
45
|
+
yield(dir, mtime)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
nil
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def each_gphys_file
|
|
52
|
+
@dir.each do |name|
|
|
53
|
+
path = File.join(self.path,name)
|
|
54
|
+
if (File.file?(path) || (/nus$/=~path&&File.directory?(path))) && (klass=GPhys::IO.file2file_class(path))
|
|
55
|
+
# file = klass.open(path)
|
|
56
|
+
mtime = File.mtime(path)
|
|
57
|
+
size = File.size(path)
|
|
58
|
+
# yield(file, mtime, size)
|
|
59
|
+
yield(path, mtime, size, klass)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
nil
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# name_pattern : regexp to limit by name
|
|
66
|
+
#
|
|
67
|
+
def each_file(name_pattern = nil)
|
|
68
|
+
@dir.each do |name|
|
|
69
|
+
path = File.join(self.path,name)
|
|
70
|
+
if File.file?(path) and
|
|
71
|
+
(name_pattern.nil? or name_pattern =~ name)
|
|
72
|
+
yield(path, File.mtime(path), File.size(path) )
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
=begin
|
|
78
|
+
def plain_file_paths
|
|
79
|
+
if @plain_file_paths.nil?
|
|
80
|
+
@plain_file_paths = Array.new
|
|
81
|
+
@dir.each do |name|
|
|
82
|
+
path = File.join(self.path,name)
|
|
83
|
+
if File.file?(path) && GPhys::IO.file2file_class(path).nil?
|
|
84
|
+
@plain_file_paths.push(path)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
@plain_file_paths
|
|
89
|
+
end
|
|
90
|
+
=end
|
|
91
|
+
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if $0 == __FILE__
|
|
96
|
+
include NumRu
|
|
97
|
+
dir = LocalDir.open(File.expand_path(File.dirname(__FILE__)+'/../public/data/samples/reanalysis'))
|
|
98
|
+
dir.each_dir do |d, mtime|
|
|
99
|
+
p d.path, mtime
|
|
100
|
+
d.each_gphys_file do |file, mtime,size|
|
|
101
|
+
p file.path,mtime,size,GPhys::IO.var_names_except_coordinates(file)
|
|
102
|
+
file.close
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
pat = Regexp.union(/readme$/i, /\.yml$/)
|
|
106
|
+
dir.each_file(pat) do |path, mtime, size|
|
|
107
|
+
print " **** #{path} #{mtime} #{size}\n"
|
|
108
|
+
open(path){|f| print f.gets}
|
|
109
|
+
end
|
|
110
|
+
end
|
data/lib/login_system.rb
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
require_dependency "user"
|
|
2
|
+
|
|
3
|
+
module LoginSystem
|
|
4
|
+
|
|
5
|
+
protected
|
|
6
|
+
|
|
7
|
+
# overwrite this if you want to restrict access to only a few actions
|
|
8
|
+
# or if you want to check if the user has the correct rights
|
|
9
|
+
# example:
|
|
10
|
+
#
|
|
11
|
+
# # only allow nonbobs
|
|
12
|
+
# def authorize?(user)
|
|
13
|
+
# user.login != "bob"
|
|
14
|
+
# end
|
|
15
|
+
def authorize?(user)
|
|
16
|
+
true
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# overwrite this method if you only want to protect certain actions of the controller
|
|
20
|
+
# example:
|
|
21
|
+
#
|
|
22
|
+
# # don't protect the login and the about method
|
|
23
|
+
# def protect?(action)
|
|
24
|
+
# if ['action', 'about'].include?(action)
|
|
25
|
+
# return false
|
|
26
|
+
# else
|
|
27
|
+
# return true
|
|
28
|
+
# end
|
|
29
|
+
# end
|
|
30
|
+
def protect?(action)
|
|
31
|
+
true
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# login_required filter. add
|
|
35
|
+
#
|
|
36
|
+
# before_filter :login_required
|
|
37
|
+
#
|
|
38
|
+
# if the controller should be under any rights management.
|
|
39
|
+
# for finer access control you can overwrite
|
|
40
|
+
#
|
|
41
|
+
# def authorize?(user)
|
|
42
|
+
#
|
|
43
|
+
def login_required
|
|
44
|
+
|
|
45
|
+
if not protect?(action_name)
|
|
46
|
+
return true
|
|
47
|
+
end
|
|
48
|
+
if session[:user] and authorize?(session[:user])
|
|
49
|
+
return true
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# store current location so that we can
|
|
53
|
+
# come back after the user logged in
|
|
54
|
+
store_location
|
|
55
|
+
|
|
56
|
+
# call overwriteable reaction to unauthorized access
|
|
57
|
+
access_denied
|
|
58
|
+
return false
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# == internal_login filter.
|
|
62
|
+
# using as follows in controllers.
|
|
63
|
+
# before_filter :internal_login_required
|
|
64
|
+
def internal_login_required
|
|
65
|
+
if not protect?(action_name)
|
|
66
|
+
return true
|
|
67
|
+
end
|
|
68
|
+
if session[:user] and authorize?(session[:user])
|
|
69
|
+
user = (login=session[:user]) && User.find_by_login(login)
|
|
70
|
+
if user.internal_user
|
|
71
|
+
return true
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# store current location so that we can
|
|
76
|
+
# come back after the user logged in
|
|
77
|
+
store_location
|
|
78
|
+
|
|
79
|
+
# call overwriteable reaction to unauthorized access
|
|
80
|
+
access_denied
|
|
81
|
+
return false
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# overwrite if you want to have special behavior in case the user is not authorized
|
|
86
|
+
# to access the current operation.
|
|
87
|
+
# the default action is to redirect to the login screen
|
|
88
|
+
# example use :
|
|
89
|
+
# a popup window might just close itself for instance
|
|
90
|
+
def access_denied
|
|
91
|
+
redirect_to :controller=>"/user", :action =>"login"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# store current uri in the session.
|
|
95
|
+
# we can return to this location by calling return_location
|
|
96
|
+
def store_location
|
|
97
|
+
session['return-to'] = request.request_uri
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# move to the last store_location call or to the passed default one
|
|
101
|
+
def redirect_back_or_default(default)
|
|
102
|
+
if session['return-to'].nil?
|
|
103
|
+
redirect_to default
|
|
104
|
+
else
|
|
105
|
+
redirect_to session['return-to']
|
|
106
|
+
session['return-to'] = nil
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
end
|
data/lib/multibytes.rb
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# = Handling of multi-byte characters (or Japanese).
|
|
2
|
+
#
|
|
3
|
+
# Assume that $KCONV has been set appropriately
|
|
4
|
+
|
|
5
|
+
class String
|
|
6
|
+
|
|
7
|
+
# see http://www.ruby-lang.org/ja/man/ chapter 10 (method jleft)
|
|
8
|
+
def jleft_w_dots(len)
|
|
9
|
+
len0 = self.length
|
|
10
|
+
if len0 <= len
|
|
11
|
+
self.dup
|
|
12
|
+
else
|
|
13
|
+
str = self[0,len]
|
|
14
|
+
str[-1,1] = '' if /.\z/ !~ str
|
|
15
|
+
str[-1,1] = '' if /.\z/ !~ str # don't know why, but needed two times
|
|
16
|
+
str + '..'
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
data/lib/narray_yaml.rb
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
require "yaml"
|
|
2
|
+
require "narray"
|
|
3
|
+
|
|
4
|
+
$__yaml_new__ = Class.method_defined?("yaml_as")
|
|
5
|
+
$__yaml_domain__ = "ruby.yaml.org,2002"
|
|
6
|
+
$__yaml_type__ = "narray"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class NArray
|
|
10
|
+
|
|
11
|
+
if $__yaml_new__
|
|
12
|
+
|
|
13
|
+
yaml_as "tag:#{$__yaml_domain__}:#{$__yaml_type__}"
|
|
14
|
+
def NArray.yaml_new( klass, tag, val )
|
|
15
|
+
na = NArray.new(val["typecode"], *val["shape"])
|
|
16
|
+
na[true] = val["ary"]
|
|
17
|
+
na
|
|
18
|
+
end
|
|
19
|
+
def to_yaml(opts={})
|
|
20
|
+
YAML::quick_emit( object_id, opts ) do |out|
|
|
21
|
+
out.map( taguri, to_yaml_style ) do |map|
|
|
22
|
+
map.add( "typecode", typecode )
|
|
23
|
+
map.add( "shape", shape )
|
|
24
|
+
map.add( "ary", to_a.flatten )
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
else
|
|
30
|
+
|
|
31
|
+
def is_complex_yaml?
|
|
32
|
+
true
|
|
33
|
+
end
|
|
34
|
+
def to_yaml_type
|
|
35
|
+
"!#{$__yaml_domain__}/#{$__yaml_type__}"
|
|
36
|
+
end
|
|
37
|
+
def to_yaml( opts = {} )
|
|
38
|
+
YAML::quick_emit( object_id, opts ) { |out|
|
|
39
|
+
out.map( to_yaml_type ) { |map|
|
|
40
|
+
map.add( "typecode", typecode )
|
|
41
|
+
map.add( "shape", shape )
|
|
42
|
+
map.add( "ary", to_a.flatten )
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
unless $__yaml_new__
|
|
51
|
+
YAML.add_domain_type( $__yaml_domain__, /^#{$__yaml_type__}/ ) { |type, val|
|
|
52
|
+
na = NArray.new(val["typecode"], *val["shape"])
|
|
53
|
+
na[true] = val["ary"]
|
|
54
|
+
na
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
$__yaml_new__ = nil
|
data/lib/no_rdb_base.rb
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module ActiveRecord #:nodoc:
|
|
2
|
+
class NoRdbBase < Base
|
|
3
|
+
class << self # Class methods
|
|
4
|
+
%w(find exists?
|
|
5
|
+
create update delete destroy update_all destroy_all
|
|
6
|
+
count_by_sql
|
|
7
|
+
table_exists?
|
|
8
|
+
construct_finder_sql
|
|
9
|
+
add_order! add_limit! add_lock! add_joins! add_conditions! type_condition
|
|
10
|
+
determine_finder determine_deprecated_finder determine_instantiator extract_attribute_names_from_match
|
|
11
|
+
attribute_condition expand_id_conditions
|
|
12
|
+
sanitize_sql sanitize_sql_hash sanitize_sql_array sanitize_conditions
|
|
13
|
+
validate_find_options
|
|
14
|
+
).each{|name|
|
|
15
|
+
undef_method(name) if instance_methods.include?(name)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
def connection
|
|
19
|
+
raise "this is NoRdbBase class. No connection exists"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def push_column(column)
|
|
23
|
+
@columns ||= Array.new
|
|
24
|
+
@columns.push column
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def columns
|
|
28
|
+
@columns
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
%w(save save! destroy reload create_or_update update create
|
|
34
|
+
interpolate_sql
|
|
35
|
+
).each{|name|
|
|
36
|
+
undef_method(name) if self.instance_methods.include?(name)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
end
|