angular_xss 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/.travis.yml +1 -1
  2. data/Rakefile +11 -3
  3. data/lib/angular_xss.rb +1 -0
  4. data/lib/angular_xss/erb.rb +36 -15
  5. data/lib/angular_xss/safe_buffer.rb +19 -0
  6. data/lib/angular_xss/version.rb +1 -1
  7. data/spec/rails-2.3/Gemfile.lock +1 -1
  8. data/spec/rails-3.2/Gemfile.lock +1 -1
  9. data/spec/rails-4.2/.rspec +2 -0
  10. data/spec/rails-4.2/Gemfile +10 -0
  11. data/spec/rails-4.2/Gemfile.lock +157 -0
  12. data/spec/rails-4.2/Rakefile +10 -0
  13. data/spec/rails-4.2/app_root/.gitignore +4 -0
  14. data/spec/rails-4.2/app_root/config/application.rb +34 -0
  15. data/spec/rails-4.2/app_root/config/boot.rb +13 -0
  16. data/spec/rails-4.2/app_root/config/database.yml +4 -0
  17. data/spec/rails-4.2/app_root/config/environment.rb +5 -0
  18. data/spec/rails-4.2/app_root/config/environments/test.rb +35 -0
  19. data/spec/rails-4.2/app_root/config/initializers/backtrace_silencers.rb +7 -0
  20. data/spec/rails-4.2/app_root/config/initializers/inflections.rb +10 -0
  21. data/spec/rails-4.2/app_root/config/initializers/mime_types.rb +5 -0
  22. data/spec/rails-4.2/app_root/config/initializers/secret_token.rb +7 -0
  23. data/spec/rails-4.2/app_root/config/initializers/session_store.rb +8 -0
  24. data/spec/rails-4.2/app_root/config/routes.rb +3 -0
  25. data/spec/rails-4.2/app_root/lib/tasks/.gitkeep +0 -0
  26. data/spec/rails-4.2/app_root/log/.gitkeep +0 -0
  27. data/spec/rails-4.2/app_root/script/rails +6 -0
  28. data/spec/rails-4.2/rcov.opts +2 -0
  29. data/spec/rails-4.2/spec/spec_helper.rb +27 -0
  30. data/spec/shared/app_root/app/views/test/_test_erb.erb +3 -0
  31. data/spec/shared/app_root/app/views/test/_test_haml.haml +3 -0
  32. metadata +112 -48
  33. checksums.yaml +0 -7
data/.travis.yml CHANGED
@@ -2,7 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - "1.8.7"
4
4
  - "1.9.3"
5
- - ree
5
+ - "2.1.2"
6
6
  services:
7
7
  - mysql
8
8
  script: rake travis:run
data/Rakefile CHANGED
@@ -6,13 +6,15 @@ task :default => 'all:spec'
6
6
 
7
7
 
8
8
  namespace :travis do
9
-
9
+
10
10
  desc 'Run tests on Travis CI'
11
11
  task :run => ['slimgems', 'all:bundle:install', 'all:spec']
12
12
 
13
13
  desc 'Install slimgems'
14
14
  task :slimgems do
15
- system('gem install slimgems')
15
+ if RUBY_VERSION == '1.8.7'
16
+ system('gem install slimgems')
17
+ end
16
18
  end
17
19
 
18
20
  end
@@ -57,6 +59,12 @@ def for_each_directory_of(path, &block)
57
59
  Dir[path].sort.each do |rakefile|
58
60
  directory = File.dirname(rakefile)
59
61
  puts '', "\033[44m#{directory}\033[0m", ''
60
- block.call(directory)
62
+
63
+ if (RUBY_VERSION == '1.8.7' && directory =~ /-4\.2$/) ||
64
+ (RUBY_VERSION != '1.8.7' && directory =~ /-2\.3$/)
65
+ puts "Skipping tests for Ruby #{RUBY_VERSION} since it is unsupported"
66
+ else
67
+ block.call(directory)
68
+ end
61
69
  end
62
70
  end
data/lib/angular_xss.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  #"string".respond_to?(:html_safe?) or raise "No rails_xss implementation present"
2
2
 
