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 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.1 (http://code.google.com/p/swfobject)
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
  #
@@ -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-2012 Marc-André Lafortune, released under the BSD license
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="http://www.adobe.com/go/getflashplayer">
10
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
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
@@ -1,3 +1,3 @@
1
1
  module SwfFu
2
- VERSION = '2.0.3'
2
+ VERSION = '2.0.4'
3
3
  end
@@ -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
 
@@ -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
- sqlite3
116
+ swf_fu!
111
117
  uglifier (>= 1.0.3)
@@ -1,6 +1,11 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
- require 'rails/all'
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: '_dummy_session'
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: [:json]
8
+ wrap_parameters :format => [:json]
9
9
  end
10
10
 
11
11
  # Disable root element in JSON by default.
@@ -73,3 +73,323 @@ Completed 200 OK in 16ms (Views: 15.2ms | ActiveRecord: 0.0ms)
73
73
   (0.1ms) rollback transaction
74
74
   (0.0ms) begin transaction
75
75
   (0.0ms) rollback transaction
76
+  (0.3ms) begin transaction
77
+  (0.1ms) rollback transaction
78
+  (0.1ms) begin transaction
79
+  (0.1ms) rollback transaction
80
+  (0.0ms) begin transaction
81
+  (0.0ms) rollback transaction
82
+  (0.0ms) begin transaction
83
+  (0.0ms) rollback transaction
84
+  (0.1ms) begin transaction
85
+  (0.1ms) rollback transaction
86
+  (0.0ms) begin transaction
87
+  (0.0ms) rollback transaction
88
+  (0.0ms) begin transaction
89
+  (0.1ms) rollback transaction
90
+  (0.0ms) begin transaction
91
+  (0.0ms) rollback transaction
92
+  (0.0ms) begin transaction
93
+  (0.0ms) rollback transaction
94
+  (0.0ms) begin transaction
95
+  (0.0ms) rollback transaction
96
+  (0.0ms) begin transaction
97
+  (0.0ms) rollback transaction
98
+  (0.0ms) begin transaction
99
+  (0.0ms) rollback transaction
100
+  (0.0ms) begin transaction
101
+  (0.0ms) rollback transaction
102
+  (0.0ms) begin transaction
103
+  (0.0ms) rollback transaction
104
+  (0.0ms) begin transaction
105
+  (0.0ms) rollback transaction
106
+  (0.0ms) begin transaction
107
+  (0.0ms) rollback transaction
108
+  (0.9ms) begin transaction
109
+  (0.1ms) rollback transaction
110
+  (0.1ms) begin transaction
111
+  (0.1ms) rollback transaction
112
+  (0.1ms) begin transaction
113
+  (0.1ms) rollback transaction
114
+  (0.0ms) begin transaction
115
+  (0.0ms) rollback transaction
116
+  (0.1ms) begin transaction
117
+  (0.1ms) rollback transaction
118
+  (0.0ms) begin transaction
119
+  (0.0ms) rollback transaction
120
+  (0.0ms) begin transaction
121
+  (0.1ms) rollback transaction
122
+  (0.0ms) begin transaction
123
+  (0.0ms) rollback transaction
124
+  (0.0ms) begin transaction
125
+  (0.1ms) rollback transaction
126
+  (0.0ms) begin transaction
127
+  (0.0ms) rollback transaction
128
+  (0.0ms) begin transaction
129
+  (0.1ms) rollback transaction
130
+  (0.0ms) begin transaction
131
+  (0.1ms) rollback transaction
132
+  (0.0ms) begin transaction
133
+  (0.1ms) rollback transaction
134
+  (0.0ms) begin transaction
135
+  (0.0ms) rollback transaction
136
+  (0.0ms) begin transaction
137
+  (0.1ms) rollback transaction
138
+  (0.0ms) begin transaction
139
+  (0.1ms) rollback transaction
140
+  (0.7ms) begin transaction
141
+  (0.1ms) rollback transaction
142
+  (0.2ms) begin transaction
143
+  (0.0ms) rollback transaction
144
+  (0.0ms) begin transaction
145
+  (0.0ms) rollback transaction
146
+  (0.0ms) begin transaction
147
+  (0.0ms) rollback transaction
148
+  (0.0ms) begin transaction
149
+  (0.0ms) rollback transaction
150
+  (0.0ms) begin transaction
151
+  (0.0ms) rollback transaction
152
+  (0.0ms) begin transaction
153
+  (0.0ms) rollback transaction
154
+  (0.0ms) begin transaction
155
+  (0.0ms) rollback transaction
156
+  (0.0ms) begin transaction
157
+  (0.0ms) rollback transaction
158
+  (0.0ms) begin transaction
159
+  (0.0ms) rollback transaction
160
+  (0.0ms) begin transaction
161
+  (0.0ms) rollback transaction
162
+  (0.0ms) begin transaction
163
+  (0.1ms) rollback transaction
164
+  (0.1ms) begin transaction
165
+  (0.1ms) rollback transaction
166
+  (0.1ms) begin transaction
167
+  (0.1ms) rollback transaction
168
+  (0.1ms) begin transaction
169
+  (0.1ms) rollback transaction
170
+  (0.4ms) begin transaction
171
+  (0.2ms) rollback transaction
172
+  (0.2ms) begin transaction
173
+  (0.1ms) rollback transaction
174
+  (0.0ms) begin transaction
175
+  (0.0ms) rollback transaction
176
+  (0.0ms) begin transaction
177
+  (0.0ms) rollback transaction
178
+  (0.0ms) begin transaction
179
+  (0.0ms) rollback transaction
180
+  (0.0ms) begin transaction
181
+  (0.0ms) rollback transaction
182
+  (0.2ms) begin transaction
183
+  (0.1ms) rollback transaction
184
+  (0.0ms) begin transaction
185
+  (0.0ms) rollback transaction
186
+  (0.0ms) begin transaction
187
+  (0.0ms) rollback transaction
188
+  (0.0ms) begin transaction
189
+  (0.1ms) rollback transaction
190
+  (0.0ms) begin transaction
191
+  (0.0ms) rollback transaction
192
+  (0.0ms) begin transaction
193
+  (0.1ms) rollback transaction
194
+  (0.0ms) begin transaction
195
+  (0.1ms) rollback transaction
196
+  (0.1ms) begin transaction
197
+  (0.1ms) rollback transaction
198
+  (0.1ms) begin transaction
199
+  (0.1ms) rollback transaction
200
+  (0.2ms) begin transaction
201
+  (0.1ms) rollback transaction
202
+  (0.0ms) begin transaction
203
+  (0.0ms) rollback transaction
204
+  (0.2ms) begin transaction
205
+  (0.1ms) rollback transaction
206
+  (0.1ms) begin transaction
207
+  (0.0ms) rollback transaction
208
+  (0.0ms) begin transaction
209
+  (0.0ms) rollback transaction
210
+  (0.0ms) begin transaction
211
+  (0.0ms) rollback transaction
212
+  (0.0ms) begin transaction
213
+  (0.0ms) rollback transaction
214
+  (0.0ms) begin transaction
215
+  (0.0ms) rollback transaction
216
+  (0.0ms) begin transaction
217
+  (0.0ms) rollback transaction
218
+  (0.0ms) begin transaction
219
+  (0.0ms) rollback transaction
220
+  (0.0ms) begin transaction
221
+  (0.0ms) rollback transaction
222
+  (0.0ms) begin transaction
223
+  (0.0ms) rollback transaction
224
+  (0.0ms) begin transaction
225
+  (0.0ms) rollback transaction
226
+  (0.0ms) begin transaction
227
+  (0.0ms) rollback transaction
228
+  (0.0ms) begin transaction
229
+  (0.1ms) rollback transaction
230
+  (0.1ms) begin transaction
231
+  (0.1ms) rollback transaction
232
+  (0.0ms) begin transaction
233
+  (0.1ms) rollback transaction
234
+  (0.0ms) begin transaction
235
+  (0.1ms) rollback transaction
236
+  (0.2ms) begin transaction
237
+  (0.1ms) rollback transaction
238
+  (0.0ms) begin transaction
239
+  (0.0ms) rollback transaction
240
+  (0.0ms) begin transaction
241
+  (0.0ms) rollback transaction
242
+  (0.0ms) begin transaction
243
+  (0.0ms) rollback transaction
244
+  (0.1ms) begin transaction
245
+  (0.0ms) rollback transaction
246
+  (0.0ms) begin transaction
247
+  (0.2ms) rollback transaction
248
+  (0.1ms) begin transaction
249
+  (0.1ms) rollback transaction
250
+  (0.2ms) begin transaction
251
+  (0.1ms) rollback transaction
252
+  (0.1ms) begin transaction
253
+  (0.1ms) rollback transaction
254
+  (0.0ms) begin transaction
255
+  (0.1ms) rollback transaction
256
+  (0.0ms) begin transaction
257
+  (0.1ms) rollback transaction
258
+  (0.0ms) begin transaction
259
+  (0.1ms) rollback transaction
260
+  (0.0ms) begin transaction
261
+  (0.1ms) rollback transaction
262
+  (0.1ms) begin transaction
263
+  (0.1ms) rollback transaction
264
+  (0.0ms) begin transaction
265
+  (0.1ms) rollback transaction
266
+  (0.1ms) begin transaction
267
+  (0.1ms) rollback transaction
268
+  (0.2ms) begin transaction
269
+  (0.1ms) rollback transaction
270
+  (0.1ms) begin transaction
271
+  (0.0ms) rollback transaction
272
+  (0.0ms) begin transaction
273
+  (0.0ms) rollback transaction
274
+  (0.0ms) begin transaction
275
+  (0.0ms) rollback transaction
276
+  (0.0ms) begin transaction
277
+  (0.5ms) rollback transaction
278
+  (0.0ms) begin transaction
279
+  (0.0ms) rollback transaction
280
+  (0.0ms) begin transaction
281
+  (0.1ms) rollback transaction
282
+  (0.3ms) begin transaction
283
+  (0.2ms) rollback transaction
284
+  (0.1ms) begin transaction
285
+  (0.1ms) rollback transaction
286
+  (0.1ms) begin transaction
287
+  (0.1ms) rollback transaction
288
+  (0.0ms) begin transaction
289
+  (0.0ms) rollback transaction
290
+  (0.0ms) begin transaction
291
+  (0.1ms) rollback transaction
292
+  (0.0ms) begin transaction
293
+  (0.1ms) rollback transaction
294
+  (0.1ms) begin transaction
295
+  (0.1ms) rollback transaction
296
+  (0.0ms) begin transaction
297
+  (0.1ms) rollback transaction
298
+  (0.2ms) begin transaction
299
+  (0.1ms) rollback transaction
300
+  (0.2ms) begin transaction
301
+  (0.1ms) rollback transaction
302
+  (0.0ms) begin transaction
303
+  (0.0ms) rollback transaction
304
+  (0.0ms) begin transaction
305
+  (0.0ms) rollback transaction
306
+  (0.0ms) begin transaction
307
+  (0.0ms) rollback transaction
308
+  (0.0ms) begin transaction
309
+  (0.0ms) rollback transaction
310
+  (0.0ms) begin transaction
311
+  (0.0ms) rollback transaction
312
+  (0.0ms) begin transaction
313
+  (0.0ms) rollback transaction
314
+  (0.0ms) begin transaction
315
+  (0.1ms) rollback transaction
316
+  (0.0ms) begin transaction
317
+  (0.0ms) rollback transaction
318
+  (0.0ms) begin transaction
319
+  (0.1ms) rollback transaction
320
+  (0.0ms) begin transaction
321
+  (0.0ms) rollback transaction
322
+  (0.0ms) begin transaction
323
+  (0.0ms) rollback transaction
324
+  (0.0ms) begin transaction
325
+  (0.1ms) rollback transaction
326
+  (0.1ms) begin transaction
327
+  (0.1ms) rollback transaction
328
+  (0.0ms) begin transaction
329
+  (0.0ms) rollback transaction
330
+  (0.0ms) begin transaction
331
+  (0.0ms) rollback transaction
332
+  (0.3ms) begin transaction
333
+  (0.1ms) rollback transaction
334
+  (0.1ms) begin transaction
335
+  (0.1ms) rollback transaction
336
+  (0.1ms) begin transaction
337
+  (0.1ms) rollback transaction
338
+  (0.0ms) begin transaction
339
+  (0.0ms) rollback transaction
340
+  (0.0ms) begin transaction
341
+  (0.1ms) rollback transaction
342
+  (0.1ms) begin transaction
343
+  (0.1ms) rollback transaction
344
+  (0.3ms) begin transaction
345
+  (0.1ms) rollback transaction
346
+  (0.0ms) begin transaction
347
+  (0.0ms) rollback transaction
348
+  (0.0ms) begin transaction
349
+  (0.0ms) rollback transaction
350
+  (0.0ms) begin transaction
351
+  (0.0ms) rollback transaction
352
+  (0.0ms) begin transaction
353
+  (0.0ms) rollback transaction
354
+  (0.0ms) begin transaction
355
+  (0.0ms) rollback transaction
356
+  (0.0ms) begin transaction
357
+  (0.1ms) rollback transaction
358
+  (0.0ms) begin transaction
359
+  (0.0ms) rollback transaction
360
+  (0.1ms) begin transaction
361
+  (0.0ms) rollback transaction
362
+  (0.0ms) begin transaction
363
+  (0.1ms) rollback transaction
364
+  (1.7ms) begin transaction
365
+  (0.1ms) rollback transaction
366
+  (0.1ms) begin transaction
367
+  (0.1ms) rollback transaction
368
+  (0.0ms) begin transaction
369
+  (0.1ms) rollback transaction
370
+  (0.1ms) begin transaction
371
+  (0.1ms) rollback transaction
372
+  (0.1ms) begin transaction
373
+  (0.1ms) rollback transaction
374
+  (0.0ms) begin transaction
375
+  (0.1ms) rollback transaction
376
+  (0.1ms) begin transaction
377
+  (0.1ms) rollback transaction
378
+  (0.0ms) begin transaction
379
+  (0.1ms) rollback transaction
380
+  (0.0ms) begin transaction
381
+  (0.1ms) rollback transaction
382
+  (0.1ms) begin transaction
383
+  (0.1ms) rollback transaction
384
+  (0.0ms) begin transaction
385
+  (0.1ms) rollback transaction
386
+  (0.1ms) begin transaction
387
+  (0.1ms) rollback transaction
388
+  (0.1ms) begin transaction
389
+  (0.1ms) rollback transaction
390
+  (0.1ms) begin transaction
391
+  (0.1ms) rollback transaction
392
+  (0.0ms) begin transaction
393
+  (0.1ms) rollback transaction
394
+  (0.1ms) begin transaction
395
+  (0.1ms) 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="http://www.adobe.com/go/getflashplayer">
8
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
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="http://www.adobe.com/go/getflashplayer">
31
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
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
@@ -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.3
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: 2012-08-05 00:00:00.000000000 Z
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: http://github.com/marcandre/swf_fu
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: -3105183884836016203
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: -3105183884836016203
180
+ hash: -199881685857687227
197
181
  requirements: []
198
182
  rubyforge_project:
199
183
  rubygems_version: 1.8.24