recipe_scraper 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +21 -0
- data/README.md +80 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/recipe_scraper/version.rb +3 -0
- data/lib/recipe_scraper.rb +211 -0
- data/recipe_scraper.gemspec +26 -0
- metadata +114 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1e671a72d183535c484d94f627e393be2d1d4e08
|
4
|
+
data.tar.gz: a5595832f756125d35e45e8f5d4d88e1fd3c8931
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1f6d46c12f9009a806b8d3476d6ab6002d207f8ce1beea3767fd4bd82bbeb94f0e78526403df55a3e451a73ecb205ed152c763f0c7abcda0e7a92566f97b66a1
|
7
|
+
data.tar.gz: 766abc201c33ab3710bb62b0ce0659b37c173368117658d0f94d475e19145933cd935934a7ea41f75cac392324020e80be5f768732066689d879fac8c24ee6df
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at madeindjs@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2016 Rousseau Alexandre
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 madeindjs
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
# RecipeCrawler
|
2
|
+
|
3
|
+
A web scrawler to get recipe data just by its web url: **RecipeCrawler** support:
|
4
|
+
|
5
|
+
* [marmiton.org](http://www.marmiton.org/)
|
6
|
+
* [750g.com](http://www.750g.com)
|
7
|
+
* [cuisineaz.com](http://www.cuisineaz.com)
|
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.
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem 'recipe_crawler'
|
17
|
+
```
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
$ bundle
|
22
|
+
|
23
|
+
Or install it yourself as:
|
24
|
+
|
25
|
+
$ gem install recipe_crawler
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
1. import library:
|
30
|
+
|
31
|
+
~~~ruby
|
32
|
+
require 'recipe_crawler'
|
33
|
+
~~~
|
34
|
+
|
35
|
+
2. Create a new instance of `RecipeCrawler::Recipe`
|
36
|
+
|
37
|
+
~~~ruby
|
38
|
+
marmiton_url = 'http://www.marmiton.org/recettes/recette_burger-d-avocat_345742.aspx'
|
39
|
+
recipe = RecipeCrawler::Recipe.new marmiton_url
|
40
|
+
~~~
|
41
|
+
|
42
|
+
3. Export as `json` or as an `Array`
|
43
|
+
|
44
|
+
~~~ruby
|
45
|
+
recipe.to_hash
|
46
|
+
# will return
|
47
|
+
# --------------
|
48
|
+
# { :cooktime => 7,
|
49
|
+
# :image => "http://images.marmitoncdn.org/recipephotos/multiphoto/7b/7b4e95f5-37e0-4294-bebe-cde86c30817f_normal.jpg",
|
50
|
+
# :ingredients => ["2 beaux avocat", "2 steaks hachés de boeuf", "2 tranches de cheddar", "quelques feuilles de salade", "1/2 oignon rouge", "1 tomate", "graines de sésame", "1 filet d'huile d'olive", "1 pincée de sel", "1 pincée de poivre"],
|
51
|
+
# :preptime => 20,
|
52
|
+
# :steps => ["Laver et couper la tomate en rondelles", "Cuire les steaks à la poêle avec un filet d'huile d'olive", "Saler et poivrer", "Toaster les graines de sésames", "Ouvrir les avocats en 2, retirer le noyau et les éplucher", "Monter les burger en plaçant un demi-avocat face noyau vers le haut, déposer un steak, une tranche de cheddar sur le steak bien chaud pour qu'elle fonde, une rondelle de tomate, une rondelle d'oignon, quelques feuilles de salade et terminer par la seconde moitié d'avocat", "Parsemer quelques graines de sésames."],
|
53
|
+
# :title => "Burger d'avocat",
|
54
|
+
# }
|
55
|
+
recipe.to_json
|
56
|
+
# will return
|
57
|
+
# --------------
|
58
|
+
# "{\"title\":\"Burger d'avocat\",\"preptime\":20,\"cooktime\":7,\"ingredients\":[\"2 beaux avocat\",\"2 steaks hachés de boeuf\",\"2 tranches de cheddar\",\"quelques feuilles de salade\",\"1/2 oignon rouge\",\"1 tomate\",\"graines de sésame\",\"1 filet d'huile d'olive\",\"1 pincée de sel\",\"1 pincée de poivre\"],\"steps\":[\"Laver et couper la tomate en rondelles\",\"Cuire les steaks à la poêle avec un filet d'huile d'olive\",\"Saler et poivrer\",\"Toaster les graines de sésames\",\"Ouvrir les avocats en 2, retirer le noyau et les éplucher\",\"Monter les burger en plaçant un demi-avocat face noyau vers le haut, déposer un steak, une tranche de cheddar sur le steak bien chaud pour qu'elle fonde, une rondelle de tomate, une rondelle d'oignon, quelques feuilles de salade et terminer par la seconde moitié d'avocat\",\"Parsemer quelques graines de sésames.\"],\"image\":\"http://images.marmitoncdn.org/recipephotos/multiphoto/7b/7b4e95f5-37e0-4294-bebe-cde86c30817f_normal.jpg\"}"
|
59
|
+
~~~
|
60
|
+
|
61
|
+
## Development
|
62
|
+
|
63
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
64
|
+
|
65
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
66
|
+
|
67
|
+
## Contributing
|
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.
|
70
|
+
|
71
|
+
|
72
|
+
## License
|
73
|
+
|
74
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
75
|
+
|
76
|
+
Author
|
77
|
+
----------
|
78
|
+
|
79
|
+
[Rousseau Alexandre](https://github.com/madeindjs)
|
80
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "marmiton_crawler"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,211 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'json'
|
3
|
+
require 'open-uri'
|
4
|
+
require 'nokogiri'
|
5
|
+
|
6
|
+
require "recipe_scraper/version"
|
7
|
+
|
8
|
+
|
9
|
+
module RecipeSraper
|
10
|
+
|
11
|
+
# represent a recipe fetched from an Url
|
12
|
+
class Recipe
|
13
|
+
|
14
|
+
attr_reader :title, :preptime, :cooktime , :ingredients, :steps, :image
|
15
|
+
|
16
|
+
MARMITON_HOST = {desktop: 'http://www.marmiton.org/', mobile: 'http://m.marmiton.org/'}
|
17
|
+
G750_HOST = {desktop: 'http://www.750g.com'}
|
18
|
+
CUISINEAZ_HOST = {desktop: 'http://www.cuisineaz.com/'}
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
# Instanciate a Recipe object with data crawled from an url
|
23
|
+
#
|
24
|
+
# @param url [String] representing an url from Marmiton or 750g website
|
25
|
+
def initialize url
|
26
|
+
|
27
|
+
if marmiton_host? url
|
28
|
+
fetch_from_marmiton url
|
29
|
+
|
30
|
+
elsif g750_host? url
|
31
|
+
fetch_from_g750 url
|
32
|
+
|
33
|
+
elsif cuisineaz_host? url
|
34
|
+
fetch_from_cuisineaz url
|
35
|
+
|
36
|
+
else
|
37
|
+
raise ArgumentError, "Instantiation cancelled (Host not supported)."
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
# export object properties to hash
|
43
|
+
#
|
44
|
+
# @return [Hash] as object's properties
|
45
|
+
def to_hash
|
46
|
+
attrs = Hash.new
|
47
|
+
instance_variables.each do |var|
|
48
|
+
str = var.to_s.gsub /^@/, ''
|
49
|
+
attrs[str.to_sym] = instance_variable_get(var)
|
50
|
+
end
|
51
|
+
attrs
|
52
|
+
end
|
53
|
+
|
54
|
+
|
55
|
+
# convert object properties to json
|
56
|
+
#
|
57
|
+
# @return [String] data formated in JSON
|
58
|
+
def to_json
|
59
|
+
return self.to_hash.to_json
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
|
66
|
+
# remove `\r\n` & unwanted espaces
|
67
|
+
#
|
68
|
+
# @param text [String] a text to sanitize
|
69
|
+
# @return [String] as text corrected formated
|
70
|
+
def sanitize text
|
71
|
+
[' ', '\r\n', "\r\n", "\n", "\r"].each { |text_to_remove|
|
72
|
+
text.gsub!(text_to_remove,'')
|
73
|
+
}
|
74
|
+
return text
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
# test if url is from a valid marmiton.org host
|
79
|
+
#
|
80
|
+
# @param url [String] representing an url
|
81
|
+
# @return [Boolean] as true if coresponding to a valid url
|
82
|
+
def marmiton_host? url
|
83
|
+
return url.include?(MARMITON_HOST[:desktop]) || url.include?(MARMITON_HOST[:mobile])
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
# test if url is from a valid 750g.com host
|
88
|
+
#
|
89
|
+
# @param url [String] representing an url
|
90
|
+
# @return [Boolean] as true if coresponding to a valid url
|
91
|
+
def g750_host? url
|
92
|
+
return url.include? G750_HOST[:desktop]
|
93
|
+
end
|
94
|
+
|
95
|
+
|
96
|
+
# test if url is from a valid cuisineaz.com host
|
97
|
+
#
|
98
|
+
# @param url [String] representing an url
|
99
|
+
# @return [Boolean] as true if coresponding to a valid url
|
100
|
+
def cuisineaz_host? url
|
101
|
+
return url.include? CUISINEAZ_HOST[:desktop]
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
# fill object properties from a Marmiton url
|
106
|
+
#
|
107
|
+
# @param url [String] representing an url
|
108
|
+
def fetch_from_marmiton url
|
109
|
+
if marmiton_host? url
|
110
|
+
|
111
|
+
url.gsub! MARMITON_HOST[:mobile], MARMITON_HOST[:desktop]
|
112
|
+
|
113
|
+
page = Nokogiri::HTML(open(url).read)
|
114
|
+
@title = page.css('h1.m_title span.item span.fn').text
|
115
|
+
|
116
|
+
|
117
|
+
# get times
|
118
|
+
@preptime = page.css('p.m_content_recette_info span.preptime').text.to_i
|
119
|
+
@cooktime = page.css('p.m_content_recette_info span.cooktime').text.to_i
|
120
|
+
|
121
|
+
# get ingredients
|
122
|
+
ingredients_text = page.css('div.m_content_recette_ingredients').text
|
123
|
+
@ingredients = sanitize(ingredients_text).split '- '
|
124
|
+
@ingredients.delete_at(0) # to delete the first `Ingrédients (pour 2 personnes) :`
|
125
|
+
|
126
|
+
# get steps
|
127
|
+
steps_text = page.css('div.m_content_recette_todo').text
|
128
|
+
@steps = sanitize(steps_text).split '. '
|
129
|
+
@steps.delete_at(0) # to delete the first `Ingrédients (pour 2 personnes) :`
|
130
|
+
|
131
|
+
# get image
|
132
|
+
@image = page.css('a.m_content_recette_illu img.m_pinitimage').attr('src').to_s
|
133
|
+
|
134
|
+
|
135
|
+
else
|
136
|
+
raise ArgumentError, "Instantiation cancelled (ulr not from #{MARMITON_HOST})."
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
|
141
|
+
# fill object properties from a 750g url
|
142
|
+
#
|
143
|
+
# @param url [String] representing an url
|
144
|
+
def fetch_from_g750 url
|
145
|
+
if g750_host? url
|
146
|
+
page = Nokogiri::HTML(open(url).read)
|
147
|
+
@title = page.css('h1.c-article__title').text
|
148
|
+
|
149
|
+
# get times
|
150
|
+
@preptime = page.css('ul.c-recipe-summary li time[itemprop=prepTime]').text.to_i
|
151
|
+
@cooktime = page.css('ul.c-recipe-summary li time[itemprop=cookTime]').text.to_i
|
152
|
+
|
153
|
+
@steps = []
|
154
|
+
css_step = "div[itemprop=recipeInstructions] p"
|
155
|
+
@steps = page.css(css_step).text.split /[( ),(<br>)]/
|
156
|
+
|
157
|
+
@ingredients = []
|
158
|
+
css_ingredient = "div.c-recipe-ingredients ul.c-recipe-ingredients__list li.ingredient"
|
159
|
+
page.css(css_ingredient).each { |ing_node|
|
160
|
+
@ingredients << sanitize(ing_node.text)
|
161
|
+
}
|
162
|
+
|
163
|
+
# get image
|
164
|
+
css_image = 'div.swiper-wrapper img.photo'
|
165
|
+
begin
|
166
|
+
@image = page.css(css_image).attr('src').to_s
|
167
|
+
rescue NoMethodError => e
|
168
|
+
end
|
169
|
+
|
170
|
+
else
|
171
|
+
raise ArgumentError, "Instantiation cancelled (ulr not from #{G750_HOST})."
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
|
176
|
+
# fill object properties from a 750g url
|
177
|
+
#
|
178
|
+
# @param url [String] representing an url
|
179
|
+
def fetch_from_cuisineaz url
|
180
|
+
if cuisineaz_host? url
|
181
|
+
page = Nokogiri::HTML(open(url).read)
|
182
|
+
@title = page.css('#ficheRecette h1.fs36').text
|
183
|
+
|
184
|
+
# get times
|
185
|
+
@preptime = page.css('#ctl00_ContentPlaceHolder_LblRecetteTempsPrepa').text.to_i
|
186
|
+
@cooktime = page.css('#ctl00_ContentPlaceHolder_LblRecetteTempsCuisson').text.to_i
|
187
|
+
|
188
|
+
|
189
|
+
@steps = []
|
190
|
+
page.css("#preparation span p.fs17").each { |step_node|
|
191
|
+
@steps << sanitize(step_node.text)
|
192
|
+
}
|
193
|
+
|
194
|
+
@ingredients = []
|
195
|
+
page.css("#ingredients ul li span").each { |ing_node|
|
196
|
+
@ingredients << sanitize(ing_node.text)
|
197
|
+
}
|
198
|
+
|
199
|
+
begin
|
200
|
+
@image = page.css('#shareimg').attr('src').to_s
|
201
|
+
rescue NoMethodError => e
|
202
|
+
end
|
203
|
+
|
204
|
+
else
|
205
|
+
raise ArgumentError, "Instantiation cancelled (ulr not from #{G750_HOST})."
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
end
|
210
|
+
|
211
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'recipe_scraper/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "recipe_scraper"
|
8
|
+
spec.version = RecipeSraper::VERSION
|
9
|
+
spec.authors = ["madeindjs"]
|
10
|
+
spec.email = ["madeindjs@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A web scrawler to get a Marmiton's or 750g recipe}
|
13
|
+
# spec.description = %q{TODO: Write a longer description or delete this line.}
|
14
|
+
spec.homepage = "https://github.com/madeindjs/recipe_scraper"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
25
|
+
spec.add_development_dependency "nokogiri"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: recipe_scraper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- madeindjs
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nokogiri
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- madeindjs@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rspec"
|
78
|
+
- ".travis.yml"
|
79
|
+
- CODE_OF_CONDUCT.md
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE
|
82
|
+
- LICENSE.txt
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- bin/console
|
86
|
+
- bin/setup
|
87
|
+
- lib/recipe_scraper.rb
|
88
|
+
- lib/recipe_scraper/version.rb
|
89
|
+
- recipe_scraper.gemspec
|
90
|
+
homepage: https://github.com/madeindjs/recipe_scraper
|
91
|
+
licenses:
|
92
|
+
- MIT
|
93
|
+
metadata: {}
|
94
|
+
post_install_message:
|
95
|
+
rdoc_options: []
|
96
|
+
require_paths:
|
97
|
+
- lib
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
requirements: []
|
109
|
+
rubyforge_project:
|
110
|
+
rubygems_version: 2.4.8
|
111
|
+
signing_key:
|
112
|
+
specification_version: 4
|
113
|
+
summary: A web scrawler to get a Marmiton's or 750g recipe
|
114
|
+
test_files: []
|