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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +5 -0
  4. data/Dockerfile-node.development +1 -1
  5. data/Dockerfile.development +14 -4
  6. data/README.md +1 -1
  7. data/bin/generate_files +1 -1
  8. data/bin/setup +1 -3
  9. data/circle.yml +12 -8
  10. data/docker-compose.ci.yml +14 -0
  11. data/docker-compose.override.yml +15 -0
  12. data/docker-compose.yml +5 -9
  13. data/lib/language_server/protocol/interface/code_lens_registration_options.rb +2 -2
  14. data/lib/language_server/protocol/interface/completion_registration_options.rb +2 -2
  15. data/lib/language_server/protocol/interface/document_link_registration_options.rb +2 -2
  16. data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +2 -2
  17. data/lib/language_server/protocol/interface/notification_message.rb +2 -2
  18. data/lib/language_server/protocol/interface/reference_params.rb +2 -2
  19. data/lib/language_server/protocol/interface/request_message.rb +2 -2
  20. data/lib/language_server/protocol/interface/response_message.rb +2 -2
  21. data/lib/language_server/protocol/interface/signature_help_registration_options.rb +2 -2
  22. data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +2 -2
  23. data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +2 -2
  24. data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +2 -2
  25. data/lib/language_server/protocol/version.rb +1 -1
  26. data/scripts/generateFiles.ts +6 -2
  27. metadata +5 -3
  28. data/docker-sync.yml +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d04ba4a69373f5e654e6996087176f6734262ec5
4
- data.tar.gz: d12f9d73ee0583e775d4d01560a80ff4dd39b784
3
+ metadata.gz: 63cb173af8aeba11730787b15dd8f0705312c6ae
4
+ data.tar.gz: 0656572f2038cb80e5286c1f208347cd741d80e6
5
5
  SHA512:
6
- metadata.gz: 11125692f139b8cd725551580317a3e6c9b44d9f3c5b675a37fd79da2a5ab171ae5af86c9349ff1635f5a992d2c5971e5c80fca05343d08dac8cdecb547c510b
7
- data.tar.gz: ed93a8cee5ef4d7d5f8079177783b3b08ceb28ac31e81e08cc400b8127fc01e679bc2886a35f91c0b58a120112e211279983c6f7a106ab0f3a0da6de016b2b30
6
+ metadata.gz: d19b0791d8e9c04dce75d82ada89a894c2425d938b1d269b79ab1f84f9f10ac9272f0bbd63c5e25153f9c16cf93a858aad3e9b03850c9419480974d3316d5f15
7
+ data.tar.gz: 96653a9b13dc8cb14b39fc2bd2a0da988c841bae306d576695d9ca4df8658d22cc4c2eff16be976fb58cad443a594cdb105c5801692c47dc9f28abfd4ef783f9
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /node_modules
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Change log
2
+
3
+ ## 0.3.1
4
+
5
+ - Fix handling `extends`
@@ -1,6 +1,6 @@
1
1
  FROM node:6-alpine
2
2
 
3
- RUN mkdir /app && chown node:node /app
3
+ RUN mkdir /app /vendor && chown node:node /app /vendor
4
4
 
5
5
  USER node
6
6
  WORKDIR /app
@@ -1,14 +1,24 @@
1
- ARG RUBY_VERSION=2.4.1
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=/app/vendor/bundle/$RUBY_VERSION \
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
- CMD ["bundle", "exec", "exe/language_server"]
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/[USERNAME]/language_server-protocol. 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.
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
@@ -2,4 +2,4 @@
2
2
 
3
3
  set -ex
4
4
  yarn install
5
- yarn run -s ts-node scripts/generateFiles.ts
5
+ yarn run -s -- ts-node --compilerOptions '{"target":"es6"}' scripts/generateFiles.ts
data/bin/setup CHANGED
@@ -3,6 +3,4 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
6
+ bundle check || bundle install
data/circle.yml CHANGED
@@ -3,7 +3,8 @@ jobs:
3
3
  build:
4
4
  docker:
5
5
  - image: tmaier/docker-compose
6
- working_directory: /project
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 mtsmfm-language-server-protocol-sync
17
- docker create -v mtsmfm-language-server-protocol-sync:/app --name mtsmfm-language-server-protocol-sync busybox chown -R 1000:1000 /app
18
- docker cp . mtsmfm-language-server-protocol-sync:/app
19
- docker start mtsmfm-language-server-protocol-sync
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
- docker-compose run app bin/setup
22
- docker-compose run ruby-2-3 bin/setup
23
- docker-compose run ruby-2-2 bin/setup
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,14 @@
1
+ version: '3.0'
2
+ services:
3
+ app: &app
4
+ volumes:
5
+ - project:/app
6
+ ruby-2-3:
7
+ <<: *app
8
+ ruby-2-2:
9
+ <<: *app
10
+ node:
11
+ <<: *app
12
+ volumes:
13
+ project:
14
+ external: true
@@ -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
- - mtsmfm-language-server-protocol-sync:/app:nocopy
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
- - mtsmfm-language-server-protocol-sync:/app:nocopy
27
+ - vendor:/vendor
31
28
  - home:/home/node
32
29
  volumes:
33
- mtsmfm-language-server-protocol-sync:
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
@@ -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 RequestMessage
5
- def initialize(id:, method:, params: nil)
4
+ class RequestMessage < Message
5
+ def initialize(jsonrpc:, id:, method:, params: 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 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
@@ -1,5 +1,5 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -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.members}})
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.3.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-09-12 00:00:00.000000000 Z
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
data/docker-sync.yml DELETED
@@ -1,9 +0,0 @@
1
- version: '2'
2
- options:
3
- verbose: true
4
- syncs:
5
- mtsmfm-language-server-protocol-sync:
6
- src: .
7
- sync_userid: 1000
8
- image: mtsmfm/unison
9
- sync_excludes: ['vendor', 'node_modules', 'tmp']