language_server-protocol 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +5 -0
- data/Dockerfile-node.development +1 -1
- data/Dockerfile.development +14 -4
- data/README.md +1 -1
- data/bin/generate_files +1 -1
- data/bin/setup +1 -3
- data/circle.yml +12 -8
- data/docker-compose.ci.yml +14 -0
- data/docker-compose.override.yml +15 -0
- data/docker-compose.yml +5 -9
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +2 -2
- data/lib/language_server/protocol/interface/completion_registration_options.rb +2 -2
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +2 -2
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +2 -2
- data/lib/language_server/protocol/interface/notification_message.rb +2 -2
- data/lib/language_server/protocol/interface/reference_params.rb +2 -2
- data/lib/language_server/protocol/interface/request_message.rb +2 -2
- data/lib/language_server/protocol/interface/response_message.rb +2 -2
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +2 -2
- data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +2 -2
- data/lib/language_server/protocol/version.rb +1 -1
- data/scripts/generateFiles.ts +6 -2
- metadata +5 -3
- data/docker-sync.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63cb173af8aeba11730787b15dd8f0705312c6ae
|
4
|
+
data.tar.gz: 0656572f2038cb80e5286c1f208347cd741d80e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d19b0791d8e9c04dce75d82ada89a894c2425d938b1d269b79ab1f84f9f10ac9272f0bbd63c5e25153f9c16cf93a858aad3e9b03850c9419480974d3316d5f15
|
7
|
+
data.tar.gz: 96653a9b13dc8cb14b39fc2bd2a0da988c841bae306d576695d9ca4df8658d22cc4c2eff16be976fb58cad443a594cdb105c5801692c47dc9f28abfd4ef783f9
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
data/Dockerfile-node.development
CHANGED
data/Dockerfile.development
CHANGED
@@ -1,14 +1,24 @@
|
|
1
|
-
ARG RUBY_VERSION=2.4.
|
1
|
+
ARG RUBY_VERSION=2.4.2
|
2
2
|
FROM ruby:$RUBY_VERSION
|
3
3
|
|
4
4
|
RUN apt-get update && apt-get install less -y
|
5
5
|
RUN groupadd --gid 1000 ruby && useradd --uid 1000 --gid ruby --shell /bin/bash --create-home ruby
|
6
|
-
RUN mkdir /app && chown ruby:ruby /app
|
6
|
+
RUN mkdir /app /vendor && chown ruby:ruby /app /vendor
|
7
7
|
|
8
8
|
ENV LANG=C.UTF-8 \
|
9
|
-
BUNDLE_PATH=/
|
9
|
+
BUNDLE_PATH=/vendor/bundle/$RUBY_VERSION \
|
10
10
|
BUNDLE_JOBS=4
|
11
11
|
|
12
|
+
ENV ENTRYKIT_VERSION 0.4.0
|
13
|
+
|
14
|
+
RUN wget https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
|
15
|
+
&& tar -xvzf entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
|
16
|
+
&& rm entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
|
17
|
+
&& mv entrykit /bin/entrykit \
|
18
|
+
&& chmod +x /bin/entrykit \
|
19
|
+
&& entrykit --symlink
|
20
|
+
|
12
21
|
USER ruby
|
13
22
|
WORKDIR /app
|
14
|
-
|
23
|
+
|
24
|
+
ENTRYPOINT ["prehook", "bin/setup", "--"]
|
data/README.md
CHANGED
@@ -59,7 +59,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
59
59
|
|
60
60
|
## Contributing
|
61
61
|
|
62
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
62
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mtsmfm/language_server-protocol-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
63
63
|
|
64
64
|
## License
|
65
65
|
|
data/bin/generate_files
CHANGED
data/bin/setup
CHANGED
data/circle.yml
CHANGED
@@ -3,7 +3,8 @@ jobs:
|
|
3
3
|
build:
|
4
4
|
docker:
|
5
5
|
- image: tmaier/docker-compose
|
6
|
-
|
6
|
+
environment:
|
7
|
+
COMPOSE_FILE: docker-compose.yml:docker-compose.ci.yml
|
7
8
|
steps:
|
8
9
|
- checkout
|
9
10
|
- setup_remote_docker:
|
@@ -13,11 +14,14 @@ jobs:
|
|
13
14
|
command: |
|
14
15
|
set -x
|
15
16
|
docker info
|
16
|
-
docker volume create
|
17
|
-
docker create -v
|
18
|
-
docker cp .
|
19
|
-
docker start
|
17
|
+
docker volume create project
|
18
|
+
docker create -v project:/app --name project busybox chown -R 1000:1000 /app
|
19
|
+
docker cp . project:/app
|
20
|
+
docker start project
|
20
21
|
docker-compose build
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
- run:
|
23
|
+
name: test
|
24
|
+
command: |
|
25
|
+
docker-compose run app bundle exec rake test
|
26
|
+
docker-compose run ruby-2-3 bundle exec rake test
|
27
|
+
docker-compose run ruby-2-2 bundle exec rake test
|
@@ -0,0 +1,15 @@
|
|
1
|
+
version: '3.0'
|
2
|
+
services:
|
3
|
+
app: &app
|
4
|
+
volumes:
|
5
|
+
- .:/app:cached
|
6
|
+
- $HOME/.gitconfig:/home/ruby/.gitconfig:ro
|
7
|
+
- $HOME/.ssh:/home/ruby/.ssh:ro
|
8
|
+
- $HOME/.gem:/home/ruby/.gem
|
9
|
+
ruby-2-3:
|
10
|
+
<<: *app
|
11
|
+
ruby-2-2:
|
12
|
+
<<: *app
|
13
|
+
node:
|
14
|
+
volumes:
|
15
|
+
- .:/app:cached
|
data/docker-compose.yml
CHANGED
@@ -5,31 +5,27 @@ services:
|
|
5
5
|
context: .
|
6
6
|
dockerfile: Dockerfile.development
|
7
7
|
volumes:
|
8
|
-
-
|
8
|
+
- vendor:/vendor
|
9
9
|
- home:/home/ruby
|
10
|
-
- $HOME/.gitconfig:/home/ruby/.gitconfig:ro
|
11
|
-
- $HOME/.ssh:/home/ruby/.ssh:ro
|
12
|
-
- $HOME/.gem:/home/ruby/.gem
|
13
10
|
ruby-2-3:
|
14
11
|
<<: *app
|
15
12
|
build:
|
16
13
|
<<: *app-build
|
17
14
|
args:
|
18
|
-
RUBY_VERSION: 2.3
|
15
|
+
RUBY_VERSION: 2.3.5
|
19
16
|
ruby-2-2:
|
20
17
|
<<: *app
|
21
18
|
build:
|
22
19
|
<<: *app-build
|
23
20
|
args:
|
24
|
-
RUBY_VERSION: 2.2
|
21
|
+
RUBY_VERSION: 2.2.8
|
25
22
|
node:
|
26
23
|
build:
|
27
24
|
context: .
|
28
25
|
dockerfile: Dockerfile-node.development
|
29
26
|
volumes:
|
30
|
-
-
|
27
|
+
- vendor:/vendor
|
31
28
|
- home:/home/node
|
32
29
|
volumes:
|
33
|
-
|
34
|
-
external: true
|
30
|
+
vendor:
|
35
31
|
home:
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CodeLensRegistrationOptions
|
5
|
-
def initialize(resolve_provider: nil)
|
4
|
+
class CodeLensRegistrationOptions < TextDocumentRegistrationOptions
|
5
|
+
def initialize(document_selector:, resolve_provider: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CompletionRegistrationOptions
|
5
|
-
def initialize(trigger_characters: nil, resolve_provider: nil)
|
4
|
+
class CompletionRegistrationOptions < TextDocumentRegistrationOptions
|
5
|
+
def initialize(document_selector:, trigger_characters: nil, resolve_provider: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:triggerCharacters] = trigger_characters if trigger_characters
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class DocumentLinkRegistrationOptions
|
5
|
-
def initialize(resolve_provider: nil)
|
4
|
+
class DocumentLinkRegistrationOptions < TextDocumentRegistrationOptions
|
5
|
+
def initialize(document_selector:, resolve_provider: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class DocumentOnTypeFormattingRegistrationOptions
|
5
|
-
def initialize(first_trigger_character:, more_trigger_character: nil)
|
4
|
+
class DocumentOnTypeFormattingRegistrationOptions < TextDocumentRegistrationOptions
|
5
|
+
def initialize(document_selector:, first_trigger_character:, more_trigger_character: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:firstTriggerCharacter] = first_trigger_character
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class NotificationMessage
|
5
|
-
def initialize(method:, params: nil)
|
4
|
+
class NotificationMessage < Message
|
5
|
+
def initialize(jsonrpc:, method:, params: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:method] = method
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class ReferenceParams
|
5
|
-
def initialize(context:)
|
4
|
+
class ReferenceParams < TextDocumentPositionParams
|
5
|
+
def initialize(text_document:, position:, context:)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:context] = context
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class ResponseMessage
|
5
|
-
def initialize(id:, result: nil, error: nil)
|
4
|
+
class ResponseMessage < Message
|
5
|
+
def initialize(jsonrpc:, id:, result: nil, error: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:id] = id
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class SignatureHelpRegistrationOptions
|
5
|
-
def initialize(trigger_characters: nil)
|
4
|
+
class SignatureHelpRegistrationOptions < TextDocumentRegistrationOptions
|
5
|
+
def initialize(document_selector:, trigger_characters: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:triggerCharacters] = trigger_characters if trigger_characters
|
@@ -4,8 +4,8 @@ module LanguageServer
|
|
4
4
|
#
|
5
5
|
# Descibe options to be used when registered for text document change events.
|
6
6
|
#
|
7
|
-
class TextDocumentChangeRegistrationOptions
|
8
|
-
def initialize(sync_kind:)
|
7
|
+
class TextDocumentChangeRegistrationOptions < TextDocumentRegistrationOptions
|
8
|
+
def initialize(document_selector:, sync_kind:)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
11
|
@attributes[:syncKind] = sync_kind
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class TextDocumentSaveRegistrationOptions
|
5
|
-
def initialize(include_text: nil)
|
4
|
+
class TextDocumentSaveRegistrationOptions < TextDocumentRegistrationOptions
|
5
|
+
def initialize(document_selector:, include_text: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:includeText] = include_text if include_text
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class VersionedTextDocumentIdentifier
|
5
|
-
def initialize(version:)
|
4
|
+
class VersionedTextDocumentIdentifier < TextDocumentIdentifier
|
5
|
+
def initialize(uri:, version:)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:version] = version
|
data/scripts/generateFiles.ts
CHANGED
@@ -59,10 +59,14 @@ const extractDefinitions = content => {
|
|
59
59
|
|
60
60
|
const handleInterface = (node: ts.InterfaceDeclaration) => {
|
61
61
|
const members = node.members.filter(member => member.name).map(member => serialize(member));
|
62
|
+
const parentName = node.heritageClauses && node.heritageClauses[0].getLastToken().getText();
|
63
|
+
const parent = output.find(i => i.interface && (i.interface.name === parentName));
|
62
64
|
|
63
65
|
output.push(
|
64
66
|
{
|
65
67
|
interface: serialize(node),
|
68
|
+
parent: parent,
|
69
|
+
allMembers: ((parent && parent.allMembers) || []).concat(members),
|
66
70
|
members
|
67
71
|
}
|
68
72
|
);
|
@@ -148,8 +152,8 @@ module LanguageServer
|
|
148
152
|
{{comment definition.interface.documentation indent=6}}
|
149
153
|
#
|
150
154
|
{{/if}}
|
151
|
-
class {{definition.interface.name}}
|
152
|
-
def initialize({{params definition.
|
155
|
+
class {{definition.interface.name}}{{#if definition.parent}} < {{definition.parent.interface.name}}{{/if}}
|
156
|
+
def initialize({{params definition.allMembers}})
|
153
157
|
@attributes = {}
|
154
158
|
|
155
159
|
{{#each definition.members}}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: language_server-protocol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fumiaki MATSUSHIMA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -103,6 +103,7 @@ extra_rdoc_files: []
|
|
103
103
|
files:
|
104
104
|
- ".gitignore"
|
105
105
|
- ".travis.yml"
|
106
|
+
- CHANGELOG.md
|
106
107
|
- CODE_OF_CONDUCT.md
|
107
108
|
- Dockerfile-node.development
|
108
109
|
- Dockerfile.development
|
@@ -114,8 +115,9 @@ files:
|
|
114
115
|
- bin/generate_files
|
115
116
|
- bin/setup
|
116
117
|
- circle.yml
|
118
|
+
- docker-compose.ci.yml
|
119
|
+
- docker-compose.override.yml
|
117
120
|
- docker-compose.yml
|
118
|
-
- docker-sync.yml
|
119
121
|
- language_server-protocol.gemspec
|
120
122
|
- lib/language_server-protocol.rb
|
121
123
|
- lib/language_server/protocol.rb
|