qiita_org 0.1.39 → 0.1.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/qiita_org/post.rb +11 -3
- data/lib/qiita_org/version.rb +1 -1
- data/tests/tags_test.org +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85708f43a060ecac79ffd90978df7fe6224cf9e99c9c2dfeba36135ac95e6bf4
|
4
|
+
data.tar.gz: f724c732590d202dbd0d6f6e8b411ae03611f18cfab1775c282d3be2312a0b79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5190f9dbcdd7d732cd5f02cf32cabcdfea2d3991ffe2b2789b6e7e8f1c5404140530d42f08139ac93f082eb49160ced1d65bda0757e9838c550e96d0319f30e
|
7
|
+
data.tar.gz: e99e3423bb0ea74d95f2d64bcb0eb2d263fef9a264fc977a65fe859eca6c36d475be2f633c56a16d61a5cabb5a75646108f43350b6271b82cf23164d1b727c9f
|
data/Gemfile.lock
CHANGED
data/lib/qiita_org/post.rb
CHANGED
@@ -44,8 +44,16 @@ class QiitaPost
|
|
44
44
|
tags << { name: tag.strip }
|
45
45
|
end
|
46
46
|
else
|
47
|
-
|
48
|
-
|
47
|
+
if tags.include?(",")
|
48
|
+
tags = tags.split(",").inject([]) do |l, c|
|
49
|
+
l << { name: c.strip } #, versions: []}
|
50
|
+
end
|
51
|
+
else
|
52
|
+
new_tags = tags
|
53
|
+
tags = []
|
54
|
+
new_tags.each do |tag|
|
55
|
+
tags << { name: tag.strip }
|
56
|
+
end
|
49
57
|
end
|
50
58
|
end
|
51
59
|
|
@@ -202,7 +210,7 @@ class QiitaPost
|
|
202
210
|
end
|
203
211
|
new_lines = File.readlines(@src)
|
204
212
|
new_lines.each_with_index do |line, i|
|
205
|
-
if line.match(/\#\+(TAG|tag|Tag|tags|TAGS|Tags)
|
213
|
+
if line.match(/\#\+(TAG|tag|Tag|tags|TAGS|Tags):/)
|
206
214
|
new_lines[i] = "#+TAG: #{new_tags.join(", ")}\n"
|
207
215
|
break
|
208
216
|
end
|
data/lib/qiita_org/version.rb
CHANGED
data/tests/tags_test.org
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#+qiita_private:
|
1
|
+
#+qiita_private: 4da8c4ea781a585d6525
|
2
2
|
#+OPTIONS: ^:{}
|
3
3
|
#+STARTUP: indent nolineimages
|
4
4
|
#+TITLE: title
|
@@ -7,7 +7,7 @@
|
|
7
7
|
#+LANGUAGE: jp
|
8
8
|
# +OPTIONS: H:4 toc:t num:2
|
9
9
|
#+OPTIONS: toc:nil
|
10
|
-
#+TAG:
|
10
|
+
#+TAG: GitHub
|
11
11
|
#+TWITTER: off
|
12
12
|
# +SETUPFILE: ~/.emacs.d/org-mode/theme-readtheorg.setup
|
13
13
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qiita_org
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenta Yamamoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|