rfd 0.4.0 → 0.5.0

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: d75fe5bcaf9a3f7a14ba0f23fb6fc475c4aaea68
4
- data.tar.gz: 19fad896ea6eec39e417bdfee2bb0bac28d37e96
3
+ metadata.gz: 34e313d8625f35c512be57647e3038e018d854b0
4
+ data.tar.gz: 0aeb62e0b57a4d965647e4f31e6a930e248d3385
5
5
  SHA512:
6
- metadata.gz: 778f65ab177d37b688ea9f7dbe678ab3fa5b656cba93096387689cf7521c305f29b6de971a2e1de8f1cdd90918fba0776763df7573c41542adba52f8c4806ff7
7
- data.tar.gz: e3d23535bdc25262fa98c802c8a526a76dd25d585722dac423b601ce5c60f7dbab738d20307e76becb7e9133637bdae00004ee524885c305391182c80577161f
6
+ metadata.gz: 1b6e5d86f1c94a5164d10f2b660807abf654fc8e2f65a01c05ace52365319e3c0d62ecaa42ab101070bbb59ddbf3ef2f0851894682b6b315c7a8acf35fdc8765
7
+ data.tar.gz: ff9ee591f2a29eb16bf23c2e1196a9472dd2da45d3789c38c713bcea524421a318b8f4b84ee49101974772288113d67d10c95c0ff76a25c387e3d91306ff2bb2
data/README.md CHANGED
@@ -10,7 +10,6 @@ rfd is a terminal-based filesystem explorer, inpsired by the legendary freesoft
10
10
 
11
11
  * Ruby 2.0, Ruby 2.1
12
12
  * NCurses
13
- * (FFI)
14
13
 
15
14
  ## Tested environments
16
15
 
@@ -42,6 +41,7 @@ All available commands in rfd are defined as Ruby methods here. https://github.c
42
41
  * `<Enter>`: cd into the directory where the cursor is on.
43
42
  * `<Delete>` (or \<Backspace\> on your keyboard, probably?): Go up to the upper directory (cd ..).
44
43
  * `-`: Get back to where you once belonged (popd).
44
+ * `@`: cd to a directory given via the command-line window.
45
45
 
46
46
  ### Moving the cursor
47
47
 
data/lib/rfd.rb CHANGED
@@ -1,5 +1,4 @@
1
- require 'ffi-ncurses'
2
- Curses = FFI::NCurses
1
+ require 'curses'
3
2
  require 'fileutils'
4
3
  require 'tmpdir'
5
4
  require 'rubygems/package'
@@ -14,19 +13,18 @@ module Rfd
14
13
 
15
14
  # :nodoc:
16
15
  def self.init_curses
17
- Curses.initscr
16
+ Curses.init_screen
18
17
  Curses.raw
19
18
  Curses.noecho
20
19
  Curses.curs_set 0
21
- Curses.keypad Curses.stdscr, true
20
+ Curses.stdscr.keypad = true
22
21
  Curses.start_color
23
22
 
24
23
  [Curses::COLOR_WHITE, Curses::COLOR_CYAN, Curses::COLOR_MAGENTA, Curses::COLOR_GREEN, Curses::COLOR_RED].each do |c|
25
24
  Curses.init_pair c, c, Curses::COLOR_BLACK
26
25
  end
27
26
 
28
- Curses.mousemask Curses::ALL_MOUSE_EVENTS | Curses::REPORT_MOUSE_POSITION, nil
29
- Curses.extend FFI::NCurses::Mouse
27
+ Curses.mousemask Curses::BUTTON1_CLICKED | Curses::BUTTON1_DOUBLE_CLICKED
30
28
  end
31
29
 
32
30
  # Start the app here!
@@ -35,9 +33,9 @@ module Rfd
35
33
  # * +dir+ - The initial directory.
36
34
  def self.start(dir = '.')
37
35
  init_curses
36
+ Rfd::Window.draw_borders
38
37
  rfd = Rfd::Controller.new
39
38
  rfd.cd dir
40
- rfd.ls
41
39
  rfd
42
40
  end
43
41
 
@@ -57,14 +55,13 @@ module Rfd
57
55
 
58
56
  # The main loop.
59
57
  def run
60
- mouse_event = Curses::MEVENT.new
61
58
  loop do
62
59
  begin
63
60
  number_pressed = false
64
- case (c = Curses.getch)
65
- when Curses::KEY_RETURN
61
+ case (c = Curses.getch).ord
62
+ when 10, 13 # enter, return
66
63
  enter
67
- when Curses::KEY_ESCAPE
64
+ when 27
68
65
  q
69
66
  when 32 # space
70
67
  space
@@ -91,14 +88,16 @@ module Rfd
91
88
  debug "key: #{c}" if ENV['DEBUG']
92
89
  end
93
90
  when Curses::KEY_MOUSE
94
- if Curses.getmouse(mouse_event) == Curses::OK
95
- if Curses.BUTTON_CLICK(mouse_event[:bstate], 1) > 0
96
- click y: mouse_event[:y], x: mouse_event[:x]
97
- elsif Curses.BUTTON_DOUBLE_CLICK(mouse_event[:bstate], 1) > 0
98
- double_click y: mouse_event[:y], x: mouse_event[:x]
91
+ if (mouse_event = Curses.getmouse)
92
+ case mouse_event.bstate
93
+ when Curses::BUTTON1_CLICKED
94
+ click y: mouse_event.y, x: mouse_event.x
95
+ when Curses::BUTTON1_DOUBLE_CLICKED
96
+ double_click y: mouse_event.y, x: mouse_event.x
99
97
  end
100
98
  end
101
99
  else
100
+ raise c
102
101
  debug "key: #{c}" if ENV['DEBUG']
103
102
  end
104
103
  @times = nil unless number_pressed
@@ -110,7 +109,7 @@ module Rfd
110
109
  end
111
110
  end
112
111
  ensure
113
- Curses.endwin
112
+ Curses.close_screen
114
113
  end
115
114
 
116
115
  # Change the number of columns in the main window.
@@ -166,10 +165,11 @@ module Rfd
166
165
 
167
166
  header_l.draw_current_file_info item
168
167
  header_l.wrefresh
168
+ @current_row
169
169
  end
170
170
 
171
171
  # Change the current directory.
172
- def cd(dir, pushd: true)
172
+ def cd(dir = '~', pushd: true)
173
173
  dir = load_item expand_path(dir) unless dir.is_a? Item
174
174
  unless dir.zip?
175
175
  Dir.chdir dir
@@ -180,14 +180,12 @@ module Rfd
180
180
  @dir_history << current_dir if current_dir && pushd
181
181
  @current_dir, @current_page, @current_row = dir, 0, nil
182
182
  main.activate_pane 0
183
+ ls
183
184
  end
184
185
 
185
186
  # cd to the previous directory.
186
187
  def popd
187
- if @dir_history.any?
188
- cd @dir_history.pop, pushd: false
189
- ls
190
- end
188
+ cd @dir_history.pop, pushd: false if @dir_history.any?
191
189
  end
192
190
 
193
191
  # Fetch files from current directory.
@@ -259,7 +257,7 @@ module Rfd
259
257
  @items = Dir.foreach(current_dir).map {|fn|
260
258
  stat = File.lstat current_dir.join(fn)
261
259
  Item.new dir: current_dir, name: fn, stat: stat, window_width: maxx
262
- }.to_a
260
+ }.to_a.partition {|i| %w(. ..).include? i.name}.flatten
263
261
  else
264
262
  @items = [Item.new(dir: current_dir, name: '.', stat: File.stat(current_dir), window_width: maxx),
265
263
  Item.new(dir: current_dir, name: '..', stat: File.stat(File.dirname(current_dir)), window_width: maxx)]
@@ -307,33 +305,31 @@ module Rfd
307
305
 
308
306
  # Sort the loaded files and directories in already given sort order.
309
307
  def sort_items_according_to_current_direction
310
- @items, unsorted = items.partition {|i| %w(. ..).include? i.name}
311
- @items.sort!
312
- @items += case @direction
308
+ case @direction
313
309
  when nil
314
- unsorted.partition(&:directory?).flat_map(&:sort)
310
+ @items = items.shift(2) + items.partition(&:directory?).flat_map(&:sort)
315
311
  when 'r'
316
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort.reverse}
312
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort.reverse}
317
313
  when 'S', 's'
318
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort_by {|i| -i.size}}
314
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort_by {|i| -i.size}}
319
315
  when 'Sr', 'sr'
320
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort_by(&:size)}
316
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort_by(&:size)}
321
317
  when 't'
322
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort {|x, y| y.mtime <=> x.mtime}}
318
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort {|x, y| y.mtime <=> x.mtime}}
323
319
  when 'tr'
324
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort_by(&:mtime)}
320
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort_by(&:mtime)}
325
321
  when 'c'
326
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort {|x, y| y.ctime <=> x.ctime}}
322
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort {|x, y| y.ctime <=> x.ctime}}
327
323
  when 'cr'
328
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort_by(&:ctime)}
324
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort_by(&:ctime)}
329
325
  when 'u'
330
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort {|x, y| y.atime <=> x.atime}}
326
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort {|x, y| y.atime <=> x.atime}}
331
327
  when 'ur'
332
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort_by(&:atime)}
328
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort_by(&:atime)}
333
329
  when 'e'
334
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort {|x, y| y.extname <=> x.extname}}
330
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort {|x, y| y.extname <=> x.extname}}
335
331
  when 'er'
336
- unsorted.partition(&:directory?).flat_map {|arr| arr.sort_by(&:extname)}
332
+ @items = items.shift(2) + items.partition(&:directory?).flat_map {|arr| arr.sort_by(&:extname)}
337
333
  end
338
334
  items.each.with_index {|item, index| item.index = index}
339
335
  end
@@ -667,10 +663,10 @@ module Rfd
667
663
  command_line.set_prompt prompt
668
664
  command_line.wrefresh
669
665
  while (c = Curses.getch)
670
- next unless [78, 89, 110, 121, 3, 27] .include? c # N, Y, n, y, ^c, esc
666
+ next unless [?N, ?Y, ?n, ?y, 3, 27] .include? c # N, Y, n, y, ^c, esc
671
667
  command_line.wclear
672
668
  command_line.wrefresh
673
- break [89, 121].include? c # Y, y
669
+ break %[Y y].include? c # Y, y
674
670
  end
675
671
  end
676
672
 
@@ -732,11 +728,14 @@ module Rfd
732
728
  private
733
729
  def execute_external_command(pause: false)
734
730
  Curses.def_prog_mode
735
- Curses.endwin
731
+ Curses.close_screen
736
732
  yield
737
733
  ensure
738
734
  Curses.reset_prog_mode
739
735
  Curses.getch if pause
736
+ #NOTE needs to draw borders and ls again here since the stdlib Curses.refresh fails to retrieve the previous screen
737
+ Rfd::Window.draw_borders
738
+ ls
740
739
  Curses.refresh
741
740
  end
742
741
 
data/lib/rfd/commands.rb CHANGED
@@ -245,6 +245,11 @@ module Rfd
245
245
  process_command_line preset_command: 'grep'
246
246
  end
247
247
 
248
+ # Change current directory (cd).
249
+ define_method('@') do
250
+ process_command_line preset_command: 'cd'
251
+ end
252
+
248
253
  # Execute a shell command in an external shell.
249
254
  define_method('!') do
250
255
  process_shell_command
@@ -260,12 +265,10 @@ module Rfd
260
265
  if current_item.name == '.' # do nothing
261
266
  elsif current_item.name == '..'
262
267
  cd '..'
263
- ls
264
268
  elsif in_zip?
265
269
  v
266
270
  elsif current_item.directory? || current_item.zip?
267
271
  cd current_item
268
- ls
269
272
  else
270
273
  v
271
274
  end
@@ -283,7 +286,6 @@ module Rfd
283
286
  def del
284
287
  if current_dir.path != '/'
285
288
  cd File.expand_path(current_dir.join(['..'] * times))
286
- ls
287
289
  end
288
290
  end
