Permalink
Browse files

New gem in progress

  • Loading branch information...
1 parent 5067abb commit 6a68a77c9dbc7f136324d52dbcd4ac05bd795ab8 @nledez committed Aug 23, 2010
Showing with 128 additions and 101 deletions.
  1. +2 −0 .gitignore
  2. +7 −0 History.txt
  3. +4 −17 Manifest → Manifest.txt
  4. +0 −33 README.rdoc
  5. +64 −0 README.txt
  6. +39 −20 Rakefile
  7. +0 −31 cine-passion.gemspec
  8. +12 −0 lib/cine_passion.rb
View
@@ -5,3 +5,5 @@ doc/
scripts/
html/
lib/cine_passion_config.rb
+pkg/
+coverage.info
View
@@ -0,0 +1,7 @@
+=== 0.5.0 / 2010-08-23
+
+* First gem
+
+ * Yes!
+
+
View
@@ -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
View
@@ -1,33 +0,0 @@
-== Cine Passion API Key
-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/
-
-To install your own key :
-cp lib/cine_passion_config.rb.sample lib/cine_passion_config.rb
-
-And replace APIKEY
-
-== 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.
-
-== Launch tests
-ruby -Ilib test/test_cine_passion.rb
-Loaded suite test/test_cine_passion
-Started
-......
-Finished in 1.088678 seconds.
-
-6 tests, 29 assertions, 0 failures, 0 errors
-
-Check coverage of tests :
-rake
-
-== Generate doc
-rdoc
View
@@ -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
View
@@ -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
View
@@ -1,31 +0,0 @@
-# -*- encoding: utf-8 -*-
-
-Gem::Specification.new do |s|
- s.name = %q{cine-passion}
- s.version = "0.5.0"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
- s.authors = ["Nicolas Ledez"]
- s.date = %q{2010-08-21}
- s.description = %q{Use Cine Passion scraper http://passion-xbmc.org/scraper-cine-passion-support-francais/ http://passion-xbmc.org/scraper/.}
- s.email = %q{gem.cinepassion@ledez.net}
- s.extra_rdoc_files = ["README.rdoc", "lib/cine_passion.rb", "lib/cine_passion_config.rb.sample"]
- s.files = ["README.rdoc", "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/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", "cine-passion.gemspec"]
- s.homepage = %q{http://github.com/nledez/ruby-scraper-cine-passion}
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Cine-passion", "--main", "README.rdoc"]
- s.require_paths = ["lib"]
- s.rubyforge_project = %q{cine-passion}
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Use Cine Passion scraper http://passion-xbmc.org/scraper-cine-passion-support-francais/ http://passion-xbmc.org/scraper/.}
- s.test_files = ["test/test_cine_passion.rb"]
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- else
- end
- else
- end
-end
View
@@ -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

0 comments on commit 6a68a77

Please sign in to comment.