inital
This commit is contained in:
commit
5385986f88
32
Gemfile.lock
Normal file
32
Gemfile.lock
Normal file
@ -0,0 +1,32 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
flowplayer (0.0.1)
|
||||
|
||||
GEM
|
||||
specs:
|
||||
diff-lcs (1.1.2)
|
||||
mocha (0.9.10)
|
||||
rake
|
||||
nokogiri (1.4.4)
|
||||
rake (0.8.7)
|
||||
rspec (2.0.1)
|
||||
rspec-core (~> 2.0.1)
|
||||
rspec-expectations (~> 2.0.1)
|
||||
rspec-mocks (~> 2.0.1)
|
||||
rspec-core (2.0.1)
|
||||
rspec-expectations (2.0.1)
|
||||
diff-lcs (>= 1.1.2)
|
||||
rspec-mocks (2.0.1)
|
||||
rspec-core (~> 2.0.1)
|
||||
rspec-expectations (~> 2.0.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
bundler (>= 1.0.0)
|
||||
flowplayer!
|
||||
mocha
|
||||
nokogiri
|
||||
rspec (~> 2.0.0)
|
30
Rakefile
Normal file
30
Rakefile
Normal file
@ -0,0 +1,30 @@
|
||||
require 'rubygems'
|
||||
require 'bundler'
|
||||
begin
|
||||
Bundler.setup(:development)
|
||||
rescue Bundler::BundlerError => e
|
||||
$stderr.puts e.message
|
||||
$stderr.puts "Run `bundle install` to install missing gems"
|
||||
exit e.status_code
|
||||
end
|
||||
require 'rake'
|
||||
|
||||
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
desc 'Default: run specs.'
|
||||
task :default => :spec
|
||||
|
||||
desc "Run specs"
|
||||
RSpec::Core::RakeTask.new do |t|
|
||||
t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
|
||||
# Put spec opts in a file named .rspec in root
|
||||
t.rspec_opts = ["--color", "--format s"]
|
||||
end
|
||||
|
||||
desc "Generate code coverage"
|
||||
RSpec::Core::RakeTask.new(:coverage) do |t|
|
||||
t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
|
||||
t.rcov = true
|
||||
t.rcov_opts = ['--exclude', 'spec']
|
||||
end
|
27
flowplayer.gemspec
Normal file
27
flowplayer.gemspec
Normal file
@ -0,0 +1,27 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
|
||||
s.name = %q{flowplayer}
|
||||
s.version = '0.0.1'
|
||||
s.platform = Gem::Platform::RUBY
|
||||
|
||||
s.authors = ["Scott Davis"]
|
||||
s.description = %q{Flowplayer Helpers}
|
||||
s.summary = %q{Flowplayer helper written in ruby}
|
||||
s.email = %q{jetviper21@gmail.com}
|
||||
|
||||
s.date = Date.today.to_s
|
||||
s.files = `git ls-files`.split("\n")
|
||||
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
||||
s.require_path = 'lib'
|
||||
|
||||
s.homepage = %q{http://github.com/jetviper21}
|
||||
s.rdoc_options = ["--charset=UTF-8"]
|
||||
s.required_rubygems_version = ">= 1.3.6"
|
||||
|
||||
s.add_development_dependency "bundler", ">= 1.0.0"
|
||||
s.add_development_dependency "rspec", "~> 2.0.0"
|
||||
s.add_development_dependency "nokogiri"
|
||||
s.add_development_dependency "mocha"
|
||||
|
||||
end
|
3
flowplayer.rb
Normal file
3
flowplayer.rb
Normal file
@ -0,0 +1,3 @@
|
||||
module Flowplayer
|
||||
|
||||
end
|
18
lib/player.rb
Normal file
18
lib/player.rb
Normal file
@ -0,0 +1,18 @@
|
||||
module Flowplayer
|
||||
class PLayer
|
||||
attr_accessor :options
|
||||
def initialize(dom_id, &block)
|
||||
@options = []
|
||||
block.call
|
||||
end
|
||||
|
||||
def method_missing(method, *args, &block)
|
||||
if block.nil?
|
||||
options[method] = args.first
|
||||
else
|
||||
options[method] = block.call
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
19
lib/rails/helper.rb
Normal file
19
lib/rails/helper.rb
Normal file
@ -0,0 +1,19 @@
|
||||
module Flowplayer
|
||||
module Helpers
|
||||
|
||||
# flowplayer_for :hubble do |f|
|
||||
# f.option 'foo'
|
||||
# f.onLoad do
|
||||
# 'this.unmute();'
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def flowplayer_for(id, &block)
|
||||
FlowPlayer::Player.new(id, &block)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user