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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 442f23ffc9e17733a2fe7270c3a88406ae35f921
4
- data.tar.gz: 8b31d0791ab11179aa4a76931a6cf605b42373d3
3
+ metadata.gz: ac966ae43ca339709481cd8e974dfc87b774f8cb
4
+ data.tar.gz: 5db0f3f4af00ee2f02050a47792f340dc43d677b
5
5
  SHA512:
6
- metadata.gz: c749f17520f2dafeb21c820c530c94cddf38ccf01f35112ff50cb1c40134d281bc8e819772b23142f03fc68a77d54d46e25c1fc8e29fdcb620f32d78d0be78fb
7
- data.tar.gz: d1032019115a40a9a1f549c9c9939cd546e4a8c6803ce1f3c3ec75a16ee0157fa1519f5957f4131b38a8a417c666d418b69a67ae434ad2c4d210561cf3a766dd
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
- %w(/usr/bin/xdg-open /usr/bin/X11/xdg-open /usr/local/bin/xdg-open
35
- /usr/bin/x-www-browser /usr/bin/firefox /usr/local/bin/firefox
36
- ).each do |bin|
37
- File.executable?(bin) or next
38
- exec(bin, url) if fork.nil?
39
- return
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/
@@ -1,5 +1,5 @@
1
1
  module OSDN
2
2
  module CLI
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osdn-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - OSDN