3
3
  require 'angular_xss/escaper'
4
+ require 'angular_xss/safe_buffer'
4
5
  require 'angular_xss/erb'
5
6
  require 'angular_xss/haml'
6
7
  require 'angular_xss/action_view'
@@ -1,25 +1,46 @@
1
1
  # Use module_eval so we crash when ERB::Util has not yet been loaded.
2
2
  ERB::Util.module_eval do
3
3
 
4
- def html_escape_with_escaping_angular_expressions(s)
5
- s = s.to_s
6
- if s.html_safe?
7
- s
8
- else
9
- html_escape_without_escaping_angular_expressions(AngularXss::Escaper.escape(s))
4
+ if private_method_defined? :unwrapped_html_escape # Rails 4.2+
5
+
6
+ def unwrapped_html_escape_with_escaping_angular_expressions(s)
7
+ s = s.to_s
8
+ if s.html_safe?
9
+ s
10
+ else
11
+ unwrapped_html_escape_without_escaping_angular_expressions(AngularXss::Escaper.escape(s))
12
+ end
10
13
  end
11
- end
12
14
 
13
- alias_method_chain :html_escape, :escaping_angular_expressions
15
+ alias_method_chain :unwrapped_html_escape, :escaping_angular_expressions
16
+
17
+ singleton_class.send(:remove_method, :unwrapped_html_escape)
18
+ module_function :unwrapped_html_escape
19
+ module_function :unwrapped_html_escape_without_escaping_angular_expressions
14
20
 
15
- # Aliasing twice issues a warning "discarding old...". Remove first to avoid it.
16
- remove_method(:h)
17
- alias h html_escape
21
+ else # Rails < 4.2
22
+
23
+ def html_escape_with_escaping_angular_expressions(s)
24
+ s = s.to_s
25
+ if s.html_safe?
26
+ s
27
+ else
28
+ html_escape_without_escaping_angular_expressions(AngularXss::Escaper.escape(s))
29
+ end
30
+ end
18
31
 
19
- module_function :h
32
+ alias_method_chain :html_escape, :escaping_angular_expressions
20
33
 
21
- singleton_class.send(:remove_method, :html_escape)
22
- module_function :html_escape
23
- module_function :html_escape_without_escaping_angular_expressions
34
+ # Aliasing twice issues a warning "discarding old...". Remove first to avoid it.
35
+ remove_method(:h)
36
+ alias h html_escape
37
+
38
+ module_function :h
39
+
40
+ singleton_class.send(:remove_method, :html_escape)
41
+ module_function :html_escape
42
+ module_function :html_escape_without_escaping_angular_expressions
43
+
44
+ end
24
45
 
25
46
  end
@@ -0,0 +1,19 @@
1
+ ActiveSupport::SafeBuffer.class_eval do
2
+
3
+ if private_method_defined? :html_escape_interpolated_argument
4
+
5
+ private
6
+
7
+ def html_escape_interpolated_argument_with_rails_xss(arg)
8
+ if arg.html_safe?
9
+ arg
10
+ else
11
+ html_escape_interpolated_argument_without_rails_xss(AngularXss::Escaper.escape(arg))
12
+ end
13
+ end
14
+
15
+ alias_method_chain :html_escape_interpolated_argument, :rails_xss
16
+
17
+ end
18
+
19
+ end
@@ -1,3 +1,3 @@
1
1
  module AngularXss
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- angular_xss (0.2.1)
4
+ angular_xss (0.2.2)
5
5
  activesupport
6
6
  haml (>= 3.1.5)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- angular_xss (0.2.1)
4
+ angular_xss (0.2.2)
5
5
  activesupport
6
6
  haml (>= 3.1.5)
