erector 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +0 -4
- data/VERSION.yml +1 -1
- data/lib/erector.rb +2 -4
- data/lib/erector/abstract_widget.rb +2 -1
- data/lib/erector/erect/erect.rb +17 -14
- data/lib/erector/erect/rhtml.treetop +18 -10
- data/lib/erector/externals.rb +7 -1
- data/lib/erector/html.rb +30 -39
- data/lib/erector/rails.rb +6 -26
- data/lib/erector/rails/form_builder.rb +36 -0
- data/lib/erector/rails/railtie.rb +11 -0
- data/lib/erector/rails/template_handler.rb +16 -0
- data/lib/erector/rails/widget_renderer.rb +6 -0
- data/lib/erector/rails2.rb +27 -0
- data/lib/erector/{rails → rails2}/extensions/action_controller.rb +1 -1
- data/lib/erector/{rails → rails2}/extensions/rails_helpers.rb +17 -4
- data/lib/erector/{rails → rails2}/extensions/rails_widget.rb +6 -3
- data/lib/erector/{rails → rails2}/rails_form_builder.rb +0 -0
- data/lib/erector/rails2/rails_version.rb +6 -0
- data/lib/erector/{rails → rails2}/template_handlers/ert_handler.rb +0 -0
- data/lib/erector/{rails → rails2}/template_handlers/rb_handler.rb +2 -2
- data/lib/erector/rails3.rb +208 -0
- data/lib/erector/raw_string.rb +4 -0
- data/lib/erector/widgets/external_renderer.rb +8 -0
- data/spec/erect/erect_rails_spec.rb +34 -49
- data/spec/erect/erected_spec.rb +11 -0
- data/spec/rails2/erect_rails_spec.rb +114 -0
- data/spec/rails2/rails_app/Gemfile +12 -0
- data/spec/rails2/rails_app/Gemfile.lock +89 -0
- data/spec/rails2/rails_app/README +243 -0
- data/spec/rails2/rails_app/Rakefile +19 -0
- data/spec/rails2/rails_app/app/controllers/application_controller.rb +10 -0
- data/spec/rails2/rails_app/app/helpers/application_helper.rb +3 -0
- data/spec/rails2/rails_app/app/views/test/_erb.erb +1 -0
- data/spec/rails2/rails_app/app/views/test/_erector.rb +5 -0
- data/spec/rails2/rails_app/app/views/test/_partial_with_locals.rb +7 -0
- data/spec/rails2/rails_app/app/views/test/bare.rb +5 -0
- data/spec/rails2/rails_app/app/views/test/erb_from_erector.html.rb +5 -0
- data/spec/rails2/rails_app/app/views/test/erector_from_erb.html.erb +1 -0
- data/spec/rails2/rails_app/app/views/test/erector_with_locals_from_erb.html.erb +6 -0
- data/spec/rails2/rails_app/app/views/test/implicit_assigns.html.rb +5 -0
- data/spec/rails2/rails_app/app/views/test/needs.html.rb +7 -0
- data/spec/rails2/rails_app/app/views/test/needs_subclass.html.rb +5 -0
- data/spec/rails2/rails_app/app/views/test/protected_instance_variable.html.rb +5 -0
- data/spec/rails2/rails_app/app/views/test/render_default.html.rb +5 -0
- data/spec/rails2/rails_app/app/views/test/render_partial.html.rb +5 -0
- data/spec/rails2/rails_app/config/boot.rb +114 -0
- data/spec/rails2/rails_app/config/database.yml +16 -0
- data/spec/rails2/rails_app/config/environment.rb +42 -0
- data/spec/rails2/rails_app/config/environments/development.rb +17 -0
- data/spec/rails2/rails_app/config/environments/production.rb +28 -0
- data/spec/rails2/rails_app/config/environments/test.rb +28 -0
- data/spec/rails2/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails2/rails_app/config/initializers/cookie_verification_secret.rb +7 -0
- data/spec/rails2/rails_app/config/initializers/inflections.rb +10 -0
- data/spec/rails2/rails_app/config/initializers/mime_types.rb +5 -0
- data/spec/rails2/rails_app/config/initializers/new_rails_defaults.rb +21 -0
- data/spec/rails2/rails_app/config/initializers/session_store.rb +15 -0
- data/spec/rails2/rails_app/config/locales/en.yml +5 -0
- data/spec/rails2/rails_app/config/routes.rb +43 -0
- data/spec/rails2/rails_app/db/development.sqlite3 +0 -0
- data/spec/rails2/rails_app/db/schema.rb +14 -0
- data/spec/rails2/rails_app/db/seeds.rb +7 -0
- data/spec/rails2/rails_app/doc/README_FOR_APP +2 -0
- data/spec/rails2/rails_app/log/development.log +76 -0
- data/spec/rails2/rails_app/log/production.log +0 -0
- data/spec/rails2/rails_app/log/server.log +0 -0
- data/spec/rails2/rails_app/log/test.log +4158 -0
- data/spec/rails2/rails_app/public/404.html +30 -0
- data/spec/rails2/rails_app/public/422.html +30 -0
- data/spec/rails2/rails_app/public/500.html +30 -0
- data/spec/rails2/rails_app/public/favicon.ico +0 -0
- data/spec/rails2/rails_app/public/images/rails.png +0 -0
- data/spec/rails2/rails_app/public/index.html +275 -0
- data/spec/rails2/rails_app/public/javascripts/application.js +2 -0
- data/spec/rails2/rails_app/public/javascripts/controls.js +963 -0
- data/spec/rails2/rails_app/public/javascripts/dragdrop.js +973 -0
- data/spec/rails2/rails_app/public/javascripts/effects.js +1128 -0
- data/spec/rails2/rails_app/public/javascripts/prototype.js +4320 -0
- data/spec/rails2/rails_app/public/robots.txt +5 -0
- data/spec/rails2/rails_app/script/about +4 -0
- data/spec/rails2/rails_app/script/console +3 -0
- data/spec/rails2/rails_app/script/dbconsole +3 -0
- data/spec/rails2/rails_app/script/destroy +3 -0
- data/spec/rails2/rails_app/script/generate +3 -0
- data/spec/rails2/rails_app/script/performance/benchmarker +3 -0
- data/spec/rails2/rails_app/script/performance/profiler +3 -0
- data/spec/rails2/rails_app/script/plugin +3 -0
- data/spec/rails2/rails_app/script/runner +3 -0
- data/spec/rails2/rails_app/script/server +3 -0
- data/spec/rails2/rails_app/spec/rails_helpers_spec.rb +255 -0
- data/spec/rails2/rails_app/spec/rails_spec_helper.rb +34 -0
- data/spec/rails2/rails_app/spec/rails_widget_spec.rb +83 -0
- data/spec/rails2/rails_app/spec/render_spec.rb +324 -0
- data/spec/rails2/rails_app/test/performance/browsing_test.rb +9 -0
- data/spec/rails2/rails_app/test/test_helper.rb +38 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/MIT-LICENSE +20 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/README.markdown +90 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/Rakefile +23 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/init.rb +7 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/lib/rails_xss.rb +3 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/lib/rails_xss/action_view.rb +87 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/lib/rails_xss/erubis.rb +33 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/lib/rails_xss/string_ext.rb +52 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/lib/tasks/rails_xss_tasks.rake +4 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/active_record_helper_test.rb +74 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/asset_tag_helper_test.rb +49 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/caching_test.rb +43 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/date_helper_test.rb +29 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/deprecated_output_safety_test.rb +112 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/erb_util_test.rb +36 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/form_helper_test.rb +1447 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/form_tag_helper_test.rb +354 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/output_safety_test.rb +115 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/rails_xss_test.rb +23 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/test_helper.rb +5 -0
- data/spec/rails2/rails_app/vendor/plugins/rails_xss/test/text_helper_test.rb +17 -0
- data/spec/spec_helper.rb +2 -6
- metadata +348 -23
- data/lib/erector/errors.rb +0 -12
- data/lib/erector/extensions/hash.rb +0 -21
- data/lib/erector/extensions/object.rb +0 -18
- data/lib/erector/rails/rails_version.rb +0 -6
- data/rails/init.rb +0 -4
data/lib/erector/errors.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
module Erector
|
2
|
-
module Errors
|
3
|
-
class RubyVersionNotSupported < RuntimeError
|
4
|
-
def initialize(version_identifier, explanation=nil)
|
5
|
-
super [
|
6
|
-
"Erector does not support Ruby version(s) #{version_identifier}.",
|
7
|
-
explanation ? "The reason(s) are:\n#{explanation}" : nil
|
8
|
-
].compact.join("\n")
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
module CorrectlyHashedHash
|
3
|
-
def hash
|
4
|
-
out = 0
|
5
|
-
# This sort_by is all kinds of weird...basically, we need a deterministic order here,
|
6
|
-
# but we can't just use "sort", because keys aren't necessarily sortable (they don't
|
7
|
-
# necessarily respond to <=>). Sorting by their hash codes works just as well, and
|
8
|
-
# is guaranteed to work, since everything hashes.
|
9
|
-
keys.sort_by { |k| k.hash }.each { |k| out ^= k.hash; out ^= self[k].hash }
|
10
|
-
out
|
11
|
-
end
|
12
|
-
|
13
|
-
def eql?(o)
|
14
|
-
self == o
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def correctly_hashed
|
19
|
-
extend(CorrectlyHashedHash)
|
20
|
-
end
|
21
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class Object
|
2
|
-
def metaclass
|
3
|
-
class << self; self; end
|
4
|
-
end
|
5
|
-
|
6
|
-
def html_escape
|
7
|
-
return CGI.escapeHTML(to_s)
|
8
|
-
end
|
9
|
-
|
10
|
-
def html_unescape
|
11
|
-
CGI.unescapeHTML(to_s)
|
12
|
-
end
|
13
|
-
|
14
|
-
def escape_single_quotes
|
15
|
-
self.gsub(/[']/, '\\\\\'')
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
data/rails/init.rb
DELETED