qiita_org 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qiita_org/get.rb +4 -1
- data/lib/qiita_org/list.rb +4 -1
- data/lib/qiita_org/version.rb +1 -1
- 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: 2e8c82431a22c64669538797e28a4063ec88e0716014fec98371f3fa03833fa5
|
4
|
+
data.tar.gz: 060c5ba8fb541193fec02aa66570300d2b3801e5c3ead68339267d514c1ae36f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe04ad5ab1e88a6b722b71e705b0e96fd2378bf19a70f3cdc98e6158ca3c52e707586bd2889c483d249fb658660315445f1d0b0d80402a07f1c597f20a71376d
|
7
|
+
data.tar.gz: e83f076ae7624915c4569f1bc81455882b854d694f0898aab5810825d4653d28356c259657515942c0bc86ea1508f327610fcd228539187ab592f9397d195ba3
|
data/lib/qiita_org/get.rb
CHANGED
@@ -3,16 +3,19 @@ require "json"
|
|
3
3
|
require "open-uri"
|
4
4
|
require "io/console"
|
5
5
|
require "colorize"
|
6
|
+
require "qiita_org/search_conf_path.rb"
|
6
7
|
|
7
8
|
class QiitaGet
|
8
9
|
def initialize(mode, id)
|
9
10
|
@mode = mode
|
10
11
|
@get_id = id
|
12
|
+
search = SearchConfPath.new(Dir.pwd, Dir.home)
|
13
|
+
@conf_dir = search.search_conf_path()
|
11
14
|
end
|
12
15
|
|
13
16
|
# set config
|
14
17
|
def set_config()
|
15
|
-
conf_path = File.join(
|
18
|
+
conf_path = File.join(@conf_dir, ".qiita.conf")
|
16
19
|
conf = JSON.load(File.read(conf_path))
|
17
20
|
@access_token = conf["access_token"]
|
18
21
|
@teams_url = conf["teams_url"]
|
data/lib/qiita_org/list.rb
CHANGED
@@ -2,10 +2,13 @@ require "net/https"
|
|
2
2
|
require "json"
|
3
3
|
require "open-uri"
|
4
4
|
require "colorize"
|
5
|
+
require "qiita_org/search_conf_path.rb"
|
5
6
|
|
6
7
|
class QiitaList
|
7
8
|
def initialize(mode)
|
8
9
|
@mode = mode
|
10
|
+
search = SearchConfPath.new(Dir.pwd, Dir.home)
|
11
|
+
@conf_dir = search.search_conf_path()
|
9
12
|
set_config()
|
10
13
|
select_path()
|
11
14
|
access_qiita()
|
@@ -13,7 +16,7 @@ class QiitaList
|
|
13
16
|
end
|
14
17
|
|
15
18
|
def set_config()
|
16
|
-
conf_path = File.join(
|
19
|
+
conf_path = File.join(@conf_dir, ".qiita.conf")
|
17
20
|
conf = JSON.load(File.read(conf_path))
|
18
21
|
@access_token = conf["access_token"]
|
19
22
|
@teams_url = conf["teams_url"]
|
data/lib/qiita_org/version.rb
CHANGED