swf_train 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +102 -0
- data/README.md +62 -0
- data/Rakefile +5 -44
- data/lib/swf_train.rb +14 -7
- data/lib/swf_train/version.rb +3 -0
- data/spec/spec.opts +4 -1
- data/spec/spec_helper.rb +12 -8
- data/spec/swf_train_spec.rb +29 -3
- data/swf_train.gemspec +26 -51
- metadata +91 -33
- data/README.rdoc +0 -45
- data/VERSION +0 -1
- data/init.rb +0 -1
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
swf_train (0.0.3)
|
5
|
+
rails
|
6
|
+
rake
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ZenTest (4.5.0)
|
12
|
+
abstract (1.0.0)
|
13
|
+
actionmailer (3.0.9)
|
14
|
+
actionpack (= 3.0.9)
|
15
|
+
mail (~> 2.2.19)
|
16
|
+
actionpack (3.0.9)
|
17
|
+
activemodel (= 3.0.9)
|
18
|
+
activesupport (= 3.0.9)
|
19
|
+
builder (~> 2.1.2)
|
20
|
+
erubis (~> 2.6.6)
|
21
|
+
i18n (~> 0.5.0)
|
22
|
+
rack (~> 1.2.1)
|
23
|
+
rack-mount (~> 0.6.14)
|
24
|
+
rack-test (~> 0.5.7)
|
25
|
+
tzinfo (~> 0.3.23)
|
26
|
+
activemodel (3.0.9)
|
27
|
+
activesupport (= 3.0.9)
|
28
|
+
builder (~> 2.1.2)
|
29
|
+
i18n (~> 0.5.0)
|
30
|
+
activerecord (3.0.9)
|
31
|
+
activemodel (= 3.0.9)
|
32
|
+
activesupport (= 3.0.9)
|
33
|
+
arel (~> 2.0.10)
|
34
|
+
tzinfo (~> 0.3.23)
|
35
|
+
activeresource (3.0.9)
|
36
|
+
activemodel (= 3.0.9)
|
37
|
+
activesupport (= 3.0.9)
|
38
|
+
activesupport (3.0.9)
|
39
|
+
arel (2.0.10)
|
40
|
+
autotest (4.4.6)
|
41
|
+
ZenTest (>= 4.4.1)
|
42
|
+
autotest-fsevent (0.2.5)
|
43
|
+
sys-uname
|
44
|
+
autotest-growl (0.2.9)
|
45
|
+
autotest-rails-pure (4.1.2)
|
46
|
+
builder (2.1.2)
|
47
|
+
diff-lcs (1.1.2)
|
48
|
+
erubis (2.6.6)
|
49
|
+
abstract (>= 1.0.0)
|
50
|
+
i18n (0.5.0)
|
51
|
+
mail (2.2.19)
|
52
|
+
activesupport (>= 2.3.6)
|
53
|
+
i18n (>= 0.4.0)
|
54
|
+
mime-types (~> 1.16)
|
55
|
+
treetop (~> 1.4.8)
|
56
|
+
mime-types (1.16)
|
57
|
+
polyglot (0.3.1)
|
58
|
+
rack (1.2.3)
|
59
|
+
rack-mount (0.6.14)
|
60
|
+
rack (>= 1.0.0)
|
61
|
+
rack-test (0.5.7)
|
62
|
+
rack (>= 1.0)
|
63
|
+
rails (3.0.9)
|
64
|
+
actionmailer (= 3.0.9)
|
65
|
+
actionpack (= 3.0.9)
|
66
|
+
activerecord (= 3.0.9)
|
67
|
+
activeresource (= 3.0.9)
|
68
|
+
activesupport (= 3.0.9)
|
69
|
+
bundler (~> 1.0)
|
70
|
+
railties (= 3.0.9)
|
71
|
+
railties (3.0.9)
|
72
|
+
actionpack (= 3.0.9)
|
73
|
+
activesupport (= 3.0.9)
|
74
|
+
rake (>= 0.8.7)
|
75
|
+
rdoc (~> 3.4)
|
76
|
+
thor (~> 0.14.4)
|
77
|
+
rake (0.9.2)
|
78
|
+
rdoc (3.8)
|
79
|
+
rspec (2.6.0)
|
80
|
+
rspec-core (~> 2.6.0)
|
81
|
+
rspec-expectations (~> 2.6.0)
|
82
|
+
rspec-mocks (~> 2.6.0)
|
83
|
+
rspec-core (2.6.4)
|
84
|
+
rspec-expectations (2.6.0)
|
85
|
+
diff-lcs (~> 1.1.2)
|
86
|
+
rspec-mocks (2.6.0)
|
87
|
+
sys-uname (0.8.5)
|
88
|
+
thor (0.14.6)
|
89
|
+
treetop (1.4.9)
|
90
|
+
polyglot (>= 0.3.1)
|
91
|
+
tzinfo (0.3.29)
|
92
|
+
|
93
|
+
PLATFORMS
|
94
|
+
ruby
|
95
|
+
|
96
|
+
DEPENDENCIES
|
97
|
+
autotest
|
98
|
+
autotest-fsevent
|
99
|
+
autotest-growl
|
100
|
+
autotest-rails-pure
|
101
|
+
rspec
|
102
|
+
swf_train!
|
data/README.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
SWF Train (swiff train)
|
2
|
+
=======================
|
3
|
+
|
4
|
+
SWF Train is a simple and flexible Rails helper for embedding SWFs in your views.
|
5
|
+
It requires [jQuery](http://jquery.com/) and [jQuery SWFObject](http://jquery.thewikies.com/swfobject/).
|
6
|
+
|
7
|
+
Installation
|
8
|
+
------------
|
9
|
+
|
10
|
+
gem install swf_train
|
11
|
+
|
12
|
+
Usage
|
13
|
+
-----
|
14
|
+
|
15
|
+
|
16
|
+
``` ruby
|
17
|
+
# <head>
|
18
|
+
javascript_include_tag %w(jquery-1.3.2.min jquery.swfobject.1-1-1.min)
|
19
|
+
|
20
|
+
# <body>
|
21
|
+
swf 'my_swf.swf'
|
22
|
+
swf 'subdirectory/of/public/another.swf', :width => 500, :height => 300
|
23
|
+
swf 'http://example.com/yet_another.swf', :wmode => 'opaque'
|
24
|
+
```
|
25
|
+
|
26
|
+
Passing in FlashVars is easy:
|
27
|
+
|
28
|
+
``` ruby
|
29
|
+
swf 'swf/foo.swf', :flashvars => {:foo => 'chacha', :bar => 250}
|
30
|
+
```
|
31
|
+
|
32
|
+
By default, a DOM element is automatically created based on a variation of the swf filename,
|
33
|
+
but you can override it like so:
|
34
|
+
|
35
|
+
``` ruby
|
36
|
+
swf 'swf/foo.swf', :dom_id => 'custom_dom_dom_doobie', :create_dom_container => false
|
37
|
+
```
|
38
|
+
|
39
|
+
SWF Train provides built-in support for the awesome non-blocking [head.js](http://headjs.com/) library,
|
40
|
+
so you can use jQuery on the body of the page even though it is not included yet:
|
41
|
+
|
42
|
+
``` ruby
|
43
|
+
swf 'swf/foo.swf', :use_headjs => true
|
44
|
+
```
|
45
|
+
|
46
|
+
See full auto-generated documentation at [rdoc.info/projects/zeke/swf_train](http://rdoc.info/projects/zeke/swf_train)
|
47
|
+
|
48
|
+
Compatibility
|
49
|
+
-------------
|
50
|
+
|
51
|
+
- v1.0+ requires Rails 3
|
52
|
+
- v0.0.2 is compatible with Rails 2
|
53
|
+
|
54
|
+
Tests
|
55
|
+
-----
|
56
|
+
|
57
|
+
bundle exec rake spec
|
58
|
+
|
59
|
+
Copyright
|
60
|
+
---------
|
61
|
+
|
62
|
+
Copyright (c) 2010-2011 Zeke Sikelianos. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,45 +1,6 @@
|
|
1
|
-
require '
|
2
|
-
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
gem.name = "swf_train"
|
8
|
-
gem.summary = "A simple and flexible Rails helper for embedding SWFs in your views."
|
9
|
-
gem.description = "A simple and flexible Rails helper for embedding SWFs in your views."
|
10
|
-
gem.email = "zeke@sikelianos.com"
|
11
|
-
gem.homepage = "http://github.com/zeke/swf_train"
|
12
|
-
gem.authors = ["Zeke Sikelianos"]
|
13
|
-
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
-
end
|
16
|
-
Jeweler::GemcutterTasks.new
|
17
|
-
rescue LoadError
|
18
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
|
-
end
|
20
|
-
|
21
|
-
require 'spec/rake/spectask'
|
22
|
-
Spec::Rake::SpecTask.new(:spec) do |spec|
|
23
|
-
spec.libs << 'lib' << 'spec'
|
24
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
25
|
-
end
|
26
|
-
|
27
|
-
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
28
|
-
spec.libs << 'lib' << 'spec'
|
29
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
30
|
-
spec.rcov = true
|
31
|
-
end
|
32
|
-
|
33
|
-
task :spec => :check_dependencies
|
34
|
-
|
35
|
-
task :default => :spec
|
36
|
-
|
37
|
-
require 'rake/rdoctask'
|
38
|
-
Rake::RDocTask.new do |rdoc|
|
39
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
40
|
-
|
41
|
-
rdoc.rdoc_dir = 'rdoc'
|
42
|
-
rdoc.title = "swf_train #{version}"
|
43
|
-
rdoc.rdoc_files.include('README*')
|
44
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
45
|
-
end
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
RSpec::Core::RakeTask.new('spec')
|
6
|
+
task :default => :spec
|
data/lib/swf_train.rb
CHANGED
@@ -6,11 +6,12 @@ module SwfTrain
|
|
6
6
|
#
|
7
7
|
# swf 'foo.swf'
|
8
8
|
# swf 'foo.swf', :height => 50, :flashvars => {:a => 1, :b => 'two'}
|
9
|
+
# swf 'foo.swf', :use_headjs => true # If you're using head.js (http://headjs.com)
|
9
10
|
#
|
10
11
|
# By default, a DOM container is generated, but if you don't want that just pass in your
|
11
12
|
# custom `dom_id` and set `create_dom_container` to false
|
12
13
|
# swf 'swf/foo.swf', :dom_id => 'dombo', :create_dom_container => false)
|
13
|
-
def swf(swf_file,
|
14
|
+
def swf(swf_file, options={})
|
14
15
|
options = {
|
15
16
|
:swf => swf_file,
|
16
17
|
:dom_id => filename_to_dom_id(swf_file),
|
@@ -20,10 +21,15 @@ module SwfTrain
|
|
20
21
|
:wmode => "opaque",
|
21
22
|
:allowScriptAccess => "sameDomain",
|
22
23
|
:create_dom_container => true,
|
23
|
-
}.merge(
|
24
|
+
}.merge!(options)
|
24
25
|
|
25
26
|
out = []
|
26
|
-
|
27
|
+
|
28
|
+
# Yank use_headjs boolean out of the options hash
|
29
|
+
# See http://headjs.com/
|
30
|
+
use_headjs = options.delete(:use_headjs)
|
31
|
+
ready_wrapper = use_headjs ? "head" : "$(document)"
|
32
|
+
|
27
33
|
# Yank dom_id out of the options hash
|
28
34
|
dom_id = options.delete(:dom_id)
|
29
35
|
|
@@ -47,8 +53,9 @@ module SwfTrain
|
|
47
53
|
embed = hash_to_key_value_string(options)
|
48
54
|
|
49
55
|
# Spit it out!
|
50
|
-
out << content_tag(:script, "
|
51
|
-
|
56
|
+
out << content_tag(:script, "#{ready_wrapper}.ready(function(){$('##{dom_id}').flash({#{embed}});});".html_safe, :type => "text/javascript", :charset => "utf-8")
|
57
|
+
|
58
|
+
out.reverse.join("\n").html_safe
|
52
59
|
end
|
53
60
|
|
54
61
|
# Convert a string to dom-friendly format.
|
@@ -67,10 +74,10 @@ module SwfTrain
|
|
67
74
|
def hash_to_key_value_string(hash)
|
68
75
|
pairs = []
|
69
76
|
hash.each_pair do |k,v|
|
70
|
-
v = "
|
77
|
+
v = "\"#{v}\"" unless k.to_s=='flashvars' || !v.to_s.match(/\A[+-]?\d+?(\.\d+)?\Z/).nil?
|
71
78
|
pairs << "#{k}:#{v}"
|
72
79
|
end
|
73
|
-
pairs.sort.join(", ")
|
80
|
+
pairs.sort.join(", ").html_safe
|
74
81
|
end
|
75
82
|
|
76
83
|
end
|
data/spec/spec.opts
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require '
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'active_support/all' # to get methods like blank? and starts_with?
|
4
|
+
require 'action_view'
|
5
|
+
require 'swf_train' # and any other gems you need
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
include ActionView::Helpers
|
8
|
+
include ActiveSupport
|
9
|
+
include SwfTrain
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
# some (optional) config here
|
13
|
+
end
|
data/spec/swf_train_spec.rb
CHANGED
@@ -1,7 +1,33 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe "SwfTrain" do
|
4
|
-
|
5
|
-
|
4
|
+
|
5
|
+
describe "DOM container" do
|
6
|
+
|
7
|
+
it "gets created by default" do
|
8
|
+
swf('foo.swf').should =~ /<div id=\"foo_swf\"/
|
9
|
+
end
|
10
|
+
|
11
|
+
it "is not created if :create_dom_container option is false" do
|
12
|
+
swf('foo.swf', :create_dom_container => false).should_not =~ /<div id=\"foo_swf\"/
|
13
|
+
end
|
14
|
+
|
15
|
+
it "takes a custom name" do
|
16
|
+
swf('foo.swf', :dom_id => 'binkle_dinkle').should =~ /<div id=\"binkle_dinkle\"/
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "ready_wrapper" do
|
22
|
+
|
23
|
+
it "wraps the output in jQuery-style ready statement by default" do
|
24
|
+
swf('foo.swf').should =~ /\$\(document\)\.ready/
|
25
|
+
end
|
26
|
+
|
27
|
+
it "wraps the output in a head.js read statement if :use_headjs option is present" do
|
28
|
+
swf('foo.swf', :use_headjs => true).should =~ /head\.ready/
|
29
|
+
end
|
30
|
+
|
6
31
|
end
|
32
|
+
|
7
33
|
end
|
data/swf_train.gemspec
CHANGED
@@ -1,56 +1,31 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "swf_train/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
6
|
+
s.name = "swf_train"
|
7
|
+
s.version = SwfTrain::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Zeke Sikelianos"]
|
10
|
+
s.email = ["zeke@sikelianos.com"]
|
11
|
+
s.homepage = "https://github.com/zeke/swf_train"
|
12
|
+
s.summary = %q{A simple and flexible Rails helper for embedding SWFs in your views.}
|
9
13
|
|
10
|
-
s.
|
11
|
-
s.authors = ["Zeke Sikelianos"]
|
12
|
-
s.date = %q{2010-04-04}
|
13
|
-
s.description = %q{A simple and flexible Rails helper for embedding SWFs in your views.}
|
14
|
-
s.email = %q{zeke@sikelianos.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitignore",
|
22
|
-
"LICENSE",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"init.rb",
|
27
|
-
"lib/swf_train.rb",
|
28
|
-
"spec/spec.opts",
|
29
|
-
"spec/spec_helper.rb",
|
30
|
-
"spec/swf_train_spec.rb",
|
31
|
-
"swf_train.gemspec"
|
32
|
-
]
|
33
|
-
s.homepage = %q{http://github.com/zeke/swf_train}
|
34
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
35
|
-
s.require_paths = ["lib"]
|
36
|
-
s.rubygems_version = %q{1.3.6}
|
37
|
-
s.summary = %q{A simple and flexible Rails helper for embedding SWFs in your views.}
|
38
|
-
s.test_files = [
|
39
|
-
"spec/spec_helper.rb",
|
40
|
-
"spec/swf_train_spec.rb"
|
41
|
-
]
|
42
|
-
|
43
|
-
if s.respond_to? :specification_version then
|
44
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
45
|
-
s.specification_version = 3
|
46
|
-
|
47
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
48
|
-
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
49
|
-
else
|
50
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
51
|
-
end
|
52
|
-
else
|
53
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
54
|
-
end
|
55
|
-
end
|
14
|
+
s.rubyforge_project = "swf_train"
|
56
15
|
|
16
|
+
s.add_dependency 'rails'
|
17
|
+
s.add_dependency 'rake'
|
18
|
+
|
19
|
+
s.add_development_dependency 'rspec'
|
20
|
+
|
21
|
+
# Optional..
|
22
|
+
s.add_development_dependency 'autotest'
|
23
|
+
s.add_development_dependency 'autotest-rails-pure'
|
24
|
+
s.add_development_dependency 'autotest-growl'
|
25
|
+
s.add_development_dependency 'autotest-fsevent'
|
26
|
+
|
27
|
+
s.files = `git ls-files`.split("\n")
|
28
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
29
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
30
|
+
s.require_paths = ["lib"]
|
31
|
+
end
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swf_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
version: 0.0.2
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.0
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Zeke Sikelianos
|
@@ -14,75 +10,137 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
18
|
-
default_executable:
|
13
|
+
date: 2011-07-26 00:00:00 Z
|
19
14
|
dependencies:
|
20
15
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
16
|
+
name: rails
|
22
17
|
prerelease: false
|
23
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
24
20
|
requirements:
|
25
21
|
- - ">="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
|
29
|
-
- 2
|
30
|
-
- 9
|
31
|
-
version: 1.2.9
|
32
|
-
type: :development
|
23
|
+
version: "0"
|
24
|
+
type: :runtime
|
33
25
|
version_requirements: *id001
|
34
|
-
|
35
|
-
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: rake
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rspec
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: autotest
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: "0"
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: autotest-rails-pure
|
61
|
+
prerelease: false
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
type: :development
|
69
|
+
version_requirements: *id005
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: autotest-growl
|
72
|
+
prerelease: false
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
type: :development
|
80
|
+
version_requirements: *id006
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: autotest-fsevent
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: "0"
|
90
|
+
type: :development
|
91
|
+
version_requirements: *id007
|
92
|
+
description:
|
93
|
+
email:
|
94
|
+
- zeke@sikelianos.com
|
36
95
|
executables: []
|
37
96
|
|
38
97
|
extensions: []
|
39
98
|
|
40
|
-
extra_rdoc_files:
|
41
|
-
|
42
|
-
- README.rdoc
|
99
|
+
extra_rdoc_files: []
|
100
|
+
|
43
101
|
files:
|
44
102
|
- .document
|
45
103
|
- .gitignore
|
104
|
+
- .rspec
|
105
|
+
- Gemfile
|
106
|
+
- Gemfile.lock
|
46
107
|
- LICENSE
|
47
|
-
- README.
|
108
|
+
- README.md
|
48
109
|
- Rakefile
|
49
|
-
- VERSION
|
50
|
-
- init.rb
|
51
110
|
- lib/swf_train.rb
|
111
|
+
- lib/swf_train/version.rb
|
52
112
|
- spec/spec.opts
|
53
113
|
- spec/spec_helper.rb
|
54
114
|
- spec/swf_train_spec.rb
|
55
115
|
- swf_train.gemspec
|
56
|
-
|
57
|
-
homepage: http://github.com/zeke/swf_train
|
116
|
+
homepage: https://github.com/zeke/swf_train
|
58
117
|
licenses: []
|
59
118
|
|
60
119
|
post_install_message:
|
61
|
-
rdoc_options:
|
62
|
-
|
120
|
+
rdoc_options: []
|
121
|
+
|
63
122
|
require_paths:
|
64
123
|
- lib
|
65
124
|
required_ruby_version: !ruby/object:Gem::Requirement
|
125
|
+
none: false
|
66
126
|
requirements:
|
67
127
|
- - ">="
|
68
128
|
- !ruby/object:Gem::Version
|
69
|
-
segments:
|
70
|
-
- 0
|
71
129
|
version: "0"
|
72
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
73
132
|
requirements:
|
74
133
|
- - ">="
|
75
134
|
- !ruby/object:Gem::Version
|
76
|
-
segments:
|
77
|
-
- 0
|
78
135
|
version: "0"
|
79
136
|
requirements: []
|
80
137
|
|
81
|
-
rubyforge_project:
|
82
|
-
rubygems_version: 1.
|
138
|
+
rubyforge_project: swf_train
|
139
|
+
rubygems_version: 1.8.5
|
83
140
|
signing_key:
|
84
141
|
specification_version: 3
|
85
142
|
summary: A simple and flexible Rails helper for embedding SWFs in your views.
|
86
143
|
test_files:
|
144
|
+
- spec/spec.opts
|
87
145
|
- spec/spec_helper.rb
|
88
146
|
- spec/swf_train_spec.rb
|
data/README.rdoc
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
= SWF Train (swiff train)
|
2
|
-
|
3
|
-
A simple and flexible Rails helper for embedding SWFs in your views.
|
4
|
-
Requires {jQuery}[http://jquery.com/] and {jQuery SWFObject}[http://jquery.thewikies.com/swfobject/].
|
5
|
-
|
6
|
-
== Installation
|
7
|
-
|
8
|
-
Install {gemcutter}[http://gemcutter.org] if you haven't already:
|
9
|
-
|
10
|
-
sudo gem install gemcutter
|
11
|
-
gem tumble
|
12
|
-
|
13
|
-
Get on the swiff train
|
14
|
-
|
15
|
-
sudo gem install swf_train
|
16
|
-
|
17
|
-
== Usage
|
18
|
-
|
19
|
-
The following example assumes you're using {haml}[http://haml-lang.com/]:
|
20
|
-
|
21
|
-
%html
|
22
|
-
%head
|
23
|
-
=javascript_include_tag %w(jquery-1.3.2.min jquery.swfobject.1-0-7.min)
|
24
|
-
%body
|
25
|
-
= swf 'my_swf.swf'
|
26
|
-
= swf 'subdirectory/of/public/another.swf', :width => 500, :height => 300
|
27
|
-
= swf 'http://example.com/yet_another.swf', :wmode => 'opaque'
|
28
|
-
|
29
|
-
Passing in FlashVars is easy:
|
30
|
-
|
31
|
-
= swf 'swf/foo.swf', :flashvars => {:foo => 'chacha', :bar => 250}
|
32
|
-
|
33
|
-
By default, a DOM element is automatically created based on a variation of the swf filename, but you can override it like so:
|
34
|
-
|
35
|
-
= swf 'swf/foo.swf', :dom_id => 'custom_dom_dom_doobie', :create_dom_container => false
|
36
|
-
|
37
|
-
See full auto-generated documentation at {rdoc.info/projects/zeke/swf_train}[http://rdoc.info/projects/zeke/swf_train]
|
38
|
-
|
39
|
-
== Colophon
|
40
|
-
|
41
|
-
* Gem built with {Jeweler}[http://github.com/technicalpickles/jeweler]
|
42
|
-
|
43
|
-
== Copyright
|
44
|
-
|
45
|
-
Copyright (c) 2010 Zeke Sikelianos. See LICENSE for details.
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.2
|
data/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'swf_train'
|