razsell 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,6 +1,10 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
3
 
4
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
5
+ require 'razsell'
6
+ include Razsell
7
+
4
8
  begin
5
9
  require 'jeweler'
6
10
  Jeweler::Tasks.new do |gem|
@@ -67,3 +71,12 @@ Rake::RDocTask.new do |rdoc|
67
71
  rdoc.rdoc_files.include('lib/**/*.rb')
68
72
  end
69
73
 
74
+ namespace :products do
75
+ desc "Returns a list of products for an artist"
76
+ task :for, :artist do |t, args|
77
+ abort "Please pass a data_root path like: rake products:for['my_login']" unless args[:artist]
78
+
79
+ results = products_for args[:artist]
80
+ results.items.sort {|x,y| x.title <=> y.title }.each { |p| puts p.title }
81
+ end
82
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -25,7 +25,7 @@ module Razsell
25
25
  item_hash = {}
26
26
  item_hash[:title] = strip_cdata(item.at("title").inner_html)
27
27
  item_hash[:guid] = item.at("guid").inner_html
28
- item_hash[:pub_date] = DateTime.parse(item.at("pubDate").inner_html)
28
+ item_hash[:pub_date] = Time.parse(item.at("pubDate").inner_html)
29
29
  item_hash[:link] = item.at("link").inner_html
30
30
  item_hash[:author] = item.at("author").inner_html
31
31
  item_hash[:description] = strip_cdata(item.at("media:description").inner_html)
data/lib/razsell.rb CHANGED
@@ -10,8 +10,9 @@ module Razsell
10
10
  engine.request(query)
11
11
  end
12
12
 
13
- def product_lines_for artist, opts={}
13
+ def products_for artist, opts={}
14
14
  engine = Razsell::Engine.new opts
15
- engine.product_lines_for artist
15
+ query = Razsell::Query.new.for_artist(artist)
16
+ engine.request(query)
16
17
  end
17
18
  end
data/razsell.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{razsell}
8
- s.version = "0.0.6"
8
+ s.version = "0.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jamal Hansen"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: razsell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamal Hansen