robot-vim 2.0.0 → 2.0.1
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 +7 -0
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/lib/robot-vim/command_generator.rb +5 -5
- data/lib/robot-vim/version.rb +2 -4
- data/robot-vim.gemspec +1 -1
- data/spec/integration_spec.rb +1 -1
- data/spec/robot-vim/command_generator_spec.rb +7 -7
- data/spec/robot-vim/input_file_spec.rb +1 -1
- data/spec/robot-vim/vim_response_spec.rb +3 -3
- metadata +71 -71
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0d314cae8656e3a0026f034553467ee398145f4a
|
4
|
+
data.tar.gz: 1cd09ccd51dc73bf0c12b033241a30bc8bfbe98b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: de51fe37682aa15267d4a9a3cf4926d18c70ca07154d2292ebdb0e718899a68af7078b1abdc4a6447a245c4c21a384581fb4342732baef63a6b5e6cd423b3f86
|
7
|
+
data.tar.gz: 4faadbb029f1cf280dcf4c7f5f5bb4f2e12568b3ed3de4ff0abebab4f289d743ef1723885953526686d92f65ab77c13a6624e32a09d8a6de8a750f86a7ca0d0e
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -66,7 +66,7 @@ The return value of RobotVim::Runner#run is a RobotVim::VimResponse instance wit
|
|
66
66
|
**Please submit pull requests or issues if there are additional values that you want to be able to assert against**
|
67
67
|
|
68
68
|
### Making Assertions
|
69
|
-
Use your preferred Ruby testing library to make assertions about the
|
69
|
+
Use your preferred Ruby testing library to make assertions about the VimResponse returned by RobotVim::Runner#run
|
70
70
|
|
71
71
|
Take a look at spec/integration\_spec.rb for examples of asserting with Rspec
|
72
72
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module RobotVim
|
2
2
|
class CommandGenerator
|
3
3
|
def self.generate(user_commands, output_file)
|
4
|
-
user_commands +
|
5
|
-
record_location_command +
|
4
|
+
user_commands +
|
5
|
+
record_location_command +
|
6
6
|
write_output_file_command(output_file) +
|
7
7
|
vim_close_commands
|
8
8
|
end
|
@@ -14,13 +14,13 @@ module RobotVim
|
|
14
14
|
def self.record_location_command
|
15
15
|
":let current_line = line(\".\")\n" +
|
16
16
|
":let current_column = col(\".\")\n" +
|
17
|
-
":normal! G\n" +
|
17
|
+
":normal! G\n" +
|
18
18
|
":execute \"normal! o\" . current_line\n" +
|
19
|
-
":execute \"normal! o\" . current_column\n"
|
19
|
+
":execute \"normal! o\" . current_column\n"
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.vim_close_commands
|
23
|
-
"
|
23
|
+
":%bd!\n:q!\n"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/robot-vim/version.rb
CHANGED
data/robot-vim.gemspec
CHANGED
@@ -3,7 +3,7 @@ require File.expand_path("../lib/robot-vim/version", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "robot-vim"
|
6
|
-
s.version =
|
6
|
+
s.version = RobotVim::VERSION
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["Matt Margolis"]
|
9
9
|
s.email = ["matt@mattmargolis.net"]
|
data/spec/integration_spec.rb
CHANGED
@@ -66,7 +66,7 @@ yes please
|
|
66
66
|
it "detects the correct line and column numbers" do
|
67
67
|
input = "Here is some text\n" +
|
68
68
|
"and more on a different line\n" +
|
69
|
-
"behold, the lines just keep going\n" +
|
69
|
+
"behold, the lines just keep going\n" +
|
70
70
|
"really?"
|
71
71
|
|
72
72
|
commands = <<-COMMANDS
|
@@ -2,19 +2,19 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe RobotVim::CommandGenerator do
|
4
4
|
describe ".generate" do
|
5
|
-
let(:output_file) { "some/file.extension" }
|
6
|
-
let(:user_commands) { "some user commands" }
|
5
|
+
let(:output_file) { "some/file.extension" }
|
6
|
+
let(:user_commands) { "some user commands" }
|
7
7
|
|
8
8
|
let(:write_to_output_file_command) { RobotVim::CommandGenerator.write_output_file_command(output_file) }
|
9
9
|
let(:close_vim_commands) { RobotVim::CommandGenerator.vim_close_commands}
|
10
|
-
let(:record_location_command) { RobotVim::CommandGenerator.record_location_command }
|
10
|
+
let(:record_location_command) { RobotVim::CommandGenerator.record_location_command }
|
11
11
|
|
12
12
|
subject { RobotVim::CommandGenerator.generate(user_commands, output_file) }
|
13
13
|
|
14
|
-
it { should include(user_commands) }
|
15
|
-
it { should include(write_to_output_file_command) }
|
16
|
-
it { should include(record_location_command) }
|
17
|
-
it { should include(close_vim_commands) }
|
14
|
+
it { should include(user_commands) }
|
15
|
+
it { should include(write_to_output_file_command) }
|
16
|
+
it { should include(record_location_command) }
|
17
|
+
it { should include(close_vim_commands) }
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RobotVim::VimResponse do
|
4
|
-
let(:expected_body) { "hi there. This is some stuff.\n That is in vim\n and might be awesome" }
|
5
|
-
let(:expected_line) { 2 }
|
6
|
-
let(:expected_column) { 4 }
|
4
|
+
let(:expected_body) { "hi there. This is some stuff.\n That is in vim\n and might be awesome" }
|
5
|
+
let(:expected_line) { 2 }
|
6
|
+
let(:expected_column) { 4 }
|
7
7
|
let(:file_contents) { expected_body + "\n" + expected_line.to_s + "\n" + expected_column.to_s }
|
8
8
|
|
9
9
|
subject { RobotVim::VimResponse.new(file_contents) }
|
metadata
CHANGED
@@ -1,86 +1,95 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: robot-vim
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 2.0.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.1
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Matt Margolis
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-10-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
17
14
|
name: bundler
|
18
|
-
requirement:
|
19
|
-
|
20
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
21
17
|
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
18
|
+
- !ruby/object:Gem::Version
|
23
19
|
version: 1.0.0
|
24
20
|
type: :development
|
25
21
|
prerelease: false
|
26
|
-
version_requirements:
|
27
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
|
-
requirement:
|
30
|
-
|
31
|
-
requirements:
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
32
31
|
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
35
34
|
type: :development
|
36
35
|
prerelease: false
|
37
|
-
version_requirements:
|
38
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
39
42
|
name: rspec
|
40
|
-
requirement:
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
- !ruby/object:Gem::Version
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
45
47
|
version: 2.5.0
|
46
48
|
type: :development
|
47
49
|
prerelease: false
|
48
|
-
version_requirements:
|
49
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.5.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
50
56
|
name: autotest
|
51
|
-
requirement:
|
52
|
-
|
53
|
-
requirements:
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
54
59
|
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version:
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
57
62
|
type: :development
|
58
63
|
prerelease: false
|
59
|
-
version_requirements:
|
60
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
61
70
|
name: uuid
|
62
|
-
requirement:
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
- !ruby/object:Gem::Version
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
67
75
|
version: 2.3.1
|
68
76
|
type: :runtime
|
69
77
|
prerelease: false
|
70
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.3.1
|
71
83
|
description: Automate Vim with Ruby to allow for TDD/BDD of Vim plugins and scripts
|
72
|
-
email:
|
84
|
+
email:
|
73
85
|
- matt@mattmargolis.net
|
74
86
|
executables: []
|
75
|
-
|
76
87
|
extensions: []
|
77
|
-
|
78
88
|
extra_rdoc_files: []
|
79
|
-
|
80
|
-
|
81
|
-
- .
|
82
|
-
- .
|
83
|
-
- .rspec
|
89
|
+
files:
|
90
|
+
- ".autotest"
|
91
|
+
- ".gitignore"
|
92
|
+
- ".rspec"
|
84
93
|
- Gemfile
|
85
94
|
- License.txt
|
86
95
|
- README.md
|
@@ -105,36 +114,27 @@ files:
|
|
105
114
|
- spec/robot-vim/script_file_spec.rb
|
106
115
|
- spec/robot-vim/vim_response_spec.rb
|
107
116
|
- spec/spec_helper.rb
|
108
|
-
has_rdoc: true
|
109
117
|
homepage: https://github.com/mrmargolis/robot-vim
|
110
118
|
licenses: []
|
111
|
-
|
119
|
+
metadata: {}
|
112
120
|
post_install_message:
|
113
121
|
rdoc_options: []
|
114
|
-
|
115
|
-
require_paths:
|
122
|
+
require_paths:
|
116
123
|
- lib
|
117
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
-
|
119
|
-
requirements:
|
124
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
120
126
|
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
version: "0"
|
126
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
128
|
-
requirements:
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
129
131
|
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
132
|
+
- !ruby/object:Gem::Version
|
131
133
|
version: 1.3.6
|
132
134
|
requirements: []
|
133
|
-
|
134
135
|
rubyforge_project: robot-vim
|
135
|
-
rubygems_version:
|
136
|
+
rubygems_version: 2.2.2
|
136
137
|
signing_key:
|
137
|
-
specification_version:
|
138
|
+
specification_version: 4
|
138
139
|
summary: Vim automation with Ruby
|
139
140
|
test_files: []
|
140
|
-
|