qiita_org 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02b35bf78555392cac08a4abe942e9d9bdaa25949e1df55a0461f385eaec21bb
4
- data.tar.gz: afcdc3a3742b2c0e96ea083e282e95d10f0ebb0fd20f436b65dc53fb03819f77
3
+ metadata.gz: 88f0ea4de914134782eac18097c144c9a7d5393c0334bf03ef9f1cdd2374f60e
4
+ data.tar.gz: fdd51bf362e3ff8635dcb873fcb9801d10a3124b63921b4dcfae3c572cba4aa5
5
5
  SHA512:
6
- metadata.gz: 6487eb7e630bdcdd8c6e5ec06a141d19da9134563a10019389a19e3cdf96a3813d69719745826c440bb4e052e5c9782b4d11912ebd852749cb69dc451db10e1e
7
- data.tar.gz: c39fa5ef1c4ddc9ef166ca1fdb7d0925ad41f2ba70f16aa788037dd2a4f00552f3371549ee37418274aee08964770592c5bbed70ca28704902e71d154823cbfe
6
+ metadata.gz: 65fd2e9345bfbf148e6bbeab986059a3ee07716571e9533da1f491cbc5d12685b120752f7986d557b4bc97778ebf0f0ab904257d99cfc4a3636c83ff85acff0d
7
+ data.tar.gz: cb0723fc53febe667ecb933bd1e34a719979e2ff447b8893a10dafbfa7da052cadc8d79b7c768025d17f18fab7f11f44774557331231685efcf801565c9586ba
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qiita_org (0.1.13)
4
+ qiita_org (0.1.14)
5
5
  colorize
6
6
  command_line (> 2.0.0)
7
7
  fileutils
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
  require "thor"
2
3
  require "colorize"
3
4
  require "qiita_org/version"
@@ -7,6 +8,7 @@ require "qiita_org/get"
7
8
  require "qiita_org/list"
8
9
  require "qiita_org/get_template"
9
10
  require "qiita_org/check_pc_os"
11
+ require "qiita_org/version"
10
12
  #require "qiita_org/qiita_org_thor"
11
13
 
12
14
  module QiitaOrg
@@ -17,8 +19,6 @@ module QiitaOrg
17
19
  #
18
20
  def initialize(*argv)
19
21
  super(*argv)
20
- checkos = CheckPcOs.new
21
- @os = checkos.return_os()
22
22
  end
23
23
 
24
24
  desc "say_hello", "say_hello"
@@ -28,13 +28,16 @@ module QiitaOrg
28
28
  puts "Hello #{name}."
29
29
  end
30
30
 
31
- desc "post", "post to qiita from org"
31
+ desc "post [FILE] [private/public/teams]", "post to qiita from org"
32
32
 
33
33
  def post(*argv)
34
+ checkos = CheckPcOs.new
35
+ os = checkos.return_os()
36
+
34
37
  p ["in qiita_org.rb", argv]
35
38
  p file = argv[0] || "README.org"
36
39
  p mode = argv[1] || "private"
37
- qiita = QiitaPost.new(file, mode, @os)
40
+ qiita = QiitaPost.new(file, mode, os)
38
41
  begin
39
42
  qiita.select_option(mode)
40
43
  rescue RuntimeError => e
@@ -44,7 +47,7 @@ module QiitaOrg
44
47
  end
45
48
  end
46
49
 
47
- desc "config", "set config"
50
+ desc "config [global/local] [option] [input]", "set config"
48
51
 
49
52
  def config(*argv)
50
53
  status = argv[0] || "local"
@@ -54,7 +57,7 @@ module QiitaOrg
54
57
  config.run
55
58
  end
56
59
 
57
- desc "get", "get qiita report"
60
+ desc "get [qiita/teams] [記事のID]", "get qiita report"
58
61
 
59
62
  def get(*argv)
60
63
  p mode = argv[0] || "qiita"
@@ -66,7 +69,10 @@ module QiitaOrg
66
69
  desc "template", "make template.org"
67
70
 
68
71
  def template(*argv)
69
- template = QiitaGetTemplate.new(@os)
72
+ checkos = CheckPcOs.new
73
+ os = checkos.return_os()
74
+
75
+ template = QiitaGetTemplate.new(os)
70
76
  end
71
77
 
72
78
  desc "all", "post all org file in the directory"
@@ -84,11 +90,17 @@ module QiitaOrg
84
90
  end
85
91
  end
86
92
 
87
- desc "list", "view qiita report list"
93
+ desc "list [qiita/teams]", "view qiita report list"
88
94
 
89
95
  def list(*argv)
90
96
  p mode = argv[0] || "qiita"
91
97
  QiitaList.new(mode)
92
98
  end
99
+
100
+ desc "version", "show version"
101
+
102
+ def version
103
+ puts QiitaOrg::VERSION
104
+ end
93
105
  end
94
106
  end
@@ -146,6 +146,7 @@ class QiitaPost
146
146
  system "explorer.exe #{@res_body["url"]}"
147
147
  else
148
148
  system "open #{@res_body["url"]}"
149
+ system "xdg-open #{@res_body["url"]}"
149
150
  end
150
151
  end
151
152
 
@@ -1,3 +1,3 @@
1
1
  module QiitaOrg
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
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.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenta Yamamoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2020-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler