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 +4 -4
- data/.circleci/config.yml +17 -13
- data/Gemfile.lock +2 -2
- data/README.md +36 -0
- data/lib/qiita_trend/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54076c9244079f54ca1a6e9634e3cd88899cc76e83e42f1736684114cee27179
|
4
|
+
data.tar.gz: 2520c785025ab48ff9ff83845564d8b59b3a80ea859ed48ac567303f008410d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# QiitaTrend
|
2
2
|
|
3
|
+
|
4
|
+
[](https://badge.fury.io/rb/qiita_trend) [](https://github.com/dodonki1223/qiita_trend/blob/master/LICENSE.txt) [](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
|
+
```
|
data/lib/qiita_trend/version.rb
CHANGED
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.
|
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-
|
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.
|
181
|
+
rubygems_version: 3.0.4
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Get Qiita Trend
|