textbringer 0.3.1 → 0.3.2

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: 501a7f57f239b45890a30564482e20d2f80d20b5b21719268f97d0f787600c77
4
- data.tar.gz: 56ec3be0a84a84663542072d76d0bfd868e42144cab77d51439d3ba317fe6302
3
+ metadata.gz: 2244343a4baaddd8efff307da619579a102c66d61c14f5dcebdba589b7f809ba
4
+ data.tar.gz: 0e59492b0f35673c3d0658d7c96c55288734017ace2edb1c58fddcdf22ca9976
5
5
  SHA512:
6
- metadata.gz: fc8752782f2b63601fc382a88689b79d874d3deef1a829ef2efaa969ccfc43175b7d6f8ca2757dd345a88bb997cbc0e3b0aafaf4bcabafad478234e6e4ecd3af
7
- data.tar.gz: 3d7ec2385be73f6d739e5fd0b547c28dc24001e58827d2d4ae15753d03d8d71e257a8f0efd50a9630ea169d3d2c58ade94104be772d9e0d91dfce08ea0b5f957
6
+ metadata.gz: 680ea08b6a0c55e0a514f8da5708cbbcde48efe50747b9f7fdf96ec39264619abfbfbab32a7ca03577885e8691c2d221e563d2fcd98c8bc3dd4e3cd9b647ac10
7
+ data.tar.gz: bac76f72017761cb3c46ff83a0d3f0dee86e811940dc97bd79c6665231f621989c262be1c17ca70d75eb5f1885fd55190062240e5b6d886c29894172a2c3c39c
@@ -2,7 +2,6 @@ root = true
2
2
 
3
3
  [*]
4
4
  end_of_line = lf
5
- insert_final_newline = true
6
5
 
7
6
  [*.rb]
8
7
  indent_style = space
@@ -10,3 +9,4 @@ indent_size = 2
10
9
 