289
291
 
data/lib/rfd/item.rb CHANGED
@@ -101,7 +101,11 @@ module Rfd
101
101
 
102
102
  def directory?
103
103
  @directory ||= if symlink?
104
- File.stat(path).directory?
104
+ begin
105
+ File.stat(path).directory?
106
+ rescue Errno::ENOENT
107
+ false
108
+ end
105
109
  else
106
110
  stat.directory?
107
111
  end
data/lib/rfd/windows.rb CHANGED
@@ -1,63 +1,88 @@
1
1
  module Rfd
2
2
  class Window
3
+ ACS_URCORNER = 4194411
4
+ ACS_LRCORNER = 4194410
5
+ ACS_ULCORNER = 4194412
6
+ ACS_LLCORNER = 4194413
7
+ ACS_HLINE = 4194417
8
+ ACS_LTEE = 4194420
9
+ ACS_RTEE = 4194421
10
+ ACS_BTEE = 4194422
11
+ ACS_TTEE = 4194423
12
+ ACS_VLINE = 4194424
13
+
3
14
  attr_reader :window
4
15
 
5
- def wmove(y, x = 0)
6
- Curses.wmove window, y, x
16
+ def self.draw_borders
17
+ Curses.attron Curses.color_pair(Curses::COLOR_CYAN) do
18
+ Curses.addch ACS_ULCORNER
19
+ (Curses.cols - 32).times { Curses.addch ACS_HLINE }
20
+ Curses.addch ACS_TTEE
21
+ 29.times { Curses.addch ACS_HLINE }
22
+ Curses.addch ACS_URCORNER
23
+
24
+ [*1..3, *5..(Curses.lines - 3)].each do |i|
25
+ Curses.setpos i, 0
26
+ Curses.addch ACS_VLINE
27
+ Curses.setpos i, Curses.cols - 1
28
+ Curses.addch ACS_VLINE
29
+ end
30
+ [1, 2, 3].each do |i|
31
+ Curses.setpos i, Curses.cols - 31
32
+ Curses.addch ACS_VLINE
33
+ end
34
+
35
+ Curses.setpos 4, 0
36
+ Curses.addch ACS_LTEE
37
+ (Curses.cols - 32).times { Curses.addch ACS_HLINE }
38
+ Curses.addch ACS_BTEE
39
+ 29.times { Curses.addch ACS_HLINE }
40
+ Curses.addch ACS_RTEE
41
+
42
+ Curses.setpos Curses.lines - 2, 0
43
+ Curses.addch ACS_LLCORNER
44
+ (Curses.cols - 2).times { Curses.addch ACS_HLINE }
45
+ Curses.addch ACS_LRCORNER
46
+ end
7
47
  end
8
48
 
9
- def waddstr(str, clear_to_eol_before_add: false)
10
- wclrtoeol if clear_to_eol_before_add
11
- Curses.waddstr window, str
49
+ def wmove(y, x = 0)
50
+ window.setpos y, x
12
51
  end
13
52
 
14
- def mvwaddstr(y, x, str)
15
- Curses.mvwaddstr window, y, x, str
53
+ def waddstr(str, clear_to_eol_before_add: false)
54
+ window.clrtoeol if clear_to_eol_before_add
55
+ window.addstr str
16
56
  end
17
57
 
18
58
  def wclear
19
- Curses.wclear window
59
+ window.clear
20
60
  end
21
61
 
22
62
  def wrefresh
23
- Curses.wrefresh window
63
+ window.refresh
24
64
  end
25
65
 
26
66
  def maxx
27
- Curses.getmaxx window
67
+ window.maxx
28
68
  end
29
69
 
30
70
  def maxy
31
- Curses.getmaxy window
71
+ window.maxy
32
72
  end
33
73
 
34
74
  def begx
35
- Curses.getbegx window
75
+ window.begx
36
76
  end
37
77
 
38
78
  def begy
