howcast 0.3.1 → 0.3.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.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.2 2008-06-03
2
+
3
+ * Clean up with inject
4
+
1
5
  == 0.3.1 2008-04-08
2
6
 
3
7
  * Ability to search in extended mode
data/Manifest.txt CHANGED
@@ -13,7 +13,6 @@ lib/howcast/client/base.rb
13
13
  lib/howcast/client/video.rb
14
14
  lib/howcast/client/guide.rb
15
15
  lib/howcast/client/search.rb
16
- log/debug.log
17
16
  script/destroy
18
17
  script/generate
19
18
  script/txt2html
@@ -68,11 +68,7 @@ class Howcast::Client
68
68
  # Howcast::Client.new.guides(:page => 3, :sort => "top_favorites", :filter => "featured")
69
69
  def guides(options = {})
70
70
  uri = guides_url(options)
71
- collection = []
72
- (establish_connection(uri)/:guide).each do |item|
73
- collection << parse_single_xml(item, Guide)
74
- end
75
- collection
71
+ (establish_connection(uri)/:guide).inject([]){ |r, i| r << parse_single_xml(i, Guide)}
76
72
  end
77
73
 
78
74
  private
@@ -50,11 +50,7 @@ class Howcast::Client
50
50
  # Howcast::Client.new.video_search("traveling", :page => 3)
51
51
  def video_search(query, options = {})
52
52
  uri = search_url(query, options.merge(:view => 'video'))
53
- collection = []
54
- (establish_connection(uri)/:video).each do |item|
55
- collection << parse_single_xml(item, Video)
56
- end
57
- collection
53
+ (establish_connection(uri)/:video).inject([]){ |r, i| r << parse_single_xml(i, Video)}
58
54
  end
59
55
 
60
56
  # Provides access to the Howcast wiki guide search API.
@@ -69,11 +65,7 @@ class Howcast::Client
69
65
  # Howcast::Client.new.guide_search("traveling", :page => 3)
70
66
  def guide_search(query, options = {})
71
67
  uri = search_url(query, options.merge(:view => 'guide'))
72
- collection = []
73
- (establish_connection(uri)/:guide).each do |item|
74
- collection << parse_single_xml(item, Guide)
75
- end
76
- collection
68
+ (establish_connection(uri)/:guide).inject([]){ |r, i| r << parse_single_xml(i, Guide) }
77
69
  end
78
70
 
79
71
  private
@@ -102,11 +102,7 @@ class Howcast::Client
102
102
  # Howcast::Client.new.videos(:page => 3, :sort => "top_favorites", :filter => "featured")
103
103
  def videos(options = {})
104
104
  uri = videos_url(options)
105
- collection = []
106
- (establish_connection(uri)/:video).each do |item|
107
- collection << parse_single_xml(item, Video)
108
- end
109
- collection
105
+ (establish_connection(uri)/:video).inject([]){ |r, i| r << parse_single_xml(i, Video)}
110
106
  end
111
107
 
112
108
  private
@@ -2,7 +2,7 @@ module Howcast #:nodoc:
2
2
  module Version #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  class << self
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>Howcast</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/howcast"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/howcast" class="numbers">0.3.1</a>
36
+ <a href="http://rubyforge.org/projects/howcast" class="numbers">0.3.2</a>
37
37
  </div>
38
38
  <h2>What</h2>
39
39
 
@@ -103,7 +103,7 @@
103
103
 
104
104
  <p>Comments are welcome. Send an email to <a href="mailto:michael@howcast.com">Michael Murray</a>.</p>
105
105
  <p class="coda">
106
- <a href="mailto:michael@howcast.com">Michael Murray</a>, 7th April 2008<br>
106
+ <a href="mailto:michael@howcast.com">Michael Murray</a>, 3rd June 2008<br>
107
107
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
108
108
  </p>
109
109
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howcast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Murray
@@ -50,7 +50,6 @@ files:
50
50
  - lib/howcast/client/video.rb
51
51
  - lib/howcast/client/guide.rb
52
52
  - lib/howcast/client/search.rb
53
- - log/debug.log
54
53
  - script/destroy
55
54
  - script/generate
56
55
  - script/txt2html
data/log/debug.log DELETED
File without changes