qiita_org 0.1.32 → 0.1.33
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/access_qiita.rb +0 -2
- data/lib/qiita_org/all.rb +0 -1
- data/lib/qiita_org/base.rb +10 -0
- data/lib/qiita_org/get_template.rb +0 -18
- data/lib/qiita_org/upload.rb +6 -1
- data/lib/qiita_org/version.rb +1 -1
- data/tests/test.org +2 -1
- 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: c62db4cbaa124181ee7ac6a7051ee752f5ba1a11ea4bdc3b949880b859de183b
|
4
|
+
data.tar.gz: 0400a11c712f89e91977560e659505306e8b366a25ff57fc0f06f1a3b4db6dad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae78c2320afc2a1a0efe7ec593a3c074a3dfc256460388105ff969b69ea0a213c418d025e55bf2556a7b0927691234fd485eaed3d839d5c93a1e477a969090e
|
7
|
+
data.tar.gz: 8b4517c1aebd8150c00b956703958d4fb2a72fb00b7307b7aceefc19c188bed90e3b187d06f9b0f04c439e2bfda785bcb5a31ce221d78a5546d60dd9175f6551
|
data/lib/qiita_org/all.rb
CHANGED
data/lib/qiita_org/base.rb
CHANGED
@@ -75,4 +75,14 @@ class QiitaBase
|
|
75
75
|
|
76
76
|
return access_token, teams_url, display, ox_qmd_load_path
|
77
77
|
end
|
78
|
+
|
79
|
+
def file_open(os, order)
|
80
|
+
if os == "mac"
|
81
|
+
system "open #{order}"
|
82
|
+
elsif os == "windows"
|
83
|
+
system "explorer.exe #{order}"
|
84
|
+
else
|
85
|
+
system "xdg-open #{order}"
|
86
|
+
end
|
87
|
+
end
|
78
88
|
end
|
@@ -117,24 +117,6 @@ class QiitaGetTemplate
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
-
=begin
|
121
|
-
def get_name()
|
122
|
-
conts = File.readlines(@filename)
|
123
|
-
p "Type your name"
|
124
|
-
name = STDIN.gets
|
125
|
-
conts[3] = "#+AUTHOR: #{name}"
|
126
|
-
File.write(@filename, conts.join)
|
127
|
-
end
|
128
|
-
|
129
|
-
def get_email()
|
130
|
-
conts = File.readlines(@filename)
|
131
|
-
p "Type your email"
|
132
|
-
email = STDIN.gets
|
133
|
-
conts[4] = "#+EMAIL: (concat \"#{email.chomp}\")\n"
|
134
|
-
File.write(@filename, conts.join)
|
135
|
-
end
|
136
|
-
=end
|
137
|
-
|
138
120
|
def set_name_and_email()
|
139
121
|
conf_path = File.join(@conf_dir, ".qiita.conf")
|
140
122
|
conf = JSON.load(File.read(conf_path))
|
data/lib/qiita_org/upload.rb
CHANGED
@@ -98,7 +98,12 @@ class QiitaFileUpLoad
|
|
98
98
|
|
99
99
|
paths.each do |path|
|
100
100
|
file_name = File.basename(path).strip
|
101
|
-
url = (get_file_url(id, file_name))? @file_url : next
|
101
|
+
#url = (get_file_url(id, file_name)) ? @file_url : next
|
102
|
+
if get_file_url(id, file_name)
|
103
|
+
url = @file_url
|
104
|
+
else
|
105
|
+
next
|
106
|
+
end
|
102
107
|
lines.each_with_index do |line, i|
|
103
108
|
if line.match(/\[\[file:#{path}\]\]/)
|
104
109
|
lines[i] = "[[#{url}][file:#{path}]]\n"
|
data/lib/qiita_org/version.rb
CHANGED
data/tests/test.org
CHANGED
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.33
|
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-12-
|
11
|
+
date: 2020-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|