ruaur 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/ruaur/aur.rb +27 -24
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d91f9f2007c3c871c47ae345664c5cb9ce041048
4
- data.tar.gz: 23639fc12e377e9c68b33bd6221ae09ebafc17c0
2
+ SHA256:
3
+ metadata.gz: f53abf0e780651b0812a01891e932a1d838d8405816c517e639eacb7fde261b7
4
+ data.tar.gz: 7e9fac6807b77aa3a452913decfa70e839349e740899d74c00e72325efb1ab4c
5
5
  SHA512:
6
- metadata.gz: 9e141fc80554db4a91b3072dd6f9fdd00d754775f50f63fbcf3ffa9b10a9b5d4a5b9580d901b3b05f51be302e0595394df068254bb91cfa1d44d386c4402ffb8
7
- data.tar.gz: b9f129ec40899d191ee551469e4c4e8086f9f59a75d66a55fdce77f775a9046cb4c585ed2ea6ef24b357f9f6a6a5f1b08881b921c798da36fabb4f273458cdfb
6
+ metadata.gz: e7e38ec385c2e13696913548716a7f022225cb1bcecee212934f0b4d2b08316a81f4e769cbf4e2517681a0df9adefb3ce4c5e1b500d16690937a8034b1852c63
7
+ data.tar.gz: d3d1bf51e7117a0f51bc32e663c6ea63cf85fe342082a4b283efe05d8c9cb030e4c3733d43356ad4a80e80d3def336c6b1cfdc47db2ce2a7b3713115d62f03f4
data/lib/ruaur/aur.rb CHANGED
@@ -58,33 +58,36 @@ class RuAUR::AUR
58
58
  def edit_pkgbuild(package, noconfirm = false)
59
59
  return false if (noconfirm)
60
60
 
61
- print "Do you want to edit the PKGBUILD y/[n]/q?: "
62
- answer = nil
63
- while (answer.nil?)
64
- begin
65
- system("stty raw -echo")
66
- if ($stdin.ready?)
67
- answer = $stdin.getc
68
- else
69
- sleep 0.1
61
+ loop do
62
+ print "Do you want to edit the PKGBUILD y/[n]/q?: "
63
+ answer = nil
64
+ while (answer.nil?)
65
+ begin
66
+ system("stty raw -echo")
67
+ if ($stdin.ready?)
68
+ answer = $stdin.getc
69
+ else
70
+ sleep 0.1
71
+ end
72
+ ensure
73
+ system("stty -raw echo")
70
74
  end
71
- ensure
72
- system("stty -raw echo")
75
+ end
76
+ puts
77
+
78
+ case answer
79
+ when "n", "N", "\r"
80
+ return false
81
+ when "q", "Q", "\x03"
82
+ # Quit or ^C
83
+ return true
84
+ when "y", "Y"
85
+ editor = ENV["EDITOR"]
86
+ editor = ScoobyDoo.where_are_you("vim") if (editor.nil?)
87
+ editor = ScoobyDoo.where_are_you("vi") if (editor.nil?)
88
+ system("#{editor} PKGBUILD")
73
89
  end
74
90
  end
75
- puts
76
-
77
- case answer
78
- when "y", "Y"
79
- editor = ENV["EDITOR"]
80
- editor = ScoobyDoo.where_are_you("vim") if (editor.nil?)
81
- editor = ScoobyDoo.where_are_you("vi") if (editor.nil?)
82
- system("#{editor} PKGBUILD")
83
- when "q", "Q", "\x03"
84
- # Quit or ^C
85
- return true
86
- end
87
- return false
88
91
  end
89
92
  private :edit_pkgbuild
90
93
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruaur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-25 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  version: '0'
153
153
  requirements: []
154
154
  rubyforge_project:
155
- rubygems_version: 2.6.13
155
+ rubygems_version: 2.7.3
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Can search and install packages for Arch Linux