qiita_trend 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
  SHA256:
3
- metadata.gz: d976be8d40fa8a10277ab3dbd74a75083dcb4e678afaf5aec35eb588d78e637f
4
- data.tar.gz: 7b4d9ece84fb7699dee8a11b24cf70abab20e580bad744fc855dbd0d2e3520b7
3
+ metadata.gz: 54076c9244079f54ca1a6e9634e3cd88899cc76e83e42f1736684114cee27179
4
+ data.tar.gz: 2520c785025ab48ff9ff83845564d8b59b3a80ea859ed48ac567303f008410d4
5
5
  SHA512:
6
- metadata.gz: 569be16b4557ed51a46cd87d64a3d0b3aa6ab3457b7a590a440f4ed9d7c68b74bfe068ffb511f01391f8f9cf0d3f4c3cc095e79bf28a51e110fc95f1b73b3f25
7
- data.tar.gz: 76067b55858cba110a05872207ce405a92b73a66d78705b9646d1878dca24c39d5f88459cee1f7322f5fdc048635d3f18bcb00a52e548394453bcc99fd6be339
6
+ metadata.gz: de666471befe34a0bba7f0d0f5689f9d5266d723070575128353f6771967de9f514a81d0a54491779f9cebff1c561a4a7a946066d6e36ed3048604dde9032ff2
7
+ data.tar.gz: d6cfd45c62879f8467d85a2541be1c7e42e98bfeaf90645f16d7a9ab0d647d72f508e1b171bb851e4114a2583447ca2ca19e657521ecbe5b17f26cdfea9ca7c7
data/.circleci/config.yml CHANGED
@@ -20,14 +20,12 @@ jobs:
20
20
 
21
21
  steps:
22
22
  - checkout
23
-
24
23
  # Download and cache dependencies
25
24
  - restore_cache:
26
25
  keys:
27
26
  - v1-dependencies-{{ checksum "Gemfile.lock" }}
28
27
  # fallback to using the latest cache if no exact match is found
29
28
  - v1-dependencies-
30
-
31
29
  # install Bundler!
32
30
  # ref:https://discuss.circleci.com/t/using-bundler-2-0-during-ci-fails/27411
33
31
  - run:
@@ -38,19 +36,21 @@ jobs:
38
36
  sudo rm /usr/local/bin/bundle
39
37
  sudo rm /usr/local/bin/bundler
40
38
  sudo gem install bundler
41
-
42
39
  # install gem!
43
40
  - run:
44
41
  name: install gem
45
42
  command: |
46
43
  # jobs=4は並列処理をして高速化するための設定(4つのjobで実行するって意味)
47
44
  bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
48
-
49
45
  - save_cache:
50
46
  paths:
51
47
  - ./vendor/bundle
52
48
  key: v1-dependencies-{{ checksum "Gemfile.lock" }}
53
-
49
+ # run rubocop!
50
+ - run:
51
+ name: run rubocop
52
+ command: |
53
+ bundle exec rubocop
54
54
  # run tests!
55
55
  - run:
56
56
  name: run tests
@@ -63,16 +63,20 @@ jobs:
63
63
  --out /tmp/test-results/rspec.xml \
64
64
  --format progress \
65
65
  $TEST_FILES
66
-
67
- # run rubocop!
68
- - run:
69
- name: run rubocop
70
- command: |
71
- bundle exec rubocop
72
-
73
66
  # collect reports
74
67
  - store_test_results:
75
68
  path: /tmp/test-results
76
69
  - store_artifacts:
77
70
  path: /tmp/test-results
78
- destination: test-results
71
+ destination: test-results
72
+ # deploy RubyGems
73
+ - deploy:
74
+ command: |
75
+ if [ "${CIRCLE_BRANCH}" == "master" ]; then
76
+ mkdir ~/.gem
77
+ curl -u dodonki1223:$RUBYGEMS_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
78
+ git config user.name dodonki1223
79
+ git config user.email $RUBYGEMS_EMAIL
80
+ bundle exec rake build
81
+ bundle exec rake release
82
+ fi
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qiita_trend (0.1.0)
4
+ qiita_trend (0.1.1)
5
5
  nokogiri (~> 1.9)
6
6
 
7
7
  GEM
@@ -72,4 +72,4 @@ DEPENDENCIES
72
72
  webmock
73
73
 
74
74
  BUNDLED WITH
75
- 2.0.1
75
+ 2.0.2
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # QiitaTrend
2
2
 
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/qiita_trend.svg)](https://badge.fury.io/rb/qiita_trend) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/dodonki1223/qiita_trend/blob/master/LICENSE.txt) [![CircleCI](https://circleci.com/gh/dodonki1223/qiita_trend/tree/master.svg?style=svg)](https://circleci.com/gh/dodonki1223/qiita_trend/tree/master)
5
+
3
6
  QiitaのDailyのトレンドを取得することができます(**Weekly、Monthlyは対応していません**)
4
7
 
5
8
  ## 概要
@@ -23,3 +26,36 @@ Or install it yourself as:
23
26
  $ gem install qiita_trend
24
27
 
25
28
  ## 使用方法
29
+
30
+ サクッと使ってみたい方は`gem install qiita_trend`を実行後、下記コマンドをターミナルで実行してください
31
+ **2019年7月24日 08時00分頃実行した結果です**
32
+
33
+ ```shell
34
+ $ ruby -r qiita_trend -e "pp QiitaTrend::Trend.new.items"
35
+
36
+ [{"title"=>"2019年版 最先端のフロントエンド開発者になるために学ぶべきこと",
37
+ "user_name"=>"baby-degu",
38
+ "user_image"=>
39
+ "https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/407975/profile-images/1557035044",
40
+ "likes_count"=>546,
41
+ "is_new_arrival"=>false,
42
+ "article"=>"https://qiita.com/baby-degu/items/da30fa71b8f48fffc568"},
43
+ {"title"=>"【俺は絶対楽してやるんだ】徹底的に学習モチベーションを維持する方法",
44
+ "user_name"=>"rexiaxm7",
45
+ "user_image"=>"https://avatars0.githubusercontent.com/u/39663347?v=4",
46
+ "likes_count"=>477,
47
+ "is_new_arrival"=>false,
48
+ "article"=>"https://qiita.com/rexiaxm7/items/b745185f319edd1a17ab"},
49
+ ...
50
+ ```
51
+
52
+ 自分のプロジェクトで使用したい場合は下記のように記述することで使用することができます
53
+
54
+ ```ruby
55
+ qiita_trend = QiitaTrend::Trend.new
56
+
57
+ # Dailyのトレンドを全て取得する
58
+ p qiita_trend.items
59
+ # DailyのトレンドでNEWのものだけを取得する
60
+ p qiita_trend.new_items
61
+ ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QiitaTrend
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita_trend
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
  - dodonki1223
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-23 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []
181
- rubygems_version: 3.0.3
181
+ rubygems_version: 3.0.4
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: Get Qiita Trend