11
10
  [lib/**.rb]
12
11
  trim_trailing_whitespace = true
12
+ insert_final_newline = true
@@ -34,14 +34,15 @@ matrix:
34
34
  - rvm: ruby-head
35
35
  fast_finish: true
36
36
  cache: bundler
37
- before_install: gem update --system
37
+ before_install:
38
+ - gem update --system
39
+ - gem install bundler-audit
38
40
  script:
39
41
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
40
42
  xvfb-run bundle exec rake test;
41
43
  else
42
44
  bundle exec rake test;
43
45
  fi
44
- - bundle exec bundle-audit check --update
45
46
  env:
46
47
  global:
47
48
  UPLOAD_TO_CODECOV: 1
data/CHANGES.md CHANGED
@@ -1,6 +1,12 @@
1
+ ## 0.3.2
2
+
3
+ * Drop Ruby 2.3 support.
4
+ * Support C-x u.
5
+
1
6
  ## 0.3.1
2
7
 
3
8
  * Depend on curses 1.2.6 or later for mingw.
9
+ * Add tbclient.
4
10
 
5
11
  ## 0.3.0
6
12
 
@@ -13,5 +13,7 @@ environment:
13
13
  UPLOAD_TO_CODECOV: 1
14
14
  SSL_CERT_FILE: C:\projects\textbringer\cacert.pem
15
15
  matrix:
16
- - ruby_version: "23"
17
- - ruby_version: "23-x64"
16
+ - ruby_version: "24"
17
+ - ruby_version: "24-x64"
18
+ - ruby_version: "25"
19
+ - ruby_version: "25-x64"
@@ -31,4 +31,3 @@ if eval
31
31
  else
32
32
  tb.visit_file(File.expand_path(arg), wait: wait)
33
33
  end
34
-
@@ -412,8 +412,8 @@ module Textbringer
412
412
  f.flock(File::LOCK_EX)
413
413
  write_to_file(f)
414
414
  f.flush
415
- @file_mtime = f.mtime
416
415
  end
416
+ @file_mtime = File.mtime(file_name)
417
417
  rescue Errno::EISDIR
418
418
  if @name
419
419
  file_name = File.expand_path(@name, file_name)
@@ -524,7 +524,7 @@ module Textbringer
524
524
  if pos < 0 || pos > size
525
525
  raise RangeError, "Out of buffer"
526
526
  end
527
- if !@binary && /[\x80-\xbf]/n =~ byte_after(pos)
527
+ if !@binary && /[\x80-\xbf]/n.match?(byte_after(pos))
528
528
  raise ArgumentError, "Position is in the middle of a character"
529
529
  end
530
530
  @goal_column = nil
@@ -578,12 +578,12 @@ module Textbringer
578
578
 
579
579
  def newline
580
580
  indentation = save_point { |saved|
581
- if /[ \t]/ =~ char_after
581
+ if /[ \t]/.match?(char_after)
582
582
  next ""
583
583
  end
584
584
  beginning_of_line
585
585
  s = @point
586
- while /[ \t]/ =~ char_after
586
+ while /[ \t]/.match?(char_after)
587
587
  forward_char
588
588
  end
589
589
  str = substring(s, @point)
@@ -44,7 +44,7 @@ module Textbringer
44
44
  while c = input.getc
45
45
  if c == "\n"
46
46
  if column < fill_column && !input.eof?
47
- if /(?=[\u{0000}-\u{00FF}])[[:graph:]]/ =~ prev_c
47
+ if /(?=[\u{0000}-\u{00FF}])[[:graph:]]/.match?(prev_c)
48
48
  column = insert_space_between_words(input, output, column)
49
49
  end
50
50
  next
@@ -53,7 +53,7 @@ module Textbringer
53
53
  else
54
54
  w = Buffer.display_width(c)
55
55
  if column + w > fill_column || column >= fill_column
56
- if /\w/ =~ prev_c && /\w/ =~ c
56
+ if /\w/.match?(prev_c) && /\w/.match?(c)
57
57
  column = insert_newline_before_word(output, column)
58
58
  else
59
59
  column = insert_newline(output)
@@ -69,7 +69,7 @@ module Textbringer
69
69
  def insert_space_between_words(input, output, column)
70
70
  c = input.getc
71
71
  input.ungetc(c)
72
- if /(?=[\u{0000}-\u{00FF}])[[:graph:]]/ =~ c
72
+ if /(?=[\u{0000}-\u{00FF}])[[:graph:]]/.match?(c)
73
73
  output << " "
74
74
  column + 1
75
75
  else
@@ -93,7 +93,7 @@ module Textbringer
93
93
  end
94
94
 
95
95
  def insert_char(output, column, c, w)
96
- if column == 0 && /[ \t]/ =~ c
96
+ if column == 0 && /[ \t]/.match?(c)
97
97
  column
98
98
  else
99
99
  output << c
@@ -118,7 +118,7 @@ module Textbringer
118
118
 
119
119
  def isearch_search
120
120
  forward = ISEARCH_STATUS[:forward]
121
- options = if /\A[A-Z]/ =~ ISEARCH_STATUS[:string]
121
+ options = if /\A[A-Z]/.match?(ISEARCH_STATUS[:string])
122
122
  nil
123
123
  else
124
124
  Regexp::IGNORECASE
@@ -34,14 +34,14 @@ module Textbringer
34
34
 
35
35
  class Server
36
36
  def eval(s)
37
- redisplay do
37
+ with_redisplay do
38
38
  Controller.current.instance_eval(s).inspect
39
39
  end
40
40
  end
41
41
 
42
42
  def visit_file(filename, wait: true)
43
43
  queue = Queue.new if wait
44
- redisplay do
44
+ with_redisplay do
45
45
  find_file(filename)
46
46
  Buffer.current[:client_wait_queue] = queue if wait
47
47
  end
@@ -50,7 +50,7 @@ module Textbringer
50
50
 
51
51
  private
52
52
 
53
- def redisplay
53
+ def with_redisplay
54
54
  foreground! do
55
55
  begin
56
56
  yield
@@ -136,6 +136,7 @@ module Textbringer
136
136
  GLOBAL_MAP.define_key(?\C-y, :yank)
137
137
  GLOBAL_MAP.define_key("\ey", :yank_pop)
138
138
  GLOBAL_MAP.define_key(?\C-_, :undo)
139
+ GLOBAL_MAP.define_key("\C-xu", :undo)
139
140
  GLOBAL_MAP.define_key("\C-x\C-_", :redo_command)
140
141
  GLOBAL_MAP.define_key("\C-t", :transpose_chars)
141
142
  GLOBAL_MAP.define_key("\C-j", :newline)
@@ -63,7 +63,7 @@ module Textbringer
63
63
  @buffer.save_excursion do
64
64
  pos = @buffer.point
65
65
  @buffer.beginning_of_line
66
- if /\A[ \t]+\z/ =~ @buffer.substring(@buffer.point, pos)
66
+ if /\A[ \t]+\z/.match?(@buffer.substring(@buffer.point, pos))
67
67
  @buffer.delete_region(@buffer.point, pos)
68
68
  end
69
69
  end
@@ -277,7 +277,7 @@ module Textbringer
277
277
  case text
278
278
  when "class", "module", "def", "if", "unless", "case",
279
279
  "do", "for", "while", "until", "begin"
280
- if /\A(if|unless|while|until)\z/ =~ text
280
+ if /\A(if|unless|while|until)\z/.match?(text)
281
281
  ts = tokens[0...i].reverse_each.take_while { |(l,_),| l == line }
282
282
  t = ts.find { |_, e| e != :on_sp }
283
283
  next if t && !(t[1] == :on_op && t[2] == "=")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Textbringer
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
@@ -19,19 +19,18 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.required_ruby_version = '>= 2.3'
22
+ spec.required_ruby_version = '>= 2.4'
23
23
 
24
- spec.add_runtime_dependency "curses", ">= 1.2.6"
24
+ spec.add_runtime_dependency "curses", ">= 1.2.7"
25
25
  spec.add_runtime_dependency "unicode-display_width", "~> 1.1"
26
26
  spec.add_runtime_dependency "clipboard", "~> 1.1"
27
27
  spec.add_runtime_dependency "fiddley", ">= 0.0.5"
28
28
  spec.add_runtime_dependency "editorconfig"
29
29
 
30
- spec.add_development_dependency "bundler", "~> 1.14"
30
+ spec.add_development_dependency "bundler"
31
31
  spec.add_development_dependency "rake", "~> 12.0"
32
32
  spec.add_development_dependency "test-unit"
33
33
  spec.add_development_dependency "simplecov"
34
34
  spec.add_development_dependency "codecov"
35
- spec.add_development_dependency "bundler-audit"
36
35
  spec.add_development_dependency "ripper-tags"
37
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textbringer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shugo Maeda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-09 00:00:00.000000000 Z
11
+ date: 2019-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.6
19
+ version: 1.2.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.6
26
+ version: 1.2.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: unicode-display_width
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '1.14'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '1.14'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -150,20 +150,6 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: bundler-audit
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: ripper-tags
169
155
  requirement: !ruby/object:Gem::Requirement
@@ -255,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
241
  requirements:
256
242
  - - ">="
257
243
  - !ruby/object:Gem::Version
258
- version: '2.3'
244
+ version: '2.4'
259
245
  required_rubygems_version: !ruby/object:Gem::Requirement
260
246
  requirements:
261
247
  - - ">="
@@ -263,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
249
  version: '0'
264
250
  requirements: []
265
251
  rubyforge_project:
266
- rubygems_version: 2.7.6
252
+ rubygems_version: 3.0.0.beta3
267
253
  signing_key:
268
254
  specification_version: 4
269
255
  summary: An Emacs-like text editor