qiita_org 0.1.7 → 0.1.8

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: 6bcfe0bcc517c1e202474d88b0008b64bc5dea57b6967db711f884ac9f0cd692
4
- data.tar.gz: 50f664328238deec48614bda9bb5657ab5443ac78a507676688dc1e2d0cd4951
3
+ metadata.gz: 2e8c82431a22c64669538797e28a4063ec88e0716014fec98371f3fa03833fa5
4
+ data.tar.gz: 060c5ba8fb541193fec02aa66570300d2b3801e5c3ead68339267d514c1ae36f
5
5
  SHA512:
6
- metadata.gz: 470de211b542bc26e9494314448176ce7a3bcc9e5063638fe64733bbe82db73488cd66d6e45f8f58184a81d5f1262380e57ac8563b575e87ec84f20fc947c432
7
- data.tar.gz: 640239350f1629577714a43e8d4e0d17e2b4bda26b8b196cf310a4c6bd40553a97053b71dac00d10ee663edefbfb6ac442a2acd344c59309c57d2ec855d6033c
6
+ metadata.gz: fe04ad5ab1e88a6b722b71e705b0e96fd2378bf19a70f3cdc98e6158ca3c52e707586bd2889c483d249fb658660315445f1d0b0d80402a07f1c597f20a71376d
7
+ data.tar.gz: e83f076ae7624915c4569f1bc81455882b854d694f0898aab5810825d4653d28356c259657515942c0bc86ea1508f327610fcd228539187ab592f9397d195ba3
@@ -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(ENV["HOME"], ".qiita.conf")
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"]
@@ -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(ENV["HOME"], ".qiita.conf")
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"]
@@ -1,3 +1,3 @@
1
1
  module QiitaOrg
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita_org
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenta Yamamoto