qiita_org 0.1.29 → 0.1.30
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.rb +4 -6
- data/lib/qiita_org/all.rb +23 -4
- data/lib/qiita_org/version.rb +1 -1
- data/tests/template.org +1 -0
- data/tests/test2.org +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f288634b1ce2de7e2a34ddc3fd7399cdb2a1b9e63e6d4b2523ec7cf3fc84601
|
4
|
+
data.tar.gz: a08fb2191f4e6cc80e3c40701df53bae8ae983cfaa225dfba57ede608d846c97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d01c3f1937f7033f7e4a7e2989492251bc53e18e1717ba394a0385afefc217df08a756c61a3cb580e24139199de80ef065d34019d122f00443359879b3cc865
|
7
|
+
data.tar.gz: afd6c322d5d5de441b55b5784e630ca9c401b5f028ce7636d68a8b12dfec8a3b0feb07dd8d458043077e1d3130a65a617f946784be87266a8044c26db18595b7
|
data/Gemfile.lock
CHANGED
data/lib/qiita_org.rb
CHANGED
@@ -121,13 +121,11 @@ module QiitaOrg
|
|
121
121
|
template = QiitaGetTemplate.new(os).run()
|
122
122
|
end
|
123
123
|
|
124
|
-
desc "all", "post all org files in the directory"
|
125
|
-
|
124
|
+
desc "all [teams/public/private] [options]", "post all org files in the directory"
|
125
|
+
|
126
126
|
def all(*argv)
|
127
|
-
mode = argv[0] || false
|
128
|
-
|
129
|
-
puts options[:hoge]
|
130
|
-
QiitaAll.new(mode).run()
|
127
|
+
#mode = argv[0] || false
|
128
|
+
QiitaAll.new(argv).run()
|
131
129
|
end
|
132
130
|
|
133
131
|
desc "list [qiita/teams]", "view qiita report list"
|
data/lib/qiita_org/all.rb
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
require "colorize"
|
2
2
|
|
3
3
|
class QiitaAll
|
4
|
-
def initialize(
|
5
|
-
@mode = mode
|
4
|
+
def initialize(argv)
|
5
|
+
# @mode = mode
|
6
|
+
check_options(argv)
|
6
7
|
@files = Dir.glob("*.org")
|
7
8
|
p @files
|
8
9
|
end
|
9
10
|
|
10
11
|
def run()
|
11
12
|
@files.each do |file|
|
12
|
-
|
13
|
-
|
13
|
+
unless @exclude_files.empty?
|
14
|
+
if @exclude_files.include?(file)
|
15
|
+
next
|
16
|
+
end
|
14
17
|
end
|
15
18
|
|
16
19
|
unless @mode
|
@@ -28,4 +31,20 @@ class QiitaAll
|
|
28
31
|
end
|
29
32
|
end
|
30
33
|
end
|
34
|
+
|
35
|
+
def check_options(string)
|
36
|
+
["teams", "private", "public"].each do |i|
|
37
|
+
if string.include?(i)
|
38
|
+
@mode = i
|
39
|
+
break
|
40
|
+
else
|
41
|
+
@mode = false
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
@exclude_files = []
|
46
|
+
if string.include?("--exclude")
|
47
|
+
@exclude_files = string.grep(/.org/)
|
48
|
+
end
|
49
|
+
end
|
31
50
|
end
|
data/lib/qiita_org/version.rb
CHANGED
data/tests/template.org
CHANGED
data/tests/test2.org
CHANGED