osdn-cli 0.0.3 → 0.0.4
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 +4 -4
- data/lib/osdn/cli/command/login.rb +8 -6
- data/lib/osdn/cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac966ae43ca339709481cd8e974dfc87b774f8cb
|
|
4
|
+
data.tar.gz: 5db0f3f4af00ee2f02050a47792f340dc43d677b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2410cbbf83e311af1565d2bb4c6180642d6e46a3d87f46e68017755388c52bf3aa46a9570122863c80827f6d8c3faa9b74b96e255d8ac0260e3ea7efcebb17af
|
|
7
|
+
data.tar.gz: b5472f3405bd5d7ac1c8f0cd37ed32e78d8c7cccbf3af81d22795aa1b42674d6f6b56ccd2c05d0538b4000c6e66f122c9a745b2f74e0fd47a41bfafb47ef7bfd
|
|
@@ -31,12 +31,14 @@ module OSDN; module CLI; module Command
|
|
|
31
31
|
|
|
32
32
|
def launch_brwoser(url)
|
|
33
33
|
puts "Access follwoing URL to get auth code;\n#{url}"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
if ENV['DISPLAY']
|
|
35
|
+
%w(/usr/bin/xdg-open /usr/bin/X11/xdg-open /usr/local/bin/xdg-open
|
|
36
|
+
/usr/bin/x-www-browser /usr/bin/firefox /usr/local/bin/firefox
|
|
37
|
+
).each do |bin|
|
|
38
|
+
File.executable?(bin) or next
|
|
39
|
+
exec(bin, url) if fork.nil?
|
|
40
|
+
return
|
|
41
|
+
end
|
|
40
42
|
end
|
|
41
43
|
case RUBY_PLATFORM
|
|
42
44
|
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
data/lib/osdn/cli/version.rb
CHANGED