neovim 0.0.6 → 0.1.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 +4 -4
 - data/.travis.yml +4 -19
 - data/CHANGELOG.md +9 -0
 - data/README.md +2 -2
 - data/Rakefile +1 -25
 - data/bin/j2mp +1 -1
 - data/bin/mp2j +1 -1
 - data/bin/neovim-ruby-host +9 -0
 - data/lib/neovim.rb +5 -7
 - data/lib/neovim/async_session.rb +2 -1
 - data/lib/neovim/buffer.rb +112 -0
 - data/lib/neovim/client.rb +4 -2
 - data/lib/neovim/current.rb +9 -1
 - data/lib/neovim/event_loop.rb +8 -4
 - data/lib/neovim/host.rb +3 -1
 - data/lib/neovim/line_range.rb +34 -10
 - data/lib/neovim/logging.rb +29 -20
 - data/lib/neovim/manifest.rb +9 -3
 - data/lib/neovim/plugin.rb +3 -1
 - data/lib/neovim/plugin/dsl.rb +14 -0
 - data/lib/neovim/plugin/handler.rb +24 -5
 - data/lib/neovim/ruby_provider.rb +138 -0
 - data/lib/neovim/session.rb +14 -5
 - data/lib/neovim/version.rb +1 -1
 - data/lib/neovim/window.rb +52 -59
 - data/spec/acceptance/neovim-ruby-host_spec.rb +6 -1
 - data/spec/acceptance/ruby_provider_spec.rb +76 -0
 - data/spec/helper.rb +13 -19
 - data/spec/neovim/async_session_spec.rb +19 -15
 - data/spec/neovim/buffer_spec.rb +127 -1
 - data/spec/neovim/client_spec.rb +1 -1
 - data/spec/neovim/current_spec.rb +9 -1
 - data/spec/neovim/event_loop_spec.rb +20 -21
 - data/spec/neovim/host_spec.rb +1 -1
 - data/spec/neovim/line_range_spec.rb +73 -9
 - data/spec/neovim/manifest_spec.rb +26 -0
 - data/spec/neovim/msgpack_stream_spec.rb +8 -8
 - data/spec/neovim/plugin_spec.rb +41 -0
 - data/spec/neovim/remote_object_spec.rb +3 -3
 - data/spec/neovim/session_spec.rb +68 -29
 - data/spec/neovim/window_spec.rb +47 -24
 - data/spec/neovim_spec.rb +3 -5
 - data/spec/support.rb +1 -2
 - metadata +5 -3
 - data/.gitmodules +0 -4
 
    
        data/spec/neovim_spec.rb
    CHANGED
    
    | 
         @@ -1,15 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require "helper"
         
     | 
| 
       2 
     | 
    
         
            -
            require "fileutils"
         
     | 
| 
       3 
2 
     | 
    
         | 
| 
       4 
3 
     | 
    
         
             
            RSpec.describe Neovim do
         
     | 
| 
       5 
     | 
    
         
            -
              let(: 
     | 
| 
       6 
     | 
    
         
            -
              let(:nvim_argv) { %w(--headless -u NONE -i NONE -N -n) }
         
     | 
| 
      
 4 
     | 
    
         
            +
              let(:nvim_argv) { %w(nvim --headless -u NONE -i NONE -N -n) }
         
     | 
| 
       7 
5 
     | 
    
         | 
| 
       8 
6 
     | 
    
         
             
              describe ".attach_tcp" do
         
     | 
| 
       9 
7 
     | 
    
         
             
                it "attaches to a TCP socket" do
         
     | 
| 
       10 
8 
     | 
    
         
             
                  port = Support.port
         
     | 
| 
       11 
9 
     | 
    
         
             
                  env = {"NVIM_LISTEN_ADDRESS" => "0.0.0.0:#{port}"}
         
     | 
| 
       12 
     | 
    
         
            -
                  pid = Process.spawn(env,  
     | 
| 
      
 10 
     | 
    
         
            +
                  pid = Process.spawn(env, *nvim_argv, [:out, :err] => "/dev/null")
         
     | 
| 
       13 
11 
     | 
    
         | 
| 
       14 
12 
     | 
    
         
             
                  begin
         
     | 
| 
       15 
13 
     | 
    
         
             
                    TCPSocket.open("0.0.0.0", port).close
         
     | 
| 
         @@ -30,7 +28,7 @@ RSpec.describe Neovim do 
     | 
|
| 
       30 
28 
     | 
    
         
             
                it "attaches to a UNIX socket" do
         
     | 
| 
       31 
29 
     | 
    
         
             
                  socket_path = Support.socket_path
         
     | 
| 
       32 
30 
     | 
    
         
             
                  env = {"NVIM_LISTEN_ADDRESS" => socket_path}
         
     | 
| 
       33 
     | 
    
         
            -
                  pid = Process.spawn(env,  
     | 
| 
      
 31 
     | 
    
         
            +
                  pid = Process.spawn(env, *nvim_argv, [:out, :err] => "/dev/null")
         
     | 
| 
       34 
32 
     | 
    
         | 
| 
       35 
33 
     | 
    
         
             
                  begin
         
     | 
| 
       36 
34 
     | 
    
         
             
                    UNIXSocket.new(socket_path).close
         
     | 
    
        data/spec/support.rb
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ require "fileutils" 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Support
         
     | 
| 
       4 
4 
     | 
    
         
             
              def self.workspace
         
     | 
| 
       5 
     | 
    
         
            -
                File.expand_path("../workspace 
     | 
| 
      
 5 
     | 
    
         
            +
                File.expand_path("../workspace", __FILE__)
         
     | 
| 
       6 
6 
     | 
    
         
             
              end
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
              def self.socket_path
         
     | 
| 
         @@ -19,7 +19,6 @@ module Support 
     | 
|
| 
       19 
19 
     | 
    
         
             
              end
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
              def self.setup_workspace
         
     | 
| 
       22 
     | 
    
         
            -
                teardown_workspace
         
     | 
| 
       23 
22 
     | 
    
         
             
                FileUtils.mkdir_p(workspace)
         
     | 
| 
       24 
23 
     | 
    
         
             
              end
         
     | 
| 
       25 
24 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: neovim
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Alex Genco
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016-03 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-07-03 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: msgpack
         
     | 
| 
         @@ -104,7 +104,6 @@ extra_rdoc_files: [] 
     | 
|
| 
       104 
104 
     | 
    
         
             
            files:
         
     | 
| 
       105 
105 
     | 
    
         
             
            - ".coveralls.yml"
         
     | 
| 
       106 
106 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
       107 
     | 
    
         
            -
            - ".gitmodules"
         
     | 
| 
       108 
107 
     | 
    
         
             
            - ".travis.yml"
         
     | 
| 
       109 
108 
     | 
    
         
             
            - CHANGELOG.md
         
     | 
| 
       110 
109 
     | 
    
         
             
            - Gemfile
         
     | 
| 
         @@ -132,12 +131,14 @@ files: 
     | 
|
| 
       132 
131 
     | 
    
         
             
            - lib/neovim/plugin/handler.rb
         
     | 
| 
       133 
132 
     | 
    
         
             
            - lib/neovim/remote_object.rb
         
     | 
| 
       134 
133 
     | 
    
         
             
            - lib/neovim/request.rb
         
     | 
| 
      
 134 
     | 
    
         
            +
            - lib/neovim/ruby_provider.rb
         
     | 
| 
       135 
135 
     | 
    
         
             
            - lib/neovim/session.rb
         
     | 
| 
       136 
136 
     | 
    
         
             
            - lib/neovim/tabpage.rb
         
     | 
| 
       137 
137 
     | 
    
         
             
            - lib/neovim/version.rb
         
     | 
| 
       138 
138 
     | 
    
         
             
            - lib/neovim/window.rb
         
     | 
| 
       139 
139 
     | 
    
         
             
            - neovim.gemspec
         
     | 
| 
       140 
140 
     | 
    
         
             
            - spec/acceptance/neovim-ruby-host_spec.rb
         
     | 
| 
      
 141 
     | 
    
         
            +
            - spec/acceptance/ruby_provider_spec.rb
         
     | 
| 
       141 
142 
     | 
    
         
             
            - spec/helper.rb
         
     | 
| 
       142 
143 
     | 
    
         
             
            - spec/neovim/api_spec.rb
         
     | 
| 
       143 
144 
     | 
    
         
             
            - spec/neovim/async_session_spec.rb
         
     | 
| 
         @@ -181,6 +182,7 @@ specification_version: 4 
     | 
|
| 
       181 
182 
     | 
    
         
             
            summary: A Ruby client for Neovim
         
     | 
| 
       182 
183 
     | 
    
         
             
            test_files:
         
     | 
| 
       183 
184 
     | 
    
         
             
            - spec/acceptance/neovim-ruby-host_spec.rb
         
     | 
| 
      
 185 
     | 
    
         
            +
            - spec/acceptance/ruby_provider_spec.rb
         
     | 
| 
       184 
186 
     | 
    
         
             
            - spec/helper.rb
         
     | 
| 
       185 
187 
     | 
    
         
             
            - spec/neovim/api_spec.rb
         
     | 
| 
       186 
188 
     | 
    
         
             
            - spec/neovim/async_session_spec.rb
         
     | 
    
        data/.gitmodules
    DELETED