Skip to content

Commit

Permalink
updating the version
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorleal committed Aug 28, 2013
1 parent 0c0f2ea commit 85893a4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
24 changes: 13 additions & 11 deletions lib/find-cine.js
Expand Up @@ -59,21 +59,23 @@ findCine.prototype.makeRequest = function (url, callback) {

//get each .theater
$('.theater').each(function () {
var theater = {
name : $(this).find('.desc .name a').text(),
address: $(this).find('.desc .info').text(),
id : $(this).find('.desc').attr('id').split('_')[1],
var desc = $(this).find('.desc'),
theater = {
name : desc.find('.name a').text(),
address: desc.find('.info').text(),
id : desc.attr('id').split('_')[1],
movies : []
};

//get each movie for the theater
$(this).find('.showtimes .movie').each(function () {
var movie = {
title : $(this).find('.name a').text(),
duration: $(this).find('.info').text(),
id : $(this).find('.name a').attr('href').split('id=')[1],
times : []
};
var name = $(this).find('.name a'),
movie = {
title : name.text(),
duration: $(this).find('.info').text(),
id : name.attr('href').split('id=')[1],
times : []
};

//get the movie times
$(this).find('.times > span').each(function () {
Expand All @@ -90,7 +92,7 @@ findCine.prototype.makeRequest = function (url, callback) {
});

//return the object
callback(undefined, {
callback({
total : self.itens.length,
theaters: self.itens
});
Expand Down
22 changes: 11 additions & 11 deletions package.json
@@ -1,26 +1,26 @@
{
"name": "find-cine",
"version": "0.3.8",
"name" : "find-cine",
"version" : "0.3.9",
"description": "Find movie theaters near you (good to use with geoLocation)",
"main": "index.js",
"main" : "index.js",
"scripts": {
"test": "make test",
"test" : "make test",
"cover": "istanbul cover _mocha -- -R spec",
"ci": "concrete ."
"ci" : "concrete ."
},
"dependencies": {
"cheerio": "*"
},
"devDependencies": {
"should": "*",
"should" : "*",
"jscover": "*",
"mocha": "*",
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.5.4"
"mocha" : "*",
"grunt" : "*",
"grunt-contrib-jshint": "*"
},
"repository": {
"type": "git",
"url": "git://github.com/vitorleal/find-cine.git"
"url" : "git://github.com/vitorleal/find-cine.git"
},
"keywords": [
"find-cine",
Expand All @@ -31,6 +31,6 @@
"peliculas",
"cine"
],
"author": "Vitor Leal <vitorleal1@gmail.com>",
"author" : "Vitor Leal <vitorleal1@gmail.com>",
"license": "MIT"
}
3 changes: 1 addition & 2 deletions test/test.js
@@ -1,5 +1,4 @@
var fs = require('fs'),
should = require('should'),
var should = require('should'),
findCine = require('../lib/find-cine');

//Format String
Expand Down

0 comments on commit 85893a4

Please sign in to comment.