Skip to content

Commit

Permalink
New gem in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
nledez committed Aug 23, 2010
1 parent 5067abb commit 6a68a77
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 101 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -5,3 +5,5 @@ doc/
scripts/
html/
lib/cine_passion_config.rb
pkg/
coverage.info
7 changes: 7 additions & 0 deletions History.txt
@@ -0,0 +1,7 @@
=== 0.5.0 / 2010-08-23

* First gem

* Yes!


21 changes: 4 additions & 17 deletions Manifest → Manifest.txt
@@ -1,26 +1,13 @@
README.rdoc
History.txt
Manifest.txt
README.txt
Rakefile
SuiteTests
exemple.rb
html/classes/CinePassion.html
html/created.rid
html/files/README_rdoc.html
html/files/lib/cine_passion_rb.html
html/fr_class_index.html
html/fr_file_index.html
html/fr_method_index.html
html/index.html
html/rdoc-style.css
lib/cine_passion.rb
lib/cine_passion_config.rb.sample
scripts/ajouteClasse
scripts/ajouteFixture
scripts/creeShoesApp
test/test_cine_passion.rb
test/data/cinepassion-scraper-test-00-no-response.xml
test/data/cinepassion-scraper-test-01-one-response.xml
test/data/cinepassion-scraper-test-02-mutiple-response.xml
test/data/exploded/cinepassion-scraper-test-00-no-response.xml
test/data/exploded/cinepassion-scraper-test-01-one-response.xml
test/data/exploded/cinepassion-scraper-test-02-mutiple-response.xml
test/test_cine_passion.rb
Manifest
33 changes: 0 additions & 33 deletions README.rdoc

This file was deleted.

64 changes: 64 additions & 0 deletions README.txt
@@ -0,0 +1,64 @@
= cine-passion

* http://github.com/nledez/ruby-scraper-cine-passion
* http://rubyforge.org/projects/cine-passion/

== DESCRIPTION:

Cine Passion is a powerfull movies scraper.
This lib allow you to get information about a movie in Ruby without manipulating XML.

If you want try scraper online :
http://passion-xbmc.org/scraper/

If you have any question about this scraper you have a forum :
http://passion-xbmc.org/scraper-cine-passion-support-francais/

== FEATURES/PROBLEMS:

* Extract XML information to build ruby objects

* Does not work actualy for images

== SYNOPSIS:

FIX (code sample of usage)

== REQUIREMENTS:

In my project, you can't find Cine Passion API Key.

In fact you need a key your own side, you can request one here :
http://passion-xbmc.org/demande-clef-api-api-key-request/

See INSTALL

== INSTALL:

* gem install cine-passion
* cd /lib/to/gem/cine-passion
* cp lib/cine_passion_config.rb.sample lib/cine_passion_config.rb
* edit lib/cine_passion_config.rb # And replace APIKEY

== DEVELOPERS:

After checking out the source, run:

$ rake newb

This task will install any missing dependencies, run the tests/specs,
and generate the RDoc.

* XML Sample files
To start devel on my project I made sample files. You can found them on test/data folder. At this time I have theres :
cinepassion-scraper-test-00-no-response.xml -> No response from scraper
cinepassion-scraper-test-01-one-response.xml -> One result from scraper
cinepassion-scraper-test-02-mutiple-response.xml -> Many result from scraper

In "exploded" directory, I have "translate" files in human readable format (only with indentation ;) ). Do not use there files.


== LICENSE:

Ruby Licence:
http://www.ruby-lang.org/en/LICENSE.txt
59 changes: 39 additions & 20 deletions Rakefile
@@ -1,28 +1,47 @@
gem 'hoe', '>=2.0.0'
require 'rcov/rcovtask'
require 'rake/rdoctask'
require 'rubygems'
require 'rake'
require 'echoe'
require 'hoe'

Echoe.new('cine-passion', '0.5.0') do |p|
p.description = "Use Cine Passion scraper http://passion-xbmc.org/scraper-cine-passion-support-francais/ http://passion-xbmc.org/scraper/."
p.url = "http://github.com/nledez/ruby-scraper-cine-passion"
p.author = "Nicolas Ledez"
p.email = "gem.cinepassion@ledez.net"
p.ignore_pattern = ["tmp/*", "script/*"]
p.development_dependencies = []
end

task :default => [:rcov]
$:.unshift 'lib'
require 'cine_passion'

desc "RCov"
Rcov::RcovTask.new do | t |
t.test_files = FileList[ 'test/test_*.rb' ]
t.rcov_opts << '--exclude /gems/,/Library/,/usr/,spec,lib/tasks'
Hoe.spec 'cine-passion' do
# developer('FIX', 'FIX@example.com')
#self.description = "Use Cine Passion scraper http://passion-xbmc.org/scraper-cine-passion-support-francais/ http://passion-xbmc.org/scraper/."
#self.url = "http://github.com/nledez/ruby-scraper-cine-passion"
self.author = "Nicolas Ledez"
self.email = "gem.cinepassion@ledez.net"
#self.ignore_pattern = ["tmp/*", "scripts/*", "coverage/*", "html/*", "html/*/*", "html/*/*/*", "lib/cine_passion_config.rb"]
#self.development_dependencies = []
# self.rubyforge_name = 'blahx' # if different than 'blah'
## self.post_install_message = <<-POST_INSTALL_MESSAGE
###{'*'*50}
##
## Thank you for installing cine-passion-{CinePassion::VERSION::STRING}
##
## Please be copy lib/lib/cine_passion_config.rb.sample to lib/cine_passion_config.rb
## And replace APIKEY with your own.
##
## You can request one here :
## http://passion-xbmc.org/demande-clef-api-api-key-request/
##
###{'*'*50}
##POST_INSTALL_MESSAGE
end

Rake::RDocTask.new do | t |
t.rdoc_files.include("lib/*.rb", "README.rdoc")
t.main = "README.rdoc"
t.title = "Documentation"
end
##desc "RCov"
##Rcov::RcovTask.new do | t |
## t.test_files = FileList[ 'test/test_*.rb' ]
## t.rcov_opts << '--exclude /gems/,/Library/,/usr/,spec,lib/tasks'
##end
##
##Rake::RDocTask.new do | t |
## t.rdoc_files.include("lib/*.rb", "README.rdoc")
## t.main = "README.rdoc"
## t.title = "Documentation"
##end

# vim: syntax=ruby
31 changes: 0 additions & 31 deletions cine-passion.gemspec

This file was deleted.

12 changes: 12 additions & 0 deletions lib/cine_passion.rb
Expand Up @@ -21,6 +21,18 @@
class CinePassion
attr_reader :xml_data, :movie_info, :result_nb, :status, :quota

VERSION = '0.5.0'
unless defined? MAJOR
MAJOR = 0
MINOR = 5
TINY = 0
PRE = nil

STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')

SUMMARY = "cine-passion #{STRING}"
end

# This class does not require parameters
# First action is reset object
def initialize
Expand Down

0 comments on commit 6a68a77

Please sign in to comment.