gpuzzletime 0.2.0 → 0.2.1

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: '085c039e47e90785456469afa634a2bdec1a0827f6338002ad328aec65bd3ebe'
4
- data.tar.gz: 90c4d988689fbdd1984b8d03ada7cb7c323239275dcb58bdf93966d7d17e7b0f
3
+ metadata.gz: 25d45d4c0242828b4e577bc2273a0c7a5813d33a65ab8760f0c08795d51340ff
4
+ data.tar.gz: fdcea7b3498c360fc80f91da9f6bbb39ec45d365f01c72c2f40e86bfae251e34
5
5
  SHA512:
6
- metadata.gz: 3ca42c92cb96a54088514f351317a09c96bfc8d566fa12153f7a2ee843900575bca8389913223cd1ebd8ab8b37aeb0f5f9ae549c8545be4e0e5b080bc2551011
7
- data.tar.gz: cb59f1b6ef96d3b94eab51713d39ff8f3fa18980d45815988804da871fac27210470d83bd7c8641f6ee59eefbcf771dfc494dcef8e2031168eaf2f038cfc4b3e
6
+ metadata.gz: c32b7c7b65f50769a852e728f3bcc15f5cf585ac530b5ba8c8436787510f31349b22302d644405ee505a90f4b8969c21727f4e5829ea113d9bd0b74da05991f1
7
+ data.tar.gz: cb3cf7c061d46a3a9b60a7aab3df4a7859d31f7ab36994749593e1a430d94ba15abf780de0ceac051b1fee792c3e96c20c1316919367b2090df1919d9c488940
data/README.md CHANGED
@@ -36,6 +36,7 @@ small tooling to transfer timelog-entries from gtimelog's timelog.txt to the Puz
36
36
  - [ ] from *-notation
37
37
  - [ ] allow to have a list of "favourite" time-accounts
38
38
  - [ ] select best-matching time-account according to tags, possibly limited to the favourites
39
+ - [ ] add cli-help
39
40
 
40
41
 
41
42
  ## Installation
@@ -88,8 +88,23 @@ module Gpuzzletime
88
88
  end
89
89
 
90
90
  def open_browser(start, entry)
91
- url = "#{@base_url}/ordertimes/new?#{url_options(start, entry)}"
92
- system "gnome-open '#{url}' > /dev/null 2> /dev/null"
91
+ xdg_open "'#{@base_url}/ordertimes/new?#{url_options(start, entry)}'", silent: true
92
+ end
93
+
94
+ def xdg_open(args, silent: false)
95
+ opener = 'xdg-open'
96
+ silencer = '> /dev/null 2> /dev/null'
97
+
98
+ if system("which #{opener} #{silencer}")
99
+ system "#{opener} #{args} #{silencer if silent}"
100
+ else
101
+ abort <<~ERRORMESSAGE
102
+ #{opener} not found
103
+
104
+ This binary is needed to launch a webbrowser and open the page
105
+ to enter the worktime-entry into puzzletime.
106
+ ERRORMESSAGE
107
+ end
93
108
  end
94
109
 
95
110
  def launch_editor
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version
4
4
  module Gpuzzletime
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpuzzletime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Viehweger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-15 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler