refinerycms 0.9.6.34 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -8
- data/Gemfile +50 -0
- data/Rakefile +1 -1
- data/bin/refinery +22 -11
- data/bin/refinery-update-core +45 -27
- data/changelog.md +313 -0
- data/config.ru +5 -0
- data/config/acts_as_indexed_config.rb +7 -0
- data/config/amazon_s3.yml.example +3 -3
- data/config/application.rb +7 -11
- data/config/boot.rb +15 -1
- data/config/cucumber.yml +8 -0
- data/config/database.yml.example +24 -0
- data/config/environments/cucumber.rb +27 -0
- data/config/environments/development.rb +0 -1
- data/config/environments/production.rb +2 -1
- data/config/i18n-js.yml +6 -0
- data/config/initializers/field_with_error_fix.rb +3 -0
- data/config/preinitializer.rb +20 -18
- data/config/routes.rb +8 -3
- data/db/migrate/20100125003944_rename_title_to_name_on_user_plugins.rb +9 -0
- data/db/migrate/20100125033146_migrate_old_plugin_titles_to_plugin_names_for_users.rb +61 -0
- data/db/migrate/20100419001048_change_image_grid_thumbnail_size_and_regenerate.rb +13 -0
- data/db/migrate/20100522020225_rename_permissions_for_resources_plugin_to_files.rb +15 -0
- data/db/migrate/20100525084518_remove_take_down_for_maintenance_page.rb +19 -0
- data/db/migrate/20100525110237_add_small_and_large_thumbnail_sizes.rb +14 -0
- data/db/migrate/20100530205942_update_link_url_on_pages_from_inquiries_new_to_contact.rb +31 -0
- data/db/migrate/20100606173919_create_page_translations.rb +12 -0
- data/db/migrate/20100608062447_add_scoping_to_refinery_settings.rb +9 -0
- data/db/migrate/20100623220402_add_restricted_to_refinery_settings.rb +9 -0
- data/db/migrate/20100624024501_add_roles.rb +24 -0
- data/db/migrate/20100629081543_add_callback_proc_as_string_to_refinery_settings.rb +9 -0
- data/db/migrate/20100701053151_remove_superuser_from_users.rb +20 -0
- data/db/migrate/20100702022630_add_spam_to_inquiries.rb +11 -0
- data/db/schema.rb +28 -10
- data/db/seeds.rb +6 -119
- data/db/seeds/inquiry_settings.rb +2 -0
- data/db/seeds/pages.rb +81 -0
- data/db/seeds/refinery_settings.rb +19 -0
- data/features/refinery/dashboard.feature +4 -0
- data/features/refinery/manage_files.feature +4 -0
- data/features/refinery/manage_images.feature +4 -0
- data/features/refinery/manage_inquiries.feature +4 -0
- data/features/refinery/manage_pages.feature +39 -0
- data/features/refinery/manage_refinery_settings.feature +4 -0
- data/features/refinery/manage_users.feature +29 -0
- data/features/refinery/site_bar.feature +22 -0
- data/features/step_definitions/refinery/page_steps.rb +23 -0
- data/features/step_definitions/refinery/user_steps.rb +33 -0
- data/features/step_definitions/web_steps.rb +271 -0
- data/features/support/env.rb +63 -0
- data/features/support/factories.rb +19 -0
- data/features/support/negative_expectations_helper.rb +57 -0
- data/features/support/paths.rb +39 -0
- data/lib/gemspec.rb +35 -0
- data/lib/refinery/tasks/refinery.rake +0 -30
- data/lib/tasks/cucumber.rake +53 -0
- data/lib/tasks/rspec.rake +144 -0
- data/public/images/refinery/admin_bg.png +0 -0
- data/public/images/refinery/cross.png +0 -0
- data/public/images/refinery/icons/bin.png +0 -0
- data/public/images/refinery/icons/bin_closed.png +0 -0
- data/public/images/refinery/icons/doc.png +0 -0
- data/public/images/refinery/icons/email.png +0 -0
- data/public/images/refinery/icons/flags/ad.png +0 -0
- data/public/images/refinery/icons/flags/ae.png +0 -0
- data/public/images/refinery/icons/flags/af.png +0 -0
- data/public/images/refinery/icons/flags/ag.png +0 -0
- data/public/images/refinery/icons/flags/ai.png +0 -0
- data/public/images/refinery/icons/flags/al.png +0 -0
- data/public/images/refinery/icons/flags/am.png +0 -0
- data/public/images/refinery/icons/flags/an.png +0 -0
- data/public/images/refinery/icons/flags/ao.png +0 -0
- data/public/images/refinery/icons/flags/ar.png +0 -0
- data/public/images/refinery/icons/flags/as.png +0 -0
- data/public/images/refinery/icons/flags/at.png +0 -0
- data/public/images/refinery/icons/flags/au.png +0 -0
- data/public/images/refinery/icons/flags/aw.png +0 -0
- data/public/images/refinery/icons/flags/ax.png +0 -0
- data/public/images/refinery/icons/flags/az.png +0 -0
- data/public/images/refinery/icons/flags/ba.png +0 -0
- data/public/images/refinery/icons/flags/bb.png +0 -0
- data/public/images/refinery/icons/flags/bd.png +0 -0
- data/public/images/refinery/icons/flags/be.png +0 -0
- data/public/images/refinery/icons/flags/bf.png +0 -0
- data/public/images/refinery/icons/flags/bg.png +0 -0
- data/public/images/refinery/icons/flags/bh.png +0 -0
- data/public/images/refinery/icons/flags/bi.png +0 -0
- data/public/images/refinery/icons/flags/bj.png +0 -0
- data/public/images/refinery/icons/flags/bm.png +0 -0
- data/public/images/refinery/icons/flags/bn.png +0 -0
- data/public/images/refinery/icons/flags/bo.png +0 -0
- data/public/images/refinery/icons/flags/bs.png +0 -0
- data/public/images/refinery/icons/flags/bt.png +0 -0
- data/public/images/refinery/icons/flags/bv.png +0 -0
- data/public/images/refinery/icons/flags/bw.png +0 -0
- data/public/images/refinery/icons/flags/by.png +0 -0
- data/public/images/refinery/icons/flags/bz.png +0 -0
- data/public/images/refinery/icons/flags/ca.png +0 -0
- data/public/images/refinery/icons/flags/catalonia.png +0 -0
- data/public/images/refinery/icons/flags/cc.png +0 -0
- data/public/images/refinery/icons/flags/cd.png +0 -0
- data/public/images/refinery/icons/flags/cf.png +0 -0
- data/public/images/refinery/icons/flags/cg.png +0 -0
- data/public/images/refinery/icons/flags/ch.png +0 -0
- data/public/images/refinery/icons/flags/ci.png +0 -0
- data/public/images/refinery/icons/flags/ck.png +0 -0
- data/public/images/refinery/icons/flags/cl.png +0 -0
- data/public/images/refinery/icons/flags/cm.png +0 -0
- data/public/images/refinery/icons/flags/cn.png +0 -0
- data/public/images/refinery/icons/flags/co.png +0 -0
- data/public/images/refinery/icons/flags/cr.png +0 -0
- data/public/images/refinery/icons/flags/cs.png +0 -0
- data/public/images/refinery/icons/flags/cu.png +0 -0
- data/public/images/refinery/icons/flags/cv.png +0 -0
- data/public/images/refinery/icons/flags/cx.png +0 -0
- data/public/images/refinery/icons/flags/cy.png +0 -0
- data/public/images/refinery/icons/flags/cz.png +0 -0
- data/public/images/refinery/icons/flags/da.png +0 -0
- data/public/images/refinery/icons/flags/de.png +0 -0
- data/public/images/refinery/icons/flags/dj.png +0 -0
- data/public/images/refinery/icons/flags/dm.png +0 -0
- data/public/images/refinery/icons/flags/do.png +0 -0
- data/public/images/refinery/icons/flags/dz.png +0 -0
- data/public/images/refinery/icons/flags/ec.png +0 -0
- data/public/images/refinery/icons/flags/ee.png +0 -0
- data/public/images/refinery/icons/flags/eg.png +0 -0
- data/public/images/refinery/icons/flags/eh.png +0 -0
- data/public/images/refinery/icons/flags/en.png +0 -0
- data/public/images/refinery/icons/flags/england.png +0 -0
- data/public/images/refinery/icons/flags/er.png +0 -0
- data/public/images/refinery/icons/flags/es.png +0 -0
- data/public/images/refinery/icons/flags/et.png +0 -0
- data/public/images/refinery/icons/flags/europeanunion.png +0 -0
- data/public/images/refinery/icons/flags/fam.png +0 -0
- data/public/images/refinery/icons/flags/fi.png +0 -0
- data/public/images/refinery/icons/flags/fj.png +0 -0
- data/public/images/refinery/icons/flags/fk.png +0 -0
- data/public/images/refinery/icons/flags/fm.png +0 -0
- data/public/images/refinery/icons/flags/fo.png +0 -0
- data/public/images/refinery/icons/flags/fr.png +0 -0
- data/public/images/refinery/icons/flags/ga.png +0 -0
- data/public/images/refinery/icons/flags/gb.png +0 -0
- data/public/images/refinery/icons/flags/gd.png +0 -0
- data/public/images/refinery/icons/flags/ge.png +0 -0
- data/public/images/refinery/icons/flags/gf.png +0 -0
- data/public/images/refinery/icons/flags/gh.png +0 -0
- data/public/images/refinery/icons/flags/gi.png +0 -0
- data/public/images/refinery/icons/flags/gl.png +0 -0
- data/public/images/refinery/icons/flags/gm.png +0 -0
- data/public/images/refinery/icons/flags/gn.png +0 -0
- data/public/images/refinery/icons/flags/gp.png +0 -0
- data/public/images/refinery/icons/flags/gq.png +0 -0
- data/public/images/refinery/icons/flags/gr.png +0 -0
- data/public/images/refinery/icons/flags/gs.png +0 -0
- data/public/images/refinery/icons/flags/gt.png +0 -0
- data/public/images/refinery/icons/flags/gu.png +0 -0
- data/public/images/refinery/icons/flags/gw.png +0 -0
- data/public/images/refinery/icons/flags/gy.png +0 -0
- data/public/images/refinery/icons/flags/hk.png +0 -0
- data/public/images/refinery/icons/flags/hm.png +0 -0
- data/public/images/refinery/icons/flags/hn.png +0 -0
- data/public/images/refinery/icons/flags/hr.png +0 -0
- data/public/images/refinery/icons/flags/ht.png +0 -0
- data/public/images/refinery/icons/flags/hu.png +0 -0
- data/public/images/refinery/icons/flags/id.png +0 -0
- data/public/images/refinery/icons/flags/ie.png +0 -0
- data/public/images/refinery/icons/flags/il.png +0 -0
- data/public/images/refinery/icons/flags/in.png +0 -0
- data/public/images/refinery/icons/flags/io.png +0 -0
- data/public/images/refinery/icons/flags/iq.png +0 -0
- data/public/images/refinery/icons/flags/ir.png +0 -0
- data/public/images/refinery/icons/flags/is.png +0 -0
- data/public/images/refinery/icons/flags/it.png +0 -0
- data/public/images/refinery/icons/flags/jm.png +0 -0
- data/public/images/refinery/icons/flags/jo.png +0 -0
- data/public/images/refinery/icons/flags/jp.png +0 -0
- data/public/images/refinery/icons/flags/ke.png +0 -0
- data/public/images/refinery/icons/flags/kg.png +0 -0
- data/public/images/refinery/icons/flags/kh.png +0 -0
- data/public/images/refinery/icons/flags/ki.png +0 -0
- data/public/images/refinery/icons/flags/km.png +0 -0
- data/public/images/refinery/icons/flags/kn.png +0 -0
- data/public/images/refinery/icons/flags/kp.png +0 -0
- data/public/images/refinery/icons/flags/kr.png +0 -0
- data/public/images/refinery/icons/flags/kw.png +0 -0
- data/public/images/refinery/icons/flags/ky.png +0 -0
- data/public/images/refinery/icons/flags/kz.png +0 -0
- data/public/images/refinery/icons/flags/la.png +0 -0
- data/public/images/refinery/icons/flags/lb.png +0 -0
- data/public/images/refinery/icons/flags/lc.png +0 -0
- data/public/images/refinery/icons/flags/li.png +0 -0
- data/public/images/refinery/icons/flags/lk.png +0 -0
- data/public/images/refinery/icons/flags/lr.png +0 -0
- data/public/images/refinery/icons/flags/ls.png +0 -0
- data/public/images/refinery/icons/flags/lt.png +0 -0
- data/public/images/refinery/icons/flags/lu.png +0 -0
- data/public/images/refinery/icons/flags/lv.png +0 -0
- data/public/images/refinery/icons/flags/ly.png +0 -0
- data/public/images/refinery/icons/flags/ma.png +0 -0
- data/public/images/refinery/icons/flags/mc.png +0 -0
- data/public/images/refinery/icons/flags/md.png +0 -0
- data/public/images/refinery/icons/flags/me.png +0 -0
- data/public/images/refinery/icons/flags/mg.png +0 -0
- data/public/images/refinery/icons/flags/mh.png +0 -0
- data/public/images/refinery/icons/flags/mk.png +0 -0
- data/public/images/refinery/icons/flags/ml.png +0 -0
- data/public/images/refinery/icons/flags/mm.png +0 -0
- data/public/images/refinery/icons/flags/mn.png +0 -0
- data/public/images/refinery/icons/flags/mo.png +0 -0
- data/public/images/refinery/icons/flags/mp.png +0 -0
- data/public/images/refinery/icons/flags/mq.png +0 -0
- data/public/images/refinery/icons/flags/mr.png +0 -0
- data/public/images/refinery/icons/flags/ms.png +0 -0
- data/public/images/refinery/icons/flags/mt.png +0 -0
- data/public/images/refinery/icons/flags/mu.png +0 -0
- data/public/images/refinery/icons/flags/mv.png +0 -0
- data/public/images/refinery/icons/flags/mw.png +0 -0
- data/public/images/refinery/icons/flags/mx.png +0 -0
- data/public/images/refinery/icons/flags/my.png +0 -0
- data/public/images/refinery/icons/flags/mz.png +0 -0
- data/public/images/refinery/icons/flags/na.png +0 -0
- data/public/images/refinery/icons/flags/nb.png +0 -0
- data/public/images/refinery/icons/flags/nc.png +0 -0
- data/public/images/refinery/icons/flags/ne.png +0 -0
- data/public/images/refinery/icons/flags/nf.png +0 -0
- data/public/images/refinery/icons/flags/ng.png +0 -0
- data/public/images/refinery/icons/flags/ni.png +0 -0
- data/public/images/refinery/icons/flags/nl.png +0 -0
- data/public/images/refinery/icons/flags/nn.png +0 -0
- data/public/images/refinery/icons/flags/np.png +0 -0
- data/public/images/refinery/icons/flags/nr.png +0 -0
- data/public/images/refinery/icons/flags/nu.png +0 -0
- data/public/images/refinery/icons/flags/nz.png +0 -0
- data/public/images/refinery/icons/flags/om.png +0 -0
- data/public/images/refinery/icons/flags/pa.png +0 -0
- data/public/images/refinery/icons/flags/pe.png +0 -0
- data/public/images/refinery/icons/flags/pf.png +0 -0
- data/public/images/refinery/icons/flags/pg.png +0 -0
- data/public/images/refinery/icons/flags/ph.png +0 -0
- data/public/images/refinery/icons/flags/pk.png +0 -0
- data/public/images/refinery/icons/flags/pl.png +0 -0
- data/public/images/refinery/icons/flags/pm.png +0 -0
- data/public/images/refinery/icons/flags/pn.png +0 -0
- data/public/images/refinery/icons/flags/pr.png +0 -0
- data/public/images/refinery/icons/flags/ps.png +0 -0
- data/public/images/refinery/icons/flags/pt-BR.png +0 -0
- data/public/images/refinery/icons/flags/pt.png +0 -0
- data/public/images/refinery/icons/flags/pw.png +0 -0
- data/public/images/refinery/icons/flags/py.png +0 -0
- data/public/images/refinery/icons/flags/qa.png +0 -0
- data/public/images/refinery/icons/flags/re.png +0 -0
- data/public/images/refinery/icons/flags/ro.png +0 -0
- data/public/images/refinery/icons/flags/rs.png +0 -0
- data/public/images/refinery/icons/flags/ru.png +0 -0
- data/public/images/refinery/icons/flags/rw.png +0 -0
- data/public/images/refinery/icons/flags/sa.png +0 -0
- data/public/images/refinery/icons/flags/sb.png +0 -0
- data/public/images/refinery/icons/flags/sc.png +0 -0
- data/public/images/refinery/icons/flags/scotland.png +0 -0
- data/public/images/refinery/icons/flags/sd.png +0 -0
- data/public/images/refinery/icons/flags/se.png +0 -0
- data/public/images/refinery/icons/flags/sg.png +0 -0
- data/public/images/refinery/icons/flags/sh.png +0 -0
- data/public/images/refinery/icons/flags/si.png +0 -0
- data/public/images/refinery/icons/flags/sj.png +0 -0
- data/public/images/refinery/icons/flags/sk.png +0 -0
- data/public/images/refinery/icons/flags/sl.png +0 -0
- data/public/images/refinery/icons/flags/sm.png +0 -0
- data/public/images/refinery/icons/flags/sn.png +0 -0
- data/public/images/refinery/icons/flags/so.png +0 -0
- data/public/images/refinery/icons/flags/sr.png +0 -0
- data/public/images/refinery/icons/flags/st.png +0 -0
- data/public/images/refinery/icons/flags/sv.png +0 -0
- data/public/images/refinery/icons/flags/sy.png +0 -0
- data/public/images/refinery/icons/flags/sz.png +0 -0
- data/public/images/refinery/icons/flags/tc.png +0 -0
- data/public/images/refinery/icons/flags/td.png +0 -0
- data/public/images/refinery/icons/flags/tf.png +0 -0
- data/public/images/refinery/icons/flags/tg.png +0 -0
- data/public/images/refinery/icons/flags/th.png +0 -0
- data/public/images/refinery/icons/flags/tj.png +0 -0
- data/public/images/refinery/icons/flags/tk.png +0 -0
- data/public/images/refinery/icons/flags/tl.png +0 -0
- data/public/images/refinery/icons/flags/tm.png +0 -0
- data/public/images/refinery/icons/flags/tn.png +0 -0
- data/public/images/refinery/icons/flags/to.png +0 -0
- data/public/images/refinery/icons/flags/tr.png +0 -0
- data/public/images/refinery/icons/flags/tt.png +0 -0
- data/public/images/refinery/icons/flags/tv.png +0 -0
- data/public/images/refinery/icons/flags/tw.png +0 -0
- data/public/images/refinery/icons/flags/tz.png +0 -0
- data/public/images/refinery/icons/flags/ua.png +0 -0
- data/public/images/refinery/icons/flags/ug.png +0 -0
- data/public/images/refinery/icons/flags/um.png +0 -0
- data/public/images/refinery/icons/flags/us.png +0 -0
- data/public/images/refinery/icons/flags/uy.png +0 -0
- data/public/images/refinery/icons/flags/uz.png +0 -0
- data/public/images/refinery/icons/flags/va.png +0 -0
- data/public/images/refinery/icons/flags/vc.png +0 -0
- data/public/images/refinery/icons/flags/ve.png +0 -0
- data/public/images/refinery/icons/flags/vg.png +0 -0
- data/public/images/refinery/icons/flags/vi.png +0 -0
- data/public/images/refinery/icons/flags/vn.png +0 -0
- data/public/images/refinery/icons/flags/vu.png +0 -0
- data/public/images/refinery/icons/flags/wales.png +0 -0
- data/public/images/refinery/icons/flags/wf.png +0 -0
- data/public/images/refinery/icons/flags/ws.png +0 -0
- data/public/images/refinery/icons/flags/ye.png +0 -0
- data/public/images/refinery/icons/flags/yt.png +0 -0
- data/public/images/refinery/icons/flags/za.png +0 -0
- data/public/images/refinery/icons/flags/zm.png +0 -0
- data/public/images/refinery/icons/flags/zw.png +0 -0
- data/public/images/refinery/icons/folder_page_white.png +0 -0
- data/public/images/refinery/icons/img.png +0 -0
- data/public/images/refinery/icons/music.png +0 -0
- data/public/images/refinery/icons/page_white_gear.png +0 -0
- data/public/images/refinery/icons/pdf.png +0 -0
- data/public/images/refinery/icons/ppt.png +0 -0
- data/public/images/refinery/icons/xls.png +0 -0
- data/public/images/refinery/icons/zip.png +0 -0
- data/public/images/refinery/logo-site-bar.png +0 -0
- data/public/images/refinery/nav_inactive_background.png +0 -0
- data/public/images/refinery/orange_button.png +0 -0
- data/public/images/refinery/text_field_background.png +0 -0
- data/public/images/refinery/tooltip-nib.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_indent.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
- data/public/javascripts/admin.js +6 -8
- data/public/javascripts/i18n-messages.js +2 -0
- data/public/javascripts/jquery-min.js +154 -0
- data/public/javascripts/jquery-ui-custom-min.js +244 -0
- data/public/javascripts/jquery/jquery.corner.js +314 -216
- data/public/javascripts/jquery/jquery.html5-placeholder-shim.js +81 -0
- data/public/javascripts/jquery/jquery.nestedsortables.js +186 -0
- data/public/javascripts/jquery/jquery.textTruncate.js +174 -0
- data/public/javascripts/jquery/jquery.timers.js +138 -0
- data/public/javascripts/refinery/admin.js +352 -153
- data/public/javascripts/refinery/boot_wym.js +81 -46
- data/public/javascripts/refinery/i18n.js +340 -0
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +359 -363
- data/public/javascripts/wymeditor/lang/en.js +46 -46
- data/public/javascripts/wymeditor/lang/nl.js +5 -3
- data/public/javascripts/wymeditor/lang/pt-br.js +3 -2
- data/public/javascripts/wymeditor/lang/sl.js +47 -0
- data/public/javascripts/wymeditor/skins/refinery/skin.js +23 -23
- data/public/robots.txt +1 -0
- data/public/stylesheets/application.css +3 -3
- data/public/stylesheets/formatting.css +3 -3
- data/public/stylesheets/home.css +2 -2
- data/public/stylesheets/ie7.css +1 -0
- data/public/stylesheets/refinery/application.css +4 -2
- data/public/stylesheets/refinery/formatting.css +15 -15
- data/public/stylesheets/refinery/ie.css +20 -0
- data/public/stylesheets/refinery/refinery.css +680 -462
- data/public/stylesheets/refinery/site_bar.css +68 -25
- data/public/stylesheets/refinery/theme.css +14 -14
- data/public/stylesheets/refinery/tooltips.css +28 -32
- data/public/stylesheets/refinery/ui.css +25 -10
- data/public/stylesheets/wymeditor/skins/refinery/skin.css +148 -149
- data/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +67 -63
- data/readme.md +48 -17
- data/script/about +1 -1
- data/script/autospec +6 -0
- data/script/console +1 -1
- data/script/cucumber +10 -0
- data/script/dbconsole +1 -1
- data/script/destroy +1 -1
- data/script/generate +1 -1
- data/script/performance/benchmarker +1 -1
- data/script/performance/profiler +1 -1
- data/script/performance/request +1 -1
- data/script/plugin +1 -1
- data/script/process/inspector +1 -1
- data/script/process/reaper +1 -1
- data/script/process/spawner +1 -1
- data/script/runner +1 -1
- data/script/server +1 -1
- data/script/spec +10 -0
- data/test/fixtures/images.yml +1 -2
- data/test/fixtures/pages.yml +4 -4
- data/test/fixtures/user_plugins.yml +20 -24
- data/test/functional/dashboard_controller_test.rb +2 -1
- data/test/functional/images_controller_test.rb +3 -10
- data/test/unit/image_test.rb +1 -1
- data/test/unit/inquiry_test.rb +6 -6
- data/test/unit/page_test.rb +31 -1
- data/test/unit/refinery_setting_test.rb +1 -1
- data/themes/demolicious/stylesheets/application.css +23 -12
- data/themes/demolicious/stylesheets/formatting.css +3 -3
- data/themes/demolicious/stylesheets/home.css +1 -4
- data/themes/demolicious/views/layouts/application.html.erb +5 -5
- data/themes/demolicious/views/pages/home.html.erb +1 -1
- data/themes/hemingway/stylesheets/application.css +1 -1
- data/themes/hemingway/views/layouts/application.html.erb +1 -0
- data/todo.md +19 -5
- data/vendor/plugins/authentication/app/controllers/admin/users_controller.rb +13 -18
- data/vendor/plugins/authentication/app/controllers/sessions_controller.rb +21 -6
- data/vendor/plugins/authentication/app/controllers/users_controller.rb +57 -49
- data/vendor/plugins/authentication/app/models/role.rb +16 -0
- data/vendor/plugins/authentication/app/models/user.rb +21 -8
- data/vendor/plugins/authentication/app/models/user_mailer.rb +3 -2
- data/vendor/plugins/authentication/app/models/user_session.rb +1 -1
- data/vendor/plugins/authentication/app/views/admin/users/_form.html.erb +29 -10
- data/vendor/plugins/authentication/app/views/admin/users/_user.html.erb +11 -10
- data/vendor/plugins/authentication/app/views/admin/users/index.html.erb +2 -3
- data/vendor/plugins/authentication/app/views/sessions/new.html.erb +15 -18
- data/vendor/plugins/authentication/app/views/users/forgot.html.erb +14 -9
- data/vendor/plugins/authentication/app/views/users/new.html.erb +11 -13
- data/vendor/plugins/authentication/app/views/users/reset.html.erb +14 -9
- data/vendor/plugins/authentication/config/locales/da.yml +71 -0
- data/vendor/plugins/authentication/config/locales/de.yml +75 -0
- data/vendor/plugins/authentication/config/locales/en.yml +75 -0
- data/vendor/plugins/authentication/config/locales/es.yml +79 -0
- data/vendor/plugins/authentication/config/locales/fr.yml +79 -0
- data/vendor/plugins/authentication/config/locales/it.yml +68 -0
- data/vendor/plugins/authentication/config/locales/nb.yml +68 -0
- data/vendor/plugins/authentication/config/locales/nl.yml +83 -0
- data/vendor/plugins/authentication/config/locales/pt-BR.yml +64 -0
- data/vendor/plugins/authentication/config/locales/sl.yml +78 -0
- data/vendor/plugins/authentication/config/routes.rb +4 -5
- data/vendor/plugins/authentication/lib/authenticated_system.rb +5 -1
- data/vendor/plugins/authentication/rails/init.rb +5 -1
- data/vendor/plugins/authentication/{authentication.md → readme.md} +0 -0
- data/vendor/plugins/authentication/test/unit/user_mailer_test.rb +1 -1
- data/vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb +17 -7
- data/vendor/plugins/dashboard/app/helpers/admin/dashboard_helper.rb +5 -9
- data/vendor/plugins/dashboard/app/views/admin/dashboard/_recent_activity.html.erb +10 -12
- data/vendor/plugins/dashboard/app/views/admin/dashboard/_recent_inquiries.html.erb +12 -0
- data/vendor/plugins/dashboard/app/views/admin/dashboard/index.html.erb +34 -11
- data/vendor/plugins/dashboard/config/locales/da.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/de.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/en.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/es.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/fr.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/it.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/nb.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/nl.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/pt-BR.yml +22 -0
- data/vendor/plugins/dashboard/config/locales/sl.yml +22 -0
- data/vendor/plugins/dashboard/config/routes.rb +2 -1
- data/vendor/plugins/dashboard/rails/init.rb +6 -0
- data/vendor/plugins/dashboard/{dashboard.md → readme.md} +0 -0
- data/vendor/plugins/i18n-js/README.rdoc +249 -0
- data/vendor/plugins/i18n-js/Rakefile +23 -0
- data/vendor/plugins/i18n-js/init.rb +1 -0
- data/vendor/plugins/i18n-js/install.rb +7 -0
- data/vendor/plugins/i18n-js/lib/i18n-js.rb +132 -0
- data/vendor/plugins/i18n-js/lib/i18n-js.yml +4 -0
- data/vendor/plugins/i18n-js/lib/i18n.js +339 -0
- data/vendor/plugins/i18n-js/lib/tasks/i18n-js_tasks.rake +16 -0
- data/vendor/plugins/i18n-js/test/i18n-test.html +50 -0
- data/vendor/plugins/i18n-js/test/i18n-test.js +661 -0
- data/vendor/plugins/i18n-js/test/i18n_js_test.rb +168 -0
- data/vendor/plugins/i18n-js/test/jsunittest/jsunittest.js +1017 -0
- data/vendor/plugins/i18n-js/test/jsunittest/unittest.css +54 -0
- data/vendor/plugins/i18n-js/test/resources/custom_path.yml +4 -0
- data/vendor/plugins/i18n-js/test/resources/default.yml +4 -0
- data/vendor/plugins/i18n-js/test/resources/locales.yml +76 -0
- data/vendor/plugins/i18n-js/test/resources/multiple_files.yml +6 -0
- data/vendor/plugins/i18n-js/test/resources/no_scope.yml +3 -0
- data/vendor/plugins/i18n-js/test/resources/simple_scope.yml +4 -0
- data/vendor/plugins/i18n-js/test/test_helper.rb +24 -0
- data/vendor/plugins/i18n/config/locales/ar.yml +121 -0
- data/vendor/plugins/i18n/config/locales/bg.yml +198 -0
- data/vendor/plugins/i18n/config/locales/bn-IN.yml +180 -0
- data/vendor/plugins/i18n/config/locales/bs.yml +114 -0
- data/vendor/plugins/i18n/config/locales/ca-ES.yml +155 -0
- data/vendor/plugins/i18n/config/locales/cz.rb +166 -0
- data/vendor/plugins/i18n/config/locales/da.yml +167 -0
- data/vendor/plugins/i18n/config/locales/de-AT.yml +140 -0
- data/vendor/plugins/i18n/config/locales/de.yml +141 -0
- data/vendor/plugins/i18n/config/locales/dsb.yml +182 -0
- data/vendor/plugins/i18n/config/locales/el.yml +191 -0
- data/vendor/plugins/i18n/config/locales/es-AR.yml +168 -0
- data/vendor/plugins/i18n/config/locales/es-CO.yml +146 -0
- data/vendor/plugins/i18n/config/locales/es-MX.yml +118 -0
- data/vendor/plugins/i18n/config/locales/es.yml +186 -0
- data/vendor/plugins/i18n/config/locales/et.yml +109 -0
- data/vendor/plugins/i18n/config/locales/fa.yml +119 -0
- data/vendor/plugins/i18n/config/locales/fi.yml +154 -0
- data/vendor/plugins/i18n/config/locales/fr-CH.yml +123 -0
- data/vendor/plugins/i18n/config/locales/fr.yml +140 -0
- data/vendor/plugins/i18n/config/locales/fun/en-AU.rb +105 -0
- data/vendor/plugins/i18n/config/locales/fun/gibberish.rb +109 -0
- data/vendor/plugins/i18n/config/locales/fur.yml +141 -0
- data/vendor/plugins/i18n/config/locales/gl-ES.yml +193 -0
- data/vendor/plugins/i18n/config/locales/he.yml +103 -0
- data/vendor/plugins/i18n/config/locales/hr.yml +116 -0
- data/vendor/plugins/i18n/config/locales/hsb.yml +190 -0
- data/vendor/plugins/i18n/config/locales/hu.yml +144 -0
- data/vendor/plugins/i18n/config/locales/id.yml +122 -0
- data/vendor/plugins/i18n/config/locales/is.yml +142 -0
- data/vendor/plugins/i18n/config/locales/it.yml +146 -0
- data/vendor/plugins/i18n/config/locales/ja.yml +139 -0
- data/vendor/plugins/i18n/config/locales/ko.yml +153 -0
- data/vendor/plugins/i18n/config/locales/lo.yml +201 -0
- data/vendor/plugins/i18n/config/locales/lt.yml +141 -0
- data/vendor/plugins/i18n/config/locales/lv.yml +132 -0
- data/vendor/plugins/i18n/config/locales/mk.yml +115 -0
- data/vendor/plugins/i18n/config/locales/nb.yml +103 -0
- data/vendor/plugins/i18n/config/locales/nl.yml +173 -0
- data/vendor/plugins/i18n/config/locales/nn.yml +96 -0
- data/vendor/plugins/i18n/config/locales/pl.yml +127 -0
- data/vendor/plugins/i18n/config/locales/pt-BR.yml +148 -0
- data/vendor/plugins/i18n/config/locales/pt-PT.yml +220 -0
- data/vendor/plugins/i18n/config/locales/rm.yml +134 -0
- data/vendor/plugins/i18n/config/locales/ro.yml +152 -0
- data/vendor/plugins/i18n/config/locales/ru.yml +210 -0
- data/vendor/plugins/i18n/config/locales/sk.yml +139 -0
- data/vendor/plugins/i18n/config/locales/sl.yml +190 -0
- data/vendor/plugins/i18n/config/locales/sr-Latn.yml +116 -0
- data/vendor/plugins/i18n/config/locales/sr.yml +116 -0
- data/vendor/plugins/i18n/config/locales/sv-SE.yml +191 -0
- data/vendor/plugins/i18n/config/locales/sw.yml +123 -0
- data/vendor/plugins/i18n/config/locales/th.rb +222 -0
- data/vendor/plugins/i18n/config/locales/tr.yml +139 -0
- data/vendor/plugins/i18n/config/locales/uk.yml +237 -0
- data/vendor/plugins/i18n/config/locales/vi.yml +198 -0
- data/vendor/plugins/i18n/config/locales/zh-CN.yml +131 -0
- data/vendor/plugins/i18n/config/locales/zh-TW.yml +132 -0
- data/vendor/plugins/i18n/lib/i18n.rb +115 -0
- data/vendor/plugins/i18n/lib/i18n_filter.rb +48 -0
- data/vendor/plugins/i18n/lib/routing_filter/MIT-LICENSE +20 -0
- data/vendor/plugins/i18n/lib/routing_filter/README.markdown +123 -0
- data/vendor/plugins/i18n/lib/routing_filter/VERSION +1 -0
- data/vendor/plugins/i18n/lib/routing_filter/routing_filter.rb +96 -0
- data/vendor/plugins/i18n/lib/routing_filter/routing_filter/base.rb +31 -0
- data/vendor/plugins/i18n/lib/routing_filter/routing_filter/force_extension.rb +57 -0
- data/vendor/plugins/i18n/lib/routing_filter/routing_filter/pagination.rb +33 -0
- data/vendor/plugins/i18n/lib/routing_filter/routing_filter/uuid_token.rb +78 -0
- data/vendor/plugins/i18n/rails/init.rb +4 -0
- data/vendor/plugins/images/app/controllers/admin/images_controller.rb +6 -7
- data/vendor/plugins/images/app/models/image.rb +24 -6
- data/vendor/plugins/images/app/views/admin/images/_existing_image.erb +50 -0
- data/vendor/plugins/images/app/views/admin/images/_form.html.erb +15 -7
- data/vendor/plugins/images/app/views/admin/images/_grid_view.html.erb +5 -5
- data/vendor/plugins/images/app/views/admin/images/_list_view.html.erb +3 -1
- data/vendor/plugins/images/app/views/admin/images/_list_view_image.html.erb +10 -10
- data/vendor/plugins/images/app/views/admin/images/index.html.erb +5 -8
- data/vendor/plugins/images/app/views/admin/images/insert.html.erb +16 -38
- data/vendor/plugins/images/config/locales/da.yml +44 -0
- data/vendor/plugins/images/config/locales/de.yml +45 -0
- data/vendor/plugins/images/config/locales/en.yml +44 -0
- data/vendor/plugins/images/config/locales/es.yml +45 -0
- data/vendor/plugins/images/config/locales/fr.yml +44 -0
- data/vendor/plugins/images/config/locales/it.yml +42 -0
- data/vendor/plugins/images/config/locales/nb.yml +43 -0
- data/vendor/plugins/images/config/locales/nl.yml +44 -0
- data/vendor/plugins/images/config/locales/pt-BR.yml +46 -0
- data/vendor/plugins/images/config/locales/sl.yml +44 -0
- data/vendor/plugins/images/config/routes.rb +1 -1
- data/vendor/plugins/images/lib/tasks/images.rake +6 -6
- data/vendor/plugins/images/rails/init.rb +5 -1
- data/vendor/plugins/images/readme.md +58 -0
- data/vendor/plugins/inquiries/app/controllers/admin/inquiries_controller.rb +16 -7
- data/vendor/plugins/inquiries/app/controllers/admin/inquiry_settings_controller.rb +5 -9
- data/vendor/plugins/inquiries/app/controllers/inquiries_controller.rb +14 -12
- data/vendor/plugins/inquiries/app/models/inquiry.rb +133 -6
- data/vendor/plugins/inquiries/app/models/inquiry_mailer.rb +2 -2
- data/vendor/plugins/inquiries/app/models/inquiry_setting.rb +51 -2
- data/vendor/plugins/inquiries/app/views/admin/inquiries/_inquiry.html.erb +16 -8
- data/vendor/plugins/inquiries/app/views/admin/inquiries/_submenu.html.erb +27 -0
- data/vendor/plugins/inquiries/app/views/admin/inquiries/index.html.erb +3 -18
- data/vendor/plugins/inquiries/app/views/admin/inquiries/show.html.erb +23 -12
- data/vendor/plugins/inquiries/app/views/admin/inquiries/spam.html.erb +20 -0
- data/vendor/plugins/inquiries/app/views/admin/inquiry_settings/_confirmation_email_form.html.erb +21 -14
- data/vendor/plugins/inquiries/app/views/admin/inquiry_settings/_inquiry_setting.html.erb +11 -0
- data/vendor/plugins/inquiries/app/views/admin/inquiry_settings/_notification_recipients_form.html.erb +21 -14
- data/vendor/plugins/inquiries/app/views/admin/inquiry_settings/_subject_form.html.erb +9 -0
- data/vendor/plugins/inquiries/app/views/admin/inquiry_settings/edit.html.erb +2 -0
- data/vendor/plugins/inquiries/app/views/admin/inquiry_settings/index.html.erb +7 -17
- data/vendor/plugins/inquiries/app/views/inquiries/new.html.erb +4 -5
- data/vendor/plugins/inquiries/config/locales/da.yml +67 -0
- data/vendor/plugins/inquiries/config/locales/de.yml +71 -0
- data/vendor/plugins/inquiries/config/locales/en.yml +75 -0
- data/vendor/plugins/inquiries/config/locales/es.yml +68 -0
- data/vendor/plugins/inquiries/config/locales/fr.yml +65 -0
- data/vendor/plugins/inquiries/config/locales/it.yml +66 -0
- data/vendor/plugins/inquiries/config/locales/nb.yml +67 -0
- data/vendor/plugins/inquiries/config/locales/nl.yml +71 -0
- data/vendor/plugins/inquiries/config/locales/pt-BR.yml +75 -0
- data/vendor/plugins/inquiries/config/locales/sl.yml +68 -0
- data/vendor/plugins/inquiries/config/routes.rb +4 -3
- data/vendor/plugins/inquiries/rails/init.rb +6 -3
- data/vendor/plugins/inquiries/readme.md +31 -0
- data/vendor/plugins/model_translations/MIT-LICENSE +20 -0
- data/vendor/plugins/model_translations/README.rdoc +90 -0
- data/vendor/plugins/model_translations/Rakefile +23 -0
- data/vendor/plugins/model_translations/init.rb +1 -0
- data/vendor/plugins/model_translations/lib/active_record/model_translations.rb +55 -0
- data/vendor/plugins/model_translations/test/model_translations_test.rb +88 -0
- data/vendor/plugins/model_translations/test/test_helper.rb +3 -0
- data/vendor/plugins/pages/app/controllers/admin/page_dialogs_controller.rb +29 -0
- data/vendor/plugins/pages/app/controllers/admin/page_parts_controller.rb +2 -0
- data/vendor/plugins/pages/app/controllers/admin/pages_controller.rb +37 -10
- data/vendor/plugins/pages/app/controllers/pages_controller.rb +24 -2
- data/vendor/plugins/pages/app/models/page.rb +90 -15
- data/vendor/plugins/pages/app/models/page_part.rb +1 -1
- data/vendor/plugins/pages/app/views/admin/page_dialogs/_page_link.html.erb +1 -1
- data/vendor/plugins/pages/app/views/admin/page_dialogs/link_to.html.erb +59 -74
- data/vendor/plugins/pages/app/views/admin/pages/_form.html.erb +14 -39
- data/vendor/plugins/pages/app/views/admin/pages/_form_advanced_options.html.erb +56 -50
- data/vendor/plugins/pages/app/views/admin/pages/_form_advanced_options_seo.html.erb +23 -21
- data/vendor/plugins/pages/app/views/admin/pages/_form_page_parts.html.erb +37 -0
- data/vendor/plugins/pages/app/views/admin/pages/_page.html.erb +10 -11
- data/vendor/plugins/pages/app/views/admin/pages/_page_part_field.html.erb +3 -2
- data/vendor/plugins/pages/app/views/admin/pages/index.html.erb +7 -7
- data/vendor/plugins/pages/app/views/pages/home.html.erb +1 -1
- data/vendor/plugins/pages/config/locales/da.yml +53 -0
- data/vendor/plugins/pages/config/locales/de.yml +53 -0
- data/vendor/plugins/pages/config/locales/en.yml +95 -0
- data/vendor/plugins/pages/config/locales/es.yml +53 -0
- data/vendor/plugins/pages/config/locales/fr.yml +53 -0
- data/vendor/plugins/pages/config/locales/it.yml +53 -0
- data/vendor/plugins/pages/config/locales/nb.yml +53 -0
- data/vendor/plugins/pages/config/locales/nl.yml +54 -0
- data/vendor/plugins/pages/config/locales/pt-BR.yml +61 -0
- data/vendor/plugins/pages/config/locales/sl.yml +96 -0
- data/vendor/plugins/pages/config/routes.rb +2 -2
- data/vendor/plugins/pages/rails/init.rb +5 -1
- data/vendor/plugins/pages/readme.md +156 -0
- data/vendor/plugins/refinery/app/controllers/admin/refinery_core_controller.rb +4 -2
- data/vendor/plugins/refinery/app/controllers/refinery/fast_controller.rb +7 -0
- data/vendor/plugins/refinery/app/views/admin/_head.html.erb +42 -9
- data/vendor/plugins/refinery/app/views/admin/_menu.html.erb +14 -15
- data/vendor/plugins/refinery/app/views/admin/_menu_tab.html.erb +4 -0
- data/vendor/plugins/refinery/app/views/layouts/admin.html.erb +10 -5
- data/vendor/plugins/refinery/app/views/layouts/application.html.erb +3 -3
- data/vendor/plugins/refinery/app/views/shared/_content_page.html.erb +28 -29
- data/vendor/plugins/refinery/app/views/shared/_draft_page_message.html.erb +3 -0
- data/vendor/plugins/refinery/app/views/shared/_google_analytics.html.erb +2 -1
- data/vendor/plugins/refinery/app/views/shared/_head.html.erb +1 -0
- data/vendor/plugins/refinery/app/views/shared/_header.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/_ie6check.html.erb +44 -4
- data/vendor/plugins/refinery/app/views/shared/_language_switcher.html.erb +5 -0
- data/vendor/plugins/refinery/app/views/shared/_menu.html.erb +17 -8
- data/vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb +19 -21
- data/vendor/plugins/refinery/app/views/shared/_message.html.erb +6 -1
- data/vendor/plugins/refinery/app/views/shared/_site_bar.html.erb +38 -15
- data/vendor/plugins/refinery/app/views/shared/admin/_continue_editing.html.erb +1 -2
- data/vendor/plugins/refinery/app/views/shared/admin/_form_actions.html.erb +58 -14
- data/vendor/plugins/refinery/app/views/shared/admin/_image_picker.html.erb +7 -6
- data/vendor/plugins/refinery/app/views/shared/admin/_make_sortable.html.erb +10 -9
- data/vendor/plugins/refinery/app/views/shared/admin/_resource_picker.html.erb +7 -4
- data/vendor/plugins/refinery/app/views/shared/admin/_search.html.erb +3 -4
- data/vendor/plugins/refinery/app/views/shared/admin/_sortable_list.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/welcome.html.erb +5 -7
- data/vendor/plugins/refinery/app/views/wymiframe.html.erb +13 -5
- data/vendor/plugins/refinery/config/locales/da.yml +71 -0
- data/vendor/plugins/refinery/config/locales/de.yml +67 -0
- data/vendor/plugins/refinery/config/locales/en.yml +59 -0
- data/vendor/plugins/refinery/config/locales/es.yml +64 -0
- data/vendor/plugins/refinery/config/locales/fr.yml +67 -0
- data/vendor/plugins/refinery/config/locales/it.yml +68 -0
- data/vendor/plugins/refinery/config/locales/nb.yml +64 -0
- data/vendor/plugins/refinery/config/locales/nl.yml +63 -0
- data/vendor/plugins/refinery/config/locales/pt-BR.yml +60 -0
- data/vendor/plugins/refinery/config/locales/sl.yml +61 -0
- data/vendor/plugins/refinery/config/routes.rb +4 -4
- data/vendor/plugins/refinery/crud.md +2 -2
- data/vendor/plugins/refinery/lib/crud.rb +34 -25
- data/vendor/plugins/refinery/lib/generators/refinery/refinery_generator.rb +9 -2
- data/vendor/plugins/refinery/lib/generators/refinery/templates/config/locales/en.yml +16 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/config/locales/nl.yml +16 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/config/routes.rb +2 -2
- data/vendor/plugins/refinery/lib/generators/refinery/templates/migration.rb +1 -14
- data/vendor/plugins/refinery/lib/generators/refinery/templates/model.rb +1 -2
- data/vendor/plugins/refinery/lib/generators/refinery/templates/rails/init.rb +3 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/seed.rb +15 -0
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb +2 -2
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_singular_name.html.erb +10 -11
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/index.html.erb +5 -6
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/show.html.erb +1 -1
- data/vendor/plugins/refinery/lib/refinery.rb +22 -1
- data/vendor/plugins/refinery/lib/refinery/activity.rb +1 -1
- data/vendor/plugins/refinery/lib/refinery/admin_base_controller.rb +56 -10
- data/vendor/plugins/refinery/lib/refinery/application_controller.rb +39 -14
- data/vendor/plugins/refinery/lib/refinery/application_helper.rb +62 -12
- data/vendor/plugins/refinery/lib/refinery/base_presenter.rb +1 -1
- data/vendor/plugins/refinery/lib/refinery/form_helpers.rb +37 -2
- data/vendor/plugins/refinery/lib/refinery/html_truncation_helper.rb +10 -100
- data/vendor/plugins/refinery/lib/refinery/initializer.rb +15 -1
- data/vendor/plugins/refinery/lib/refinery/plugin.rb +26 -14
- data/vendor/plugins/refinery/lib/refinery/plugins.rb +21 -8
- data/vendor/plugins/refinery/lib/tasks/doc.rake +24 -24
- data/vendor/plugins/refinery/lib/tasks/refinery.rake +232 -9
- data/vendor/plugins/refinery/lib/tasks/yard.rake +22 -22
- data/vendor/plugins/refinery/plugins.md +6 -6
- data/vendor/plugins/refinery/rails/init.rb +8 -1
- data/vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb +4 -0
- data/vendor/plugins/refinery_dialogs/app/views/admin/dialogs/show.html.erb +11 -12
- data/vendor/plugins/refinery_dialogs/app/views/layouts/admin_dialog.html.erb +4 -2
- data/vendor/plugins/refinery_dialogs/config/routes.rb +1 -1
- data/vendor/plugins/refinery_dialogs/rails/init.rb +4 -0
- data/vendor/plugins/refinery_settings/app/controllers/admin/refinery_settings_controller.rb +39 -0
- data/vendor/plugins/refinery_settings/app/models/refinery_setting.rb +67 -10
- data/vendor/plugins/refinery_settings/app/views/admin/refinery_settings/_form.html.erb +30 -6
- data/vendor/plugins/refinery_settings/app/views/admin/refinery_settings/_refinery_setting.html.erb +10 -11
- data/vendor/plugins/refinery_settings/app/views/admin/refinery_settings/edit.html.erb +0 -3
- data/vendor/plugins/refinery_settings/app/views/admin/refinery_settings/index.html.erb +13 -4
- data/vendor/plugins/refinery_settings/config/locales/da.yml +49 -0
- data/vendor/plugins/refinery_settings/config/locales/de.yml +23 -0
- data/vendor/plugins/refinery_settings/config/locales/en.yml +45 -0
- data/vendor/plugins/refinery_settings/config/locales/es.yml +23 -0
- data/vendor/plugins/refinery_settings/config/locales/fr.yml +23 -0
- data/vendor/plugins/refinery_settings/config/locales/it.yml +23 -0
- data/vendor/plugins/refinery_settings/config/locales/nb.yml +23 -0
- data/vendor/plugins/refinery_settings/config/locales/nl.yml +46 -0
- data/vendor/plugins/refinery_settings/config/locales/pt-BR.yml +23 -0
- data/vendor/plugins/refinery_settings/config/locales/sl.yml +24 -0
- data/vendor/plugins/refinery_settings/config/routes.rb +1 -1
- data/vendor/plugins/refinery_settings/rails/init.rb +5 -8
- data/vendor/plugins/refinery_settings/{settings.md → readme.md} +0 -0
- data/vendor/plugins/resources/app/controllers/admin/resources_controller.rb +2 -7
- data/vendor/plugins/resources/app/models/resource.rb +8 -3
- data/vendor/plugins/resources/app/views/admin/resources/_existing_resource.html.erb +34 -0
- data/vendor/plugins/resources/app/views/admin/resources/_form.html.erb +15 -7
- data/vendor/plugins/resources/app/views/admin/resources/_resource.html.erb +12 -12
- data/vendor/plugins/resources/app/views/admin/resources/index.html.erb +8 -6
- data/vendor/plugins/resources/app/views/admin/resources/insert.html.erb +4 -40
- data/vendor/plugins/resources/config/locales/da.yml +34 -0
- data/vendor/plugins/resources/config/locales/de.yml +32 -0
- data/vendor/plugins/resources/config/locales/en.yml +32 -0
- data/vendor/plugins/resources/config/locales/es.yml +34 -0
- data/vendor/plugins/resources/config/locales/fr.yml +34 -0
- data/vendor/plugins/resources/config/locales/it.yml +33 -0
- data/vendor/plugins/resources/config/locales/nb.yml +34 -0
- data/vendor/plugins/resources/config/locales/nl.yml +34 -0
- data/vendor/plugins/resources/config/locales/pt-BR.yml +34 -0
- data/vendor/plugins/resources/config/locales/sl.yml +34 -0
- data/vendor/plugins/resources/config/routes.rb +1 -3
- data/vendor/plugins/resources/rails/init.rb +5 -1
- data/vendor/plugins/resources/{resources.md → readme.md} +0 -0
- data/vendor/plugins/themes/lib/theme_server.rb +1 -1
- data/vendor/plugins/themes/rails/init.rb +4 -1
- data/vendor/plugins/themes/readme.md +113 -0
- data/vendor/plugins/{rails_indexes → translate}/MIT-LICENSE +0 -0
- data/vendor/plugins/translate/README +61 -0
- data/vendor/plugins/translate/REFINERY_README +8 -0
- data/vendor/plugins/translate/Rakefile +11 -0
- data/vendor/plugins/translate/init.rb +8 -0
- data/vendor/plugins/translate/lib/translate.rb +13 -0
- data/vendor/plugins/translate/lib/translate/file.rb +35 -0
- data/vendor/plugins/translate/lib/translate/keys.rb +123 -0
- data/vendor/plugins/translate/lib/translate/log.rb +39 -0
- data/vendor/plugins/translate/lib/translate/storage.rb +20 -0
- data/vendor/plugins/translate/tasks/translate.rake +182 -0
- metadata +574 -366
- data/.gems +0 -0
- data/VERSION +0 -1
- data/bin/refinery-override +0 -76
- data/public/images/thickbox/cross.png +0 -0
- data/public/images/thickbox/loadingAnimation.gif +0 -0
- data/public/images/thickbox/macFFBgHack.png +0 -0
- data/public/javascripts/jquery-ui-1.8.min.js +0 -374
- data/vendor/plugins/acts_as_indexed/CHANGELOG +0 -78
- data/vendor/plugins/acts_as_indexed/MIT-LICENSE +0 -20
- data/vendor/plugins/acts_as_indexed/README.rdoc +0 -114
- data/vendor/plugins/acts_as_indexed/Rakefile +0 -35
- data/vendor/plugins/acts_as_indexed/init.rb +0 -2
- data/vendor/plugins/acts_as_indexed/lib/acts_as_indexed.rb +0 -224
- data/vendor/plugins/acts_as_indexed/lib/search_atom.rb +0 -109
- data/vendor/plugins/acts_as_indexed/lib/search_index.rb +0 -329
- data/vendor/plugins/acts_as_indexed/lib/will_paginate_search.rb +0 -29
- data/vendor/plugins/acts_as_indexed/test/abstract_unit.rb +0 -47
- data/vendor/plugins/acts_as_indexed/test/acts_as_indexed_test.rb +0 -102
- data/vendor/plugins/acts_as_indexed/test/database.yml +0 -10
- data/vendor/plugins/acts_as_indexed/test/fixtures/post.rb +0 -5
- data/vendor/plugins/acts_as_indexed/test/fixtures/posts.yml +0 -31
- data/vendor/plugins/acts_as_indexed/test/schema.rb +0 -6
- data/vendor/plugins/authlogic/CHANGELOG.rdoc +0 -345
- data/vendor/plugins/authlogic/LICENSE +0 -20
- data/vendor/plugins/authlogic/README.rdoc +0 -246
- data/vendor/plugins/authlogic/Rakefile +0 -42
- data/vendor/plugins/authlogic/VERSION.yml +0 -5
- data/vendor/plugins/authlogic/authlogic.gemspec +0 -217
- data/vendor/plugins/authlogic/generators/session/session_generator.rb +0 -9
- data/vendor/plugins/authlogic/generators/session/templates/session.rb +0 -2
- data/vendor/plugins/authlogic/init.rb +0 -1
- data/vendor/plugins/authlogic/lib/authlogic.rb +0 -64
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/base.rb +0 -107
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/email.rb +0 -110
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/logged_in_status.rb +0 -60
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/login.rb +0 -141
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/magic_columns.rb +0 -24
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/password.rb +0 -355
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/perishable_token.rb +0 -105
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/persistence_token.rb +0 -68
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/restful_authentication.rb +0 -61
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/session_maintenance.rb +0 -139
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/single_access_token.rb +0 -65
- data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/validations_scope.rb +0 -32
- data/vendor/plugins/authlogic/lib/authlogic/authenticates_many/association.rb +0 -42
- data/vendor/plugins/authlogic/lib/authlogic/authenticates_many/base.rb +0 -55
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/abstract_adapter.rb +0 -67
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/merb_adapter.rb +0 -30
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/rails_adapter.rb +0 -48
- data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/sinatra_adapter.rb +0 -61
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/aes256.rb +0 -43
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/bcrypt.rb +0 -90
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/md5.rb +0 -34
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha1.rb +0 -35
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha256.rb +0 -50
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha512.rb +0 -50
- data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/wordpress.rb +0 -43
- data/vendor/plugins/authlogic/lib/authlogic/i18n.rb +0 -83
- data/vendor/plugins/authlogic/lib/authlogic/i18n/translator.rb +0 -15
- data/vendor/plugins/authlogic/lib/authlogic/random.rb +0 -33
- data/vendor/plugins/authlogic/lib/authlogic/regex.rb +0 -25
- data/vendor/plugins/authlogic/lib/authlogic/session/activation.rb +0 -58
- data/vendor/plugins/authlogic/lib/authlogic/session/active_record_trickery.rb +0 -64
- data/vendor/plugins/authlogic/lib/authlogic/session/base.rb +0 -37
- data/vendor/plugins/authlogic/lib/authlogic/session/brute_force_protection.rb +0 -96
- data/vendor/plugins/authlogic/lib/authlogic/session/callbacks.rb +0 -99
- data/vendor/plugins/authlogic/lib/authlogic/session/cookies.rb +0 -130
- data/vendor/plugins/authlogic/lib/authlogic/session/existence.rb +0 -93
- data/vendor/plugins/authlogic/lib/authlogic/session/foundation.rb +0 -63
- data/vendor/plugins/authlogic/lib/authlogic/session/http_auth.rb +0 -58
- data/vendor/plugins/authlogic/lib/authlogic/session/id.rb +0 -41
- data/vendor/plugins/authlogic/lib/authlogic/session/klass.rb +0 -78
- data/vendor/plugins/authlogic/lib/authlogic/session/magic_columns.rb +0 -95
- data/vendor/plugins/authlogic/lib/authlogic/session/magic_states.rb +0 -59
- data/vendor/plugins/authlogic/lib/authlogic/session/params.rb +0 -101
- data/vendor/plugins/authlogic/lib/authlogic/session/password.rb +0 -240
- data/vendor/plugins/authlogic/lib/authlogic/session/perishable_token.rb +0 -18
- data/vendor/plugins/authlogic/lib/authlogic/session/persistence.rb +0 -70
- data/vendor/plugins/authlogic/lib/authlogic/session/priority_record.rb +0 -34
- data/vendor/plugins/authlogic/lib/authlogic/session/scopes.rb +0 -101
- data/vendor/plugins/authlogic/lib/authlogic/session/session.rb +0 -62
- data/vendor/plugins/authlogic/lib/authlogic/session/timeout.rb +0 -82
- data/vendor/plugins/authlogic/lib/authlogic/session/unauthorized_record.rb +0 -50
- data/vendor/plugins/authlogic/lib/authlogic/session/validation.rb +0 -82
- data/vendor/plugins/authlogic/lib/authlogic/test_case.rb +0 -120
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_controller.rb +0 -45
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_cookie_jar.rb +0 -14
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_logger.rb +0 -10
- data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_request.rb +0 -19
- data/vendor/plugins/authlogic/lib/authlogic/test_case/rails_request_adapter.rb +0 -30
- data/vendor/plugins/authlogic/rails/init.rb +0 -1
- data/vendor/plugins/authlogic/shoulda_macros/authlogic.rb +0 -69
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/base_test.rb +0 -18
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/email_test.rb +0 -97
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/logged_in_status_test.rb +0 -36
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/login_test.rb +0 -109
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/magic_columns_test.rb +0 -27
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/password_test.rb +0 -236
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/perishable_token_test.rb +0 -90
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/persistence_token_test.rb +0 -55
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/restful_authentication_test.rb +0 -40
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/session_maintenance_test.rb +0 -84
- data/vendor/plugins/authlogic/test/acts_as_authentic_test/single_access_test.rb +0 -44
- data/vendor/plugins/authlogic/test/authenticates_many_test.rb +0 -16
- data/vendor/plugins/authlogic/test/crypto_provider_test/aes256_test.rb +0 -14
- data/vendor/plugins/authlogic/test/crypto_provider_test/bcrypt_test.rb +0 -14
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha1_test.rb +0 -23
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha256_test.rb +0 -14
- data/vendor/plugins/authlogic/test/crypto_provider_test/sha512_test.rb +0 -14
- data/vendor/plugins/authlogic/test/fixtures/companies.yml +0 -5
- data/vendor/plugins/authlogic/test/fixtures/employees.yml +0 -17
- data/vendor/plugins/authlogic/test/fixtures/projects.yml +0 -3
- data/vendor/plugins/authlogic/test/fixtures/users.yml +0 -24
- data/vendor/plugins/authlogic/test/i18n_test.rb +0 -33
- data/vendor/plugins/authlogic/test/libs/affiliate.rb +0 -7
- data/vendor/plugins/authlogic/test/libs/company.rb +0 -6
- data/vendor/plugins/authlogic/test/libs/employee.rb +0 -7
- data/vendor/plugins/authlogic/test/libs/employee_session.rb +0 -2
- data/vendor/plugins/authlogic/test/libs/ldaper.rb +0 -3
- data/vendor/plugins/authlogic/test/libs/ordered_hash.rb +0 -9
- data/vendor/plugins/authlogic/test/libs/project.rb +0 -3
- data/vendor/plugins/authlogic/test/libs/user.rb +0 -5
- data/vendor/plugins/authlogic/test/libs/user_session.rb +0 -6
- data/vendor/plugins/authlogic/test/random_test.rb +0 -49
- data/vendor/plugins/authlogic/test/session_test/activation_test.rb +0 -43
- data/vendor/plugins/authlogic/test/session_test/active_record_trickery_test.rb +0 -36
- data/vendor/plugins/authlogic/test/session_test/brute_force_protection_test.rb +0 -101
- data/vendor/plugins/authlogic/test/session_test/callbacks_test.rb +0 -6
- data/vendor/plugins/authlogic/test/session_test/cookies_test.rb +0 -112
- data/vendor/plugins/authlogic/test/session_test/credentials_test.rb +0 -0
- data/vendor/plugins/authlogic/test/session_test/existence_test.rb +0 -64
- data/vendor/plugins/authlogic/test/session_test/http_auth_test.rb +0 -28
- data/vendor/plugins/authlogic/test/session_test/id_test.rb +0 -17
- data/vendor/plugins/authlogic/test/session_test/klass_test.rb +0 -40
- data/vendor/plugins/authlogic/test/session_test/magic_columns_test.rb +0 -62
- data/vendor/plugins/authlogic/test/session_test/magic_states_test.rb +0 -60
- data/vendor/plugins/authlogic/test/session_test/params_test.rb +0 -53
- data/vendor/plugins/authlogic/test/session_test/password_test.rb +0 -106
- data/vendor/plugins/authlogic/test/session_test/perishability_test.rb +0 -15
- data/vendor/plugins/authlogic/test/session_test/persistence_test.rb +0 -21
- data/vendor/plugins/authlogic/test/session_test/scopes_test.rb +0 -60
- data/vendor/plugins/authlogic/test/session_test/session_test.rb +0 -59
- data/vendor/plugins/authlogic/test/session_test/timeout_test.rb +0 -52
- data/vendor/plugins/authlogic/test/session_test/unauthorized_record_test.rb +0 -13
- data/vendor/plugins/authlogic/test/session_test/validation_test.rb +0 -23
- data/vendor/plugins/authlogic/test/test_helper.rb +0 -182
- data/vendor/plugins/friendly_id/Changelog.md +0 -243
- data/vendor/plugins/friendly_id/Contributors.md +0 -30
- data/vendor/plugins/friendly_id/Gemfile +0 -2
- data/vendor/plugins/friendly_id/Guide.md +0 -509
- data/vendor/plugins/friendly_id/LICENSE +0 -19
- data/vendor/plugins/friendly_id/README.md +0 -76
- data/vendor/plugins/friendly_id/Rakefile +0 -68
- data/vendor/plugins/friendly_id/extras/README.txt +0 -3
- data/vendor/plugins/friendly_id/extras/bench.rb +0 -59
- data/vendor/plugins/friendly_id/extras/extras.rb +0 -31
- data/vendor/plugins/friendly_id/extras/prof.rb +0 -14
- data/vendor/plugins/friendly_id/extras/template-gem.rb +0 -26
- data/vendor/plugins/friendly_id/extras/template-plugin.rb +0 -28
- data/vendor/plugins/friendly_id/friendly_id.gemspec +0 -40
- data/vendor/plugins/friendly_id/generators/friendly_id/friendly_id_generator.rb +0 -28
- data/vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb +0 -18
- data/vendor/plugins/friendly_id/lib/friendly_id.rb +0 -67
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2.rb +0 -47
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/configuration.rb +0 -66
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/finders.rb +0 -140
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/simple_model.rb +0 -162
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/slug.rb +0 -111
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/slugged_model.rb +0 -323
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/tasks.rb +0 -66
- data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/tasks/friendly_id.rake +0 -19
- data/vendor/plugins/friendly_id/lib/friendly_id/configuration.rb +0 -132
- data/vendor/plugins/friendly_id/lib/friendly_id/finders.rb +0 -106
- data/vendor/plugins/friendly_id/lib/friendly_id/slug_string.rb +0 -292
- data/vendor/plugins/friendly_id/lib/friendly_id/slugged.rb +0 -91
- data/vendor/plugins/friendly_id/lib/friendly_id/status.rb +0 -35
- data/vendor/plugins/friendly_id/lib/friendly_id/test.rb +0 -175
- data/vendor/plugins/friendly_id/lib/friendly_id/version.rb +0 -8
- data/vendor/plugins/friendly_id/rails/init.rb +0 -2
- data/vendor/plugins/friendly_id/test/active_record2/basic_slugged_model_test.rb +0 -14
- data/vendor/plugins/friendly_id/test/active_record2/cached_slug_test.rb +0 -61
- data/vendor/plugins/friendly_id/test/active_record2/core.rb +0 -93
- data/vendor/plugins/friendly_id/test/active_record2/custom_normalizer_test.rb +0 -20
- data/vendor/plugins/friendly_id/test/active_record2/custom_table_name_test.rb +0 -22
- data/vendor/plugins/friendly_id/test/active_record2/deprecated_test.rb +0 -23
- data/vendor/plugins/friendly_id/test/active_record2/scoped_model_test.rb +0 -111
- data/vendor/plugins/friendly_id/test/active_record2/simple_test.rb +0 -59
- data/vendor/plugins/friendly_id/test/active_record2/slug_test.rb +0 -34
- data/vendor/plugins/friendly_id/test/active_record2/slugged.rb +0 -30
- data/vendor/plugins/friendly_id/test/active_record2/slugged_status_test.rb +0 -61
- data/vendor/plugins/friendly_id/test/active_record2/sti_test.rb +0 -22
- data/vendor/plugins/friendly_id/test/active_record2/support/database.mysql.yml +0 -4
- data/vendor/plugins/friendly_id/test/active_record2/support/database.postgres.yml +0 -6
- data/vendor/plugins/friendly_id/test/active_record2/support/database.sqlite3.yml +0 -2
- data/vendor/plugins/friendly_id/test/active_record2/support/models.rb +0 -78
- data/vendor/plugins/friendly_id/test/active_record2/tasks_test.rb +0 -82
- data/vendor/plugins/friendly_id/test/active_record2/test_helper.rb +0 -114
- data/vendor/plugins/friendly_id/test/friendly_id_test.rb +0 -60
- data/vendor/plugins/friendly_id/test/slug_string_test.rb +0 -78
- data/vendor/plugins/friendly_id/test/test_helper.rb +0 -9
- data/vendor/plugins/hpricot/CHANGELOG +0 -88
- data/vendor/plugins/hpricot/COPYING +0 -18
- data/vendor/plugins/hpricot/README +0 -275
- data/vendor/plugins/hpricot/Rakefile +0 -272
- data/vendor/plugins/hpricot/ext/fast_xs/FastXsService.java +0 -1030
- data/vendor/plugins/hpricot/ext/fast_xs/extconf.rb +0 -4
- data/vendor/plugins/hpricot/ext/fast_xs/fast_xs.c +0 -201
- data/vendor/plugins/hpricot/ext/hpricot_scan/HpricotCss.java +0 -831
- data/vendor/plugins/hpricot/ext/hpricot_scan/HpricotScanService.java +0 -2086
- data/vendor/plugins/hpricot/ext/hpricot_scan/MANIFEST +0 -0
- data/vendor/plugins/hpricot/ext/hpricot_scan/extconf.rb +0 -6
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_common.rl +0 -76
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.c +0 -3503
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.java.rl +0 -155
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.rl +0 -115
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.c +0 -6927
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.h +0 -79
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.java.rl +0 -1152
- data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.rl +0 -788
- data/vendor/plugins/hpricot/extras/mingw-rbconfig.rb +0 -176
- data/vendor/plugins/hpricot/hpricot.gemspec +0 -17
- data/vendor/plugins/hpricot/lib/hpricot.rb +0 -26
- data/vendor/plugins/hpricot/lib/hpricot/blankslate.rb +0 -63
- data/vendor/plugins/hpricot/lib/hpricot/builder.rb +0 -216
- data/vendor/plugins/hpricot/lib/hpricot/elements.rb +0 -510
- data/vendor/plugins/hpricot/lib/hpricot/htmlinfo.rb +0 -691
- data/vendor/plugins/hpricot/lib/hpricot/inspect.rb +0 -103
- data/vendor/plugins/hpricot/lib/hpricot/modules.rb +0 -40
- data/vendor/plugins/hpricot/lib/hpricot/parse.rb +0 -38
- data/vendor/plugins/hpricot/lib/hpricot/tag.rb +0 -219
- data/vendor/plugins/hpricot/lib/hpricot/tags.rb +0 -164
- data/vendor/plugins/hpricot/lib/hpricot/traverse.rb +0 -839
- data/vendor/plugins/hpricot/lib/hpricot/xchar.rb +0 -94
- data/vendor/plugins/hpricot/setup.rb +0 -1585
- data/vendor/plugins/hpricot/test/files/basic.xhtml +0 -17
- data/vendor/plugins/hpricot/test/files/boingboing.html +0 -2266
- data/vendor/plugins/hpricot/test/files/cy0.html +0 -3653
- data/vendor/plugins/hpricot/test/files/immob.html +0 -400
- data/vendor/plugins/hpricot/test/files/pace_application.html +0 -1320
- data/vendor/plugins/hpricot/test/files/tenderlove.html +0 -16
- data/vendor/plugins/hpricot/test/files/uswebgen.html +0 -220
- data/vendor/plugins/hpricot/test/files/utf8.html +0 -1054
- data/vendor/plugins/hpricot/test/files/week9.html +0 -1723
- data/vendor/plugins/hpricot/test/files/why.xml +0 -19
- data/vendor/plugins/hpricot/test/load_files.rb +0 -7
- data/vendor/plugins/hpricot/test/nokogiri-bench.rb +0 -64
- data/vendor/plugins/hpricot/test/test_alter.rb +0 -96
- data/vendor/plugins/hpricot/test/test_builder.rb +0 -37
- data/vendor/plugins/hpricot/test/test_parser.rb +0 -428
- data/vendor/plugins/hpricot/test/test_paths.rb +0 -25
- data/vendor/plugins/hpricot/test/test_preserved.rb +0 -88
- data/vendor/plugins/hpricot/test/test_xml.rb +0 -28
- data/vendor/plugins/images/images.md +0 -53
- data/vendor/plugins/inquiries/inquiries.md +0 -31
- data/vendor/plugins/pages/pages.md +0 -146
- data/vendor/plugins/rails_indexes/README.textile +0 -46
- data/vendor/plugins/rails_indexes/Rakefile +0 -23
- data/vendor/plugins/rails_indexes/lib/indexer.rb +0 -303
- data/vendor/plugins/rails_indexes/tasks/indexer.rake +0 -18
- data/vendor/plugins/rails_indexes/test/fixtures/app/controllers/users_controller.rb +0 -8
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/address.rb +0 -5
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/company.rb +0 -11
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/country.rb +0 -4
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/freelancer.rb +0 -3
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/gift.rb +0 -10
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/god.rb +0 -3
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/user.rb +0 -17
- data/vendor/plugins/rails_indexes/test/fixtures/app/sweepers/user_sweeper.rb +0 -9
- data/vendor/plugins/rails_indexes/test/fixtures/schema.rb +0 -46
- data/vendor/plugins/rails_indexes/test/rails_indexes_test.rb +0 -83
- data/vendor/plugins/rails_indexes/test/test_helper.rb +0 -30
- data/vendor/plugins/refinery/app/views/admin/_footer.html.erb +0 -7
- data/vendor/plugins/refinery/app/views/shared/_submenu.html.erb +0 -5
- data/vendor/plugins/refinery/app/views/shared/_submenu_branch.html.erb +0 -10
- data/vendor/plugins/themes/themes.md +0 -113
- data/vendor/plugins/will_paginate/.manifest +0 -43
- data/vendor/plugins/will_paginate/CHANGELOG.rdoc +0 -139
- data/vendor/plugins/will_paginate/LICENSE +0 -18
- data/vendor/plugins/will_paginate/README.rdoc +0 -107
- data/vendor/plugins/will_paginate/Rakefile +0 -53
- data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
- data/vendor/plugins/will_paginate/examples/index.haml +0 -69
- data/vendor/plugins/will_paginate/examples/index.html +0 -92
- data/vendor/plugins/will_paginate/examples/pagination.css +0 -90
- data/vendor/plugins/will_paginate/examples/pagination.sass +0 -91
- data/vendor/plugins/will_paginate/init.rb +0 -1
- data/vendor/plugins/will_paginate/lib/will_paginate.rb +0 -90
- data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +0 -16
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +0 -146
- data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +0 -43
- data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +0 -264
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +0 -170
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +0 -37
- data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +0 -9
- data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +0 -408
- data/vendor/plugins/will_paginate/test/boot.rb +0 -21
- data/vendor/plugins/will_paginate/test/collection_test.rb +0 -143
- data/vendor/plugins/will_paginate/test/console +0 -8
- data/vendor/plugins/will_paginate/test/database.yml +0 -22
- data/vendor/plugins/will_paginate/test/finder_test.rb +0 -473
- data/vendor/plugins/will_paginate/test/fixtures/admin.rb +0 -3
- data/vendor/plugins/will_paginate/test/fixtures/developer.rb +0 -14
- data/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml +0 -13
- data/vendor/plugins/will_paginate/test/fixtures/project.rb +0 -15
- data/vendor/plugins/will_paginate/test/fixtures/projects.yml +0 -6
- data/vendor/plugins/will_paginate/test/fixtures/replies.yml +0 -29
- data/vendor/plugins/will_paginate/test/fixtures/reply.rb +0 -7
- data/vendor/plugins/will_paginate/test/fixtures/schema.rb +0 -38
- data/vendor/plugins/will_paginate/test/fixtures/topic.rb +0 -10
- data/vendor/plugins/will_paginate/test/fixtures/topics.yml +0 -30
- data/vendor/plugins/will_paginate/test/fixtures/user.rb +0 -2
- data/vendor/plugins/will_paginate/test/fixtures/users.yml +0 -35
- data/vendor/plugins/will_paginate/test/helper.rb +0 -37
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb +0 -43
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb +0 -75
- data/vendor/plugins/will_paginate/test/lib/load_fixtures.rb +0 -11
- data/vendor/plugins/will_paginate/test/lib/view_test_process.rb +0 -179
- data/vendor/plugins/will_paginate/test/tasks.rake +0 -59
- data/vendor/plugins/will_paginate/test/view_test.rb +0 -373
- data/vendor/plugins/will_paginate/will_paginate.gemspec +0 -19
@@ -1,2086 +0,0 @@
|
|
1
|
-
// line 1 "hpricot_scan.java.rl"
|
2
|
-
|
3
|
-
import java.io.IOException;
|
4
|
-
|
5
|
-
import org.jruby.Ruby;
|
6
|
-
import org.jruby.RubyArray;
|
7
|
-
import org.jruby.RubyClass;
|
8
|
-
import org.jruby.RubyHash;
|
9
|
-
import org.jruby.RubyModule;
|
10
|
-
import org.jruby.RubyNumeric;
|
11
|
-
import org.jruby.RubyObject;
|
12
|
-
import org.jruby.RubyObjectAdapter;
|
13
|
-
import org.jruby.RubyRegexp;
|
14
|
-
import org.jruby.RubyString;
|
15
|
-
import org.jruby.anno.JRubyMethod;
|
16
|
-
import org.jruby.exceptions.RaiseException;
|
17
|
-
import org.jruby.javasupport.JavaEmbedUtils;
|
18
|
-
import org.jruby.runtime.Arity;
|
19
|
-
import org.jruby.runtime.Block;
|
20
|
-
import org.jruby.runtime.ObjectAllocator;
|
21
|
-
import org.jruby.runtime.ThreadContext;
|
22
|
-
import org.jruby.runtime.builtin.IRubyObject;
|
23
|
-
import org.jruby.runtime.callback.Callback;
|
24
|
-
import org.jruby.exceptions.RaiseException;
|
25
|
-
import org.jruby.runtime.load.BasicLibraryService;
|
26
|
-
import org.jruby.util.ByteList;
|
27
|
-
|
28
|
-
public class HpricotScanService implements BasicLibraryService {
|
29
|
-
public static byte[] realloc(byte[] input, int size) {
|
30
|
-
byte[] newArray = new byte[size];
|
31
|
-
System.arraycopy(input, 0, newArray, 0, input.length);
|
32
|
-
return newArray;
|
33
|
-
}
|
34
|
-
|
35
|
-
// hpricot_state
|
36
|
-
public static class State {
|
37
|
-
public IRubyObject doc;
|
38
|
-
public IRubyObject focus;
|
39
|
-
public IRubyObject last;
|
40
|
-
public IRubyObject EC;
|
41
|
-
public boolean xml, strict, fixup;
|
42
|
-
}
|
43
|
-
|
44
|
-
static boolean OPT(IRubyObject opts, String key) {
|
45
|
-
Ruby runtime = opts.getRuntime();
|
46
|
-
return !opts.isNil() && ((RubyHash)opts).op_aref(runtime.getCurrentContext(), runtime.newSymbol(key)).isTrue();
|
47
|
-
}
|
48
|
-
|
49
|
-
// H_PROP(name, H_ELE_TAG)
|
50
|
-
public static IRubyObject hpricot_ele_set_name(IRubyObject self, IRubyObject x) {
|
51
|
-
H_ELE_SET(self, H_ELE_TAG, x);
|
52
|
-
return self;
|
53
|
-
}
|
54
|
-
|
55
|
-
public static IRubyObject hpricot_ele_clear_name(IRubyObject self) {
|
56
|
-
H_ELE_SET(self, H_ELE_TAG, self.getRuntime().getNil());
|
57
|
-
return self.getRuntime().getTrue();
|
58
|
-
}
|
59
|
-
|
60
|
-
public static IRubyObject hpricot_ele_get_name(IRubyObject self) {
|
61
|
-
return H_ELE_GET(self, H_ELE_TAG);
|
62
|
-
}
|
63
|
-
|
64
|
-
// H_PROP(raw, H_ELE_RAW)
|
65
|
-
public static IRubyObject hpricot_ele_set_raw(IRubyObject self, IRubyObject x) {
|
66
|
-
H_ELE_SET(self, H_ELE_RAW, x);
|
67
|
-
return self;
|
68
|
-
}
|
69
|
-
|
70
|
-
public static IRubyObject hpricot_ele_clear_raw(IRubyObject self) {
|
71
|
-
H_ELE_SET(self, H_ELE_RAW, self.getRuntime().getNil());
|
72
|
-
return self.getRuntime().getTrue();
|
73
|
-
}
|
74
|
-
|
75
|
-
public static IRubyObject hpricot_ele_get_raw(IRubyObject self) {
|
76
|
-
return H_ELE_GET(self, H_ELE_RAW);
|
77
|
-
}
|
78
|
-
|
79
|
-
// H_PROP(parent, H_ELE_PARENT)
|
80
|
-
public static IRubyObject hpricot_ele_set_parent(IRubyObject self, IRubyObject x) {
|
81
|
-
H_ELE_SET(self, H_ELE_PARENT, x);
|
82
|
-
return self;
|
83
|
-
}
|
84
|
-
|
85
|
-
public static IRubyObject hpricot_ele_clear_parent(IRubyObject self) {
|
86
|
-
H_ELE_SET(self, H_ELE_PARENT, self.getRuntime().getNil());
|
87
|
-
return self.getRuntime().getTrue();
|
88
|
-
}
|
89
|
-
|
90
|
-
public static IRubyObject hpricot_ele_get_parent(IRubyObject self) {
|
91
|
-
return H_ELE_GET(self, H_ELE_PARENT);
|
92
|
-
}
|
93
|
-
|
94
|
-
// H_PROP(attr, H_ELE_ATTR)
|
95
|
-
public static IRubyObject hpricot_ele_set_attr(IRubyObject self, IRubyObject x) {
|
96
|
-
H_ELE_SET(self, H_ELE_ATTR, x);
|
97
|
-
return self;
|
98
|
-
}
|
99
|
-
|
100
|
-
public static IRubyObject hpricot_ele_clear_attr(IRubyObject self) {
|
101
|
-
H_ELE_SET(self, H_ELE_ATTR, self.getRuntime().getNil());
|
102
|
-
return self.getRuntime().getTrue();
|
103
|
-
}
|
104
|
-
|
105
|
-
public static IRubyObject hpricot_ele_get_attr(IRubyObject self) {
|
106
|
-
return H_ELE_GET(self, H_ELE_ATTR);
|
107
|
-
}
|
108
|
-
|
109
|
-
// H_PROP(etag, H_ELE_ETAG)
|
110
|
-
public static IRubyObject hpricot_ele_set_etag(IRubyObject self, IRubyObject x) {
|
111
|
-
H_ELE_SET(self, H_ELE_ETAG, x);
|
112
|
-
return self;
|
113
|
-
}
|
114
|
-
|
115
|
-
public static IRubyObject hpricot_ele_clear_etag(IRubyObject self) {
|
116
|
-
H_ELE_SET(self, H_ELE_ETAG, self.getRuntime().getNil());
|
117
|
-
return self.getRuntime().getTrue();
|
118
|
-
}
|
119
|
-
|
120
|
-
public static IRubyObject hpricot_ele_get_etag(IRubyObject self) {
|
121
|
-
return H_ELE_GET(self, H_ELE_ETAG);
|
122
|
-
}
|
123
|
-
|
124
|
-
// H_PROP(children, H_ELE_CHILDREN)
|
125
|
-
public static IRubyObject hpricot_ele_set_children(IRubyObject self, IRubyObject x) {
|
126
|
-
H_ELE_SET(self, H_ELE_CHILDREN, x);
|
127
|
-
return self;
|
128
|
-
}
|
129
|
-
|
130
|
-
public static IRubyObject hpricot_ele_clear_children(IRubyObject self) {
|
131
|
-
H_ELE_SET(self, H_ELE_CHILDREN, self.getRuntime().getNil());
|
132
|
-
return self.getRuntime().getTrue();
|
133
|
-
}
|
134
|
-
|
135
|
-
public static IRubyObject hpricot_ele_get_children(IRubyObject self) {
|
136
|
-
return H_ELE_GET(self, H_ELE_CHILDREN);
|
137
|
-
}
|
138
|
-
|
139
|
-
// H_ATTR(target)
|
140
|
-
public static IRubyObject hpricot_ele_set_target(IRubyObject self, IRubyObject x) {
|
141
|
-
((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).fastASet(self.getRuntime().newSymbol("target"), x);
|
142
|
-
return self;
|
143
|
-
}
|
144
|
-
|
145
|
-
public static IRubyObject hpricot_ele_get_target(IRubyObject self) {
|
146
|
-
return ((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).op_aref(self.getRuntime().getCurrentContext(), self.getRuntime().newSymbol("target"));
|
147
|
-
}
|
148
|
-
|
149
|
-
// H_ATTR(encoding)
|
150
|
-
public static IRubyObject hpricot_ele_set_encoding(IRubyObject self, IRubyObject x) {
|
151
|
-
((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).fastASet(self.getRuntime().newSymbol("encoding"), x);
|
152
|
-
return self;
|
153
|
-
}
|
154
|
-
|
155
|
-
public static IRubyObject hpricot_ele_get_encoding(IRubyObject self) {
|
156
|
-
return ((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).op_aref(self.getRuntime().getCurrentContext(), self.getRuntime().newSymbol("encoding"));
|
157
|
-
}
|
158
|
-
|
159
|
-
// H_ATTR(version)
|
160
|
-
public static IRubyObject hpricot_ele_set_version(IRubyObject self, IRubyObject x) {
|
161
|
-
((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).fastASet(self.getRuntime().newSymbol("version"), x);
|
162
|
-
return self;
|
163
|
-
}
|
164
|
-
|
165
|
-
public static IRubyObject hpricot_ele_get_version(IRubyObject self) {
|
166
|
-
return ((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).op_aref(self.getRuntime().getCurrentContext(), self.getRuntime().newSymbol("version"));
|
167
|
-
}
|
168
|
-
|
169
|
-
// H_ATTR(standalone)
|
170
|
-
public static IRubyObject hpricot_ele_set_standalone(IRubyObject self, IRubyObject x) {
|
171
|
-
((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).fastASet(self.getRuntime().newSymbol("standalone"), x);
|
172
|
-
return self;
|
173
|
-
}
|
174
|
-
|
175
|
-
public static IRubyObject hpricot_ele_get_standalone(IRubyObject self) {
|
176
|
-
return ((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).op_aref(self.getRuntime().getCurrentContext(), self.getRuntime().newSymbol("standalone"));
|
177
|
-
}
|
178
|
-
|
179
|
-
// H_ATTR(system_id)
|
180
|
-
public static IRubyObject hpricot_ele_set_system_id(IRubyObject self, IRubyObject x) {
|
181
|
-
((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).fastASet(self.getRuntime().newSymbol("system_id"), x);
|
182
|
-
return self;
|
183
|
-
}
|
184
|
-
|
185
|
-
public static IRubyObject hpricot_ele_get_system_id(IRubyObject self) {
|
186
|
-
return ((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).op_aref(self.getRuntime().getCurrentContext(), self.getRuntime().newSymbol("system_id"));
|
187
|
-
}
|
188
|
-
|
189
|
-
// H_ATTR(public_id)
|
190
|
-
public static IRubyObject hpricot_ele_set_public_id(IRubyObject self, IRubyObject x) {
|
191
|
-
((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).fastASet(self.getRuntime().newSymbol("public_id"), x);
|
192
|
-
return self;
|
193
|
-
}
|
194
|
-
|
195
|
-
public static IRubyObject hpricot_ele_get_public_id(IRubyObject self) {
|
196
|
-
return ((RubyHash)H_ELE_GET(self, H_ELE_ATTR)).op_aref(self.getRuntime().getCurrentContext(), self.getRuntime().newSymbol("public_id"));
|
197
|
-
}
|
198
|
-
|
199
|
-
public static class Scanner {
|
200
|
-
public IRubyObject SET(int mark, int E, IRubyObject org) {
|
201
|
-
if(mark == -1 || E == mark) {
|
202
|
-
return runtime.newString("");
|
203
|
-
} else if(E > mark) {
|
204
|
-
return RubyString.newString(runtime, data, mark, E-mark);
|
205
|
-
} else {
|
206
|
-
return org;
|
207
|
-
}
|
208
|
-
}
|
209
|
-
|
210
|
-
public int SLIDE(int N) {
|
211
|
-
if(N > ts) {
|
212
|
-
return N - ts;
|
213
|
-
} else {
|
214
|
-
return N;
|
215
|
-
}
|
216
|
-
}
|
217
|
-
|
218
|
-
public IRubyObject CAT(IRubyObject N, int mark, int E) {
|
219
|
-
if(N.isNil()) {
|
220
|
-
return SET(mark, E, N);
|
221
|
-
} else {
|
222
|
-
((RubyString)N).cat(data, mark, E-mark);
|
223
|
-
return N;
|
224
|
-
}
|
225
|
-
}
|
226
|
-
|
227
|
-
public void ATTR(IRubyObject K, IRubyObject V) {
|
228
|
-
if(!K.isNil()) {
|
229
|
-
if(attr.isNil()) {
|
230
|
-
attr = RubyHash.newHash(runtime);
|
231
|
-
}
|
232
|
-
((RubyHash)attr).fastASet(K, V);
|
233
|
-
}
|
234
|
-
}
|
235
|
-
|
236
|
-
public void TEXT_PASS() {
|
237
|
-
if(!text) {
|
238
|
-
if(ele_open) {
|
239
|
-
ele_open = false;
|
240
|
-
if(ts != -1) {
|
241
|
-
mark_tag = ts;
|
242
|
-
}
|
243
|
-
} else {
|
244
|
-
mark_tag = p;
|
245
|
-
}
|
246
|
-
attr = runtime.getNil();
|
247
|
-
tag = runtime.getNil();
|
248
|
-
text = true;
|
249
|
-
}
|
250
|
-
}
|
251
|
-
|
252
|
-
public void ELE(IRubyObject N) {
|
253
|
-
if(te > ts || text) {
|
254
|
-
int raw = -1;
|
255
|
-
int rawlen = 0;
|
256
|
-
ele_open = false;
|
257
|
-
text = false;
|
258
|
-
|
259
|
-
if(ts != -1 && N != x.sym_cdata && N != x.sym_text && N != x.sym_procins && N != x.sym_comment) {
|
260
|
-
raw = ts;
|
261
|
-
rawlen = te - ts;
|
262
|
-
}
|
263
|
-
|
264
|
-
if(block.isGiven()) {
|
265
|
-
IRubyObject raw_string = runtime.getNil();
|
266
|
-
if(raw != -1) {
|
267
|
-
raw_string = RubyString.newString(runtime, data, raw, rawlen);
|
268
|
-
}
|
269
|
-
yieldTokens(N, tag, attr, runtime.getNil(), taint);
|
270
|
-
} else {
|
271
|
-
hpricotToken(S, N, tag, attr, raw, rawlen, taint);
|
272
|
-
}
|
273
|
-
}
|
274
|
-
}
|
275
|
-
|
276
|
-
|
277
|
-
public void EBLK(IRubyObject N, int T) {
|
278
|
-
tag = CAT(tag, mark_tag, p - T + 1);
|
279
|
-
ELE(N);
|
280
|
-
}
|
281
|
-
|
282
|
-
public void hpricotAdd(IRubyObject focus, IRubyObject ele) {
|
283
|
-
IRubyObject children = H_ELE_GET(focus, H_ELE_CHILDREN);
|
284
|
-
if(children.isNil()) {
|
285
|
-
H_ELE_SET(focus, H_ELE_CHILDREN, children = RubyArray.newArray(runtime, 1));
|
286
|
-
}
|
287
|
-
((RubyArray)children).append(ele);
|
288
|
-
H_ELE_SET(ele, H_ELE_PARENT, focus);
|
289
|
-
}
|
290
|
-
|
291
|
-
private static class TokenInfo {
|
292
|
-
public IRubyObject sym;
|
293
|
-
public IRubyObject tag;
|
294
|
-
public IRubyObject attr;
|
295
|
-
public int raw;
|
296
|
-
public int rawlen;
|
297
|
-
public IRubyObject ec;
|
298
|
-
public IRubyObject ele;
|
299
|
-
public Extra x;
|
300
|
-
public Ruby runtime;
|
301
|
-
public Scanner scanner;
|
302
|
-
public State S;
|
303
|
-
|
304
|
-
public void H_ELE(RubyClass klass) {
|
305
|
-
ele = klass.allocate();
|
306
|
-
if(klass == x.cElem) {
|
307
|
-
H_ELE_SET(ele, H_ELE_TAG, tag);
|
308
|
-
H_ELE_SET(ele, H_ELE_ATTR, attr);
|
309
|
-
H_ELE_SET(ele, H_ELE_EC, ec);
|
310
|
-
if(raw != -1 && (sym == x.sym_emptytag || sym == x.sym_stag || sym == x.sym_doctype)) {
|
311
|
-
H_ELE_SET(ele, H_ELE_RAW, RubyString.newString(runtime, scanner.data, raw, rawlen));
|
312
|
-
}
|
313
|
-
} else if(klass == x.cDocType || klass == x.cProcIns || klass == x.cXMLDecl || klass == x.cBogusETag) {
|
314
|
-
if(klass == x.cBogusETag) {
|
315
|
-
H_ELE_SET(ele, H_ELE_TAG, tag);
|
316
|
-
if(raw != -1) {
|
317
|
-
H_ELE_SET(ele, H_ELE_ATTR, RubyString.newString(runtime, scanner.data, raw, rawlen));
|
318
|
-
}
|
319
|
-
} else {
|
320
|
-
if(klass == x.cDocType) {
|
321
|
-
scanner.ATTR(runtime.newSymbol("target"), tag);
|
322
|
-
}
|
323
|
-
H_ELE_SET(ele, H_ELE_ATTR, attr);
|
324
|
-
if(klass != x.cProcIns) {
|
325
|
-
tag = runtime.getNil();
|
326
|
-
if(raw != -1) {
|
327
|
-
tag = RubyString.newString(runtime, scanner.data, raw, rawlen);
|
328
|
-
}
|
329
|
-
}
|
330
|
-
H_ELE_SET(ele, H_ELE_TAG, tag);
|
331
|
-
}
|
332
|
-
} else {
|
333
|
-
H_ELE_SET(ele, H_ELE_TAG, tag);
|
334
|
-
}
|
335
|
-
S.last = ele;
|
336
|
-
}
|
337
|
-
|
338
|
-
public void hpricotToken(boolean taint) {
|
339
|
-
//
|
340
|
-
// in html mode, fix up start tags incorrectly formed as empty tags
|
341
|
-
//
|
342
|
-
if(!S.xml) {
|
343
|
-
if(sym == x.sym_emptytag || sym == x.sym_stag || sym == x.sym_etag) {
|
344
|
-
ec = ((RubyHash)S.EC).op_aref(scanner.ctx, tag);
|
345
|
-
if(ec.isNil()) {
|
346
|
-
tag = tag.callMethod(scanner.ctx, "downcase");
|
347
|
-
ec = ((RubyHash)S.EC).op_aref(scanner.ctx, tag);
|
348
|
-
}
|
349
|
-
}
|
350
|
-
|
351
|
-
if(H_ELE_GET(S.focus, H_ELE_EC) == x.sym_CDATA &&
|
352
|
-
(sym != x.sym_procins && sym != x.sym_comment && sym != x.sym_cdata && sym != x.sym_text) &&
|
353
|
-
!(sym == x.sym_etag && runtime.newFixnum(tag.hashCode()).equals(H_ELE_GET(S.focus, H_ELE_HASH)))) {
|
354
|
-
sym = x.sym_text;
|
355
|
-
tag = RubyString.newString(runtime, scanner.data, raw, rawlen);
|
356
|
-
}
|
357
|
-
|
358
|
-
if(!ec.isNil()) {
|
359
|
-
if(sym == x.sym_emptytag) {
|
360
|
-
if(ec != x.sym_EMPTY) {
|
361
|
-
sym = x.sym_stag;
|
362
|
-
}
|
363
|
-
} else if(sym == x.sym_stag) {
|
364
|
-
if(ec == x.sym_EMPTY) {
|
365
|
-
sym = x.sym_emptytag;
|
366
|
-
}
|
367
|
-
}
|
368
|
-
}
|
369
|
-
}
|
370
|
-
|
371
|
-
if(sym == x.sym_emptytag || sym == x.sym_stag) {
|
372
|
-
IRubyObject name = runtime.newFixnum(tag.hashCode());
|
373
|
-
H_ELE(x.cElem);
|
374
|
-
H_ELE_SET(ele, H_ELE_HASH, name);
|
375
|
-
|
376
|
-
if(!S.xml) {
|
377
|
-
IRubyObject match = runtime.getNil(), e = S.focus;
|
378
|
-
while(e != S.doc) {
|
379
|
-
IRubyObject hEC = H_ELE_GET(e, H_ELE_EC);
|
380
|
-
if(hEC instanceof RubyHash) {
|
381
|
-
IRubyObject has = ((RubyHash)hEC).op_aref(scanner.ctx, name);
|
382
|
-
if(!has.isNil()) {
|
383
|
-
if(has == runtime.getTrue()) {
|
384
|
-
if(match.isNil()) {
|
385
|
-
match = e;
|
386
|
-
}
|
387
|
-
} else if(has == x.symAllow) {
|
388
|
-
match = S.focus;
|
389
|
-
} else if(has == x.symDeny) {
|
390
|
-
match = runtime.getNil();
|
391
|
-
}
|
392
|
-
}
|
393
|
-
}
|
394
|
-
e = H_ELE_GET(e, H_ELE_PARENT);
|
395
|
-
}
|
396
|
-
|
397
|
-
if(match.isNil()) {
|
398
|
-
match = S.focus;
|
399
|
-
}
|
400
|
-
S.focus = match;
|
401
|
-
}
|
402
|
-
|
403
|
-
scanner.hpricotAdd(S.focus, ele);
|
404
|
-
|
405
|
-
//
|
406
|
-
// in the case of a start tag that should be empty, just
|
407
|
-
// skip the step that focuses the element. focusing moves
|
408
|
-
// us deeper into the document.
|
409
|
-
//
|
410
|
-
if(sym == x.sym_stag) {
|
411
|
-
if(S.xml || ec != x.sym_EMPTY) {
|
412
|
-
S.focus = ele;
|
413
|
-
S.last = runtime.getNil();
|
414
|
-
}
|
415
|
-
}
|
416
|
-
} else if(sym == x.sym_etag) {
|
417
|
-
IRubyObject name, match = runtime.getNil(), e = S.focus;
|
418
|
-
if(S.strict) {
|
419
|
-
if(((RubyHash)S.EC).op_aref(scanner.ctx, tag).isNil()) {
|
420
|
-
tag = runtime.newString("div");
|
421
|
-
}
|
422
|
-
}
|
423
|
-
|
424
|
-
name = runtime.newFixnum(tag.hashCode());
|
425
|
-
while(e != S.doc) {
|
426
|
-
if(H_ELE_GET(e, H_ELE_HASH).equals(name)) {
|
427
|
-
match = e;
|
428
|
-
break;
|
429
|
-
}
|
430
|
-
e = H_ELE_GET(e, H_ELE_PARENT);
|
431
|
-
|
432
|
-
}
|
433
|
-
if(match.isNil()) {
|
434
|
-
H_ELE(x.cBogusETag);
|
435
|
-
scanner.hpricotAdd(S.focus, ele);
|
436
|
-
} else {
|
437
|
-
ele = runtime.getNil();
|
438
|
-
if(raw != -1) {
|
439
|
-
ele = RubyString.newString(runtime, scanner.data, raw, rawlen);
|
440
|
-
}
|
441
|
-
H_ELE_SET(match, H_ELE_ETAG, ele);
|
442
|
-
S.focus = H_ELE_GET(match, H_ELE_PARENT);
|
443
|
-
S.last = runtime.getNil();
|
444
|
-
|
445
|
-
}
|
446
|
-
} else if(sym == x.sym_cdata) {
|
447
|
-
H_ELE(x.cCData);
|
448
|
-
scanner.hpricotAdd(S.focus, ele);
|
449
|
-
} else if(sym == x.sym_comment) {
|
450
|
-
H_ELE(x.cComment);
|
451
|
-
scanner.hpricotAdd(S.focus, ele);
|
452
|
-
} else if(sym == x.sym_doctype) {
|
453
|
-
H_ELE(x.cDocType);
|
454
|
-
if(S.strict) {
|
455
|
-
RubyHash h = (RubyHash)attr;
|
456
|
-
h.fastASet(runtime.newSymbol("system_id"), runtime.newString("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"));
|
457
|
-
h.fastASet(runtime.newSymbol("public_id"), runtime.newString("-//W3C//DTD XHTML 1.0 Strict//EN"));
|
458
|
-
}
|
459
|
-
scanner.hpricotAdd(S.focus, ele);
|
460
|
-
} else if(sym == x.sym_procins) {
|
461
|
-
IRubyObject match = tag.callMethod(scanner.ctx, "match", x.reProcInsParse);
|
462
|
-
tag = RubyRegexp.nth_match(1, match);
|
463
|
-
attr = RubyRegexp.nth_match(2, match);
|
464
|
-
H_ELE(x.cProcIns);
|
465
|
-
scanner.hpricotAdd(S.focus, ele);
|
466
|
-
} else if(sym == x.sym_text) {
|
467
|
-
if(!S.last.isNil() && S.last.getType() == x.cText) {
|
468
|
-
((RubyString)H_ELE_GET(S.last, H_ELE_TAG)).append(tag);
|
469
|
-
} else {
|
470
|
-
H_ELE(x.cText);
|
471
|
-
scanner.hpricotAdd(S.focus, ele);
|
472
|
-
}
|
473
|
-
} else if(sym == x.sym_xmldecl) {
|
474
|
-
H_ELE(x.cXMLDecl);
|
475
|
-
scanner.hpricotAdd(S.focus, ele);
|
476
|
-
}
|
477
|
-
}
|
478
|
-
}
|
479
|
-
|
480
|
-
public void hpricotToken(State S, IRubyObject _sym, IRubyObject _tag, IRubyObject _attr, int _raw, int _rawlen, boolean taint) {
|
481
|
-
TokenInfo t = new TokenInfo();
|
482
|
-
t.sym = _sym;
|
483
|
-
t.tag = _tag;
|
484
|
-
t.attr = _attr;
|
485
|
-
t.raw = _raw;
|
486
|
-
t.rawlen = _rawlen;
|
487
|
-
t.ec = runtime.getNil();
|
488
|
-
t.ele = runtime.getNil();
|
489
|
-
t.x = x;
|
490
|
-
t.runtime = runtime;
|
491
|
-
t.scanner = this;
|
492
|
-
t.S = S;
|
493
|
-
|
494
|
-
t.hpricotToken(taint);
|
495
|
-
}
|
496
|
-
|
497
|
-
public void yieldTokens(IRubyObject sym, IRubyObject tag, IRubyObject attr, IRubyObject raw, boolean taint) {
|
498
|
-
if(sym == x.sym_text) {
|
499
|
-
raw = tag;
|
500
|
-
}
|
501
|
-
IRubyObject ary = RubyArray.newArrayNoCopy(runtime, new IRubyObject[]{sym, tag, attr, raw});
|
502
|
-
if(taint) {
|
503
|
-
ary.setTaint(true);
|
504
|
-
tag.setTaint(true);
|
505
|
-
attr.setTaint(true);
|
506
|
-
raw.setTaint(true);
|
507
|
-
}
|
508
|
-
|
509
|
-
block.yield(ctx, ary);
|
510
|
-
}
|
511
|
-
|
512
|
-
// line 561 "hpricot_scan.java.rl"
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
// line 517 "HpricotScanService.java"
|
517
|
-
private static byte[] init__hpricot_scan_actions_0()
|
518
|
-
{
|
519
|
-
return new byte [] {
|
520
|
-
0, 1, 1, 1, 2, 1, 4, 1, 5, 1, 6, 1,
|
521
|
-
7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1,
|
522
|
-
14, 1, 16, 1, 20, 1, 21, 1, 22, 1, 24, 1,
|
523
|
-
25, 1, 26, 1, 28, 1, 29, 1, 30, 1, 32, 1,
|
524
|
-
33, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 1,
|
525
|
-
43, 1, 44, 1, 45, 1, 46, 1, 47, 1, 48, 1,
|
526
|
-
49, 1, 50, 1, 51, 2, 2, 5, 2, 2, 6, 2,
|
527
|
-
2, 11, 2, 2, 12, 2, 2, 14, 2, 4, 39, 2,
|
528
|
-
4, 40, 2, 4, 41, 2, 5, 2, 2, 6, 14, 2,
|
529
|
-
7, 6, 2, 7, 14, 2, 11, 12, 2, 13, 3, 2,
|
530
|
-
14, 6, 2, 14, 40, 2, 15, 24, 2, 15, 28, 2,
|
531
|
-
15, 32, 2, 15, 45, 2, 17, 23, 2, 18, 27, 2,
|
532
|
-
19, 31, 2, 22, 34, 2, 22, 36, 3, 2, 6, 14,
|
533
|
-
3, 2, 14, 6, 3, 6, 7, 14, 3, 6, 14, 40,
|
534
|
-
3, 7, 14, 40, 3, 11, 2, 12, 3, 14, 6, 40,
|
535
|
-
3, 14, 13, 3, 3, 22, 0, 37, 3, 22, 2, 34,
|
536
|
-
3, 22, 14, 35, 4, 2, 14, 13, 3, 4, 6, 7,
|
537
|
-
14, 40, 4, 22, 2, 14, 35, 4, 22, 6, 14, 35,
|
538
|
-
4, 22, 7, 14, 35, 4, 22, 14, 6, 35, 5, 22,
|
539
|
-
2, 6, 14, 35, 5, 22, 2, 14, 6, 35, 5, 22,
|
540
|
-
6, 7, 14, 35
|
541
|
-
};
|
542
|
-
}
|
543
|
-
|
544
|
-
private static final byte _hpricot_scan_actions[] = init__hpricot_scan_actions_0();
|
545
|
-
|
546
|
-
|
547
|
-
private static short[] init__hpricot_scan_key_offsets_0()
|
548
|
-
{
|
549
|
-
return new short [] {
|
550
|
-
0, 3, 4, 5, 6, 7, 8, 9, 10, 13, 22, 37,
|
551
|
-
44, 45, 46, 47, 48, 49, 52, 57, 69, 81, 86, 93,
|
552
|
-
94, 95, 100, 101, 105, 106, 107, 121, 135, 152, 169, 186,
|
553
|
-
203, 210, 212, 214, 220, 222, 227, 232, 238, 240, 245, 251,
|
554
|
-
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
|
555
|
-
282, 296, 300, 313, 326, 340, 354, 355, 366, 375, 388, 405,
|
556
|
-
423, 441, 450, 461, 480, 499, 510, 521, 536, 538, 540, 556,
|
557
|
-
572, 575, 587, 599, 619, 639, 658, 677, 697, 717, 728, 739,
|
558
|
-
751, 763, 775, 791, 794, 809, 811, 813, 829, 845, 848, 860,
|
559
|
-
871, 890, 910, 930, 941, 952, 964, 984, 1004, 1016, 1036, 1057,
|
560
|
-
1074, 1091, 1095, 1098, 1110, 1122, 1142, 1162, 1182, 1194, 1206, 1226,
|
561
|
-
1242, 1258, 1270, 1291, 1310, 1313, 1328, 1340, 1355, 1358, 1369, 1371,
|
562
|
-
1373, 1384, 1391, 1404, 1418, 1432, 1445, 1446, 1447, 1448, 1449, 1450,
|
563
|
-
1451, 1455, 1460, 1469, 1479, 1484, 1491, 1492, 1493, 1494, 1495, 1496,
|
564
|
-
1497, 1498, 1499, 1503, 1508, 1512, 1522, 1527, 1533, 1534, 1535, 1536,
|
565
|
-
1537, 1538, 1539, 1540, 1541, 1542, 1546, 1551, 1553, 1554, 1555, 1560,
|
566
|
-
1561, 1562, 1564, 1565, 1566, 1567, 1568, 1572, 1582, 1591, 1601, 1602,
|
567
|
-
1603, 1605, 1614, 1615, 1616, 1617, 1619, 1621, 1624, 1627, 1631, 1633,
|
568
|
-
1634, 1636, 1637, 1640
|
569
|
-
};
|
570
|
-
}
|
571
|
-
|
572
|
-
private static final short _hpricot_scan_key_offsets[] = init__hpricot_scan_key_offsets_0();
|
573
|
-
|
574
|
-
|
575
|
-
private static char[] init__hpricot_scan_trans_keys_0()
|
576
|
-
{
|
577
|
-
return new char [] {
|
578
|
-
45, 68, 91, 45, 79, 67, 84, 89, 80, 69, 32, 9,
|
579
|
-
13, 32, 58, 95, 9, 13, 65, 90, 97, 122, 32, 62,
|
580
|
-
63, 91, 95, 9, 13, 45, 46, 48, 58, 65, 90, 97,
|
581
|
-
122, 32, 62, 80, 83, 91, 9, 13, 85, 66, 76, 73,
|
582
|
-
67, 32, 9, 13, 32, 34, 39, 9, 13, 9, 34, 61,
|
583
|
-
95, 32, 37, 39, 59, 63, 90, 97, 122, 9, 34, 61,
|
584
|
-
95, 32, 37, 39, 59, 63, 90, 97, 122, 32, 62, 91,
|
585
|
-
9, 13, 32, 34, 39, 62, 91, 9, 13, 34, 34, 32,
|
586
|
-
62, 91, 9, 13, 93, 32, 62, 9, 13, 39, 39, 9,
|
587
|
-
39, 61, 95, 32, 33, 35, 37, 40, 59, 63, 90, 97,
|
588
|
-
122, 9, 39, 61, 95, 32, 33, 35, 37, 40, 59, 63,
|
589
|
-
90, 97, 122, 9, 32, 33, 39, 62, 91, 95, 10, 13,
|
590
|
-
35, 37, 40, 59, 61, 90, 97, 122, 9, 32, 34, 39,
|
591
|
-
62, 91, 95, 10, 13, 33, 37, 40, 59, 61, 90, 97,
|
592
|
-
122, 9, 32, 33, 39, 62, 91, 95, 10, 13, 35, 37,
|
593
|
-
40, 59, 61, 90, 97, 122, 9, 32, 34, 39, 62, 91,
|
594
|
-
95, 10, 13, 33, 37, 40, 59, 61, 90, 97, 122, 32,
|
595
|
-
34, 39, 62, 91, 9, 13, 34, 39, 34, 39, 32, 39,
|
596
|
-
62, 91, 9, 13, 39, 93, 32, 62, 93, 9, 13, 32,
|
597
|
-
39, 62, 9, 13, 32, 34, 62, 91, 9, 13, 34, 93,
|
598
|
-
32, 34, 62, 9, 13, 32, 39, 62, 91, 9, 13, 9,
|
599
|
-
39, 61, 95, 32, 33, 35, 37, 40, 59, 63, 90, 97,
|
600
|
-
122, 89, 83, 84, 69, 77, 67, 68, 65, 84, 65, 91,
|
601
|
-
58, 95, 65, 90, 97, 122, 32, 62, 63, 95, 9, 13,
|
602
|
-
45, 46, 48, 58, 65, 90, 97, 122, 32, 62, 9, 13,
|
603
|
-
32, 47, 62, 63, 95, 9, 13, 45, 58, 65, 90, 97,
|
604
|
-
122, 32, 47, 62, 63, 95, 9, 13, 45, 58, 65, 90,
|
605
|
-
97, 122, 32, 47, 61, 62, 63, 95, 9, 13, 45, 58,
|
606
|
-
65, 90, 97, 122, 32, 47, 61, 62, 63, 95, 9, 13,
|
607
|
-
45, 58, 65, 90, 97, 122, 62, 13, 32, 34, 39, 47,
|
608
|
-
60, 62, 9, 10, 11, 12, 13, 32, 47, 60, 62, 9,
|
609
|
-
10, 11, 12, 32, 47, 62, 63, 95, 9, 13, 45, 58,
|
610
|
-
65, 90, 97, 122, 13, 32, 47, 60, 62, 63, 95, 9,
|
611
|
-
10, 11, 12, 45, 58, 65, 90, 97, 122, 13, 32, 47,
|
612
|
-
60, 61, 62, 63, 95, 9, 10, 11, 12, 45, 58, 65,
|
613
|
-
90, 97, 122, 13, 32, 47, 60, 61, 62, 63, 95, 9,
|
614
|
-
10, 11, 12, 45, 58, 65, 90, 97, 122, 13, 32, 47,
|
615
|
-
60, 62, 9, 10, 11, 12, 13, 32, 34, 39, 47, 60,
|
616
|
-
62, 9, 10, 11, 12, 13, 32, 34, 39, 47, 60, 62,
|
617
|
-
63, 95, 9, 10, 11, 12, 45, 58, 65, 90, 97, 122,
|
618
|
-
13, 32, 34, 39, 47, 60, 62, 63, 95, 9, 10, 11,
|
619
|
-
12, 45, 58, 65, 90, 97, 122, 13, 32, 34, 47, 60,
|
620
|
-
62, 92, 9, 10, 11, 12, 13, 32, 34, 47, 60, 62,
|
621
|
-
92, 9, 10, 11, 12, 32, 34, 47, 62, 63, 92, 95,
|
622
|
-
9, 13, 45, 58, 65, 90, 97, 122, 34, 92, 34, 92,
|
623
|
-
32, 34, 47, 61, 62, 63, 92, 95, 9, 13, 45, 58,
|
624
|
-
65, 90, 97, 122, 32, 34, 47, 61, 62, 63, 92, 95,
|
625
|
-
9, 13, 45, 58, 65, 90, 97, 122, 34, 62, 92, 13,
|
626
|
-
32, 34, 39, 47, 60, 62, 92, 9, 10, 11, 12, 13,
|
627
|
-
32, 34, 39, 47, 60, 62, 92, 9, 10, 11, 12, 13,
|
628
|
-
32, 34, 39, 47, 60, 62, 63, 92, 95, 9, 10, 11,
|
629
|
-
12, 45, 58, 65, 90, 97, 122, 13, 32, 34, 39, 47,
|
630
|
-
60, 62, 63, 92, 95, 9, 10, 11, 12, 45, 58, 65,
|
631
|
-
90, 97, 122, 13, 32, 34, 47, 60, 62, 63, 92, 95,
|
632
|
-
9, 10, 11, 12, 45, 58, 65, 90, 97, 122, 13, 32,
|
633
|
-
34, 47, 60, 62, 63, 92, 95, 9, 10, 11, 12, 45,
|
634
|
-
58, 65, 90, 97, 122, 13, 32, 34, 47, 60, 61, 62,
|
635
|
-
63, 92, 95, 9, 10, 11, 12, 45, 58, 65, 90, 97,
|
636
|
-
122, 13, 32, 34, 47, 60, 61, 62, 63, 92, 95, 9,
|
637
|
-
10, 11, 12, 45, 58, 65, 90, 97, 122, 13, 32, 34,
|
638
|
-
47, 60, 62, 92, 9, 10, 11, 12, 13, 32, 34, 47,
|
639
|
-
60, 62, 92, 9, 10, 11, 12, 13, 32, 34, 39, 47,
|
640
|
-
60, 62, 92, 9, 10, 11, 12, 13, 32, 34, 39, 47,
|
641
|
-
60, 62, 92, 9, 10, 11, 12, 13, 32, 34, 39, 47,
|
642
|
-
60, 62, 92, 9, 10, 11, 12, 32, 34, 39, 47, 62,
|
643
|
-
63, 92, 95, 9, 13, 45, 58, 65, 90, 97, 122, 34,
|
644
|
-
39, 92, 32, 39, 47, 62, 63, 92, 95, 9, 13, 45,
|
645
|
-
58, 65, 90, 97, 122, 39, 92, 39, 92, 32, 39, 47,
|
646
|
-
61, 62, 63, 92, 95, 9, 13, 45, 58, 65, 90, 97,
|
647
|
-
122, 32, 39, 47, 61, 62, 63, 92, 95, 9, 13, 45,
|
648
|
-
58, 65, 90, 97, 122, 39, 62, 92, 13, 32, 34, 39,
|
649
|
-
47, 60, 62, 92, 9, 10, 11, 12, 13, 32, 39, 47,
|
650
|
-
60, 62, 92, 9, 10, 11, 12, 13, 32, 39, 47, 60,
|
651
|
-
62, 63, 92, 95, 9, 10, 11, 12, 45, 58, 65, 90,
|
652
|
-
97, 122, 13, 32, 39, 47, 60, 61, 62, 63, 92, 95,
|
653
|
-
9, 10, 11, 12, 45, 58, 65, 90, 97, 122, 13, 32,
|
654
|
-
39, 47, 60, 61, 62, 63, 92, 95, 9, 10, 11, 12,
|
655
|
-
45, 58, 65, 90, 97, 122, 13, 32, 39, 47, 60, 62,
|
656
|
-
92, 9, 10, 11, 12, 13, 32, 39, 47, 60, 62, 92,
|
657
|
-
9, 10, 11, 12, 13, 32, 34, 39, 47, 60, 62, 92,
|
658
|
-
9, 10, 11, 12, 13, 32, 34, 39, 47, 60, 62, 63,
|
659
|
-
92, 95, 9, 10, 11, 12, 45, 58, 65, 90, 97, 122,
|
660
|
-
13, 32, 34, 39, 47, 60, 62, 63, 92, 95, 9, 10,
|
661
|
-
11, 12, 45, 58, 65, 90, 97, 122, 13, 32, 34, 39,
|
662
|
-
47, 60, 62, 92, 9, 10, 11, 12, 13, 32, 34, 39,
|
663
|
-
47, 60, 62, 63, 92, 95, 9, 10, 11, 12, 45, 58,
|
664
|
-
65, 90, 97, 122, 13, 32, 34, 39, 47, 60, 61, 62,
|
665
|
-
63, 92, 95, 9, 10, 11, 12, 45, 58, 65, 90, 97,
|
666
|
-
122, 32, 34, 39, 47, 61, 62, 63, 92, 95, 9, 13,
|
667
|
-
45, 58, 65, 90, 97, 122, 32, 34, 39, 47, 61, 62,
|
668
|
-
63, 92, 95, 9, 13, 45, 58, 65, 90, 97, 122, 34,
|
669
|
-
39, 62, 92, 34, 39, 92, 13, 32, 34, 39, 47, 60,
|
670
|
-
62, 92, 9, 10, 11, 12, 13, 32, 34, 39, 47, 60,
|
671
|
-
62, 92, 9, 10, 11, 12, 13, 32, 34, 39, 47, 60,
|
672
|
-
62, 63, 92, 95, 9, 10, 11, 12, 45, 58, 65, 90,
|
673
|
-
97, 122, 13, 32, 34, 39, 47, 60, 62, 63, 92, 95,
|
674
|
-
9, 10, 11, 12, 45, 58, 65, 90, 97, 122, 13, 32,
|
675
|
-
34, 39, 47, 60, 62, 63, 92, 95, 9, 10, 11, 12,
|
676
|
-
45, 58, 65, 90, 97, 122, 13, 32, 34, 39, 47, 60,
|
677
|
-
62, 92, 9, 10, 11, 12, 13, 32, 34, 39, 47, 60,
|
678
|
-
62, 92, 9, 10, 11, 12, 13, 32, 34, 39, 47, 60,
|
679
|
-
62, 63, 92, 95, 9, 10, 11, 12, 45, 58, 65, 90,
|
680
|
-
97, 122, 32, 34, 39, 47, 62, 63, 92, 95, 9, 13,
|
681
|
-
45, 58, 65, 90, 97, 122, 32, 34, 39, 47, 62, 63,
|
682
|
-
92, 95, 9, 13, 45, 58, 65, 90, 97, 122, 13, 32,
|
683
|
-
34, 39, 47, 60, 62, 92, 9, 10, 11, 12, 13, 32,
|
684
|
-
34, 39, 47, 60, 61, 62, 63, 92, 95, 9, 10, 11,
|
685
|
-
12, 45, 58, 65, 90, 97, 122, 13, 32, 39, 47, 60,
|
686
|
-
62, 63, 92, 95, 9, 10, 11, 12, 45, 58, 65, 90,
|
687
|
-
97, 122, 34, 39, 92, 32, 39, 47, 62, 63, 92, 95,
|
688
|
-
9, 13, 45, 58, 65, 90, 97, 122, 13, 32, 34, 39,
|
689
|
-
47, 60, 62, 92, 9, 10, 11, 12, 32, 34, 47, 62,
|
690
|
-
63, 92, 95, 9, 13, 45, 58, 65, 90, 97, 122, 34,
|
691
|
-
39, 92, 13, 32, 39, 47, 60, 62, 92, 9, 10, 11,
|
692
|
-
12, 34, 92, 39, 92, 13, 32, 34, 39, 47, 60, 62,
|
693
|
-
9, 10, 11, 12, 58, 95, 120, 65, 90, 97, 122, 32,
|
694
|
-
63, 95, 9, 13, 45, 46, 48, 58, 65, 90, 97, 122,
|
695
|
-
32, 63, 95, 109, 9, 13, 45, 46, 48, 58, 65, 90,
|
696
|
-
97, 122, 32, 63, 95, 108, 9, 13, 45, 46, 48, 58,
|
697
|
-
65, 90, 97, 122, 32, 63, 95, 9, 13, 45, 46, 48,
|
698
|
-
58, 65, 90, 97, 122, 101, 114, 115, 105, 111, 110, 32,
|
699
|
-
61, 9, 13, 32, 34, 39, 9, 13, 95, 45, 46, 48,
|
700
|
-
58, 65, 90, 97, 122, 34, 95, 45, 46, 48, 58, 65,
|
701
|
-
90, 97, 122, 32, 62, 63, 9, 13, 32, 62, 63, 101,
|
702
|
-
115, 9, 13, 62, 110, 99, 111, 100, 105, 110, 103, 32,
|
703
|
-
61, 9, 13, 32, 34, 39, 9, 13, 65, 90, 97, 122,
|
704
|
-
34, 95, 45, 46, 48, 57, 65, 90, 97, 122, 32, 62,
|
705
|
-
63, 9, 13, 32, 62, 63, 115, 9, 13, 116, 97, 110,
|
706
|
-
100, 97, 108, 111, 110, 101, 32, 61, 9, 13, 32, 34,
|
707
|
-
39, 9, 13, 110, 121, 111, 34, 32, 62, 63, 9, 13,
|
708
|
-
101, 115, 110, 121, 111, 39, 101, 115, 65, 90, 97, 122,
|
709
|
-
39, 95, 45, 46, 48, 57, 65, 90, 97, 122, 95, 45,
|
710
|
-
46, 48, 58, 65, 90, 97, 122, 39, 95, 45, 46, 48,
|
711
|
-
58, 65, 90, 97, 122, 62, 62, 10, 60, 33, 47, 58,
|
712
|
-
63, 95, 65, 90, 97, 122, 39, 93, 34, 34, 92, 39,
|
713
|
-
92, 34, 39, 92, 32, 9, 13, 32, 118, 9, 13, 10,
|
714
|
-
45, 45, 10, 93, 93, 10, 62, 63, 62, 0
|
715
|
-
};
|
716
|
-
}
|
717
|
-
|
718
|
-
private static final char _hpricot_scan_trans_keys[] = init__hpricot_scan_trans_keys_0();
|
719
|
-
|
720
|
-
|
721
|
-
private static byte[] init__hpricot_scan_single_lengths_0()
|
722
|
-
{
|
723
|
-
return new byte [] {
|
724
|
-
3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5,
|
725
|
-
1, 1, 1, 1, 1, 1, 3, 4, 4, 3, 5, 1,
|
726
|
-
1, 3, 1, 2, 1, 1, 4, 4, 7, 7, 7, 7,
|
727
|
-
5, 2, 2, 4, 2, 3, 3, 4, 2, 3, 4, 4,
|
728
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
|
729
|
-
4, 2, 5, 5, 6, 6, 1, 7, 5, 5, 7, 8,
|
730
|
-
8, 5, 7, 9, 9, 7, 7, 7, 2, 2, 8, 8,
|
731
|
-
3, 8, 8, 10, 10, 9, 9, 10, 10, 7, 7, 8,
|
732
|
-
8, 8, 8, 3, 7, 2, 2, 8, 8, 3, 8, 7,
|
733
|
-
9, 10, 10, 7, 7, 8, 10, 10, 8, 10, 11, 9,
|
734
|
-
9, 4, 3, 8, 8, 10, 10, 10, 8, 8, 10, 8,
|
735
|
-
8, 8, 11, 9, 3, 7, 8, 7, 3, 7, 2, 2,
|
736
|
-
7, 3, 3, 4, 4, 3, 1, 1, 1, 1, 1, 1,
|
737
|
-
2, 3, 1, 2, 3, 5, 1, 1, 1, 1, 1, 1,
|
738
|
-
1, 1, 2, 3, 0, 2, 3, 4, 1, 1, 1, 1,
|
739
|
-
1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 1,
|
740
|
-
1, 2, 1, 1, 1, 1, 0, 2, 1, 2, 1, 1,
|
741
|
-
2, 5, 1, 1, 1, 2, 2, 3, 1, 2, 2, 1,
|
742
|
-
2, 1, 3, 1
|
743
|
-
};
|
744
|
-
}
|
745
|
-
|
746
|
-
private static final byte _hpricot_scan_single_lengths[] = init__hpricot_scan_single_lengths_0();
|
747
|
-
|
748
|
-
|
749
|
-
private static byte[] init__hpricot_scan_range_lengths_0()
|
750
|
-
{
|
751
|
-
return new byte [] {
|
752
|
-
0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 5, 1,
|
753
|
-
0, 0, 0, 0, 0, 1, 1, 4, 4, 1, 1, 0,
|
754
|
-
0, 1, 0, 1, 0, 0, 5, 5, 5, 5, 5, 5,
|
755
|
-
1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 5,
|
756
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
|
757
|
-
5, 1, 4, 4, 4, 4, 0, 2, 2, 4, 5, 5,
|
758
|
-
5, 2, 2, 5, 5, 2, 2, 4, 0, 0, 4, 4,
|
759
|
-
0, 2, 2, 5, 5, 5, 5, 5, 5, 2, 2, 2,
|
760
|
-
2, 2, 4, 0, 4, 0, 0, 4, 4, 0, 2, 2,
|
761
|
-
5, 5, 5, 2, 2, 2, 5, 5, 2, 5, 5, 4,
|
762
|
-
4, 0, 0, 2, 2, 5, 5, 5, 2, 2, 5, 4,
|
763
|
-
4, 2, 5, 5, 0, 4, 2, 4, 0, 2, 0, 0,
|
764
|
-
2, 2, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
|
765
|
-
1, 1, 4, 4, 1, 1, 0, 0, 0, 0, 0, 0,
|
766
|
-
0, 0, 1, 1, 2, 4, 1, 1, 0, 0, 0, 0,
|
767
|
-
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0,
|
768
|
-
0, 0, 0, 0, 0, 0, 2, 4, 4, 4, 0, 0,
|
769
|
-
0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
|
770
|
-
0, 0, 0, 0
|
771
|
-
};
|
772
|
-
}
|
773
|
-
|
774
|
-
private static final byte _hpricot_scan_range_lengths[] = init__hpricot_scan_range_lengths_0();
|
775
|
-
|
776
|
-
|
777
|
-
private static short[] init__hpricot_scan_index_offsets_0()
|
778
|
-
{
|
779
|
-
return new short [] {
|
780
|
-
0, 4, 6, 8, 10, 12, 14, 16, 18, 21, 28, 39,
|
781
|
-
46, 48, 50, 52, 54, 56, 59, 64, 73, 82, 87, 94,
|
782
|
-
96, 98, 103, 105, 109, 111, 113, 123, 133, 146, 159, 172,
|
783
|
-
185, 192, 195, 198, 204, 207, 212, 217, 223, 226, 231, 237,
|
784
|
-
247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269,
|
785
|
-
274, 284, 288, 298, 308, 319, 330, 332, 342, 350, 360, 373,
|
786
|
-
387, 401, 409, 419, 434, 449, 459, 469, 481, 484, 487, 500,
|
787
|
-
513, 517, 528, 539, 555, 571, 586, 601, 617, 633, 643, 653,
|
788
|
-
664, 675, 686, 699, 703, 715, 718, 721, 734, 747, 751, 762,
|
789
|
-
772, 787, 803, 819, 829, 839, 850, 866, 882, 893, 909, 926,
|
790
|
-
940, 954, 959, 963, 974, 985, 1001, 1017, 1033, 1044, 1055, 1071,
|
791
|
-
1084, 1097, 1108, 1125, 1140, 1144, 1156, 1167, 1179, 1183, 1193, 1196,
|
792
|
-
1199, 1209, 1215, 1224, 1234, 1244, 1253, 1255, 1257, 1259, 1261, 1263,
|
793
|
-
1265, 1269, 1274, 1280, 1287, 1292, 1299, 1301, 1303, 1305, 1307, 1309,
|
794
|
-
1311, 1313, 1315, 1319, 1324, 1327, 1334, 1339, 1345, 1347, 1349, 1351,
|
795
|
-
1353, 1355, 1357, 1359, 1361, 1363, 1367, 1372, 1375, 1377, 1379, 1384,
|
796
|
-
1386, 1388, 1391, 1393, 1395, 1397, 1399, 1402, 1409, 1415, 1422, 1424,
|
797
|
-
1426, 1429, 1437, 1439, 1441, 1443, 1446, 1449, 1453, 1456, 1460, 1463,
|
798
|
-
1465, 1468, 1470, 1474
|
799
|
-
};
|
800
|
-
}
|
801
|
-
|
802
|
-
private static final short _hpricot_scan_index_offsets[] = init__hpricot_scan_index_offsets_0();
|
803
|
-
|
804
|
-
|
805
|
-
private static short[] init__hpricot_scan_indicies_0()
|
806
|
-
{
|
807
|
-
return new short [] {
|
808
|
-
1, 2, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0,
|
809
|
-
8, 0, 9, 0, 10, 0, 11, 11, 0, 11, 12, 12,
|
810
|
-
11, 12, 12, 0, 13, 15, 14, 16, 14, 13, 14, 14,
|
811
|
-
14, 14, 0, 17, 18, 19, 20, 21, 17, 0, 22, 0,
|
812
|
-
23, 0, 24, 0, 25, 0, 26, 0, 27, 27, 0, 27,
|
813
|
-
28, 29, 27, 0, 30, 31, 30, 30, 30, 30, 30, 30,
|
814
|
-
0, 32, 33, 32, 32, 32, 32, 32, 32, 0, 34, 18,
|
815
|
-
21, 34, 0, 34, 35, 36, 18, 21, 34, 0, 38, 37,
|
816
|
-
41, 40, 42, 18, 21, 42, 39, 43, 21, 43, 18, 43,
|
817
|
-
39, 38, 44, 41, 45, 46, 47, 46, 46, 46, 46, 46,
|
818
|
-
46, 46, 0, 48, 49, 48, 48, 48, 48, 48, 48, 48,
|
819
|
-
0, 50, 50, 48, 49, 18, 21, 48, 34, 48, 48, 48,
|
820
|
-
48, 0, 50, 50, 35, 51, 18, 21, 48, 34, 48, 48,
|
821
|
-
48, 48, 0, 52, 52, 54, 55, 56, 57, 54, 53, 54,
|
822
|
-
54, 54, 54, 44, 58, 58, 61, 62, 63, 64, 60, 59,
|
823
|
-
60, 60, 60, 60, 45, 59, 61, 65, 63, 64, 59, 45,
|
824
|
-
67, 68, 66, 70, 71, 69, 72, 41, 63, 64, 72, 45,
|
825
|
-
73, 74, 64, 75, 76, 43, 75, 21, 74, 41, 63, 74,
|
826
|
-
45, 77, 41, 78, 79, 77, 40, 73, 80, 79, 80, 41,
|
827
|
-
78, 80, 40, 81, 38, 56, 57, 81, 44, 60, 82, 60,
|
828
|
-
60, 60, 60, 60, 60, 60, 45, 83, 0, 84, 0, 85,
|
829
|
-
0, 86, 0, 87, 0, 88, 0, 89, 0, 90, 0, 91,
|
830
|
-
0, 92, 0, 93, 0, 94, 94, 94, 94, 0, 95, 97,
|
831
|
-
96, 96, 95, 96, 96, 96, 96, 0, 98, 99, 98, 0,
|
832
|
-
100, 102, 103, 101, 101, 100, 101, 101, 101, 0, 104, 106,
|
833
|
-
107, 105, 105, 104, 105, 105, 105, 0, 108, 110, 111, 112,
|
834
|
-
109, 109, 108, 109, 109, 109, 39, 113, 115, 116, 117, 114,
|
835
|
-
114, 113, 114, 114, 114, 39, 118, 39, 120, 120, 122, 123,
|
836
|
-
124, 39, 117, 120, 121, 119, 126, 126, 128, 39, 129, 126,
|
837
|
-
127, 125, 130, 115, 117, 114, 114, 130, 114, 114, 114, 39,
|
838
|
-
126, 126, 132, 39, 133, 131, 131, 126, 127, 131, 131, 131,
|
839
|
-
125, 134, 134, 137, 39, 138, 139, 136, 136, 134, 135, 136,
|
840
|
-
136, 136, 125, 140, 140, 132, 39, 142, 133, 131, 131, 140,
|
841
|
-
141, 131, 131, 131, 125, 126, 126, 128, 39, 129, 126, 127,
|
842
|
-
125, 143, 143, 145, 146, 147, 39, 129, 143, 144, 119, 148,
|
843
|
-
148, 122, 123, 124, 39, 117, 150, 150, 148, 149, 150, 150,
|
844
|
-
150, 119, 143, 143, 145, 146, 151, 39, 133, 150, 150, 143,
|
845
|
-
144, 150, 150, 150, 119, 153, 153, 155, 156, 157, 158, 159,
|
846
|
-
153, 154, 152, 161, 161, 163, 164, 165, 166, 167, 161, 162,
|
847
|
-
160, 168, 169, 171, 172, 170, 173, 170, 168, 170, 170, 170,
|
848
|
-
165, 169, 173, 165, 174, 173, 165, 175, 169, 177, 178, 179,
|
849
|
-
176, 173, 176, 175, 176, 176, 176, 165, 180, 169, 171, 181,
|
850
|
-
172, 170, 173, 170, 180, 170, 170, 170, 165, 169, 182, 173,
|
851
|
-
165, 183, 183, 185, 186, 187, 165, 172, 159, 183, 184, 152,
|
852
|
-
188, 188, 185, 186, 187, 165, 172, 159, 188, 189, 152, 188,
|
853
|
-
188, 185, 186, 187, 165, 172, 190, 159, 190, 188, 189, 190,
|
854
|
-
190, 190, 152, 191, 191, 193, 194, 195, 165, 196, 190, 159,
|
855
|
-
190, 191, 192, 190, 190, 190, 152, 153, 153, 155, 195, 157,
|
856
|
-
197, 190, 159, 190, 153, 154, 190, 190, 190, 152, 161, 161,
|
857
|
-
163, 199, 165, 196, 198, 167, 198, 161, 162, 198, 198, 198,
|
858
|
-
160, 200, 200, 163, 203, 165, 204, 205, 202, 167, 202, 200,
|
859
|
-
201, 202, 202, 202, 160, 206, 206, 163, 199, 165, 208, 196,
|
860
|
-
198, 167, 198, 206, 207, 198, 198, 198, 160, 161, 161, 163,
|
861
|
-
164, 165, 166, 167, 161, 162, 160, 161, 161, 209, 164, 165,
|
862
|
-
166, 167, 161, 162, 160, 191, 191, 193, 194, 156, 165, 166,
|
863
|
-
159, 191, 192, 152, 211, 211, 213, 214, 215, 216, 217, 218,
|
864
|
-
211, 212, 210, 220, 220, 222, 209, 223, 224, 225, 226, 220,
|
865
|
-
221, 219, 227, 228, 174, 230, 231, 229, 232, 229, 227, 229,
|
866
|
-
229, 229, 224, 228, 174, 232, 224, 234, 169, 236, 237, 235,
|
867
|
-
238, 235, 234, 235, 235, 235, 233, 169, 238, 233, 228, 238,
|
868
|
-
233, 239, 169, 241, 242, 243, 240, 238, 240, 239, 240, 240,
|
869
|
-
240, 233, 244, 169, 236, 245, 237, 235, 238, 235, 244, 235,
|
870
|
-
235, 235, 233, 169, 246, 238, 233, 248, 248, 250, 251, 252,
|
871
|
-
233, 237, 253, 248, 249, 247, 255, 255, 163, 257, 233, 258,
|
872
|
-
259, 255, 256, 254, 255, 255, 163, 261, 233, 262, 260, 259,
|
873
|
-
260, 255, 256, 260, 260, 260, 254, 263, 263, 163, 266, 233,
|
874
|
-
267, 268, 265, 259, 265, 263, 264, 265, 265, 265, 254, 269,
|
875
|
-
269, 163, 261, 233, 271, 262, 260, 259, 260, 269, 270, 260,
|
876
|
-
260, 260, 254, 255, 255, 163, 257, 233, 258, 259, 255, 256,
|
877
|
-
254, 255, 255, 222, 257, 233, 258, 259, 255, 256, 254, 272,
|
878
|
-
272, 274, 275, 276, 233, 258, 253, 272, 273, 247, 277, 277,
|
879
|
-
250, 251, 252, 233, 237, 279, 253, 279, 277, 278, 279, 279,
|
880
|
-
279, 247, 272, 272, 274, 275, 280, 233, 262, 279, 253, 279,
|
881
|
-
272, 273, 279, 279, 279, 247, 211, 211, 281, 214, 215, 216,
|
882
|
-
217, 218, 211, 212, 210, 220, 220, 222, 209, 283, 224, 284,
|
883
|
-
282, 226, 282, 220, 221, 282, 282, 282, 219, 285, 285, 222,
|
884
|
-
209, 288, 224, 289, 290, 287, 226, 287, 285, 286, 287, 287,
|
885
|
-
287, 219, 291, 228, 174, 230, 292, 231, 229, 232, 229, 291,
|
886
|
-
229, 229, 229, 224, 293, 228, 174, 295, 296, 297, 294, 232,
|
887
|
-
294, 293, 294, 294, 294, 224, 228, 174, 298, 232, 224, 299,
|
888
|
-
299, 232, 224, 300, 300, 302, 303, 304, 224, 231, 218, 300,
|
889
|
-
301, 210, 305, 305, 302, 303, 304, 224, 231, 218, 305, 306,
|
890
|
-
210, 305, 305, 302, 303, 304, 224, 231, 307, 218, 307, 305,
|
891
|
-
306, 307, 307, 307, 210, 308, 308, 310, 311, 312, 224, 284,
|
892
|
-
307, 218, 307, 308, 309, 307, 307, 307, 210, 211, 211, 281,
|
893
|
-
214, 312, 216, 313, 307, 218, 307, 211, 212, 307, 307, 307,
|
894
|
-
210, 220, 220, 222, 209, 223, 224, 225, 226, 220, 221, 219,
|
895
|
-
220, 220, 314, 314, 223, 224, 225, 226, 220, 221, 219, 211,
|
896
|
-
211, 213, 214, 312, 216, 313, 307, 218, 307, 211, 212, 307,
|
897
|
-
307, 307, 210, 315, 316, 317, 319, 320, 318, 321, 318, 315,
|
898
|
-
318, 318, 318, 216, 315, 322, 317, 319, 320, 318, 321, 318,
|
899
|
-
315, 318, 318, 318, 216, 308, 308, 310, 311, 215, 224, 225,
|
900
|
-
218, 308, 309, 210, 323, 323, 222, 209, 283, 224, 325, 284,
|
901
|
-
282, 226, 282, 323, 324, 282, 282, 282, 219, 326, 326, 155,
|
902
|
-
280, 328, 329, 279, 253, 279, 326, 327, 279, 279, 279, 247,
|
903
|
-
316, 317, 321, 216, 330, 331, 333, 334, 332, 335, 332, 330,
|
904
|
-
332, 332, 332, 328, 277, 277, 250, 251, 252, 233, 237, 253,
|
905
|
-
277, 278, 247, 336, 331, 338, 339, 337, 340, 337, 336, 337,
|
906
|
-
337, 337, 157, 322, 317, 321, 216, 326, 326, 155, 276, 328,
|
907
|
-
341, 253, 326, 327, 247, 331, 340, 157, 331, 335, 328, 148,
|
908
|
-
148, 122, 123, 124, 39, 117, 148, 149, 119, 342, 342, 343,
|
909
|
-
342, 342, 0, 344, 345, 345, 344, 345, 345, 345, 345, 0,
|
910
|
-
344, 345, 345, 346, 344, 345, 345, 345, 345, 0, 344, 345,
|
911
|
-
345, 347, 344, 345, 345, 345, 345, 0, 348, 345, 345, 348,
|
912
|
-
345, 345, 345, 345, 0, 350, 349, 351, 349, 352, 349, 353,
|
913
|
-
349, 354, 349, 355, 349, 355, 356, 355, 349, 356, 357, 358,
|
914
|
-
356, 349, 359, 359, 359, 359, 359, 349, 360, 361, 361, 361,
|
915
|
-
361, 361, 349, 362, 363, 364, 362, 349, 362, 363, 364, 365,
|
916
|
-
366, 362, 349, 363, 349, 367, 349, 368, 349, 369, 349, 370,
|
917
|
-
349, 371, 349, 372, 349, 373, 349, 373, 374, 373, 349, 374,
|
918
|
-
375, 376, 374, 349, 377, 377, 349, 378, 379, 379, 379, 379,
|
919
|
-
379, 349, 380, 363, 364, 380, 349, 380, 363, 364, 366, 380,
|
920
|
-
349, 381, 349, 382, 349, 383, 349, 384, 349, 385, 349, 386,
|
921
|
-
349, 387, 349, 388, 349, 389, 349, 389, 390, 389, 349, 390,
|
922
|
-
391, 392, 390, 349, 393, 394, 349, 395, 349, 396, 349, 397,
|
923
|
-
363, 364, 397, 349, 398, 349, 395, 349, 399, 400, 349, 401,
|
924
|
-
349, 396, 349, 402, 349, 401, 349, 403, 403, 349, 378, 404,
|
925
|
-
404, 404, 404, 404, 349, 405, 405, 405, 405, 405, 349, 360,
|
926
|
-
406, 406, 406, 406, 406, 349, 408, 407, 410, 409, 412, 413,
|
927
|
-
411, 415, 416, 417, 418, 417, 417, 417, 414, 41, 45, 43,
|
928
|
-
21, 41, 40, 169, 173, 165, 169, 238, 233, 228, 174, 232,
|
929
|
-
224, 344, 344, 420, 348, 421, 348, 420, 423, 424, 422, 426,
|
930
|
-
425, 428, 429, 427, 431, 430, 433, 434, 435, 432, 434, 436,
|
931
|
-
0
|
932
|
-
};
|
933
|
-
}
|
934
|
-
|
935
|
-
private static final short _hpricot_scan_indicies[] = init__hpricot_scan_indicies_0();
|
936
|
-
|
937
|
-
|
938
|
-
private static short[] init__hpricot_scan_trans_targs_wi_0()
|
939
|
-
{
|
940
|
-
return new short [] {
|
941
|
-
204, 1, 2, 53, 204, 3, 4, 5, 6, 7, 8, 9,
|
942
|
-
10, 11, 10, 204, 26, 11, 204, 12, 48, 26, 13, 14,
|
943
|
-
15, 16, 17, 18, 19, 30, 20, 21, 20, 21, 22, 23,
|
944
|
-
28, 24, 25, 204, 24, 25, 25, 27, 29, 29, 31, 32,
|
945
|
-
31, 32, 33, 34, 35, 36, 47, 32, 206, 40, 35, 36,
|
946
|
-
47, 37, 34, 206, 40, 46, 38, 39, 43, 38, 39, 43,
|
947
|
-
39, 41, 42, 41, 207, 43, 208, 44, 45, 39, 32, 49,
|
948
|
-
50, 51, 52, 21, 54, 55, 56, 57, 58, 204, 60, 61,
|
949
|
-
60, 204, 61, 204, 63, 62, 66, 204, 63, 64, 66, 204,
|
950
|
-
65, 64, 66, 67, 204, 65, 64, 66, 67, 204, 204, 68,
|
951
|
-
144, 74, 142, 143, 73, 68, 69, 70, 73, 204, 69, 71,
|
952
|
-
73, 204, 65, 72, 71, 73, 74, 204, 65, 72, 74, 75,
|
953
|
-
76, 77, 141, 73, 75, 76, 71, 73, 78, 79, 90, 70,
|
954
|
-
93, 80, 209, 94, 78, 79, 90, 70, 93, 80, 209, 94,
|
955
|
-
79, 69, 82, 84, 209, 81, 79, 83, 82, 84, 85, 209,
|
956
|
-
83, 85, 209, 86, 95, 139, 140, 93, 87, 88, 91, 87,
|
957
|
-
88, 89, 96, 93, 209, 209, 91, 93, 83, 92, 91, 93,
|
958
|
-
95, 209, 83, 92, 95, 90, 97, 98, 117, 108, 90, 128,
|
959
|
-
99, 211, 129, 97, 98, 117, 108, 128, 99, 211, 129, 98,
|
960
|
-
100, 120, 121, 211, 122, 101, 100, 103, 105, 210, 102, 104,
|
961
|
-
103, 105, 106, 210, 104, 106, 210, 107, 138, 113, 136, 137,
|
962
|
-
111, 112, 107, 100, 108, 111, 210, 112, 109, 111, 210, 104,
|
963
|
-
110, 109, 111, 113, 210, 104, 110, 113, 114, 115, 116, 135,
|
964
|
-
111, 114, 115, 109, 111, 108, 118, 128, 211, 119, 134, 118,
|
965
|
-
128, 133, 211, 119, 123, 119, 120, 121, 123, 211, 211, 98,
|
966
|
-
124, 133, 131, 132, 128, 125, 126, 118, 125, 126, 127, 130,
|
967
|
-
128, 211, 117, 98, 100, 79, 120, 121, 211, 122, 100, 119,
|
968
|
-
134, 133, 100, 108, 101, 210, 100, 69, 103, 105, 210, 102,
|
969
|
-
79, 82, 84, 209, 81, 210, 146, 147, 212, 146, 148, 149,
|
970
|
-
213, 204, 151, 152, 153, 154, 155, 156, 157, 158, 200, 159,
|
971
|
-
160, 159, 161, 204, 162, 163, 176, 164, 165, 166, 167, 168,
|
972
|
-
169, 170, 171, 172, 198, 173, 174, 173, 175, 177, 178, 179,
|
973
|
-
180, 181, 182, 183, 184, 185, 186, 187, 193, 188, 191, 189,
|
974
|
-
190, 190, 192, 194, 196, 195, 197, 199, 199, 201, 201, 214,
|
975
|
-
214, 216, 216, 204, 204, 205, 204, 0, 59, 62, 145, 204,
|
976
|
-
204, 150, 214, 214, 215, 214, 202, 216, 216, 217, 216, 203,
|
977
|
-
218, 218, 218, 219, 218
|
978
|
-
};
|
979
|
-
}
|
980
|
-
|
981
|
-
private static final short _hpricot_scan_trans_targs_wi[] = init__hpricot_scan_trans_targs_wi_0();
|
982
|
-
|
983
|
-
|
984
|
-
private static short[] init__hpricot_scan_trans_actions_wi_0()
|
985
|
-
{
|
986
|
-
return new short [] {
|
987
|
-
73, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0,
|
988
|
-
1, 5, 0, 92, 5, 0, 51, 0, 0, 0, 0, 0,
|
989
|
-
0, 0, 0, 0, 0, 0, 3, 83, 0, 19, 0, 0,
|
990
|
-
0, 3, 86, 75, 0, 21, 0, 0, 3, 0, 3, 83,
|
991
|
-
0, 19, 0, 19, 3, 3, 3, 172, 188, 3, 0, 0,
|
992
|
-
0, 0, 113, 146, 0, 21, 3, 86, 86, 0, 21, 21,
|
993
|
-
0, 21, 0, 0, 146, 0, 146, 0, 0, 3, 113, 0,
|
994
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 1, 5,
|
995
|
-
0, 98, 0, 55, 5, 0, 5, 95, 0, 116, 0, 53,
|
996
|
-
11, 0, 110, 11, 168, 0, 180, 23, 0, 122, 57, 3,
|
997
|
-
3, 3, 0, 0, 89, 0, 9, 9, 104, 164, 0, 180,
|
998
|
-
119, 176, 107, 107, 0, 160, 11, 201, 9, 9, 0, 80,
|
999
|
-
80, 0, 0, 152, 3, 3, 196, 156, 3, 80, 80, 77,
|
1000
|
-
152, 3, 226, 3, 0, 9, 9, 7, 104, 0, 211, 0,
|
1001
|
-
0, 7, 180, 23, 192, 0, 7, 11, 0, 110, 11, 216,
|
1002
|
-
0, 0, 149, 3, 3, 7, 0, 89, 3, 3, 196, 80,
|
1003
|
-
80, 7, 0, 156, 221, 232, 180, 119, 107, 107, 0, 160,
|
1004
|
-
11, 238, 9, 9, 0, 7, 3, 80, 80, 101, 77, 152,
|
1005
|
-
3, 226, 3, 0, 9, 9, 7, 104, 0, 211, 0, 0,
|
1006
|
-
7, 180, 23, 192, 0, 0, 0, 180, 23, 192, 0, 11,
|
1007
|
-
0, 110, 11, 216, 0, 0, 149, 3, 3, 3, 0, 7,
|
1008
|
-
89, 3, 0, 9, 9, 104, 211, 0, 180, 119, 221, 107,
|
1009
|
-
107, 0, 160, 11, 238, 9, 9, 0, 80, 80, 0, 7,
|
1010
|
-
152, 3, 3, 196, 156, 77, 180, 119, 221, 107, 107, 0,
|
1011
|
-
160, 11, 238, 0, 0, 11, 0, 110, 11, 216, 149, 7,
|
1012
|
-
3, 3, 7, 7, 89, 3, 3, 196, 80, 80, 7, 7,
|
1013
|
-
156, 232, 7, 3, 77, 77, 196, 89, 206, 3, 101, 9,
|
1014
|
-
9, 0, 80, 80, 3, 232, 3, 77, 196, 89, 206, 3,
|
1015
|
-
3, 196, 89, 206, 3, 226, 25, 25, 0, 0, 0, 0,
|
1016
|
-
31, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
|
1017
|
-
13, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0,
|
1018
|
-
0, 0, 0, 0, 0, 3, 15, 0, 0, 0, 0, 0,
|
1019
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0,
|
1020
|
-
17, 0, 0, 3, 3, 0, 0, 3, 0, 3, 0, 37,
|
1021
|
-
137, 43, 140, 63, 134, 184, 69, 0, 0, 1, 0, 65,
|
1022
|
-
67, 0, 33, 125, 31, 35, 0, 39, 128, 31, 41, 0,
|
1023
|
-
45, 131, 143, 0, 47
|
1024
|
-
};
|
1025
|
-
}
|
1026
|
-
|
1027
|
-
private static final short _hpricot_scan_trans_actions_wi[] = init__hpricot_scan_trans_actions_wi_0();
|
1028
|
-
|
1029
|
-
|
1030
|
-
private static short[] init__hpricot_scan_to_state_actions_0()
|
1031
|
-
{
|
1032
|
-
return new short [] {
|
1033
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1034
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1035
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1036
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1037
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1038
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1039
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1040
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1041
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1042
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1043
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1044
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1045
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1046
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1047
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1048
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1049
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1050
|
-
27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0,
|
1051
|
-
27, 0, 27, 0
|
1052
|
-
};
|
1053
|
-
}
|
1054
|
-
|
1055
|
-
private static final short _hpricot_scan_to_state_actions[] = init__hpricot_scan_to_state_actions_0();
|
1056
|
-
|
1057
|
-
|
1058
|
-
private static short[] init__hpricot_scan_from_state_actions_0()
|
1059
|
-
{
|
1060
|
-
return new short [] {
|
1061
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1062
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1063
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1064
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1065
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1066
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1067
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1068
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1069
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1070
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1071
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1072
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1073
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1074
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1075
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1076
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1077
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1078
|
-
29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0,
|
1079
|
-
29, 0, 29, 0
|
1080
|
-
};
|
1081
|
-
}
|
1082
|
-
|
1083
|
-
private static final short _hpricot_scan_from_state_actions[] = init__hpricot_scan_from_state_actions_0();
|
1084
|
-
|
1085
|
-
|
1086
|
-
private static short[] init__hpricot_scan_eof_trans_0()
|
1087
|
-
{
|
1088
|
-
return new short [] {
|
1089
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1090
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1091
|
-
40, 40, 40, 40, 1, 40, 1, 1, 1, 1, 1, 1,
|
1092
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1093
|
-
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1094
|
-
1, 1, 1, 1, 40, 40, 40, 40, 40, 40, 40, 40,
|
1095
|
-
40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
1096
|
-
40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
1097
|
-
40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
1098
|
-
40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
1099
|
-
40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
1100
|
-
40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
1101
|
-
40, 1, 1, 1, 1, 1, 350, 350, 350, 350, 350, 350,
|
1102
|
-
350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
|
1103
|
-
350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
|
1104
|
-
350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
|
1105
|
-
350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 408, 410,
|
1106
|
-
0, 415, 420, 420, 420, 40, 40, 40, 421, 421, 0, 426,
|
1107
|
-
0, 431, 0, 437
|
1108
|
-
};
|
1109
|
-
}
|
1110
|
-
|
1111
|
-
private static final short _hpricot_scan_eof_trans[] = init__hpricot_scan_eof_trans_0();
|
1112
|
-
|
1113
|
-
|
1114
|
-
static final int hpricot_scan_start = 204;
|
1115
|
-
static final int hpricot_scan_error = -1;
|
1116
|
-
|
1117
|
-
static final int hpricot_scan_en_html_comment = 214;
|
1118
|
-
static final int hpricot_scan_en_html_cdata = 216;
|
1119
|
-
static final int hpricot_scan_en_html_procins = 218;
|
1120
|
-
static final int hpricot_scan_en_main = 204;
|
1121
|
-
|
1122
|
-
// line 564 "hpricot_scan.java.rl"
|
1123
|
-
|
1124
|
-
public final static int BUFSIZE = 16384;
|
1125
|
-
|
1126
|
-
|
1127
|
-
private int cs, act, have = 0, nread = 0, curline = 1;
|
1128
|
-
private int ts = 0, te = 0, eof = -1, p = -1, pe = -1, buf = 0;
|
1129
|
-
private byte[] data;
|
1130
|
-
private State S = null;
|
1131
|
-
private IRubyObject port, opts, attr, tag, akey, aval, bufsize;
|
1132
|
-
private int mark_tag = -1, mark_akey = -1, mark_aval = -1;
|
1133
|
-
private boolean done = false, ele_open = false, taint = false, io = false, text = false;
|
1134
|
-
private int buffer_size = 0;
|
1135
|
-
|
1136
|
-
private Extra x;
|
1137
|
-
|
1138
|
-
private IRubyObject self;
|
1139
|
-
private Ruby runtime;
|
1140
|
-
private ThreadContext ctx;
|
1141
|
-
private Block block;
|
1142
|
-
|
1143
|
-
private IRubyObject xmldecl, doctype, stag, etag, emptytag, comment, cdata, procins;
|
1144
|
-
|
1145
|
-
private RaiseException newRaiseException(RubyClass exceptionClass, String message) {
|
1146
|
-
return new RaiseException(runtime, exceptionClass, message, true);
|
1147
|
-
}
|
1148
|
-
|
1149
|
-
public Scanner(IRubyObject self, IRubyObject[] args, Block block) {
|
1150
|
-
this.self = self;
|
1151
|
-
this.runtime = self.getRuntime();
|
1152
|
-
this.ctx = runtime.getCurrentContext();
|
1153
|
-
this.block = block;
|
1154
|
-
attr = runtime.getNil();
|
1155
|
-
tag = runtime.getNil();
|
1156
|
-
akey = runtime.getNil();
|
1157
|
-
aval = runtime.getNil();
|
1158
|
-
bufsize = runtime.getNil();
|
1159
|
-
|
1160
|
-
this.x = (Extra)this.runtime.getModule("Hpricot").dataGetStruct();
|
1161
|
-
|
1162
|
-
this.xmldecl = x.sym_xmldecl;
|
1163
|
-
this.doctype = x.sym_doctype;
|
1164
|
-
this.stag = x.sym_stag;
|
1165
|
-
this.etag = x.sym_etag;
|
1166
|
-
this.emptytag = x.sym_emptytag;
|
1167
|
-
this.comment = x.sym_comment;
|
1168
|
-
this.cdata = x.sym_cdata;
|
1169
|
-
this.procins = x.sym_procins;
|
1170
|
-
|
1171
|
-
port = args[0];
|
1172
|
-
if(args.length == 2) {
|
1173
|
-
opts = args[1];
|
1174
|
-
} else {
|
1175
|
-
opts = runtime.getNil();
|
1176
|
-
}
|
1177
|
-
|
1178
|
-
taint = port.isTaint();
|
1179
|
-
io = port.respondsTo("read");
|
1180
|
-
if(!io) {
|
1181
|
-
if(port.respondsTo("to_str")) {
|
1182
|
-
port = port.callMethod(ctx, "to_str");
|
1183
|
-
port = port.convertToString();
|
1184
|
-
} else {
|
1185
|
-
throw runtime.newArgumentError("an Hpricot document must be built from an input source (a String or IO object.)");
|
1186
|
-
}
|
1187
|
-
}
|
1188
|
-
|
1189
|
-
if(!(opts instanceof RubyHash)) {
|
1190
|
-
opts = runtime.getNil();
|
1191
|
-
}
|
1192
|
-
|
1193
|
-
if(!block.isGiven()) {
|
1194
|
-
S = new State();
|
1195
|
-
S.doc = x.cDoc.allocate();
|
1196
|
-
S.focus = S.doc;
|
1197
|
-
S.last = runtime.getNil();
|
1198
|
-
S.xml = OPT(opts, "xml");
|
1199
|
-
S.strict = OPT(opts, "xhtml_strict");
|
1200
|
-
S.fixup = OPT(opts, "fixup_tags");
|
1201
|
-
if(S.strict) {
|
1202
|
-
S.fixup = true;
|
1203
|
-
}
|
1204
|
-
S.doc.getInstanceVariables().fastSetInstanceVariable("@options", opts);
|
1205
|
-
S.EC = x.mHpricot.getConstant("ElementContent");
|
1206
|
-
}
|
1207
|
-
|
1208
|
-
buffer_size = BUFSIZE;
|
1209
|
-
if(self.getInstanceVariables().fastHasInstanceVariable("@buffer_size")) {
|
1210
|
-
bufsize = self.getInstanceVariables().fastGetInstanceVariable("@buffer_size");
|
1211
|
-
if(!bufsize.isNil()) {
|
1212
|
-
buffer_size = RubyNumeric.fix2int(bufsize);
|
1213
|
-
}
|
1214
|
-
}
|
1215
|
-
|
1216
|
-
if(io) {
|
1217
|
-
buf = 0;
|
1218
|
-
data = new byte[buffer_size];
|
1219
|
-
}
|
1220
|
-
}
|
1221
|
-
|
1222
|
-
private int len, space;
|
1223
|
-
// hpricot_scan
|
1224
|
-
public IRubyObject scan() {
|
1225
|
-
|
1226
|
-
// line 1227 "HpricotScanService.java"
|
1227
|
-
{
|
1228
|
-
cs = hpricot_scan_start;
|
1229
|
-
ts = -1;
|
1230
|
-
te = -1;
|
1231
|
-
act = 0;
|
1232
|
-
}
|
1233
|
-
// line 667 "hpricot_scan.java.rl"
|
1234
|
-
while(!done) {
|
1235
|
-
p = pe = len = buf;
|
1236
|
-
space = buffer_size - have;
|
1237
|
-
|
1238
|
-
if(io) {
|
1239
|
-
if(space == 0) {
|
1240
|
-
/* We've used up the entire buffer storing an already-parsed token
|
1241
|
-
* prefix that must be preserved. Likely caused by super-long attributes.
|
1242
|
-
* Increase buffer size and continue */
|
1243
|
-
buffer_size += BUFSIZE;
|
1244
|
-
data = realloc(data, buffer_size);
|
1245
|
-
space = buffer_size - have;
|
1246
|
-
}
|
1247
|
-
|
1248
|
-
p = have;
|
1249
|
-
IRubyObject str = port.callMethod(ctx, "read", runtime.newFixnum(space));
|
1250
|
-
ByteList bl = str.convertToString().getByteList();
|
1251
|
-
len = bl.realSize;
|
1252
|
-
System.arraycopy(bl.bytes, bl.begin, data, p, len);
|
1253
|
-
} else {
|
1254
|
-
ByteList bl = port.convertToString().getByteList();
|
1255
|
-
data = bl.bytes;
|
1256
|
-
buf = bl.begin;
|
1257
|
-
p = bl.begin;
|
1258
|
-
len = bl.realSize + 1;
|
1259
|
-
if(p + len >= data.length) {
|
1260
|
-
data = new byte[len];
|
1261
|
-
System.arraycopy(bl.bytes, bl.begin, data, 0, bl.realSize);
|
1262
|
-
p = 0;
|
1263
|
-
buf = 0;
|
1264
|
-
}
|
1265
|
-
done = true;
|
1266
|
-
eof = p + len;
|
1267
|
-
}
|
1268
|
-
|
1269
|
-
nread += len;
|
1270
|
-
|
1271
|
-
/* If this is the last buffer, tack on an EOF. */
|
1272
|
-
if(io && len < space) {
|
1273
|
-
data[p + len++] = 0;
|
1274
|
-
eof = p + len;
|
1275
|
-
done = true;
|
1276
|
-
}
|
1277
|
-
|
1278
|
-
pe = p + len;
|
1279
|
-
|
1280
|
-
|
1281
|
-
// line 1282 "HpricotScanService.java"
|
1282
|
-
{
|
1283
|
-
int _klen;
|
1284
|
-
int _trans = 0;
|
1285
|
-
int _acts;
|
1286
|
-
int _nacts;
|
1287
|
-
int _keys;
|
1288
|
-
int _goto_targ = 0;
|
1289
|
-
|
1290
|
-
_goto: while (true) {
|
1291
|
-
switch ( _goto_targ ) {
|
1292
|
-
case 0:
|
1293
|
-
if ( p == pe ) {
|
1294
|
-
_goto_targ = 4;
|
1295
|
-
continue _goto;
|
1296
|
-
}
|
1297
|
-
case 1:
|
1298
|
-
_acts = _hpricot_scan_from_state_actions[cs];
|
1299
|
-
_nacts = (int) _hpricot_scan_actions[_acts++];
|
1300
|
-
while ( _nacts-- > 0 ) {
|
1301
|
-
switch ( _hpricot_scan_actions[_acts++] ) {
|
1302
|
-
case 21:
|
1303
|
-
// line 1 "hpricot_scan.java.rl"
|
1304
|
-
{ts = p;}
|
1305
|
-
break;
|
1306
|
-
// line 1307 "HpricotScanService.java"
|
1307
|
-
}
|
1308
|
-
}
|
1309
|
-
|
1310
|
-
_match: do {
|
1311
|
-
_keys = _hpricot_scan_key_offsets[cs];
|
1312
|
-
_trans = _hpricot_scan_index_offsets[cs];
|
1313
|
-
_klen = _hpricot_scan_single_lengths[cs];
|
1314
|
-
if ( _klen > 0 ) {
|
1315
|
-
int _lower = _keys;
|
1316
|
-
int _mid;
|
1317
|
-
int _upper = _keys + _klen - 1;
|
1318
|
-
while (true) {
|
1319
|
-
if ( _upper < _lower )
|
1320
|
-
break;
|
1321
|
-
|
1322
|
-
_mid = _lower + ((_upper-_lower) >> 1);
|
1323
|
-
if ( data[p] < _hpricot_scan_trans_keys[_mid] )
|
1324
|
-
_upper = _mid - 1;
|
1325
|
-
else if ( data[p] > _hpricot_scan_trans_keys[_mid] )
|
1326
|
-
_lower = _mid + 1;
|
1327
|
-
else {
|
1328
|
-
_trans += (_mid - _keys);
|
1329
|
-
break _match;
|
1330
|
-
}
|
1331
|
-
}
|
1332
|
-
_keys += _klen;
|
1333
|
-
_trans += _klen;
|
1334
|
-
}
|
1335
|
-
|
1336
|
-
_klen = _hpricot_scan_range_lengths[cs];
|
1337
|
-
if ( _klen > 0 ) {
|
1338
|
-
int _lower = _keys;
|
1339
|
-
int _mid;
|
1340
|
-
int _upper = _keys + (_klen<<1) - 2;
|
1341
|
-
while (true) {
|
1342
|
-
if ( _upper < _lower )
|
1343
|
-
break;
|
1344
|
-
|
1345
|
-
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
1346
|
-
if ( data[p] < _hpricot_scan_trans_keys[_mid] )
|
1347
|
-
_upper = _mid - 2;
|
1348
|
-
else if ( data[p] > _hpricot_scan_trans_keys[_mid+1] )
|
1349
|
-
_lower = _mid + 2;
|
1350
|
-
else {
|
1351
|
-
_trans += ((_mid - _keys)>>1);
|
1352
|
-
break _match;
|
1353
|
-
}
|
1354
|
-
}
|
1355
|
-
_trans += _klen;
|
1356
|
-
}
|
1357
|
-
} while (false);
|
1358
|
-
|
1359
|
-
_trans = _hpricot_scan_indicies[_trans];
|
1360
|
-
case 3:
|
1361
|
-
cs = _hpricot_scan_trans_targs_wi[_trans];
|
1362
|
-
|
1363
|
-
if ( _hpricot_scan_trans_actions_wi[_trans] != 0 ) {
|
1364
|
-
_acts = _hpricot_scan_trans_actions_wi[_trans];
|
1365
|
-
_nacts = (int) _hpricot_scan_actions[_acts++];
|
1366
|
-
while ( _nacts-- > 0 )
|
1367
|
-
{
|
1368
|
-
switch ( _hpricot_scan_actions[_acts++] )
|
1369
|
-
{
|
1370
|
-
case 0:
|
1371
|
-
// line 514 "hpricot_scan.java.rl"
|
1372
|
-
{
|
1373
|
-
if(text) {
|
1374
|
-
tag = CAT(tag, mark_tag, p);
|
1375
|
-
ELE(x.sym_text);
|
1376
|
-
text = false;
|
1377
|
-
}
|
1378
|
-
attr = runtime.getNil();
|
1379
|
-
tag = runtime.getNil();
|
1380
|
-
mark_tag = -1;
|
1381
|
-
ele_open = true;
|
1382
|
-
}
|
1383
|
-
break;
|
1384
|
-
case 1:
|
1385
|
-
// line 526 "hpricot_scan.java.rl"
|
1386
|
-
{ mark_tag = p; }
|
1387
|
-
break;
|
1388
|
-
case 2:
|
1389
|
-
// line 527 "hpricot_scan.java.rl"
|
1390
|
-
{ mark_aval = p; }
|
1391
|
-
break;
|
1392
|
-
case 3:
|
1393
|
-
// line 528 "hpricot_scan.java.rl"
|
1394
|
-
{ mark_akey = p; }
|
1395
|
-
break;
|
1396
|
-
case 4:
|
1397
|
-
// line 529 "hpricot_scan.java.rl"
|
1398
|
-
{ tag = SET(mark_tag, p, tag); }
|
1399
|
-
break;
|
1400
|
-
case 5:
|
1401
|
-
// line 531 "hpricot_scan.java.rl"
|
1402
|
-
{ aval = SET(mark_aval, p, aval); }
|
1403
|
-
break;
|
1404
|
-
case 6:
|
1405
|
-
// line 532 "hpricot_scan.java.rl"
|
1406
|
-
{
|
1407
|
-
if(data[p-1] == '"' || data[p-1] == '\'') {
|
1408
|
-
aval = SET(mark_aval, p-1, aval);
|
1409
|
-
} else {
|
1410
|
-
aval = SET(mark_aval, p, aval);
|
1411
|
-
}
|
1412
|
-
}
|
1413
|
-
break;
|
1414
|
-
case 7:
|
1415
|
-
// line 539 "hpricot_scan.java.rl"
|
1416
|
-
{ akey = SET(mark_akey, p, akey); }
|
1417
|
-
break;
|
1418
|
-
case 8:
|
1419
|
-
// line 540 "hpricot_scan.java.rl"
|
1420
|
-
{ aval = SET(mark_aval, p, aval); ATTR(runtime.newSymbol("version"), aval); }
|
1421
|
-
break;
|
1422
|
-
case 9:
|
1423
|
-
// line 541 "hpricot_scan.java.rl"
|
1424
|
-
{ aval = SET(mark_aval, p, aval); ATTR(runtime.newSymbol("encoding"), aval); }
|
1425
|
-
break;
|
1426
|
-
case 10:
|
1427
|
-
// line 542 "hpricot_scan.java.rl"
|
1428
|
-
{ aval = SET(mark_aval, p, aval); ATTR(runtime.newSymbol("standalone"), aval); }
|
1429
|
-
break;
|
1430
|
-
case 11:
|
1431
|
-
// line 543 "hpricot_scan.java.rl"
|
1432
|
-
{ aval = SET(mark_aval, p, aval); ATTR(runtime.newSymbol("public_id"), aval); }
|
1433
|
-
break;
|
1434
|
-
case 12:
|
1435
|
-
// line 544 "hpricot_scan.java.rl"
|
1436
|
-
{ aval = SET(mark_aval, p, aval); ATTR(runtime.newSymbol("system_id"), aval); }
|
1437
|
-
break;
|
1438
|
-
case 13:
|
1439
|
-
// line 546 "hpricot_scan.java.rl"
|
1440
|
-
{
|
1441
|
-
akey = runtime.getNil();
|
1442
|
-
aval = runtime.getNil();
|
1443
|
-
mark_akey = -1;
|
1444
|
-
mark_aval = -1;
|
1445
|
-
}
|
1446
|
-
break;
|
1447
|
-
case 14:
|
1448
|
-
// line 553 "hpricot_scan.java.rl"
|
1449
|
-
{
|
1450
|
-
if(!S.xml) {
|
1451
|
-
akey = akey.callMethod(runtime.getCurrentContext(), "downcase");
|
1452
|
-
}
|
1453
|
-
ATTR(akey, aval);
|
1454
|
-
}
|
1455
|
-
break;
|
1456
|
-
case 15:
|
1457
|
-
// line 9 "hpricot_scan.java.rl"
|
1458
|
-
{curline += 1;}
|
1459
|
-
break;
|
1460
|
-
case 16:
|
1461
|
-
// line 46 "hpricot_scan.java.rl"
|
1462
|
-
{ TEXT_PASS(); }
|
1463
|
-
break;
|
1464
|
-
case 17:
|
1465
|
-
// line 50 "hpricot_scan.java.rl"
|
1466
|
-
{ EBLK(comment, 3); {cs = 204; _goto_targ = 2; if (true) continue _goto;} }
|
1467
|
-
break;
|
1468
|
-
case 18:
|
1469
|
-
// line 55 "hpricot_scan.java.rl"
|
1470
|
-
{ EBLK(cdata, 3); {cs = 204; _goto_targ = 2; if (true) continue _goto;} }
|
1471
|
-
break;
|
1472
|
-
case 19:
|
1473
|
-
// line 60 "hpricot_scan.java.rl"
|
1474
|
-
{ EBLK(procins, 2); {cs = 204; _goto_targ = 2; if (true) continue _goto;} }
|
1475
|
-
break;
|
1476
|
-
case 22:
|
1477
|
-
// line 1 "hpricot_scan.java.rl"
|
1478
|
-
{te = p+1;}
|
1479
|
-
break;
|
1480
|
-
case 23:
|
1481
|
-
// line 50 "hpricot_scan.java.rl"
|
1482
|
-
{te = p+1;}
|
1483
|
-
break;
|
1484
|
-
case 24:
|
1485
|
-
// line 51 "hpricot_scan.java.rl"
|
1486
|
-
{te = p+1;{ TEXT_PASS(); }}
|
1487
|
-
break;
|
1488
|
-
case 25:
|
1489
|
-
// line 51 "hpricot_scan.java.rl"
|
1490
|
-
{te = p;p--;{ TEXT_PASS(); }}
|
1491
|
-
break;
|
1492
|
-
case 26:
|
1493
|
-
// line 51 "hpricot_scan.java.rl"
|
1494
|
-
{{p = ((te))-1;}{ TEXT_PASS(); }}
|
1495
|
-
break;
|
1496
|
-
case 27:
|
1497
|
-
// line 55 "hpricot_scan.java.rl"
|
1498
|
-
{te = p+1;}
|
1499
|
-
break;
|
1500
|
-
case 28:
|
1501
|
-
// line 56 "hpricot_scan.java.rl"
|
1502
|
-
{te = p+1;{ TEXT_PASS(); }}
|
1503
|
-
break;
|
1504
|
-
case 29:
|
1505
|
-
// line 56 "hpricot_scan.java.rl"
|
1506
|
-
{te = p;p--;{ TEXT_PASS(); }}
|
1507
|
-
break;
|
1508
|
-
case 30:
|
1509
|
-
// line 56 "hpricot_scan.java.rl"
|
1510
|
-
{{p = ((te))-1;}{ TEXT_PASS(); }}
|
1511
|
-
break;
|
1512
|
-
case 31:
|
1513
|
-
// line 60 "hpricot_scan.java.rl"
|
1514
|
-
{te = p+1;}
|
1515
|
-
break;
|
1516
|
-
case 32:
|
1517
|
-
// line 61 "hpricot_scan.java.rl"
|
1518
|
-
{te = p+1;{ TEXT_PASS(); }}
|
1519
|
-
break;
|
1520
|
-
case 33:
|
1521
|
-
// line 61 "hpricot_scan.java.rl"
|
1522
|
-
{te = p;p--;{ TEXT_PASS(); }}
|
1523
|
-
break;
|
1524
|
-
case 34:
|
1525
|
-
// line 66 "hpricot_scan.java.rl"
|
1526
|
-
{act = 8;}
|
1527
|
-
break;
|
1528
|
-
case 35:
|
1529
|
-
// line 68 "hpricot_scan.java.rl"
|
1530
|
-
{act = 10;}
|
1531
|
-
break;
|
1532
|
-
case 36:
|
1533
|
-
// line 70 "hpricot_scan.java.rl"
|
1534
|
-
{act = 12;}
|
1535
|
-
break;
|
1536
|
-
case 37:
|
1537
|
-
// line 73 "hpricot_scan.java.rl"
|
1538
|
-
{act = 15;}
|
1539
|
-
break;
|
1540
|
-
case 38:
|
1541
|
-
// line 65 "hpricot_scan.java.rl"
|
1542
|
-
{te = p+1;{ ELE(xmldecl); }}
|
1543
|
-
break;
|
1544
|
-
case 39:
|
1545
|
-
// line 66 "hpricot_scan.java.rl"
|
1546
|
-
{te = p+1;{ ELE(doctype); }}
|
1547
|
-
break;
|
1548
|
-
case 40:
|
1549
|
-
// line 68 "hpricot_scan.java.rl"
|
1550
|
-
{te = p+1;{ ELE(stag); }}
|
1551
|
-
break;
|
1552
|
-
case 41:
|
1553
|
-
// line 69 "hpricot_scan.java.rl"
|
1554
|
-
{te = p+1;{ ELE(etag); }}
|
1555
|
-
break;
|
1556
|
-
case 42:
|
1557
|
-
// line 70 "hpricot_scan.java.rl"
|
1558
|
-
{te = p+1;{ ELE(emptytag); }}
|
1559
|
-
break;
|
1560
|
-
case 43:
|
1561
|
-
// line 71 "hpricot_scan.java.rl"
|
1562
|
-
{te = p+1;{ {cs = 214; _goto_targ = 2; if (true) continue _goto;} }}
|
1563
|
-
break;
|
1564
|
-
case 44:
|
1565
|
-
// line 72 "hpricot_scan.java.rl"
|
1566
|
-
{te = p+1;{ {cs = 216; _goto_targ = 2; if (true) continue _goto;} }}
|
1567
|
-
break;
|
1568
|
-
case 45:
|
1569
|
-
// line 73 "hpricot_scan.java.rl"
|
1570
|
-
{te = p+1;{ TEXT_PASS(); }}
|
1571
|
-
break;
|
1572
|
-
case 46:
|
1573
|
-
// line 66 "hpricot_scan.java.rl"
|
1574
|
-
{te = p;p--;{ ELE(doctype); }}
|
1575
|
-
break;
|
1576
|
-
case 47:
|
1577
|
-
// line 67 "hpricot_scan.java.rl"
|
1578
|
-
{te = p;p--;{ {cs = 218; _goto_targ = 2; if (true) continue _goto;} }}
|
1579
|
-
break;
|
1580
|
-
case 48:
|
1581
|
-
// line 73 "hpricot_scan.java.rl"
|
1582
|
-
{te = p;p--;{ TEXT_PASS(); }}
|
1583
|
-
break;
|
1584
|
-
case 49:
|
1585
|
-
// line 67 "hpricot_scan.java.rl"
|
1586
|
-
{{p = ((te))-1;}{ {cs = 218; _goto_targ = 2; if (true) continue _goto;} }}
|
1587
|
-
break;
|
1588
|
-
case 50:
|
1589
|
-
// line 73 "hpricot_scan.java.rl"
|
1590
|
-
{{p = ((te))-1;}{ TEXT_PASS(); }}
|
1591
|
-
break;
|
1592
|
-
case 51:
|
1593
|
-
// line 1 "hpricot_scan.java.rl"
|
1594
|
-
{ switch( act ) {
|
1595
|
-
case 8:
|
1596
|
-
{{p = ((te))-1;} ELE(doctype); }
|
1597
|
-
break;
|
1598
|
-
case 10:
|
1599
|
-
{{p = ((te))-1;} ELE(stag); }
|
1600
|
-
break;
|
1601
|
-
case 12:
|
1602
|
-
{{p = ((te))-1;} ELE(emptytag); }
|
1603
|
-
break;
|
1604
|
-
case 15:
|
1605
|
-
{{p = ((te))-1;} TEXT_PASS(); }
|
1606
|
-
break;
|
1607
|
-
default: break;
|
1608
|
-
}
|
1609
|
-
}
|
1610
|
-
break;
|
1611
|
-
// line 1612 "HpricotScanService.java"
|
1612
|
-
}
|
1613
|
-
}
|
1614
|
-
}
|
1615
|
-
|
1616
|
-
case 2:
|
1617
|
-
_acts = _hpricot_scan_to_state_actions[cs];
|
1618
|
-
_nacts = (int) _hpricot_scan_actions[_acts++];
|
1619
|
-
while ( _nacts-- > 0 ) {
|
1620
|
-
switch ( _hpricot_scan_actions[_acts++] ) {
|
1621
|
-
case 20:
|
1622
|
-
// line 1 "hpricot_scan.java.rl"
|
1623
|
-
{ts = -1;}
|
1624
|
-
break;
|
1625
|
-
// line 1626 "HpricotScanService.java"
|
1626
|
-
}
|
1627
|
-
}
|
1628
|
-
|
1629
|
-
if ( ++p != pe ) {
|
1630
|
-
_goto_targ = 1;
|
1631
|
-
continue _goto;
|
1632
|
-
}
|
1633
|
-
case 4:
|
1634
|
-
if ( p == eof )
|
1635
|
-
{
|
1636
|
-
if ( _hpricot_scan_eof_trans[cs] > 0 ) {
|
1637
|
-
_trans = _hpricot_scan_eof_trans[cs] - 1;
|
1638
|
-
_goto_targ = 3;
|
1639
|
-
continue _goto;
|
1640
|
-
}
|
1641
|
-
}
|
1642
|
-
|
1643
|
-
case 5:
|
1644
|
-
}
|
1645
|
-
break; }
|
1646
|
-
}
|
1647
|
-
// line 714 "hpricot_scan.java.rl"
|
1648
|
-
|
1649
|
-
if(cs == hpricot_scan_error) {
|
1650
|
-
if(!tag.isNil()) {
|
1651
|
-
throw newRaiseException(x.rb_eHpricotParseError, "parse error on element <" + tag + ">, starting on line " + curline + ".\n" + NO_WAY_SERIOUSLY);
|
1652
|
-
} else {
|
1653
|
-
throw newRaiseException(x.rb_eHpricotParseError, "parse error on line " + curline + ".\n" + NO_WAY_SERIOUSLY);
|
1654
|
-
}
|
1655
|
-
}
|
1656
|
-
|
1657
|
-
if(done && ele_open) {
|
1658
|
-
ele_open = false;
|
1659
|
-
if(ts > 0) {
|
1660
|
-
mark_tag = ts;
|
1661
|
-
ts = 0;
|
1662
|
-
text = true;
|
1663
|
-
}
|
1664
|
-
}
|
1665
|
-
|
1666
|
-
if(ts == -1) {
|
1667
|
-
have = 0;
|
1668
|
-
if(mark_tag != -1 && text) {
|
1669
|
-
if(done) {
|
1670
|
-
if(mark_tag < p - 1) {
|
1671
|
-
tag = CAT(tag, mark_tag, p-1);
|
1672
|
-
ELE(x.sym_text);
|
1673
|
-
}
|
1674
|
-
} else {
|
1675
|
-
tag = CAT(tag, mark_tag, p);
|
1676
|
-
}
|
1677
|
-
}
|
1678
|
-
if(io) {
|
1679
|
-
mark_tag = 0;
|
1680
|
-
} else {
|
1681
|
-
mark_tag = ((RubyString)port).getByteList().begin;
|
1682
|
-
}
|
1683
|
-
} else if(io) {
|
1684
|
-
have = pe - ts;
|
1685
|
-
System.arraycopy(data, ts, data, buf, have);
|
1686
|
-
mark_tag = SLIDE(mark_tag);
|
1687
|
-
mark_akey = SLIDE(mark_akey);
|
1688
|
-
mark_aval = SLIDE(mark_aval);
|
1689
|
-
te -= ts;
|
1690
|
-
ts = 0;
|
1691
|
-
}
|
1692
|
-
}
|
1693
|
-
|
1694
|
-
if(S != null) {
|
1695
|
-
return S.doc;
|
1696
|
-
}
|
1697
|
-
|
1698
|
-
return runtime.getNil();
|
1699
|
-
}
|
1700
|
-
}
|
1701
|
-
|
1702
|
-
public static class HpricotModule {
|
1703
|
-
// hpricot_scan
|
1704
|
-
@JRubyMethod(module = true, optional = 1, required = 1, frame = true)
|
1705
|
-
public static IRubyObject scan(IRubyObject self, IRubyObject[] args, Block block) {
|
1706
|
-
return new Scanner(self, args, block).scan();
|
1707
|
-
}
|
1708
|
-
|
1709
|
-
// hpricot_css
|
1710
|
-
@JRubyMethod(module = true)
|
1711
|
-
public static IRubyObject css(IRubyObject self, IRubyObject mod, IRubyObject str, IRubyObject node) {
|
1712
|
-
return new HpricotCss(self, mod, str, node).scan();
|
1713
|
-
}
|
1714
|
-
}
|
1715
|
-
|
1716
|
-
public static class CData {
|
1717
|
-
@JRubyMethod
|
1718
|
-
public static IRubyObject content(IRubyObject self) {
|
1719
|
-
return hpricot_ele_get_name(self);
|
1720
|
-
}
|
1721
|
-
|
1722
|
-
@JRubyMethod(name = "content=")
|
1723
|
-
public static IRubyObject content_set(IRubyObject self, IRubyObject value) {
|
1724
|
-
return hpricot_ele_set_name(self, value);
|
1725
|
-
}
|
1726
|
-
}
|
1727
|
-
|
1728
|
-
public static class Comment {
|
1729
|
-
@JRubyMethod
|
1730
|
-
public static IRubyObject content(IRubyObject self) {
|
1731
|
-
return hpricot_ele_get_name(self);
|
1732
|
-
}
|
1733
|
-
|
1734
|
-
@JRubyMethod(name = "content=")
|
1735
|
-
public static IRubyObject content_set(IRubyObject self, IRubyObject value) {
|
1736
|
-
return hpricot_ele_set_name(self, value);
|
1737
|
-
}
|
1738
|
-
}
|
1739
|
-
|
1740
|
-
public static class DocType {
|
1741
|
-
@JRubyMethod
|
1742
|
-
public static IRubyObject raw_string(IRubyObject self) {
|
1743
|
-
return hpricot_ele_get_name(self);
|
1744
|
-
}
|
1745
|
-
|
1746
|
-
@JRubyMethod
|
1747
|
-
public static IRubyObject clear_raw(IRubyObject self) {
|
1748
|
-
return hpricot_ele_clear_name(self);
|
1749
|
-
}
|
1750
|
-
|
1751
|
-
@JRubyMethod
|
1752
|
-
public static IRubyObject target(IRubyObject self) {
|
1753
|
-
return hpricot_ele_get_target(self);
|
1754
|
-
}
|
1755
|
-
|
1756
|
-
@JRubyMethod(name = "target=")
|
1757
|
-
public static IRubyObject target_set(IRubyObject self, IRubyObject value) {
|
1758
|
-
return hpricot_ele_set_target(self, value);
|
1759
|
-
}
|
1760
|
-
|
1761
|
-
@JRubyMethod
|
1762
|
-
public static IRubyObject public_id(IRubyObject self) {
|
1763
|
-
return hpricot_ele_get_public_id(self);
|
1764
|
-
}
|
1765
|
-
|
1766
|
-
@JRubyMethod(name = "public_id=")
|
1767
|
-
public static IRubyObject public_id_set(IRubyObject self, IRubyObject value) {
|
1768
|
-
return hpricot_ele_set_public_id(self, value);
|
1769
|
-
}
|
1770
|
-
|
1771
|
-
@JRubyMethod
|
1772
|
-
public static IRubyObject system_id(IRubyObject self) {
|
1773
|
-
return hpricot_ele_get_system_id(self);
|
1774
|
-
}
|
1775
|
-
|
1776
|
-
@JRubyMethod(name = "system_id=")
|
1777
|
-
public static IRubyObject system_id_set(IRubyObject self, IRubyObject value) {
|
1778
|
-
return hpricot_ele_set_system_id(self, value);
|
1779
|
-
}
|
1780
|
-
}
|
1781
|
-
|
1782
|
-
public static class Elem {
|
1783
|
-
@JRubyMethod
|
1784
|
-
public static IRubyObject clear_raw(IRubyObject self) {
|
1785
|
-
return hpricot_ele_clear_raw(self);
|
1786
|
-
}
|
1787
|
-
}
|
1788
|
-
|
1789
|
-
public static class BogusETag {
|
1790
|
-
@JRubyMethod
|
1791
|
-
public static IRubyObject raw_string(IRubyObject self) {
|
1792
|
-
return hpricot_ele_get_attr(self);
|
1793
|
-
}
|
1794
|
-
|
1795
|
-
@JRubyMethod
|
1796
|
-
public static IRubyObject clear_raw(IRubyObject self) {
|
1797
|
-
return hpricot_ele_clear_attr(self);
|
1798
|
-
}
|
1799
|
-
}
|
1800
|
-
|
1801
|
-
public static class Text {
|
1802
|
-
@JRubyMethod
|
1803
|
-
public static IRubyObject raw_string(IRubyObject self) {
|
1804
|
-
return hpricot_ele_get_name(self);
|
1805
|
-
}
|
1806
|
-
|
1807
|
-
@JRubyMethod
|
1808
|
-
public static IRubyObject clear_raw(IRubyObject self) {
|
1809
|
-
return hpricot_ele_clear_name(self);
|
1810
|
-
}
|
1811
|
-
|
1812
|
-
@JRubyMethod
|
1813
|
-
public static IRubyObject content(IRubyObject self) {
|
1814
|
-
return hpricot_ele_get_name(self);
|
1815
|
-
}
|
1816
|
-
|
1817
|
-
@JRubyMethod(name = "content=")
|
1818
|
-
public static IRubyObject content_set(IRubyObject self, IRubyObject value) {
|
1819
|
-
return hpricot_ele_set_name(self, value);
|
1820
|
-
}
|
1821
|
-
}
|
1822
|
-
|
1823
|
-
public static class XMLDecl {
|
1824
|
-
@JRubyMethod
|
1825
|
-
public static IRubyObject raw_string(IRubyObject self) {
|
1826
|
-
return hpricot_ele_get_name(self);
|
1827
|
-
}
|
1828
|
-
|
1829
|
-
@JRubyMethod
|
1830
|
-
public static IRubyObject clear_raw(IRubyObject self) {
|
1831
|
-
return hpricot_ele_clear_name(self);
|
1832
|
-
}
|
1833
|
-
|
1834
|
-
@JRubyMethod
|
1835
|
-
public static IRubyObject encoding(IRubyObject self) {
|
1836
|
-
return hpricot_ele_get_encoding(self);
|
1837
|
-
}
|
1838
|
-
|
1839
|
-
@JRubyMethod(name = "encoding=")
|
1840
|
-
public static IRubyObject encoding_set(IRubyObject self, IRubyObject value) {
|
1841
|
-
return hpricot_ele_set_encoding(self, value);
|
1842
|
-
}
|
1843
|
-
|
1844
|
-
@JRubyMethod
|
1845
|
-
public static IRubyObject standalone(IRubyObject self) {
|
1846
|
-
return hpricot_ele_get_standalone(self);
|
1847
|
-
}
|
1848
|
-
|
1849
|
-
@JRubyMethod(name = "standalone=")
|
1850
|
-
public static IRubyObject standalone_set(IRubyObject self, IRubyObject value) {
|
1851
|
-
return hpricot_ele_set_standalone(self, value);
|
1852
|
-
}
|
1853
|
-
|
1854
|
-
@JRubyMethod
|
1855
|
-
public static IRubyObject version(IRubyObject self) {
|
1856
|
-
return hpricot_ele_get_version(self);
|
1857
|
-
}
|
1858
|
-
|
1859
|
-
@JRubyMethod(name = "version=")
|
1860
|
-
public static IRubyObject version_set(IRubyObject self, IRubyObject value) {
|
1861
|
-
return hpricot_ele_set_version(self, value);
|
1862
|
-
}
|
1863
|
-
}
|
1864
|
-
|
1865
|
-
public static class ProcIns {
|
1866
|
-
@JRubyMethod
|
1867
|
-
public static IRubyObject target(IRubyObject self) {
|
1868
|
-
return hpricot_ele_get_name(self);
|
1869
|
-
}
|
1870
|
-
|
1871
|
-
@JRubyMethod(name = "target=")
|
1872
|
-
public static IRubyObject target_set(IRubyObject self, IRubyObject value) {
|
1873
|
-
return hpricot_ele_set_name(self, value);
|
1874
|
-
}
|
1875
|
-
|
1876
|
-
@JRubyMethod
|
1877
|
-
public static IRubyObject content(IRubyObject self) {
|
1878
|
-
return hpricot_ele_get_attr(self);
|
1879
|
-
}
|
1880
|
-
|
1881
|
-
@JRubyMethod(name = "content=")
|
1882
|
-
public static IRubyObject content_set(IRubyObject self, IRubyObject value) {
|
1883
|
-
return hpricot_ele_set_attr(self, value);
|
1884
|
-
}
|
1885
|
-
}
|
1886
|
-
|
1887
|
-
public final static String NO_WAY_SERIOUSLY = "*** This should not happen, please send a bug report with the HTML you're parsing to why@whytheluckystiff.net. So sorry!";
|
1888
|
-
|
1889
|
-
public final static int H_ELE_TAG = 0;
|
1890
|
-
public final static int H_ELE_PARENT = 1;
|
1891
|
-
public final static int H_ELE_ATTR = 2;
|
1892
|
-
public final static int H_ELE_ETAG = 3;
|
1893
|
-
public final static int H_ELE_RAW = 4;
|
1894
|
-
public final static int H_ELE_EC = 5;
|
1895
|
-
public final static int H_ELE_HASH = 6;
|
1896
|
-
public final static int H_ELE_CHILDREN = 7;
|
1897
|
-
|
1898
|
-
public static IRubyObject H_ELE_GET(IRubyObject recv, int n) {
|
1899
|
-
return ((IRubyObject[])recv.dataGetStruct())[n];
|
1900
|
-
}
|
1901
|
-
|
1902
|
-
public static IRubyObject H_ELE_SET(IRubyObject recv, int n, IRubyObject value) {
|
1903
|
-
((IRubyObject[])recv.dataGetStruct())[n] = value;
|
1904
|
-
return value;
|
1905
|
-
}
|
1906
|
-
|
1907
|
-
private static class RefCallback implements Callback {
|
1908
|
-
private final int n;
|
1909
|
-
public RefCallback(int n) { this.n = n; }
|
1910
|
-
|
1911
|
-
public IRubyObject execute(IRubyObject recv, IRubyObject[] args, Block block) {
|
1912
|
-
return H_ELE_GET(recv, n);
|
1913
|
-
}
|
1914
|
-
|
1915
|
-
public Arity getArity() {
|
1916
|
-
return Arity.NO_ARGUMENTS;
|
1917
|
-
}
|
1918
|
-
}
|
1919
|
-
|
1920
|
-
private static class SetCallback implements Callback {
|
1921
|
-
private final int n;
|
1922
|
-
public SetCallback(int n) { this.n = n; }
|
1923
|
-
|
1924
|
-
public IRubyObject execute(IRubyObject recv, IRubyObject[] args, Block block) {
|
1925
|
-
return H_ELE_SET(recv, n, args[0]);
|
1926
|
-
}
|
1927
|
-
|
1928
|
-
public Arity getArity() {
|
1929
|
-
return Arity.ONE_ARGUMENT;
|
1930
|
-
}
|
1931
|
-
}
|
1932
|
-
|
1933
|
-
private final static Callback[] ref_func = new Callback[]{
|
1934
|
-
new RefCallback(0),
|
1935
|
-
new RefCallback(1),
|
1936
|
-
new RefCallback(2),
|
1937
|
-
new RefCallback(3),
|
1938
|
-
new RefCallback(4),
|
1939
|
-
new RefCallback(5),
|
1940
|
-
new RefCallback(6),
|
1941
|
-
new RefCallback(7),
|
1942
|
-
new RefCallback(8),
|
1943
|
-
new RefCallback(9)};
|
1944
|
-
|
1945
|
-
private final static Callback[] set_func = new Callback[]{
|
1946
|
-
new SetCallback(0),
|
1947
|
-
new SetCallback(1),
|
1948
|
-
new SetCallback(2),
|
1949
|
-
new SetCallback(3),
|
1950
|
-
new SetCallback(4),
|
1951
|
-
new SetCallback(5),
|
1952
|
-
new SetCallback(6),
|
1953
|
-
new SetCallback(7),
|
1954
|
-
new SetCallback(8),
|
1955
|
-
new SetCallback(9)};
|
1956
|
-
|
1957
|
-
public final static ObjectAllocator alloc_hpricot_struct = new ObjectAllocator() {
|
1958
|
-
// alloc_hpricot_struct
|
1959
|
-
public IRubyObject allocate(Ruby runtime, RubyClass klass) {
|
1960
|
-
RubyClass kurrent = klass;
|
1961
|
-
Object sz = kurrent.fastGetInternalVariable("__size__");
|
1962
|
-
while(sz == null && kurrent != null) {
|
1963
|
-
kurrent = kurrent.getSuperClass();
|
1964
|
-
sz = kurrent.fastGetInternalVariable("__size__");
|
1965
|
-
}
|
1966
|
-
int size = RubyNumeric.fix2int((RubyObject)sz);
|
1967
|
-
RubyObject obj = new RubyObject(runtime, klass);
|
1968
|
-
IRubyObject[] all = new IRubyObject[size];
|
1969
|
-
java.util.Arrays.fill(all, runtime.getNil());
|
1970
|
-
obj.dataWrapStruct(all);
|
1971
|
-
return obj;
|
1972
|
-
}
|
1973
|
-
};
|
1974
|
-
|
1975
|
-
public static RubyClass makeHpricotStruct(Ruby runtime, IRubyObject[] members) {
|
1976
|
-
RubyClass klass = RubyClass.newClass(runtime, runtime.getObject());
|
1977
|
-
klass.fastSetInternalVariable("__size__", runtime.newFixnum(members.length));
|
1978
|
-
klass.setAllocator(alloc_hpricot_struct);
|
1979
|
-
|
1980
|
-
for(int i = 0; i < members.length; i++) {
|
1981
|
-
String id = members[i].toString();
|
1982
|
-
klass.defineMethod(id, ref_func[i]);
|
1983
|
-
klass.defineMethod(id + "=", set_func[i]);
|
1984
|
-
}
|
1985
|
-
|
1986
|
-
return klass;
|
1987
|
-
}
|
1988
|
-
|
1989
|
-
public boolean basicLoad(final Ruby runtime) throws IOException {
|
1990
|
-
Init_hpricot_scan(runtime);
|
1991
|
-
return true;
|
1992
|
-
}
|
1993
|
-
|
1994
|
-
public static class Extra {
|
1995
|
-
IRubyObject symAllow, symDeny, sym_xmldecl, sym_doctype,
|
1996
|
-
sym_procins, sym_stag, sym_etag, sym_emptytag,
|
1997
|
-
sym_allowed, sym_children, sym_comment,
|
1998
|
-
sym_cdata, sym_name, sym_parent,
|
1999
|
-
sym_raw_attributes, sym_raw_string, sym_tagno,
|
2000
|
-
sym_text, sym_EMPTY, sym_CDATA;
|
2001
|
-
|
2002
|
-
public RubyModule mHpricot;
|
2003
|
-
public RubyClass structElem;
|
2004
|
-
public RubyClass structAttr;
|
2005
|
-
public RubyClass structBasic;
|
2006
|
-
public RubyClass cDoc;
|
2007
|
-
public RubyClass cCData;
|
2008
|
-
public RubyClass cComment;
|
2009
|
-
public RubyClass cDocType;
|
2010
|
-
public RubyClass cElem;
|
2011
|
-
public RubyClass cBogusETag;
|
2012
|
-
public RubyClass cText;
|
2013
|
-
public RubyClass cXMLDecl;
|
2014
|
-
public RubyClass cProcIns;
|
2015
|
-
public RubyClass rb_eHpricotParseError;
|
2016
|
-
public IRubyObject reProcInsParse;
|
2017
|
-
|
2018
|
-
public Extra(Ruby runtime) {
|
2019
|
-
symAllow = runtime.newSymbol("allow");
|
2020
|
-
symDeny = runtime.newSymbol("deny");
|
2021
|
-
sym_xmldecl = runtime.newSymbol("xmldecl");
|
2022
|
-
sym_doctype = runtime.newSymbol("doctype");
|
2023
|
-
sym_procins = runtime.newSymbol("procins");
|
2024
|
-
sym_stag = runtime.newSymbol("stag");
|
2025
|
-
sym_etag = runtime.newSymbol("etag");
|
2026
|
-
sym_emptytag = runtime.newSymbol("emptytag");
|
2027
|
-
sym_allowed = runtime.newSymbol("allowed");
|
2028
|
-
sym_children = runtime.newSymbol("children");
|
2029
|
-
sym_comment = runtime.newSymbol("comment");
|
2030
|
-
sym_cdata = runtime.newSymbol("cdata");
|
2031
|
-
sym_name = runtime.newSymbol("name");
|
2032
|
-
sym_parent = runtime.newSymbol("parent");
|
2033
|
-
sym_raw_attributes = runtime.newSymbol("raw_attributes");
|
2034
|
-
sym_raw_string = runtime.newSymbol("raw_string");
|
2035
|
-
sym_tagno = runtime.newSymbol("tagno");
|
2036
|
-
sym_text = runtime.newSymbol("text");
|
2037
|
-
sym_EMPTY = runtime.newSymbol("EMPTY");
|
2038
|
-
sym_CDATA = runtime.newSymbol("CDATA");
|
2039
|
-
}
|
2040
|
-
}
|
2041
|
-
|
2042
|
-
public static void Init_hpricot_scan(Ruby runtime) {
|
2043
|
-
Extra x = new Extra(runtime);
|
2044
|
-
|
2045
|
-
x.mHpricot = runtime.defineModule("Hpricot");
|
2046
|
-
x.mHpricot.dataWrapStruct(x);
|
2047
|
-
|
2048
|
-
x.mHpricot.getSingletonClass().attr_accessor(runtime.getCurrentContext(),new IRubyObject[]{runtime.newSymbol("buffer_size")});
|
2049
|
-
x.mHpricot.defineAnnotatedMethods(HpricotModule.class);
|
2050
|
-
|
2051
|
-
x.rb_eHpricotParseError = x.mHpricot.defineClassUnder("ParseError",runtime.getClass("StandardError"),runtime.getClass("StandardError").getAllocator());
|
2052
|
-
|
2053
|
-
x.structElem = makeHpricotStruct(runtime, new IRubyObject[] {x.sym_name, x.sym_parent, x.sym_raw_attributes, x.sym_etag, x.sym_raw_string, x.sym_allowed, x.sym_tagno, x.sym_children});
|
2054
|
-
x.structAttr = makeHpricotStruct(runtime, new IRubyObject[] {x.sym_name, x.sym_parent, x.sym_raw_attributes});
|
2055
|
-
x.structBasic= makeHpricotStruct(runtime, new IRubyObject[] {x.sym_name, x.sym_parent});
|
2056
|
-
|
2057
|
-
x.cDoc = x.mHpricot.defineClassUnder("Doc", x.structElem, x.structElem.getAllocator());
|
2058
|
-
|
2059
|
-
x.cCData = x.mHpricot.defineClassUnder("CData", x.structBasic, x.structBasic.getAllocator());
|
2060
|
-
x.cCData.defineAnnotatedMethods(CData.class);
|
2061
|
-
|
2062
|
-
x.cComment = x.mHpricot.defineClassUnder("Comment", x.structBasic, x.structBasic.getAllocator());
|
2063
|
-
x.cComment.defineAnnotatedMethods(Comment.class);
|
2064
|
-
|
2065
|
-
x.cDocType = x.mHpricot.defineClassUnder("DocType", x.structAttr, x.structAttr.getAllocator());
|
2066
|
-
x.cDocType.defineAnnotatedMethods(DocType.class);
|
2067
|
-
|
2068
|
-
x.cElem = x.mHpricot.defineClassUnder("Elem", x.structElem, x.structElem.getAllocator());
|
2069
|
-
x.cElem.defineAnnotatedMethods(Elem.class);
|
2070
|
-
|
2071
|
-
x.cBogusETag = x.mHpricot.defineClassUnder("BogusETag", x.structAttr, x.structAttr.getAllocator());
|
2072
|
-
x.cBogusETag.defineAnnotatedMethods(BogusETag.class);
|
2073
|
-
|
2074
|
-
x.cText = x.mHpricot.defineClassUnder("Text", x.structBasic, x.structBasic.getAllocator());
|
2075
|
-
x.cText.defineAnnotatedMethods(Text.class);
|
2076
|
-
|
2077
|
-
x.cXMLDecl = x.mHpricot.defineClassUnder("XMLDecl", x.structAttr, x.structAttr.getAllocator());
|
2078
|
-
x.cXMLDecl.defineAnnotatedMethods(XMLDecl.class);
|
2079
|
-
|
2080
|
-
x.cProcIns = x.mHpricot.defineClassUnder("ProcIns", x.structAttr, x.structAttr.getAllocator());
|
2081
|
-
x.cProcIns.defineAnnotatedMethods(ProcIns.class);
|
2082
|
-
|
2083
|
-
x.reProcInsParse = runtime.evalScriptlet("/\\A<\\?(\\S+)\\s+(.+)/m");
|
2084
|
-
x.mHpricot.setConstant("ProcInsParse", x.reProcInsParse);
|
2085
|
-
}
|
2086
|
-
}
|