fb_video_url_converter 0.1.8 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +2 -0
- data/Manifest +5 -1
- data/README.md +3 -41
- data/Rakefile +1 -1
- data/fb_video_url_converter.gemspec +4 -4
- data/lib/generators/fb_video_url_converter/install_generator.rb +21 -0
- data/lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb +18 -0
- data/lib/generators/fb_video_url_converter/templates/facebook_video_converter_init.rb +3 -0
- data.tar.gz.sig +0 -0
- metadata +10 -4
- metadata.gz.sig +0 -0
data/CHANGELOG.rdoc
CHANGED
data/Manifest
CHANGED
@@ -1,13 +1,17 @@
|
|
1
1
|
CHANGELOG.rdoc
|
2
2
|
Gemfile
|
3
3
|
MIT-LICENSE
|
4
|
-
Manifest
|
5
4
|
README.md
|
6
5
|
Rakefile
|
6
|
+
fb_video_url_converter.gemspec
|
7
7
|
init.rb
|
8
8
|
lib/facebook_bot.rb
|
9
9
|
lib/facebook_video.rb
|
10
10
|
lib/fb_video_url_converter.rb
|
11
|
+
lib/generators/fb_video_url_converter/install_generator.rb
|
12
|
+
lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb
|
13
|
+
lib/generators/fb_video_url_converter/templates/facebook_video_converter_init.rb
|
11
14
|
spec/facebook_bot_spec.rb
|
12
15
|
spec/facebook_video_spec.rb
|
13
16
|
spec/spec_helper.rb
|
17
|
+
Manifest
|
data/README.md
CHANGED
@@ -30,38 +30,6 @@ Works with Ruby 1.8.7, 1.8.7 EE, 1.9.2
|
|
30
30
|
## Requirements
|
31
31
|
|
32
32
|
Facebook Video URL Converter uses ActiveRecord to store cached data.
|
33
|
-
You need to create a migration containing:
|
34
|
-
|
35
|
-
class CreateFacebookVideos < ActiveRecord::Migration
|
36
|
-
def self.up
|
37
|
-
create_table :facebook_videos do |t|
|
38
|
-
t.column :video_id, :string
|
39
|
-
t.column :name, :string
|
40
|
-
t.column :url, :string, :default => nil
|
41
|
-
t.column :views, :integer, :default => 1
|
42
|
-
t.column :cached_at, :datetime
|
43
|
-
end
|
44
|
-
|
45
|
-
add_index :facebook_videos, :video_id
|
46
|
-
add_index :facebook_videos, :url
|
47
|
-
end
|
48
|
-
|
49
|
-
def self.down
|
50
|
-
drop_table :facebook_videos
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
or without migrations:
|
55
|
-
|
56
|
-
unless FacebookVideo.table_exists?
|
57
|
-
ActiveRecord::Base.connection.create_table(:facebook_videos) do |t|
|
58
|
-
t.column :video_id, :string
|
59
|
-
t.column :name, :string
|
60
|
-
t.column :url, :string, :default => nil
|
61
|
-
t.column :views, :integer, :default => 1
|
62
|
-
t.column :cached_at, :datetime
|
63
|
-
end
|
64
|
-
end
|
65
33
|
|
66
34
|
## Example
|
67
35
|
|
@@ -80,16 +48,10 @@ error has occurred.
|
|
80
48
|
|
81
49
|
## Setup
|
82
50
|
|
83
|
-
|
84
|
-
one more thing - you need to setup your Facebook account. To do so, create
|
85
|
-
initializer containing:
|
51
|
+
rails generate fb_video_url_converter:install
|
86
52
|
|
87
|
-
|
88
|
-
|
89
|
-
# Cache storage - in seconds
|
90
|
-
FacebookVideo.cache = 60*10
|
91
|
-
|
92
|
-
Insert your own account data and you are ready to go :)
|
53
|
+
After that, you need to setup your Facebook account. To do so, find facebook_video_converter
|
54
|
+
initializer and set it up according to your needs. Thats all
|
93
55
|
|
94
56
|
## Tests
|
95
57
|
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('fb_video_url_converter', '0.1
|
5
|
+
Echoe.new('fb_video_url_converter', '0.2.1') do |p|
|
6
6
|
p.description = "Facebook Video URL Converter is intended as an easy alternative to changing video hosting from Facebook to a different one."
|
7
7
|
p.url = "https://github.com/mensfeld/FB-Video-URL-Converter"
|
8
8
|
p.author = "Maciej Mensfeld"
|
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{fb_video_url_converter}
|
5
|
-
s.version = "0.1
|
5
|
+
s.version = "0.2.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Maciej Mensfeld"]
|
9
9
|
s.cert_chain = ["/home/mencio/.cert_keys/gem-public_cert.pem"]
|
10
|
-
s.date = %q{2011-
|
10
|
+
s.date = %q{2011-06-01}
|
11
11
|
s.description = %q{Facebook Video URL Converter is intended as an easy alternative to changing video hosting from Facebook to a different one.}
|
12
12
|
s.email = %q{maciej@mensfeld.pl}
|
13
|
-
s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.md", "lib/facebook_bot.rb", "lib/facebook_video.rb", "lib/fb_video_url_converter.rb"]
|
14
|
-
s.files = ["CHANGELOG.rdoc", "Gemfile", "MIT-LICENSE", "
|
13
|
+
s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.md", "lib/facebook_bot.rb", "lib/facebook_video.rb", "lib/fb_video_url_converter.rb", "lib/generators/fb_video_url_converter/install_generator.rb", "lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb", "lib/generators/fb_video_url_converter/templates/facebook_video_converter_init.rb"]
|
14
|
+
s.files = ["CHANGELOG.rdoc", "Gemfile", "MIT-LICENSE", "README.md", "Rakefile", "fb_video_url_converter.gemspec", "init.rb", "lib/facebook_bot.rb", "lib/facebook_video.rb", "lib/fb_video_url_converter.rb", "lib/generators/fb_video_url_converter/install_generator.rb", "lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb", "lib/generators/fb_video_url_converter/templates/facebook_video_converter_init.rb", "spec/facebook_bot_spec.rb", "spec/facebook_video_spec.rb", "spec/spec_helper.rb", "Manifest"]
|
15
15
|
s.homepage = %q{https://github.com/mensfeld/FB-Video-URL-Converter}
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Fb_video_url_converter", "--main", "README.md"]
|
17
17
|
s.require_paths = ["lib"]
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module FbVideoUrlConverter
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path("../templates", __FILE__)
|
4
|
+
|
5
|
+
def add_my_migration
|
6
|
+
timestamp = Time.now.strftime("%Y%m%d%H%M%S")
|
7
|
+
source = "create_facebook_videos_migration.rb"
|
8
|
+
target = "db/migrate/#{timestamp}_create_facebook_videos.rb"
|
9
|
+
copy_file source, target
|
10
|
+
end
|
11
|
+
|
12
|
+
def add_initializer
|
13
|
+
source = "facebook_video_converter_init.rb"
|
14
|
+
target = "config/initializers/facebook_video_converter.rb"
|
15
|
+
copy_file source, target
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateFacebookVideos < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :facebook_videos do |t|
|
4
|
+
t.column :video_id, :string
|
5
|
+
t.column :name, :string
|
6
|
+
t.column :url, :string, :default => nil
|
7
|
+
t.column :views, :integer, :default => 1
|
8
|
+
t.column :cached_at, :datetime
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :facebook_videos, :video_id
|
12
|
+
add_index :facebook_videos, :url
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
drop_table :facebook_videos
|
17
|
+
end
|
18
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: fb_video_url_converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1
|
5
|
+
version: 0.2.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Maciej Mensfeld
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
BH3YFsdk
|
32
32
|
-----END CERTIFICATE-----
|
33
33
|
|
34
|
-
date: 2011-
|
34
|
+
date: 2011-06-01 00:00:00 +02:00
|
35
35
|
default_executable:
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -79,21 +79,27 @@ extra_rdoc_files:
|
|
79
79
|
- lib/facebook_bot.rb
|
80
80
|
- lib/facebook_video.rb
|
81
81
|
- lib/fb_video_url_converter.rb
|
82
|
+
- lib/generators/fb_video_url_converter/install_generator.rb
|
83
|
+
- lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb
|
84
|
+
- lib/generators/fb_video_url_converter/templates/facebook_video_converter_init.rb
|
82
85
|
files:
|
83
86
|
- CHANGELOG.rdoc
|
84
87
|
- Gemfile
|
85
88
|
- MIT-LICENSE
|
86
|
-
- Manifest
|
87
89
|
- README.md
|
88
90
|
- Rakefile
|
91
|
+
- fb_video_url_converter.gemspec
|
89
92
|
- init.rb
|
90
93
|
- lib/facebook_bot.rb
|
91
94
|
- lib/facebook_video.rb
|
92
95
|
- lib/fb_video_url_converter.rb
|
96
|
+
- lib/generators/fb_video_url_converter/install_generator.rb
|
97
|
+
- lib/generators/fb_video_url_converter/templates/create_facebook_videos_migration.rb
|
98
|
+
- lib/generators/fb_video_url_converter/templates/facebook_video_converter_init.rb
|
93
99
|
- spec/facebook_bot_spec.rb
|
94
100
|
- spec/facebook_video_spec.rb
|
95
101
|
- spec/spec_helper.rb
|
96
|
-
-
|
102
|
+
- Manifest
|
97
103
|
has_rdoc: true
|
98
104
|
homepage: https://github.com/mensfeld/FB-Video-URL-Converter
|
99
105
|
licenses: []
|
metadata.gz.sig
CHANGED
Binary file
|