7
7
 
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --format progress
@@ -0,0 +1,10 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'sqlite3'
4
+ gem 'rails', '~>4.2'
5
+ gem 'rspec'
6
+ gem 'rspec-rails'
7
+ gem 'rspec_candy'
8
+ gem 'haml'
9
+ gem 'haml-rails'
10
+ gem 'angular_xss', :path => '../..'
@@ -0,0 +1,157 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ angular_xss (0.2.2)
5
+ activesupport
6
+ haml (>= 3.1.5)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actionmailer (4.2.1)
12
+ actionpack (= 4.2.1)
13
+ actionview (= 4.2.1)
14
+ activejob (= 4.2.1)
15
+ mail (~> 2.5, >= 2.5.4)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ actionpack (4.2.1)
18
+ actionview (= 4.2.1)
19
+ activesupport (= 4.2.1)
20
+ rack (~> 1.6)
21
+ rack-test (~> 0.6.2)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
24
+ actionview (4.2.1)
25
+ activesupport (= 4.2.1)
26
+ builder (~> 3.1)
27
+ erubis (~> 2.7.0)
28
+ rails-dom-testing (~> 1.0, >= 1.0.5)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
30
+ activejob (4.2.1)
31
+ activesupport (= 4.2.1)
32
+ globalid (>= 0.3.0)
33
+ activemodel (4.2.1)
34
+ activesupport (= 4.2.1)
35
+ builder (~> 3.1)
36
+ activerecord (4.2.1)
37
+ activemodel (= 4.2.1)
38
+ activesupport (= 4.2.1)
39
+ arel (~> 6.0)
40
+ activesupport (4.2.1)
41
+ i18n (~> 0.7)
42
+ json (~> 1.7, >= 1.7.7)
43
+ minitest (~> 5.1)
44
+ thread_safe (~> 0.3, >= 0.3.4)
45
+ tzinfo (~> 1.1)
46
+ arel (6.0.0)
47
+ builder (3.2.2)
48
+ diff-lcs (1.2.5)
49
+ erubis (2.7.0)
50
+ globalid (0.3.5)
51
+ activesupport (>= 4.1.0)
52
+ haml (4.0.6)
53
+ tilt
54
+ haml-rails (0.9.0)
55
+ actionpack (>= 4.0.1)
56
+ activesupport (>= 4.0.1)
57
+ haml (>= 4.0.6, < 5.0)
58
+ html2haml (>= 1.0.1)
59
+ railties (>= 4.0.1)
60
+ html2haml (2.0.0)
61
+ erubis (~> 2.7.0)
62
+ haml (~> 4.0.0)
63
+ nokogiri (~> 1.6.0)
64
+ ruby_parser (~> 3.5)
65
+ i18n (0.7.0)
66
+ json (1.8.2)
67
+ loofah (2.0.1)
68
+ nokogiri (>= 1.5.9)
69
+ mail (2.6.3)
70
+ mime-types (>= 1.16, < 3)
71
+ mime-types (2.4.3)
72
+ mini_portile (0.6.2)
73
+ minitest (5.6.0)
74
+ nokogiri (1.6.6.2)
75
+ mini_portile (~> 0.6.0)
76
+ rack (1.6.0)
77
+ rack-test (0.6.3)
78
+ rack (>= 1.0)
79
+ rails (4.2.1)
80
+ actionmailer (= 4.2.1)
81
+ actionpack (= 4.2.1)
82
+ actionview (= 4.2.1)
83
+ activejob (= 4.2.1)
84
+ activemodel (= 4.2.1)
85
+ activerecord (= 4.2.1)
86
+ activesupport (= 4.2.1)
87
+ bundler (>= 1.3.0, < 2.0)
88
+ railties (= 4.2.1)
89
+ sprockets-rails
90
+ rails-deprecated_sanitizer (1.0.3)
91
+ activesupport (>= 4.2.0.alpha)
92
+ rails-dom-testing (1.0.6)
93
+ activesupport (>= 4.2.0.beta, < 5.0)
94
+ nokogiri (~> 1.6.0)
95
+ rails-deprecated_sanitizer (>= 1.0.1)
96
+ rails-html-sanitizer (1.0.2)
97
+ loofah (~> 2.0)
98
+ railties (4.2.1)
99
+ actionpack (= 4.2.1)
100
+ activesupport (= 4.2.1)
101
+ rake (>= 0.8.7)
102
+ thor (>= 0.18.1, < 2.0)
103
+ rake (10.4.2)
104
+ rspec (3.2.0)
105
+ rspec-core (~> 3.2.0)
106
+ rspec-expectations (~> 3.2.0)
107
+ rspec-mocks (~> 3.2.0)
108
+ rspec-core (3.2.3)
109
+ rspec-support (~> 3.2.0)
110
+ rspec-expectations (3.2.1)
111
+ diff-lcs (>= 1.2.0, < 2.0)
112
+ rspec-support (~> 3.2.0)
113
+ rspec-mocks (3.2.1)
114
+ diff-lcs (>= 1.2.0, < 2.0)
115
+ rspec-support (~> 3.2.0)
116
+ rspec-rails (3.2.1)
117
+ actionpack (>= 3.0, < 4.3)
118
+ activesupport (>= 3.0, < 4.3)
119
+ railties (>= 3.0, < 4.3)
120
+ rspec-core (~> 3.2.0)
121
+ rspec-expectations (~> 3.2.0)
122
+ rspec-mocks (~> 3.2.0)
123
+ rspec-support (~> 3.2.0)
124
+ rspec-support (3.2.2)
125
+ rspec_candy (0.4.0)
126
+ rspec
127
+ sneaky-save
128
+ ruby_parser (3.6.6)
129
+ sexp_processor (~> 4.1)
130
+ sexp_processor (4.5.0)
131
+ sneaky-save (0.1.0)
132
+ activerecord (>= 3.2.0)
133
+ sprockets (3.0.1)
134
+ rack (~> 1.0)
135
+ sprockets-rails (2.2.4)
136
+ actionpack (>= 3.0)
137
+ activesupport (>= 3.0)
138
+ sprockets (>= 2.8, < 4.0)
139
+ sqlite3 (1.3.10)
140
+ thor (0.19.1)
141
+ thread_safe (0.3.5)
142
+ tilt (2.0.1)
143
+ tzinfo (1.2.2)
144
+ thread_safe (~> 0.1)
145
+
146
+ PLATFORMS
147
+ ruby
148
+
149
+ DEPENDENCIES
150
+ angular_xss!
151
+ haml
152
+ haml-rails
153
+ rails (~> 4.2)
154
+ rspec
155
+ rspec-rails
156
+ rspec_candy
157
+ sqlite3
@@ -0,0 +1,10 @@
1
+ require 'rake'
2
+ require 'rspec/core/rake_task'
3
+
4
+ desc 'Default: Run all specs for a specific rails version.'
5
+ task :default => :spec
6
+
7
+ desc "Run all specs for a specific rails version"
8
+ RSpec::Core::RakeTask.new(:spec) do |t|
9
+ t.pattern = defined?(SPEC) ? SPEC : ['**/*_spec.rb', '../shared/**/*_spec.rb']
10
+ end
@@ -0,0 +1,4 @@
1
+ .bundle
2
+ db/*.sqlite3
3
+ log/*.log
4
+ tmp/**/*
@@ -0,0 +1,34 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # If you have a Gemfile, require the gems listed there, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(:default, Rails.env) if defined?(Bundler)
8
+
9
+
10
+ module SpecApp
11
+ class Application < Rails::Application
12
+ config.encoding = "utf-8"
13
+
14
+ config.cache_classes = true
15
+ config.whiny_nils = true
16
+
17
+ config.eager_load = false
18
+
19
+ config.consider_all_requests_local = true
20
+ config.action_controller.perform_caching = false
21
+
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ config.action_controller.allow_forgery_protection = false
25
+
26
+ config.action_mailer.delivery_method = :test
27
+
28
+ config.active_support.deprecation = :stderr
29
+
30
+ config.root = File.expand_path('../..', __FILE__)
31
+
32
+ # railties.plugins << Rails::Plugin.new(File.expand_path('../../../../..', __FILE__))
33
+ end
34
+ end
@@ -0,0 +1,13 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ gemfile = File.expand_path('../../Gemfile', __FILE__)
5
+ begin
6
+ ENV['BUNDLE_GEMFILE'] = gemfile
7
+ require 'bundler'
8
+ Bundler.setup
9
+ rescue Bundler::GemNotFound => e
10
+ STDERR.puts e.message
11
+ STDERR.puts "Try running `bundle install`."
12
+ exit!
13
+ end if File.exist?(gemfile)
@@ -0,0 +1,4 @@
1
+ test:
2
+ adapter: sqlite3
3
+ database: ":memory:"
4
+ verbosity: quiet
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ SpecApp::Application.initialize!
@@ -0,0 +1,35 @@
1
+ SpecApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Log error messages when you accidentally call methods on nil.
11
+ config.whiny_nils = true
12
+
13
+ # Show full error reports and disable caching
14
+ config.consider_all_requests_local = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Raise exceptions instead of rendering exception templates
18
+ config.action_dispatch.show_exceptions = false
19
+
20
+ # Disable request forgery protection in test environment
21
+ config.action_controller.allow_forgery_protection = false
22
+
23
+ # Tell Action Mailer not to deliver emails to the real world.
24
+ # The :test delivery method accumulates sent emails in the
25
+ # ActionMailer::Base.deliveries array.
26
+ config.action_mailer.delivery_method = :test
27
+
28
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
29
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
30
+ # like if you have constraints or database-specific column types
31
+ # config.active_record.schema_format = :sql
32
+
33
+ # Print deprecation notices to the stderr
34
+ config.active_support.deprecation = :stderr
35
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ SpecApp::Application.config.secret_key_base = 'cb014a08a45243e7143f31e04774c342c1fba329fd594ae1a480d8283b1a851f425dc08044311fb4be6d000b6e6681de7c76d19148419a5ffa0a9f84556d3b33'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ SpecApp::Application.config.session_store :cookie_store, :key => '_app_root_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # SpecApp::Application.config.session_store :active_record_store
@@ -0,0 +1,3 @@
1
+ SpecApp::Application.routes.draw do
2
+ get ':controller(/:action(/:id(.:format)))'
3
+ end
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby1.8
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,2 @@
1
+ --exclude "spec/*,gems/*"
2
+ --rails
@@ -0,0 +1,27 @@
1
+ $: << File.join(File.dirname(__FILE__), "/../../lib" )
2
+
3
+ ENV['RAILS_ENV'] = 'test'
4
+ ENV['RAILS_ROOT'] = 'app_root'
5
+
6
+ # Load the Rails environment and testing framework
7
+ require "#{File.dirname(__FILE__)}/../app_root/config/environment"
8
+ require 'rspec/rails'
9
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
10
+ require 'rspec_candy/all'
11
+
12
+ # Run the migrations
13
+ print "\033[30m" # dark gray text
14
+ ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
15
+ print "\033[0m"
16
+
17
+ RSpec.configure do |config|
18
+ config.use_transactional_fixtures = true
19
+ config.use_instantiated_fixtures = false
20
+
21
+ config.mock_with :rspec do |c|
22
+ c.syntax = [:should, :expect]
23
+ end
24
+ config.expect_with :rspec do |c|
25
+ c.syntax = [:should, :expect]
26
+ end
27
+ end
@@ -7,6 +7,9 @@
7
7
  {{safe}}
