swf_fu 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.rdoc +2 -2
- data/app/models/swf_fu/generator.rb +10 -10
- data/lib/swf_fu/version.rb +1 -1
- data/test/dummy/Gemfile +2 -2
- data/test/dummy/Gemfile.lock +8 -2
- data/test/dummy/config/application.rb +7 -3
- data/test/dummy/config/environments/development.rb +2 -2
- data/test/dummy/config/environments/test.rb +1 -1
- data/test/dummy/config/initializers/session_store.rb +1 -1
- data/test/dummy/config/initializers/wrap_parameters.rb +1 -1
- data/test/dummy/log/test.log +320 -0
- data/test/support/assert_same_striped.rb +2 -1
- data/test/support/fixtures/results.rb +5 -5
- data/test/swf_tag_test.rb +4 -2
- metadata +5 -21
data/LICENSE
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Copyright (c) 2010, Marc-André Lafortune.
|
3
3
|
# All rights reserved.
|
4
4
|
# Inspired by FlashObject by Davide D'Agostino aka DAddYE (http://www.lipsiasoft.com)
|
5
|
-
# Uses SWFObject.js 2.
|
5
|
+
# Uses SWFObject.js 2.2 (http://code.google.com/p/swfobject)
|
6
6
|
#
|
7
7
|
# Licensed under the terms of the (modified) BSD License below:
|
8
8
|
#
|
data/README.rdoc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= +swf_fu+
|
1
|
+
= +swf_fu+ {<img src="https://travis-ci.org/marcandre/swf_fu.png?branch=master">}[https://travis-ci.org/marcandre/swf_fu]
|
2
2
|
|
3
3
|
With the +swf_fu+ plugin, rails treats your swf files like any other asset (images, javascripts, etc...).
|
4
4
|
|
@@ -91,4 +91,4 @@ It takes into account the global setting +asset_host+, like any other asset:
|
|
91
91
|
image_path("logo.jpg") => "http://assets.example.com/images/logo.jpg"
|
92
92
|
swf_path("fonts/optima") => "http://assets.example.com/swfs/fonts/optima.swf"
|
93
93
|
|
94
|
-
Copyright (c) 2010-
|
94
|
+
Copyright (c) 2010-2013 Marc-André Lafortune, released under the BSD license
|
@@ -6,12 +6,12 @@ module SwfFu
|
|
6
6
|
:mode => :dynamic,
|
7
7
|
:auto_install => "expressInstall",
|
8
8
|
:alt => <<-"EOS".squeeze(" ").strip.freeze
|
9
|
-
<a href="
|
10
|
-
<img src="
|
9
|
+
<a href="//www.adobe.com/go/getflashplayer">
|
10
|
+
<img src="//www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
|
11
11
|
</a>
|
12
12
|
EOS
|
13
13
|
}.freeze
|
14
|
-
|
14
|
+
|
15
15
|
class Generator # :nodoc:
|
16
16
|
VALID_MODES = [:static, :dynamic]
|
17
17
|
def initialize(source, options, view)
|
@@ -49,7 +49,7 @@ module SwfFu
|
|
49
49
|
@options[:alt] = @view.capture(&block) if block_given?
|
50
50
|
send(@mode)
|
51
51
|
end
|
52
|
-
|
52
|
+
|
53
53
|
private
|
54
54
|
def convert_to_hash(s)
|
55
55
|
case s
|
@@ -67,13 +67,13 @@ module SwfFu
|
|
67
67
|
raise ArgumentError, "#{s} should be a Hash, a String or nil"
|
68
68
|
end
|
69
69
|
end
|
70
|
-
|
70
|
+
|
71
71
|
def convert_to_string(h)
|
72
72
|
h.map do |key_value|
|
73
73
|
key_value.map{|val| CGI::escape(val.to_s)}.join("=")
|
74
74
|
end.join("&")
|
75
75
|
end
|
76
|
-
|
76
|
+
|
77
77
|
def static
|
78
78
|
param_list = @options[:parameters].map{|k,v| %(<param name="#{k}" value="#{v}"/>) }.join("\n")
|
79
79
|
param_list += %(\n<param name="flashvars" value="#{convert_to_string(@options[:flashvars])}"/>) unless @options[:flashvars].empty?
|
@@ -99,7 +99,7 @@ module SwfFu
|
|
99
99
|
r << library_check
|
100
100
|
r
|
101
101
|
end
|
102
|
-
|
102
|
+
|
103
103
|
def dynamic
|
104
104
|
@options[:html_options] = @options[:html_options].merge(:id => @options[:id])
|
105
105
|
@options[:parameters] = @options[:parameters].dup # don't modify the original parameters
|
@@ -109,7 +109,7 @@ module SwfFu
|
|
109
109
|
)
|
110
110
|
|
111
111
|
preambule = @options[:switch_off_auto_hide_show] ? "swfobject.switchOffAutoHideShow();" : ""
|
112
|
-
r = @view.javascript_tag(preambule + "swfobject.embedSWF(#{args})")
|
112
|
+
r = @view.javascript_tag(preambule + "swfobject.embedSWF(#{args})")
|
113
113
|
r << @view.content_tag("div", @options[:alt].html_safe, :id => @options[:div_id])
|
114
114
|
r << @view.javascript_tag("swfobject.addDomLoadEvent(function(){#{extend_js}})") if @options[:javascript_class]
|
115
115
|
r << library_check
|
@@ -126,7 +126,7 @@ module SwfFu
|
|
126
126
|
args = [args] unless args.is_a?(Array)
|
127
127
|
"SwfFu.setup($('##{@options[:id]}')[0], #{@options[:javascript_class]}, [#{convert_to_escaped_arguments(*args)}])"
|
128
128
|
end
|
129
|
-
|
129
|
+
|
130
130
|
def library_check
|
131
131
|
return "" unless 'development' == ENV['RAILS_ENV']
|
132
132
|
@view.javascript_tag(<<-"EOS")
|
@@ -136,4 +136,4 @@ module SwfFu
|
|
136
136
|
EOS
|
137
137
|
end
|
138
138
|
end #class Generator
|
139
|
-
end
|
139
|
+
end
|
data/lib/swf_fu/version.rb
CHANGED
data/test/dummy/Gemfile
CHANGED
@@ -5,8 +5,7 @@ gem 'rails', '3.2.6'
|
|
5
5
|
# Bundle edge Rails instead:
|
6
6
|
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
7
7
|
|
8
|
-
gem 'sqlite3'
|
9
|
-
|
8
|
+
# gem 'sqlite3'
|
10
9
|
|
11
10
|
# Gems used only for assets and not required
|
12
11
|
# in production environments by default.
|
@@ -22,6 +21,7 @@ end
|
|
22
21
|
|
23
22
|
gem 'jquery-rails'
|
24
23
|
|
24
|
+
gem 'swf_fu', :path => "../.."
|
25
25
|
# To use ActiveModel has_secure_password
|
26
26
|
# gem 'bcrypt-ruby', '~> 3.0.0'
|
27
27
|
|
data/test/dummy/Gemfile.lock
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
swf_fu (2.0.4)
|
5
|
+
coffee-script
|
6
|
+
rails (>= 3.1)
|
7
|
+
|
1
8
|
GEM
|
2
9
|
remote: https://rubygems.org/
|
3
10
|
specs:
|
@@ -88,7 +95,6 @@ GEM
|
|
88
95
|
hike (~> 1.2)
|
89
96
|
rack (~> 1.0)
|
90
97
|
tilt (~> 1.1, != 1.3.0)
|
91
|
-
sqlite3 (1.3.6)
|
92
98
|
thor (0.15.4)
|
93
99
|
tilt (1.3.3)
|
94
100
|
treetop (1.4.10)
|
@@ -107,5 +113,5 @@ DEPENDENCIES
|
|
107
113
|
jquery-rails
|
108
114
|
rails (= 3.2.6)
|
109
115
|
sass-rails (~> 3.2.3)
|
110
|
-
|
116
|
+
swf_fu!
|
111
117
|
uglifier (>= 1.0.3)
|
@@ -1,6 +1,11 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
|
-
|
3
|
+
# See http://stackoverflow.com/questions/3954307/rails-3-how-do-i-avoid-database-altogether
|
4
|
+
require "action_controller/railtie"
|
5
|
+
require "action_mailer/railtie"
|
6
|
+
require "active_resource/railtie"
|
7
|
+
require "rails/test_unit/railtie"
|
8
|
+
require "sprockets/railtie"
|
4
9
|
|
5
10
|
if defined?(Bundler)
|
6
11
|
# If you precompile assets before deploying to production, use this line
|
@@ -8,7 +13,6 @@ if defined?(Bundler)
|
|
8
13
|
# If you want your assets lazily compiled in production, use this line
|
9
14
|
# Bundler.require(:default, :assets, Rails.env)
|
10
15
|
end
|
11
|
-
require_relative "../../../lib/swf_fu"
|
12
16
|
|
13
17
|
module Dummy
|
14
18
|
class Application < Rails::Application
|
@@ -52,7 +56,7 @@ module Dummy
|
|
52
56
|
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
53
57
|
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
54
58
|
# parameters by using an attr_accessible or attr_protected declaration.
|
55
|
-
config.active_record.whitelist_attributes = true
|
59
|
+
#config.active_record.whitelist_attributes = true
|
56
60
|
|
57
61
|
# Enable the asset pipeline
|
58
62
|
config.assets.enabled = true
|
@@ -23,11 +23,11 @@ Dummy::Application.configure do
|
|
23
23
|
config.action_dispatch.best_standards_support = :builtin
|
24
24
|
|
25
25
|
# Raise exception on mass assignment protection for Active Record models
|
26
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
26
|
+
#config.active_record.mass_assignment_sanitizer = :strict
|
27
27
|
|
28
28
|
# Log the query plan for queries taking more than this (works
|
29
29
|
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
30
|
+
#config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
31
|
|
32
32
|
# Do not compress assets
|
33
33
|
config.assets.compress = false
|
@@ -30,7 +30,7 @@ Dummy::Application.configure do
|
|
30
30
|
config.action_mailer.delivery_method = :test
|
31
31
|
|
32
32
|
# Raise exception on mass assignment protection for Active Record models
|
33
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
33
|
+
#config.active_record.mass_assignment_sanitizer = :strict
|
34
34
|
|
35
35
|
# Print deprecation notices to the stderr
|
36
36
|
config.active_support.deprecation = :stderr
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
Dummy::Application.config.session_store :cookie_store, key
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
4
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
7
|
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format
|
8
|
+
wrap_parameters :format => [:json]
|
9
9
|
end
|
10
10
|
|
11
11
|
# Disable root element in JSON by default.
|
data/test/dummy/log/test.log
CHANGED
@@ -73,3 +73,323 @@ Completed 200 OK in 16ms (Views: 15.2ms | ActiveRecord: 0.0ms)
|
|
73
73
|
[1m[35m (0.1ms)[0m rollback transaction
|
74
74
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
75
75
|
[1m[35m (0.0ms)[0m rollback transaction
|
76
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
77
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
78
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
79
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
80
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
81
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
82
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
83
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
84
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
85
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
86
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
87
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
88
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
89
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
90
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
91
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
92
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
93
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
94
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
95
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
96
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
97
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
98
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
99
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
100
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
101
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
102
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
103
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
104
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
105
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
106
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
107
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
108
|
+
[1m[36m (0.9ms)[0m [1mbegin transaction[0m
|
109
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
110
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
111
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
112
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
113
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
114
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
115
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
116
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
117
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
118
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
119
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
120
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
121
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
122
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
123
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
124
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
125
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
126
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
127
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
128
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
129
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
130
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
131
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
132
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
133
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
134
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
135
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
136
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
137
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
138
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
139
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
140
|
+
[1m[36m (0.7ms)[0m [1mbegin transaction[0m
|
141
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
142
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
143
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
144
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
145
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
146
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
147
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
148
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
149
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
150
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
151
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
152
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
153
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
154
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
155
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
156
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
157
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
158
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
159
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
160
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
161
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
162
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
163
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
164
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
165
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
166
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
167
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
168
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
169
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
170
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
171
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
172
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
173
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
174
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
175
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
176
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
177
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
178
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
179
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
180
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
181
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
182
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
183
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
184
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
185
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
186
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
187
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
188
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
189
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
190
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
191
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
192
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
193
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
194
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
195
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
196
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
197
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
198
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
199
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
200
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
201
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
202
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
203
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
204
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
205
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
206
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
207
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
208
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
209
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
210
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
211
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
212
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
213
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
214
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
215
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
216
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
217
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
218
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
219
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
220
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
221
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
222
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
223
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
224
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
225
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
226
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
227
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
228
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
229
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
230
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
231
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
232
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
233
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
234
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
235
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
236
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
237
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
238
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
239
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
240
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
241
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
242
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
243
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
244
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
245
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
246
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
247
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
248
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
249
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
250
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
251
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
252
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
253
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
254
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
255
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
256
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
257
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
258
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
259
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
260
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
261
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
262
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
263
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
264
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
265
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
266
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
267
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
268
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
269
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
270
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
271
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
272
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
273
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
274
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
275
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
276
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
277
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
278
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
279
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
280
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
281
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
282
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
283
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
284
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
285
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
286
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
287
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
288
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
289
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
290
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
291
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
292
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
293
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
294
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
295
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
296
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
297
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
298
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
299
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
300
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
301
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
302
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
303
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
304
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
305
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
306
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
307
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
308
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
309
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
310
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
311
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
312
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
313
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
314
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
315
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
316
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
317
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
318
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
319
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
320
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
321
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
322
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
324
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
325
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
326
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
327
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
328
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
329
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
330
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
331
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
332
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
333
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
334
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
335
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
336
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
337
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
338
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
340
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
342
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
343
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
344
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
345
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
346
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
347
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
348
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
349
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
350
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
352
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
353
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
354
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
355
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
356
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
357
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
358
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
359
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
360
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
361
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
362
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
363
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
364
|
+
[1m[36m (1.7ms)[0m [1mbegin transaction[0m
|
365
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
366
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
367
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
368
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
369
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
370
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
371
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
372
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
373
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
374
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
375
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
376
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
377
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
378
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
379
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
380
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
381
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
382
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
383
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
384
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
385
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
386
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
387
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
388
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
389
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
390
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
391
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
392
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
393
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
394
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
395
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
@@ -1,4 +1,5 @@
|
|
1
|
-
def assert_same_stripped(expect, test)
|
1
|
+
def assert_same_stripped(expect, test, *equivalencies)
|
2
|
+
equivalencies.each{|look, ok| test.gsub! look, ok }
|
2
3
|
expect, test = [expect, test].map{|s| s.split("\n").map(&:strip)}
|
3
4
|
same = expect & test
|
4
5
|
delta_expect, delta_test = [expect, test].map{|a| a-same}
|
@@ -4,8 +4,8 @@ DYNAMIC_RESULT = <<'EOS'
|
|
4
4
|
//<![CDATA[
|
5
5
|
swfobject.embedSWF("/swfs/mySwf.swf","mySwf_div","456","123","7","/swfs/expressInstall.swf",{"myVar":"value 1 \u003E 2","id":"mySwf"},{"play":true},{"id":"mySwf"})
|
6
6
|
//]]>
|
7
|
-
</script><div id="mySwf_div"><a href="
|
8
|
-
<img src="
|
7
|
+
</script><div id="mySwf_div"><a href="//www.adobe.com/go/getflashplayer">
|
8
|
+
<img src="//www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
|
9
9
|
</a></div><script type="text/javascript">
|
10
10
|
//<![CDATA[
|
11
11
|
swfobject.addDomLoadEvent(function(){SwfFu.setup($('#mySwf')[0], SomeClass, [{"be":"good"}])})
|
@@ -27,8 +27,8 @@ swfobject.registerObject("mySwf_container", "7", "/swfs/expressInstall.swf");
|
|
27
27
|
<param name="play" value="true"/>
|
28
28
|
<param name="flashvars" value="myVar=value+1+%3E+2&id=mySwf"/>
|
29
29
|
<!--<![endif]-->
|
30
|
-
<a href="
|
31
|
-
<img src="
|
30
|
+
<a href="//www.adobe.com/go/getflashplayer">
|
31
|
+
<img src="//www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
|
32
32
|
</a>
|
33
33
|
<!--[if !IE]>-->
|
34
34
|
</object>
|
@@ -38,4 +38,4 @@ swfobject.registerObject("mySwf_container", "7", "/swfs/expressInstall.swf");
|
|
38
38
|
SwfFu.setup($('#mySwf')[0], SomeClass, [{"be":"good"}])
|
39
39
|
//]]>
|
40
40
|
</script>
|
41
|
-
EOS
|
41
|
+
EOS
|
data/test/swf_tag_test.rb
CHANGED
@@ -62,7 +62,8 @@ class SwfTagTest < ActionView::TestCase
|
|
62
62
|
end
|
63
63
|
|
64
64
|
should "produce the expected code" do
|
65
|
-
assert_same_stripped STATIC_RESULT, swf_tag("mySwf", COMPLEX_OPTIONS.merge(:html_options => {:class => "lots"}.freeze).freeze)
|
65
|
+
assert_same_stripped STATIC_RESULT, swf_tag("mySwf", COMPLEX_OPTIONS.merge(:html_options => {:class => "lots"}.freeze).freeze),
|
66
|
+
[%q[value="id=mySwf&myVar=value+1+%3E+2"], %q[value="myVar=value+1+%3E+2&id=mySwf"]]
|
66
67
|
end
|
67
68
|
|
68
69
|
teardown { ActionView::Base.swf_default_options = {} }
|
@@ -70,7 +71,8 @@ class SwfTagTest < ActionView::TestCase
|
|
70
71
|
|
71
72
|
context "with dynamic mode" do
|
72
73
|
should "produce the expected code" do
|
73
|
-
assert_same_stripped DYNAMIC_RESULT, swf_tag("mySwf", COMPLEX_OPTIONS)
|
74
|
+
assert_same_stripped DYNAMIC_RESULT, swf_tag("mySwf", COMPLEX_OPTIONS),
|
75
|
+
[%q[{"id":"mySwf","myVar":"value 1 \u003E 2"}], %q[{"myVar":"value 1 \u003E 2","id":"mySwf"}]]
|
74
76
|
end
|
75
77
|
|
76
78
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swf_fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -59,22 +59,6 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: sqlite3
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
78
62
|
description: Treat your swf files like other assets
|
79
63
|
email:
|
80
64
|
- github@marc-andre.ca
|
@@ -170,7 +154,7 @@ files:
|
|
170
154
|
- test/swf_path_test.rb
|
171
155
|
- test/swf_tag_test.rb
|
172
156
|
- test/test_helper.rb
|
173
|
-
homepage:
|
157
|
+
homepage: https://github.com/marcandre/swf_fu
|
174
158
|
licenses: []
|
175
159
|
post_install_message:
|
176
160
|
rdoc_options: []
|
@@ -184,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
168
|
version: '0'
|
185
169
|
segments:
|
186
170
|
- 0
|
187
|
-
hash: -
|
171
|
+
hash: -199881685857687227
|
188
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
189
173
|
none: false
|
190
174
|
requirements:
|
@@ -193,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
177
|
version: '0'
|
194
178
|
segments:
|
195
179
|
- 0
|
196
|
-
hash: -
|
180
|
+
hash: -199881685857687227
|
197
181
|
requirements: []
|
198
182
|
rubyforge_project:
|
199
183
|
rubygems_version: 1.8.24
|