39
- Curses.getbegy window
40
- end
41
-
42
- def subwin(height, width, top, left)
43
- Curses.derwin Curses.stdscr, height, width, top, left
44
- end
45
-
46
- def wclrtoeol
47
- Curses.wclrtoeol window
48
- end
49
-
50
- def draw_border(*border_param)
51
- border_window = subwin maxy + 2, maxx + 2, begy - 1, begx - 1
52
- Curses.wbkgd border_window, Curses.COLOR_PAIR(Curses::COLOR_CYAN)
53
- Curses.wborder border_window, *border_param
79
+ window.begy
54
80
  end
55
81
  end
56
82
 
57
83
  class HeaderLeftWindow < Window
58
84
  def initialize
59
- @window = subwin 3, Curses.COLS - 32, 1, 1
60
- draw_border 0, 0, 0, 0, 0, 0, Curses::ACS_LTEE, 0
85
+ @window = Curses.stdscr.subwin 3, Curses.cols - 32, 1, 1
61
86
  end
62
87
 
63
88
  def draw_path_and_page_number(path: nil, current: 1, total: nil)
@@ -87,8 +112,7 @@ module Rfd
87
112
 
88
113
  class HeaderRightWindow < Window
89
114
  def initialize
90
- @window = subwin 3, 29, 1, Curses.COLS - 30
91
- draw_border 0, 0, 0, 0, Curses::ACS_TTEE, 0, Curses::ACS_BTEE, Curses::ACS_RTEE
115
+ @window = Curses.stdscr.subwin 3, 29, 1, Curses.cols - 30
92
116
  end
93
117
 
94
118
  def draw_marked_items(count: 0, size: 0)
@@ -104,7 +128,7 @@ module Rfd
104
128
 
105
129
  def debug(s)
106
130
  wmove 0, 0
107
- wclrtoeol
131
+ window.clrtoeol
108
132
  waddstr s.to_s
109
133
  wrefresh
110
134
  end
@@ -139,28 +163,24 @@ module Rfd
139
163
 
140
164
  def close_all
141
165
  @panes.each do |p|
142
- Curses.wclear p
143
- Curses.delwin p
166
+ p.clear
167
+ p.close
144
168
  end
145
169
  end
146
170
 
147
171
  def include_point?(pane: pane, y: nil, x: nil)
148
- (y >= Curses.getbegy(pane)) && (Curses.getbegy(pane) + Curses.getmaxy(pane) > y) && (x >= Curses.getbegx(pane)) && (Curses.getbegx(pane) + Curses.getmaxx(pane) > x)
172
+ (y >= pane.begy) && (pane.begy + pane.maxy > y) && (x >= pane.begx) && (pane.begx + pane.maxx > x)
149
173
  end
150
174
  end
151
175
 
152
176
  def initialize(dir = '.')
153
- border_window = subwin Curses.LINES - 5, Curses.COLS, 4, 0
154
- Curses.wbkgd border_window, Curses::COLOR_PAIR(Curses::COLOR_CYAN)
155
- Curses.box border_window, 0, 0
156
-
157
177
  spawn_panes 2
158
178
  end
159
179
 
160
180
  def spawn_panes(num)
161
181
  @panes.close_all if defined? @panes
162
- width = (Curses.COLS - 2) / num
163
- windows = 0.upto(num - 1).inject([]) {|arr, i| arr << subwin(Curses.LINES - 7, width - 1, 5, width * i + 1)}
182
+ width = (Curses.cols - 2) / num
183
+ windows = 0.upto(num - 1).inject([]) {|arr, i| arr << Curses.stdscr.subwin(Curses.lines - 7, width - 1, 5, width * i + 1)}
164
184
  @panes = Panes.new windows
165
185
  activate_pane 0
166
186
  end
@@ -182,9 +202,10 @@ module Rfd
182
202
  end
183
203
 
184
204
  def draw_item(item, current: false)
185
- Curses.wattr_set window, current ? Curses::A_UNDERLINE : Curses::A_NORMAL, item.color, nil
186
- mvwaddstr item.index % maxy, 0, "#{item.to_s}\n"
187
- Curses.wstandend window
205
+ window.setpos item.index % maxy, 0
206
+ window.attron(Curses.color_pair(item.color) | (current ? Curses::A_UNDERLINE : Curses::A_NORMAL)) do
207
+ window.addstr "#{item.to_s}\n"
208
+ end
188
209
  wrefresh