8
8
  </div>
9
9
 
10
+ <%= content_tag(:span, '{{unsafe}}') %>
11
+ <%= content_tag(:span, '{{safe}}'.html_safe) %>
12
+
10
13
  <%= '{&lcub;unsafe}}' %>
11
14
  <%= '{&lbrace;unsafe}}' %>
12
15
  <%= '{&#x7b;unsafe}}' %>
@@ -4,6 +4,9 @@
4
4
 
5
5
  {{safe}}
6
6
 
7
+ = content_tag(:span, '{{unsafe}}')
8
+ = content_tag(:span, '{{safe}}'.html_safe)
9
+
7
10
  = '{&lcub;unsafe}}'
8
11
  = '{&lbrace;unsafe}}'
9
12
  = '{&#x7b;unsafe}}'
metadata CHANGED
@@ -1,52 +1,64 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: angular_xss
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 2
10
+ version: 0.2.2
5
11
  platform: ruby
6
- authors:
12
+ authors:
7
13
  - Henning Koch
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
- date: 2015-04-13 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2015-04-17 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
14
22
  name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
23
  prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: haml
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
31
27
  - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 3.1.5
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
34
33
  type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: haml
35
37
  prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
38
41
  - - ">="
39
- - !ruby/object:Gem::Version
42
+ - !ruby/object:Gem::Version
43
+ hash: 9
44
+ segments:
45
+ - 3
46
+ - 1
47
+ - 5
40
48
  version: 3.1.5
41
- description: Patches rails_xss and Haml so AngularJS interpolations are auto-escaped
42
- in unsafe strings.
49
+ type: :runtime
50
+ version_requirements: *id002
51
+ description: Patches rails_xss and Haml so AngularJS interpolations are auto-escaped in unsafe strings.
43
52
  email: henning.koch@makandra.de
44
53
  executables: []
54
+
45
55
  extensions: []
56
+
46
57
  extra_rdoc_files: []
47
- files:
48
- - ".gitignore"
49
- - ".travis.yml"
58
+
59
+ files:
60
+ - .gitignore
61
+ - .travis.yml
50
62
  - LICENSE
51
63
  - README.md
52
64
  - Rakefile
@@ -56,6 +68,7 @@ files:
56
68
  - lib/angular_xss/erb.rb
57
69
  - lib/angular_xss/escaper.rb
58
70
  - lib/angular_xss/haml.rb
71
+ - lib/angular_xss/safe_buffer.rb
59
72
  - lib/angular_xss/version.rb
60
73
  - spec/rails-2.3/Gemfile
61
74
  - spec/rails-2.3/Gemfile.lock
@@ -93,6 +106,27 @@ files:
93
106
  - spec/rails-3.2/app_root/script/rails
94
107
  - spec/rails-3.2/rcov.opts
95
108
  - spec/rails-3.2/spec/spec_helper.rb
109
+ - spec/rails-4.2/.rspec
110
+ - spec/rails-4.2/Gemfile
111
+ - spec/rails-4.2/Gemfile.lock
112
+ - spec/rails-4.2/Rakefile
113
+ - spec/rails-4.2/app_root/.gitignore
114
+ - spec/rails-4.2/app_root/config/application.rb
115
+ - spec/rails-4.2/app_root/config/boot.rb
116
+ - spec/rails-4.2/app_root/config/database.yml
117
+ - spec/rails-4.2/app_root/config/environment.rb
118
+ - spec/rails-4.2/app_root/config/environments/test.rb
119
+ - spec/rails-4.2/app_root/config/initializers/backtrace_silencers.rb
120
+ - spec/rails-4.2/app_root/config/initializers/inflections.rb
121
+ - spec/rails-4.2/app_root/config/initializers/mime_types.rb
122
+ - spec/rails-4.2/app_root/config/initializers/secret_token.rb
123
+ - spec/rails-4.2/app_root/config/initializers/session_store.rb
124
+ - spec/rails-4.2/app_root/config/routes.rb
125
+ - spec/rails-4.2/app_root/lib/tasks/.gitkeep
126
+ - spec/rails-4.2/app_root/log/.gitkeep
127
+ - spec/rails-4.2/app_root/script/rails
128
+ - spec/rails-4.2/rcov.opts
129
+ - spec/rails-4.2/spec/spec_helper.rb
96
130
  - spec/shared/app_root/app/controllers/application_controller.rb
97
131
  - spec/shared/app_root/app/helpers/application_helper.rb
98
132
  - spec/shared/app_root/app/models/.gitkeep
@@ -103,32 +137,41 @@ files:
103
137
  - spec/shared/support/engine_preventing_angular_xss.rb
104
138
  - spec/shared/tests/erb_spec.rb
105
139
  - spec/shared/tests/haml_spec.rb
140
+ has_rdoc: true
106
141
  homepage: https://github.com/makandra/angular_xss
