recipe_scraper 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e671a72d183535c484d94f627e393be2d1d4e08
4
- data.tar.gz: a5595832f756125d35e45e8f5d4d88e1fd3c8931
3
+ metadata.gz: ad21bfeb82ade7c69ec91efb87659fbf0f43ead3
4
+ data.tar.gz: f6a3a569c869c41213fca36f213fbb5efc47b48a
5
5
  SHA512:
6
- metadata.gz: 1f6d46c12f9009a806b8d3476d6ab6002d207f8ce1beea3767fd4bd82bbeb94f0e78526403df55a3e451a73ecb205ed152c763f0c7abcda0e7a92566f97b66a1
7
- data.tar.gz: 766abc201c33ab3710bb62b0ce0659b37c173368117658d0f94d475e19145933cd935934a7ea41f75cac392324020e80be5f768732066689d879fac8c24ee6df
6
+ metadata.gz: b1c6991149659d6003ac2955340ed71563fc8c8e56609bb3442f82bdf56c8758017e668c33411998bd68bf54436eb3bed123cdd43ae77d62ef0873c9dd59971e
7
+ data.tar.gz: e649b6171fce236dd2829c26aa75d8d445945266fe6c527bd468abce1edb33a198f0b5f35371bf7f13ee9d101f192a2ac317cb38381f0aeadee00e3c4ba991fa
data/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # RecipeCrawler
1
+ # RecipeScraper
2
2
 
3
- A web scrawler to get recipe data just by its web url: **RecipeCrawler** support:
3
+ A web scrawler to get recipe data just by its web url: **RecipeScraper** support:
4
4
 
5
5
  * [marmiton.org](http://www.marmiton.org/)
6
6
  * [750g.com](http://www.750g.com)
7
7
  * [cuisineaz.com](http://www.cuisineaz.com)
8
8
 
9
- You'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/recipe_crawler`. To experiment with that code, run `bin/console` for an interactive prompt.
9
+ You'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/recipe_scraper`. To experiment with that code, run `bin/console` for an interactive prompt.
10
10
 
11
11
  ## Installation
12
12
 
13
13
  Add this line to your application's Gemfile:
14
14
 
15
15
  ```ruby
16
- gem 'recipe_crawler'
16
+ gem 'recipe_scraper'
17
17
  ```
18
18
 
19
19
  And then execute:
@@ -22,21 +22,21 @@ And then execute:
22
22
 
23
23
  Or install it yourself as:
24
24
 
25
- $ gem install recipe_crawler
25
+ $ gem install recipe_scraper
26
26
 
27
27
  ## Usage
28
28
 
29
29
  1. import library:
30
30
 
31
31
  ~~~ruby
32
- require 'recipe_crawler'
32
+ require 'recipe_scraper'
33
33
  ~~~
34
34
 
35
- 2. Create a new instance of `RecipeCrawler::Recipe`
35
+ 2. Create a new instance of `RecipeScraper::Recipe`
36
36
 
37
37
  ~~~ruby
38
38
  marmiton_url = 'http://www.marmiton.org/recettes/recette_burger-d-avocat_345742.aspx'
39
- recipe = RecipeCrawler::Recipe.new marmiton_url
39
+ recipe = RecipeScraper::Recipe.new marmiton_url
40
40
  ~~~
41
41
 
42
42
  3. Export as `json` or as an `Array`
@@ -66,7 +66,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
66
66
 
67
67
  ## Contributing
68
68
 
69
- Bug reports and pull requests are welcome on GitHub at https://github.com/madeindjs/recipe_crawler. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
69
+ Bug reports and pull requests are welcome on GitHub at https://github.com/madeindjs/recipe_scraper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
70
70
 
71
71
 
72
72
  ## License
@@ -6,7 +6,7 @@ require 'nokogiri'
6
6
  require "recipe_scraper/version"
7
7
 
8
8
 
9
- module RecipeSraper
9
+ module RecipeScraper
10
10
 
11
11
  # represent a recipe fetched from an Url
12
12
  class Recipe
@@ -179,7 +179,7 @@ module RecipeSraper
179
179
  def fetch_from_cuisineaz url
180
180
  if cuisineaz_host? url
181
181
  page = Nokogiri::HTML(open(url).read)
182
- @title = page.css('#ficheRecette h1.fs36').text
182
+ @title = page.css('h1').text
183
183
 
184
184
  # get times
185
185
  @preptime = page.css('#ctl00_ContentPlaceHolder_LblRecetteTempsPrepa').text.to_i
@@ -192,7 +192,7 @@ module RecipeSraper
192
192
  }
193
193
 
194
194
  @ingredients = []
195
- page.css("#ingredients ul li span").each { |ing_node|
195
+ page.css("#ingredients li").each { |ing_node|
196
196
  @ingredients << sanitize(ing_node.text)
197
197
  }
198
198
 
@@ -1,3 +1,3 @@
1
- module RecipeSraper
2
- VERSION = "2.2.0"
1
+ module RecipeScraper
2
+ VERSION = "2.2.1"
3
3
  end
@@ -5,11 +5,11 @@ require 'recipe_scraper/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "recipe_scraper"
8
- spec.version = RecipeSraper::VERSION
8
+ spec.version = RecipeScraper::VERSION
9
9
  spec.authors = ["madeindjs"]
10
10
  spec.email = ["madeindjs@gmail.com"]
11
11
 
12
- spec.summary = %q{A web scrawler to get a Marmiton's or 750g recipe}
12
+ spec.summary = %q{A web scrawler to get a Marmiton's, cuisineaz or 750g recipe}
13
13
  # spec.description = %q{TODO: Write a longer description or delete this line.}
14
14
  spec.homepage = "https://github.com/madeindjs/recipe_scraper"
15
15
  spec.license = "MIT"
@@ -22,5 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "bundler", "~> 1.11"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec", "~> 3.0"
25
- spec.add_development_dependency "nokogiri"
25
+
26
+ spec.add_dependency "nokogiri"
26
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recipe_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - madeindjs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-04 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -59,7 +59,7 @@ dependencies:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- type: :development
62
+ type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
@@ -107,8 +107,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.4.8
110
+ rubygems_version: 2.5.1
111
111
  signing_key:
112
112
  specification_version: 4
113
- summary: A web scrawler to get a Marmiton's or 750g recipe
113
+ summary: A web scrawler to get a Marmiton's, cuisineaz or 750g recipe
114
114
  test_files: []