189
210
  end
190
211
 
@@ -196,50 +217,51 @@ module Rfd
196
217
  wclear
197
218
  wmove 0
198
219
  items[maxy * index, maxy * (index + 1)].each do |item|
199
- Curses.wattr_set window, Curses::A_NORMAL, item.color, nil
200
- waddstr "#{item.to_s}\n"
220
+ window.attron(Curses.color_pair(item.color) | Curses::A_NORMAL) { waddstr "#{item.to_s}\n" }
201
221
  end if items[maxy * index, maxy * (index + 1)]
202
- Curses.wstandend window
203
222
  wrefresh
204
223
  end
205
224
  activate_pane original_active_pane_index
206
225
  end
207
226
 
208
227
  def toggle_mark(item)
209
- mvwaddstr item.index % maxy, 0, item.current_mark if item.toggle_mark
228
+ if item.toggle_mark
229
+ window.setpos item.index % maxy, 0
230
+ window.addstr item.current_mark
231
+ end
210
232
  end
211
233
  end
212
234
 
213
235
  class CommandLineWindow < Window
214
236
  def initialize
215
- @window = subwin 1, Curses.COLS, Curses.LINES - 1, 0
237
+ @window = Curses.stdscr.subwin 1, Curses.cols, Curses.lines - 1, 0
216
238
  end
217
239
 
218
240
  def set_prompt(str)
219
- Curses.wattr_set window, Curses::A_BOLD, Curses::COLOR_WHITE, nil
220
- wmove 0
221
- wclrtoeol
222
- waddstr str
223
- Curses.wstandend window
241
+ window.attron(Curses.color_pair(Curses::COLOR_WHITE) | Curses::A_BOLD) do
242
+ wmove 0
243
+ window.clrtoeol
244
+ waddstr str
245
+ end
224
246
  end
225
247
 
226
248
  def get_command(prompt: nil)
227
249
  Curses.echo
228
250
  startx = prompt ? prompt.size : 1
229
- s = ' ' * 100
230
- Curses.mvwgetstr window, 0, startx, s
251
+ window.setpos 0, startx
252
+ s = window.getstr
231
253
  "#{prompt[1..-1] if prompt}#{s.strip}"
232
254
  ensure
233
255
  Curses.noecho
234
256
  end
235
257
 
236
258
  def show_error(str)
237
- Curses.wattr_set window, Curses::A_BOLD, Curses::COLOR_RED, nil
238
- wmove 0
239
- wclrtoeol
240
- waddstr str
259
+ window.attron(Curses.color_pair(Curses::COLOR_RED) | Curses::A_BOLD) do
260
+ wmove 0
261
+ window.clrtoeol
262
+ waddstr str
263
+ end
241
264
  wrefresh
242
- Curses.wstandend window
243
265
  end
244
266
  end
245
267
  end
data/rfd.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "rfd"
7
- spec.version = '0.4.0'
7
+ spec.version = '0.5.0'
8
8
  spec.authors = ["Akira Matsuda"]
9
9
  spec.email = ["ronnie@dio.jp"]
10
10
  spec.description = 'Ruby on Files & Directories'
@@ -17,7 +17,6 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency 'ffi-ncurses'
21
20
  spec.add_dependency 'rubyzip', '>= 1.0.0'
22
21
  spec.add_development_dependency "bundler", "~> 1.3"
23
22
  spec.add_development_dependency "rake"
@@ -20,7 +20,7 @@ describe Rfd::Controller do
20
20
  end
21
21
 
22
22
  after :all do
23
- Curses.endwin
23
+ Curses.close_screen
24
24
  end
25
25
 
26
26
  let(:tmpdir) { File.join __dir__, 'tmpdir' }
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-14 00:00:00.000000000 Z
11
+ date: 2013-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: ffi-ncurses
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rubyzip
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -152,4 +138,3 @@ test_files:
152
138
  - spec/testdir/link1
153
139
  - spec/testdir/link2
154
140
  - spec/testdir/zip1.zip
155
- has_rdoc: