neovim 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: 9fe8a4ab833d55be2946a9a6b9db21771c47fffe
4
- data.tar.gz: d8c4a84c020b04124978cc4311f43e113bbac1c9
3
+ metadata.gz: af56f57f1cf54f8adc5229739e6bc59970b993c2
4
+ data.tar.gz: d9c97e2f4086a239d18cad60b0e0143df4a5b476
5
5
  SHA512:
6
- metadata.gz: bc3418eaa160281fc251f2f57a7e7f5754db4a3f9d7c21d8b29482098556185f4a828d0eb3960f0eb117c352349a0b1077d6471a585ffafec64663bc791978ec
7
- data.tar.gz: ff1fd3a88fc4b8bcc44024eab6e4eb22999c68810784ea215448432653f7327a06b1a5d6befe3d2e16cf46618e2fc90bebd71951faf1910fa67fc3767b80be10
6
+ metadata.gz: a209db461c6fd40c4b43cf2dc71b0a156e2dd563d6ca3644b383cfd3a625ab6e8302de6f60e1bab216a9efd93db9ad22479687764f41346f806526356034d390
7
+ data.tar.gz: ea4a5ff5be12e6d6e9bf57c454d5cc8fe7d198bcb80329d2a62cad7a2202987a25575c542f51dbe3e501e5cc6a74ea9dcc5719678de4669d193262ad0a0c8b9a
@@ -1,3 +1,7 @@
1
+ # 0.2.2
2
+ - Make `VIM` constant a module instead of a class
3
+ - Make `Client#set_option` accept a single string argument
4
+
1
5
  # 0.2.1
2
6
  - Fix race condition in Fiber handling
3
7
  - General improvements to ruby\_provider.rb
@@ -68,6 +68,26 @@ module Neovim
68
68
  out_write(string)
69
69
  end
70
70
 
71
+ # Set an option.
72
+ #
73
+ # @overload set_option(key, value)
74
+ # @param [String] key
75
+ # @param [String] value
76
+ #
77
+ # @overload set_option(optstr)
78
+ # @param [String] optstr
79
+ #
80
+ # @example Set the +timeoutlen+ option
81
+ # client.set_option("timeoutlen", 0)
82
+ # client.set_option("timeoutlen=0")
83
+ def set_option(*args)
84
+ if args.size > 1
85
+ @api.function("vim_set_option").call(@session, *args)
86
+ else
87
+ @api.function("vim_command").call(@session, "set #{args.first}")
88
+ end
89
+ end
90
+
71
91
  private
72
92
 
73
93
  def rpc_methods
@@ -1,7 +1,7 @@
1
1
  require "neovim/buffer"
2
2
  require "neovim/window"
3
3
 
4
- class VIM < BasicObject
4
+ module VIM
5
5
  Buffer = ::Neovim::Buffer
6
6
  Window = ::Neovim::Window
7
7
 
@@ -1,3 +1,3 @@
1
1
  module Neovim
2
- VERSION = Gem::Version.new("0.2.1")
2
+ VERSION = Gem::Version.new("0.2.2")
3
3
  end
@@ -72,7 +72,19 @@ module Neovim
72
72
  it "sets an option" do
73
73
  expect {
74
74
  client.set_option("makeprg", "rake")
75
- }.to change { client.get_option("makeprg") }
75
+ }.to change { client.get_option("makeprg") }.to("rake")
76
+ end
77
+
78
+ it "sets an option as a single string" do
79
+ expect {
80
+ client.set_option("makeprg=rake")
81
+ }.to change { client.get_option("makeprg") }.to("rake")
82
+ end
83
+
84
+ it "sets an integer option as a single string" do
85
+ expect {
86
+ client.set_option("timeoutlen=0")
87
+ }.to change { client.get_option("timeoutlen") }.to(0)
76
88
  end
77
89
  end
78
90
 
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.2.1
4
+ version: 0.2.2
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-07-11 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack