readline-ext 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: ed4ef1509ac308fd2b08c0f0362418a077db8f60116864f64392fde77f2a13bd
4
- data.tar.gz: d203d5ebb5a498aa6a6dd34392e8b4150f73b5bfc4a36d8e795d78b5fa0736d1
3
+ metadata.gz: ec5e40cf5710a8714fc62088c75b94f2886e9dc79fcf9089236bb0e08f61f271
4
+ data.tar.gz: 92569538db39a5eb76ea2810a239b6b5a0aec2dcd3d942637f8622036022df14
5
5
  SHA512:
6
- metadata.gz: 18be7f82bd5373f9ed66414880e66b49e0363f26dda7dfcf3b6d46ea472a828517972a0ad06936958c812d6ce72da5eb98e1fed03903567b3b40b78d802ebea3
7
- data.tar.gz: 4f68be097b4822c8e3e87e22653516e9494166600394f202759b567c0b867963103d4be39963aa4fb35fb02db4c2050ebe84bcac358a903b2bf6bb7f13c785a4
6
+ metadata.gz: c5b05a4ae133180fa5f8c44605b31f18b3a421af796ae79f89da57691547de7a0bb7d87e3ab67e1166e1f6d34aa46a30d9f68fa40aa3960000263af2c8acb2ef
7
+ data.tar.gz: 71c1f766a0d7b0187c9525e2d996b63d246325c2fee2765eb3112810d0baa6f4d05f9d8fc1e3e4639aea74cac7ee3793480fc2daa0326a09c50b7463b6607419
@@ -0,0 +1,32 @@
1
+ name: build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: build (${{ matrix.ruby }} / ${{ matrix.os }})
8
+ strategy:
9
+ matrix:
10
+ ruby: [ '3.0', 2.7, 2.6, 2.5, head ]
11
+ os: [ ubuntu-latest, macos-latest ]
12
+ runs-on: ${{ matrix.os }}
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - name: Install libedit
16
+ run: sudo apt-get install -q libedit-dev libedit2
17
+ if: startsWith(matrix.os, 'ubuntu')
18
+ - name: Install libedit
19
+ run: brew install libedit
20
+ if: startsWith(matrix.os, 'macos')
21
+ - name: Set up Ruby
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby }}
25
+ - name: Install dependencies
26
+ run: bundle install
27
+ - name: Run test
28
+ run: rake compile test
29
+ - name: Run test with libedit enabled
30
+ run: rake clobber compile test -- --enable-libedit
31
+ - name: Run test with libedit disabled
32
+ run: rake clobber compile test -- --disable-libedit
data/README.md CHANGED
@@ -6,8 +6,8 @@ and accesses input history from the Ruby interpreter.
6
6
  This module supported Edit Line(libedit) too.
7
7
  libedit is compatible with GNU Readline.
8
8
 
9
- GNU Readline:: http://www.gnu.org/directory/readline.html
10
- libedit:: http://www.thrysoee.dk/editline/
9
+ - [GNU Readline](http://www.gnu.org/directory/readline.html)
10
+ - [libedit](http://www.thrysoee.dk/editline/)
11
11
 
12
12
  See RDoc for Readline module.
13
13
 
data/Rakefile CHANGED
@@ -16,5 +16,5 @@ task :default => [:compile, :test]
16
16
  task :build => :make_gem_depend
17
17
 
18
18
  task :make_gem_depend do
19
- FileUtils.copy_file("ext/readline/depend.gem", "ext/readline/depend")
19
+ FileUtils.copy_file("ext/readline/depend-gem", "ext/readline/depend")
20
20
  end
File without changes
@@ -78,7 +78,7 @@ static ID id_special_prefixes;
78
78
  #ifndef HAVE_RL_USERNAME_COMPLETION_FUNCTION
79
79
  # define rl_username_completion_function username_completion_function
80
80
  #else
81
- char *rl_username_completion_function(const char *, int);
81
+ RUBY_EXTERN char *rl_username_completion_function(const char *, int);
82
82
  #endif
83
83
  #ifndef HAVE_RL_COMPLETION_MATCHES
84
84
  # define rl_completion_matches completion_matches
@@ -689,7 +689,7 @@ readline_s_insert_text(VALUE self, VALUE str)
689
689
  #endif
690
690
 
691
691
  #if defined(HAVE_RL_DELETE_TEXT)
692
- int rl_delete_text(int, int);
692
+ RUBY_EXTERN int rl_delete_text(int, int);
693
693
  static const char *
694
694
  str_subpos(const char *ptr, const char *end, long beg, long *sublen, rb_encoding *enc)
695
695
  {
@@ -1148,7 +1148,7 @@ readline_s_get_screen_size(VALUE self)
1148
1148
  #endif
1149
1149
 
1150
1150
  #ifdef HAVE_RL_VI_EDITING_MODE
1151
- int rl_vi_editing_mode(int, int);
1151
+ RUBY_EXTERN int rl_vi_editing_mode(int, int);
1152
1152
  /*
1153
1153
  * call-seq:
1154
1154
  * Readline.vi_editing_mode -> nil
@@ -1187,7 +1187,7 @@ readline_s_vi_editing_mode_p(VALUE self)
1187
1187
  #endif
1188
1188
 
1189
1189
  #ifdef HAVE_RL_EMACS_EDITING_MODE
1190
- int rl_emacs_editing_mode(int, int);
1190
+ RUBY_EXTERN int rl_emacs_editing_mode(int, int);
1191
1191
  /*
1192
1192
  * call-seq:
1193
1193
  * Readline.emacs_editing_mode -> nil
@@ -1672,7 +1672,7 @@ readline_s_get_filename_quote_characters(VALUE self)
1672
1672
  #endif
1673
1673
 
1674
1674
  #ifdef HAVE_RL_REFRESH_LINE
1675
- int rl_refresh_line(int, int);
1675
+ RUBY_EXTERN int rl_refresh_line(int, int);
1676
1676
  /*
1677
1677
  * call-seq:
1678
1678
  * Readline.refresh_line -> nil
@@ -1919,7 +1919,7 @@ username_completion_proc_call(VALUE self, VALUE str)
1919
1919
  }
1920
1920
 
1921
1921
  #ifdef HAVE_RL_CLEAR_SIGNALS
1922
- int rl_clear_signals(void);
1922
+ RUBY_EXTERN int rl_clear_signals(void);
1923
1923
  #endif
1924
1924
 
1925
1925
  #undef rb_intern
@@ -2060,7 +2060,7 @@ Init_readline(void)
2060
2060
  * The history buffer. It extends Enumerable module, so it behaves
2061
2061
  * just like an array.
2062
2062
  * For example, gets the fifth content that the user input by
2063
- * HISTORY[4].
2063
+ * <code>HISTORY[4]</code>.
2064
2064
  */
2065
2065
  rb_define_const(mReadline, "HISTORY", history);
2066
2066
 
@@ -2088,6 +2088,7 @@ Init_readline(void)
2088
2088
  #if defined HAVE_CLEAR_HISTORY || defined HAVE_REMOVE_HISTORY
2089
2089
  if (strncmp(rl_library_version, EDIT_LINE_LIBRARY_VERSION,
2090
2090
  strlen(EDIT_LINE_LIBRARY_VERSION)) == 0) {
2091
+ prepare_readline();
2091
2092
  add_history("1");
2092
2093
  if (history_get(history_get_offset_func(0)) == NULL) {
2093
2094
  history_get_offset_func = history_get_offset_0;
data/readline-ext.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "readline-ext"
3
- spec.version = "0.1.1"
3
+ spec.version = "0.1.2"
4
4
  spec.authors = ["Yukihiro Matsumoto"]
5
5
  spec.email = ["matz@ruby-lang.org"]
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: readline-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yukihiro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-25 00:00:00.000000000 Z
11
+ date: 2021-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,8 +60,8 @@ extensions:
60
60
  - ext/readline/extconf.rb
61
61
  extra_rdoc_files: []
62
62
  files:
63
+ - ".github/workflows/test.yml"
63
64
  - ".gitignore"
64
- - ".travis.yml"
65
65
  - Gemfile
66
66
  - LICENSE.txt
67
67
  - README.md
@@ -71,7 +71,7 @@ files:
71
71
  - ext/readline/.gitignore
72
72
  - ext/readline/README
73
73
  - ext/readline/README.ja
74
- - ext/readline/depend.gem
74
+ - ext/readline/depend-gem
75
75
  - ext/readline/extconf.rb
76
76
  - ext/readline/readline.c
77
77
  - readline-ext.gemspec
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.1.2
100
+ rubygems_version: 3.2.17
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Provides an interface for GNU Readline and Edit Line (libedit).
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.6.3
7
- before_install: gem install bundler -v 2.0.2