trak3r-youtube_sso 0.0.1 → 0.0.2

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.
Files changed (4) hide show
  1. data/README.txt +0 -2
  2. data/bin/youtube_sso +2 -2
  3. data/lib/youtube_sso.rb +2 -11
  4. metadata +3 -11
data/README.txt CHANGED
@@ -1,5 +1,3 @@
1
1
  A poor-man's single sign-on for YouTube.
2
2
 
3
3
  Pass the username and password to YouTube's log-in form then parse the results to test for success.
4
-
5
- TODO: Make this a gem.
data/bin/youtube_sso CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/opt/local/bin/ruby
2
- require 'youtube_sso'
3
- pp YouTubeSSO.valid?(ARGV[0], ARGV[1])
2
+ require 'lib/youtube_sso'
3
+ puts YouTubeSSO.valid?(ARGV[0], ARGV[1])
data/lib/youtube_sso.rb CHANGED
@@ -1,7 +1,4 @@
1
1
  require 'net/http'
2
- require 'uri'
3
- require 'rubygems'
4
- require 'hpricot'
5
2
 
6
3
  class YouTubeSSO
7
4
  class << self
@@ -15,14 +12,8 @@ class YouTubeSSO
15
12
  'next' => "/#{target}",
16
13
  'action_login' => 'Log+In'
17
14
  })
18
- page = Hpricot(response.body)
19
- denial = page.search("div[@class='errorBox']")
20
- if denial.empty?
21
- if "http://www.youtube.com/#{target}" == response['location']
22
- return true
23
- else
24
- return response # for debugging
25
- end
15
+ if "http://www.youtube.com/#{target}" == response['location']
16
+ return true
26
17
  else
27
18
  return false
28
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trak3r-youtube_sso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas 'Teflon Ted' Davis
@@ -11,16 +11,8 @@ cert_chain: []
11
11
 
12
12
  date: 2000-01-13 00:00:00 -08:00
13
13
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: hpricot
17
- version_requirement:
18
- version_requirements: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 0.6.164
23
- version:
14
+ dependencies: []
15
+
24
16
  description: Poor-man's single sign-on for YouTube
25
17
  email: youtube_sso@rudiment.net
26
18
  executables: []