flickvimeo 1.0.0 → 1.0.1
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/README.md +5 -4
- data/flickvimeo.gemspec +1 -2
- data/lib/flickvimeo.rb +1 -1
- data/lib/flickvimeo/video.rb +7 -5
- data/test/test_video.rb +0 -2
- metadata +5 -6
- data/Gemfile.lock +0 -19
data/README.md
CHANGED
@@ -40,7 +40,7 @@ For example:
|
|
40
40
|
|
41
41
|
Once you've made your great commits:
|
42
42
|
|
43
|
-
1. [Fork][fk]
|
43
|
+
1. [Fork][fk] FlickVimeo
|
44
44
|
2. Create a topic branch - `git checkout -b my_branch`
|
45
45
|
3. Push to your branch - `git push origin my_branch`
|
46
46
|
4. Create a Pull Request or an [Issue][is] with a link to your branch
|
@@ -52,11 +52,12 @@ on coding standards, new features, etc.
|
|
52
52
|
|
53
53
|
# License
|
54
54
|
|
55
|
-
Copyright (c) 2010-2011 Eric Lindvall. See LICENSE for details.
|
55
|
+
Copyright (c) 2010-2011 Eric Lindvall. See [LICENSE][] for details.
|
56
56
|
|
57
57
|
|
58
58
|
[Vimeo]: http://vimeo.com/
|
59
59
|
[AirFlick]: http://ericasadun.com/ftp/AirPlay/
|
60
|
-
[cb]:
|
60
|
+
[cb]: https://wiki.github.com/defunkt/resque/contributing
|
61
61
|
[fk]: http://help.github.com/forking/
|
62
|
-
[is]:
|
62
|
+
[is]: https://github.com/eric/flickvimeo/issues
|
63
|
+
[LICENSE]: https://github.com/eric/flickvimeo/blob/master/LICENSE
|
data/flickvimeo.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'flickvimeo'
|
16
|
-
s.version = '1.0.
|
16
|
+
s.version = '1.0.1'
|
17
17
|
s.date = '2011-01-02'
|
18
18
|
# s.rubyforge_project = 'flickvimeo'
|
19
19
|
|
@@ -56,7 +56,6 @@ Gem::Specification.new do |s|
|
|
56
56
|
# = MANIFEST =
|
57
57
|
s.files = %w[
|
58
58
|
Gemfile
|
59
|
-
Gemfile.lock
|
60
59
|
LICENSE
|
61
60
|
README.md
|
62
61
|
Rakefile
|
data/lib/flickvimeo.rb
CHANGED
data/lib/flickvimeo/video.rb
CHANGED
@@ -42,15 +42,17 @@ module FlickVimeo
|
|
42
42
|
response = http_request(@url)
|
43
43
|
|
44
44
|
if m = response.body.match(/clip\d+_\d+ = (.*)?;Player.checkRatio/)
|
45
|
-
|
46
|
-
json = m[1].gsub(/([\{\[,]\s*)([a-zA-Z_]+):/) { %{#{$1}"#{$2}":} }
|
47
|
-
json = json.gsub(/(:\s*)'(.*?)'/, '\1"\2"')
|
48
|
-
|
49
|
-
Yajl::Parser.parse(json)
|
45
|
+
Yajl::Parser.parse(convert_javascript_to_valid_json(m[1]))
|
50
46
|
end
|
51
47
|
end
|
52
48
|
end
|
53
49
|
|
50
|
+
def convert_javascript_to_valid_json(input)
|
51
|
+
# Cleanup javascript to be valid JSON
|
52
|
+
json = input.gsub(/([\{\[,]\s*)([a-zA-Z_]+):/) { %{#{$1}"#{$2}":} }
|
53
|
+
json = json.gsub(/(:\s*)'((?:[^'\\]|\\.)*)'/, '\1"\2"')
|
54
|
+
end
|
55
|
+
|
54
56
|
def vimeo_url(id)
|
55
57
|
case id.to_s
|
56
58
|
when %r{^http://.*vimeo.com.*[#/](\d+)}
|
data/test/test_video.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flickvimeo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Eric Lindvall
|
@@ -45,7 +45,6 @@ extra_rdoc_files:
|
|
45
45
|
- LICENSE
|
46
46
|
files:
|
47
47
|
- Gemfile
|
48
|
-
- Gemfile.lock
|
49
48
|
- LICENSE
|
50
49
|
- README.md
|
51
50
|
- Rakefile
|
@@ -87,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
86
|
requirements: []
|
88
87
|
|
89
88
|
rubyforge_project:
|
90
|
-
rubygems_version: 1.
|
89
|
+
rubygems_version: 1.4.1
|
91
90
|
signing_key:
|
92
91
|
specification_version: 2
|
93
92
|
summary: A simple tool to use AirFlick to send Vimeo videos to your AppleTV
|
data/Gemfile.lock
DELETED