yahoo_news 0.1.0 → 0.1.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
  SHA256:
3
- metadata.gz: 97a2d169a1e3134672f51473db07cfed2b89f5239119e42af566d23187cc35c3
4
- data.tar.gz: 6bb6e867e647129daa4cd25e775a4bbbae91c4a7fbf7cc436227a3dcb55fd1e1
3
+ metadata.gz: 013cc6109e6cfdac550200af036d83fad3fa3e4653e64b4e7bd807fe11de33e2
4
+ data.tar.gz: 10210205c43c9e637874522765b2b2751e591b601628b9b562e4ef896d36d001
5
5
  SHA512:
6
- metadata.gz: 21dfdb4467fb3be6472c0ea143976a3699ceb6facaa29b39e025cee4144da9a8df29934f6b8e0daa7c9b8500a3cc8a2f578cb969d9179181eeb44f846ec08816
7
- data.tar.gz: 252c467bef0ddbb3b6f95cec7e671ff074647ebb8e2d46f217c9ac7074e96c9dd5f622641fb117ce0655e50d3f9b49bab3516b13fb5f7b1cb4e5a41443194d29
6
+ metadata.gz: 0b178e840a262d53232b035dd15d551fd9c28f982be2d349a4afd94bd5a75303fb0e004d1ef6088fb36c4165517ed497d72a2f6ff46b4fc5edf3a1c6cb6ea212
7
+ data.tar.gz: b0238adb499fcd1fba6e9b6bc761b844a39ea9090a2d8251c81f5a8bd6b37d10a4ae5f6a4a094f178a0477d8f1be1ecd7c6126bb3ad1e8925c9f812bcaa738f2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yahoo_news (0.1.0)
4
+ yahoo_news (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,8 +1,5 @@
1
1
  # YahooNews
2
-
3
- Welcome to your new gem! In this directory, 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/yahoo_news`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
2
+ This gem is to output the title and URL of the article that exists above Yahoo news at the current date and time.
6
3
 
7
4
  ## Installation
8
5
 
@@ -21,15 +18,23 @@ Or install it yourself as:
21
18
  $ gem install yahoo_news
22
19
 
23
20
  ## Usage
24
-
25
- TODO: Write usage instructions here
21
+ - When you type `yahoo_news`, the result is output to the command line.
22
+ - $ `yahoo_news`
23
+ - => 18時49分更新
24
+ - => {"猛暑は1週間続く見込み 警戒"=>"https://news.yahoo.co.jp/pickup/6290002"}
25
+ - => {"豪雨 農林水産被害436億円に"=>"https://news.yahoo.co.jp/pickup/6290004"}
26
+ - => {"東電を集団提訴 浪江町民検討"=>"https://news.yahoo.co.jp/pickup/6289982"}
27
+ - => {"豪雨避難 残した犬無事だった"=>"https://news.yahoo.co.jp/pickup/6290003"}
28
+ - => {"医師悩む「大丈夫」使い方"=>"https://news.yahoo.co.jp/pickup/6289997"}
29
+ - => {"村のそばに巨大氷山 住民避難"=>"https://news.yahoo.co.jp/pickup/6289994"}
30
+ - => {"春8強やシード校 相次ぎ敗退"=>"https://news.yahoo.co.jp/pickup/6290006"}
31
+ - => {"有村智恵が感涙 6季ぶり優勝"=>"https://news.yahoo.co.jp/pickup/6289995"}
26
32
 
27
33
  ## Development
28
-
29
34
  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.
30
35
 
31
36
  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).
32
37
 
33
38
  ## Contributing
34
39
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/yahoo_news.
40
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kubota-ryotaro/yahoo_news.
@@ -1,3 +1,3 @@
1
1
  module YahooNews
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/yahoo_news.rb CHANGED
@@ -9,7 +9,7 @@ module YahooNews
9
9
  str = file.read
10
10
 
11
11
  # get date
12
- str_date = str.match(/\d+時\d+分更新/)
12
+ str_date = str.match(/\d+時\d+分/)
13
13
 
14
14
  # news_table
15
15
  str = str.match(/<a href="https:\/\/news\.yahoo.co\.jp\/pickup\/\d+">.*<img src=".+><\/a><\/td><\/tr><tr><td>/)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yahoo_news
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
  - "“kubota-ryotaro”"
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-15 00:00:00.000000000 Z
11
+ date: 2018-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler