Permalink
Browse files

Added README and gem specification

  • Loading branch information...
1 parent 1239bfc commit afff0c6b1cf281b3be48e37aad2a0e845e22ddcb @sam-wan sam-wan committed Apr 16, 2008
Showing with 62 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +40 −0 README
  3. +21 −1 Rakefile
View
@@ -0,0 +1 @@
+pkg
View
40 README
@@ -0,0 +1,40 @@
+iTunes Link Maker
+=================
+
+A Ruby interface to generate iTunes URLs from http://apple.com/itunes/linkmaker.
+
+Usage (non-affiliate):
+----------------------
+
+>> require 'itunes_link_maker'
+
+>> results = ItunesLinkMaker.search('my favourite track')
+=> [ array of results ]
+
+>> results[0].url
+=> "http://...."
+
+>> results[0].name
+=> "My Favourite Track"
+
+>> result = ItunesLinkMaker.quick_search('my favourite track')
+=> first result from above
+
+>> result.url
+=> "http://...."
+
+
+Usage (affiliate):
+------------------
+
+>> require 'itunes_link_maker'
+
+>> ItunesLinkMaker.default_options['partnerId'] = XXX
+>> ItunesLinkMaker.default_options['LS_PARAM'] = 'http://click.linksynergy.com/fs-bin/stat?id=XXXXXXXX&offerid=XXXXX&type=X&subid=X&tmpid=XXXX&RD_PARM1='
+
+>> results = ItunesLinkMaker.search('my favourite track')
+=> [ array of results using affiliate url ]
+
+
+
+Copyright (c) 2008 Sam Pohlenz <sam@sampohlenz.com>, released under the MIT license
View
@@ -1,9 +1,29 @@
-require 'rake'
require 'spec/rake/spectask'
+require 'rake/gempackagetask'
task :default => [:spec]
desc "Run all examples"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_files = FileList['spec/*.rb']
end
+
+
+# Gem specification
+spec = Gem::Specification.new do |s|
+ s.name = "itunes_link_maker"
+ s.version = "1.0"
+ s.author = "Sam Pohlenz"
+ s.email = "sam@sampohlenz.com"
+ s.platform = Gem::Platform::RUBY
+ s.summary = "Create iTunes links"
+ s.files = FileList["{lib}/**/*"].to_a
+ s.require_path = "lib"
+ s.test_files = FileList["{test}/**/*test.rb"].to_a
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README"]
+end
+
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.need_tar = true
+end

0 comments on commit afff0c6

Please sign in to comment.