patu 0.1.0.pre → 0.1.1.pre

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: db2fe7bc9100a819d15319f59d881daed0b69c3e
4
- data.tar.gz: 19f8bc399856034fc8cd1314307fad069128f521
3
+ metadata.gz: 9a2ec85c2b9cc58f60ef06b7fedc1d759ce781d8
4
+ data.tar.gz: dd751a45b6d3e5c52c6796aa4276146cebd44a24
5
5
  SHA512:
6
- metadata.gz: 42d00e9f50fb3ca04c5f938e189b17d8b38aea6b5eacdb32a6c032ceacdce6510ed23d3676a9ad9df5113d0b4a282bde48197d55e3b9763aa70ea21578310aab
7
- data.tar.gz: d6d6eb5463211dbb3f34b92c0a42332d86d05dc5d80622c64c74c454a09e242c13e074b98ab65bb40890c28ea2a9a2940f9b2b8deef431f2ab1a1ae616177440
6
+ metadata.gz: b548b42858b60afb3a004ca97e7472e249530fc0ca692287a9773e84298f128d2d78601374c8bb7b007ad32c88eb8e3bd4772f145ddf75209b415d74a99ad19f
7
+ data.tar.gz: 3a8b685b5c927310bc6858910fc9a2a0908a558eb89a38a3127f13659d9037bb3e2fe229a9df0c0ea9e8c8f3d1f98da3c4aeeae2a9fb5c364f4b398b343a6154
@@ -1,5 +1,7 @@
1
1
  # Contributor Code of Conduct
2
2
 
3
+ Just be nice.
4
+
3
5
  As contributors and maintainers of this project, and in the interest of
4
6
  fostering an open and welcoming community, we pledge to respect all people who
5
7
  contribute through reporting issues, posting feature requests, updating
@@ -46,4 +48,4 @@ version 1.3.0, available at
46
48
  [http://contributor-covenant.org/version/1/3/0/][version]
47
49
 
48
50
  [homepage]: http://contributor-covenant.org
49
- [version]: http://contributor-covenant.org/version/1/3/0/
51
+ [version]: http://contributor-covenant.org/version/1/3/0/
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Bryan Lim(@ytbryan)
3
+ Copyright (c) 2016 Bryan Lim (@ytbryan)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -11,6 +11,12 @@ module Patu
11
11
  package_name 'patu'
12
12
  default_task :print
13
13
 
14
+ desc :test, 'patu test will print out result on terminal'
15
+ def test url, pattern
16
+ test_process_argv(url, pattern)
17
+ end
18
+
19
+
14
20
  desc :scrap, 'patu scrap <url> <pattern>'
15
21
  def scrap url, pattern
16
22
  process_argv(url, pattern)
@@ -47,6 +53,14 @@ module Patu
47
53
 
48
54
 
49
55
  private
56
+
57
+ def test_process_argv(url, pattern)
58
+ web_page = Nokogiri::HTML(open(url))
59
+ scraped_result = web_page.css(pattern)
60
+ # print_csv(scraped_result, scraped_result.count)
61
+ puts "#{scraped_result} \n=======\nfound #{scraped_result.count} for pattern #{pattern}"
62
+ end
63
+
50
64
  def process_argv(url, pattern)
51
65
  web_page = Nokogiri::HTML(open(url))
52
66
  scraped_result = web_page.css(pattern)
@@ -1,3 +1,3 @@
1
1
  module Patu
2
- VERSION = "0.1.0.pre"
2
+ VERSION = "0.1.1.pre"
3
3
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre
4
+ version: 0.1.1.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Lim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-25 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -75,6 +75,7 @@ files:
75
75
  - lib/patu/dependencies.rb
76
76
  - lib/patu/post_message.rb
77
77
  - lib/patu/version.rb
78
+ - patu-0.1.0.pre.gem
78
79
  - patu.gemspec
79
80
  homepage: http://github.com/ytbryan/patu
80
81
  licenses: