rinkusukurepa 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ed57cee41ec46988d39ebdfe08c1e9baa1a4478
4
- data.tar.gz: 1607ef131fc9aa0baba9a89cf655cb00e783e5ba
3
+ metadata.gz: 9d08b3e1c02c50120b9b2839260164be3f68513e
4
+ data.tar.gz: 65f03d50228c55bb84804b4423532125f961d792
5
5
  SHA512:
6
- metadata.gz: 481fa1ccdae83c4fb40d1314b97095166bffae554a3bb0eb77dc6c9f5e3d6b04dbaa727f1ac1122d8a3d5ba8926801664582680bd77b035266a84ece784ccc9b
7
- data.tar.gz: d39f067f5b389aec2b2e3421d0a2f0b98ca8339df66bda75aa9a9db7a8804c34160278eb7fff6132724fa653da28c9fa6d2e3136aa09e5c962fc0ab3867d79ec
6
+ metadata.gz: ba4a4eecee0b5b0de8ca7a2ba983901f01078dd32d2b0dcc68bbf5e25533df5c72ad947c4d6c29a2edafed25b34bcc0fe6a545291746451c1159d8f7014155f8
7
+ data.tar.gz: 41f488ae05bc50e8ae4ed4d0d288a40e38fcf4431cef327860ce97b928c8700490de02fafb4a46bd1edb6eb1a4c61c2b2ec6051ba82477f00ee9d60ca1ca9fb7
data/README.md CHANGED
@@ -19,38 +19,39 @@ Or install it yourself as:
19
19
  $ gem install rinkusukurepa
20
20
 
21
21
  ## Usage
22
- web_page = Rinkusukurepa.parse_url!('https://github.com/rewin0087/rinkusukurepa')
23
- web_page.title # return the web page title
24
- web_page.description # return the web page description
25
- web_page.images # return all the web page images
26
- web_page.site_name # return site name
27
- web_page.video # return video if present
28
- web_page.page_type # return page type
29
- web_page.page_document # return raw nokigiri document object
30
- web_page.attributes # return a hash with icon, title, description, images, site_name, video and page_type
31
-
32
- Scrape and get specific attribute
33
-
34
- web_page = Rinkusukurepa.new('https://github.com/rewin0087/rinkusukurepa')
35
- web_page.parse_url # it will scrape and return the document of the url
36
- web_page.get_icon # it will find the icon from the document and return the icon
37
- web_page.get_title # it will find the title from the document and return the title
38
- web_page.get_description # it will find the description from the document and return the description
39
- web_page.get_images # it will find the images from the document and return the images
40
- web_page.get_site_name # it will find the site name from the document and return the site name
41
- web_page.get_video # it will find the video from the document and return the video
42
- web_page.get_page_type # it will find the page type from the document and return the page type
43
-
44
- To customize some of the configurations
45
- create a file in the config/initializers/rinkusukurepa.rb
46
- and put:
47
- Rinkusukurepa.configure do |config|
48
- config.image_min_width = 200 # default 150
49
- config.image_min_height = 200 # default 100
50
- config.max_image = 20 # default 20
51
- config.page_types = ['article', 'post'] # default ['website', 'video', 'sound']
52
- config.image_extensions = /(.png|.jpg)/ # default /(.png|PNG|.jpg|JPG|.jpeg|JPEG|BMP|.bmp|.gif|GIF)/
53
- end
22
+
23
+ web_page = Rinkusukurepa.parse_url!('https://github.com/rewin0087/rinkusukurepa')
24
+ web_page.title # return the web page title
25
+ web_page.description # return the web page description
26
+ web_page.images # return all the web page images
27
+ web_page.site_name # return site name
28
+ web_page.video # return video if present
29
+ web_page.page_type # return page type
30
+ web_page.page_document # return raw nokigiri document object
31
+ web_page.attributes # return a hash with icon, title, description, images, site_name, video and page_type
32
+
33
+ Scrape and get specific attribute
34
+
35
+ web_page = Rinkusukurepa.new('https://github.com/rewin0087/rinkusukurepa')
36
+ web_page.parse_url # it will scrape and return the document of the url
37
+ web_page.get_icon # it will find the icon from the document and return the icon (@icon is now set)
38
+ web_page.get_title # it will find the title from the document and return the title (@title is now set)
39
+ web_page.get_description # it will find the description from the document and return the description (@description is now set)
40
+ web_page.get_images # it will find the images from the document and return the images (@images are now set)
41
+ web_page.get_site_name # it will find the site name from the document and return the site name (@site_name is now set)
42
+ web_page.get_video # it will find the video from the document and return the video (@video is now set)
43
+ web_page.get_page_type # it will find the page type from the document and return the page type (@page_type is now set)
44
+
45
+ To customize some of the configurations
46
+ create a file in the config/initializers/rinkusukurepa.rb
47
+ and put:
48
+ Rinkusukurepa.configure do |config|
49
+ config.image_min_width = 200 # default 150
50
+ config.image_min_height = 200 # default 100
51
+ config.max_image = 20 # default 20
52
+ config.page_types = ['article', 'post'] # default ['website', 'video', 'sound']
53
+ config.image_extensions = /(.png|.jpg)/ # default /(.png|PNG|.jpg|JPG|.jpeg|JPEG|BMP|.bmp|.gif|GIF)/
54
+ end
54
55
 
55
56
  ## Contributing
56
57
 
@@ -1,3 +1,3 @@
1
1
  module Rinkusukurepa
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rinkusukurepa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rewin0087