107
- licenses:
142
+ licenses:
108
143
  - MIT
109
- metadata: {}
110
144
  post_install_message:
111
145
  rdoc_options: []
112
- require_paths:
146
+
147
+ require_paths:
113
148
  - lib
114
- required_ruby_version: !ruby/object:Gem::Requirement
115
- requirements:
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
116
152
  - - ">="
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- required_rubygems_version: !ruby/object:Gem::Requirement
120
- requirements:
153
+ - !ruby/object:Gem::Version
154
+ hash: 3
155
+ segments:
156
+ - 0
157
+ version: "0"
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
121
161
  - - ">="
122
- - !ruby/object:Gem::Version
123
- version: '0'
162
+ - !ruby/object:Gem::Version
163
+ hash: 3
164
+ segments:
165
+ - 0
166
+ version: "0"
124
167
  requirements: []
168
+
125
169
  rubyforge_project:
126
- rubygems_version: 2.2.2
170
+ rubygems_version: 1.6.2
127
171
  signing_key:
128
- specification_version: 4
129
- summary: Patches rails_xss and Haml so AngularJS interpolations are auto-escaped in
130
- unsafe strings.
131
- test_files:
172
+ specification_version: 3
173
+ summary: Patches rails_xss and Haml so AngularJS interpolations are auto-escaped in unsafe strings.
174
+ test_files:
132
175
  - spec/rails-2.3/Gemfile
133
176
  - spec/rails-2.3/Gemfile.lock
134
177
  - spec/rails-2.3/Rakefile
@@ -165,6 +208,27 @@ test_files:
165
208
  - spec/rails-3.2/app_root/script/rails
166
209
  - spec/rails-3.2/rcov.opts
167
210
  - spec/rails-3.2/spec/spec_helper.rb
211
+ - spec/rails-4.2/.rspec
212
+ - spec/rails-4.2/Gemfile
213
+ - spec/rails-4.2/Gemfile.lock
214
+ - spec/rails-4.2/Rakefile
215
+ - spec/rails-4.2/app_root/.gitignore
216
+ - spec/rails-4.2/app_root/config/application.rb
217
+ - spec/rails-4.2/app_root/config/boot.rb
218
+ - spec/rails-4.2/app_root/config/database.yml
219
+ - spec/rails-4.2/app_root/config/environment.rb
220
+ - spec/rails-4.2/app_root/config/environments/test.rb
221
+ - spec/rails-4.2/app_root/config/initializers/backtrace_silencers.rb
222
+ - spec/rails-4.2/app_root/config/initializers/inflections.rb
223
+ - spec/rails-4.2/app_root/config/initializers/mime_types.rb
224
+ - spec/rails-4.2/app_root/config/initializers/secret_token.rb
225
+ - spec/rails-4.2/app_root/config/initializers/session_store.rb
226
+ - spec/rails-4.2/app_root/config/routes.rb
227
+ - spec/rails-4.2/app_root/lib/tasks/.gitkeep
228
+ - spec/rails-4.2/app_root/log/.gitkeep
229
+ - spec/rails-4.2/app_root/script/rails
230
+ - spec/rails-4.2/rcov.opts
231
+ - spec/rails-4.2/spec/spec_helper.rb
168
232
  - spec/shared/app_root/app/controllers/application_controller.rb
169
233
  - spec/shared/app_root/app/helpers/application_helper.rb
170
234
  - spec/shared/app_root/app/models/.gitkeep
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: bd5001cfe150eb1c470f46cdabc75fa7c93c6eda
4
- data.tar.gz: d3fa3b7a9ea77d3f47bb4ff3adec608427f8bb83
5
- SHA512:
6
- metadata.gz: 770c23bad28c0c1f9e46495e292e3bce47741e423fdece2735c980c74c0ac9b202766e614153270179d8027424a0054267299b33bd7b6b0619a5d3ca1b737376
7
- data.tar.gz: 84e8ab293070e44d74242692147e15e0b505c1c5bdd7ca1856893115160fba93fd04c650fe026589e3f583b170b7f12a0633c709522af70754ebafbdc0ec61b3