Skip to content

Commit

Permalink
Update readme and gemspec url and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Nov 28, 2023
1 parent fcafc8f commit 6ac24d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ ReplTypeCompletor.load_rbs # Could take a seconds in large projects
Now you can get completion candidates.
```ruby
array = [1, 2, 3]
class String; def upupup; end; end
result = ReplTypeCompletor.analyze('array.map do str = _1.chr; str.up', binding: binding)
result.completion_candidates #=> ["case", "case!", "to", "upup"]
code_to_complete = 'array.map do str = _1.chr; str.up'
result = ReplTypeCompletor.analyze(code_to_complete, binding: binding, filename: __FILE__)
result.completion_candidates #=> ["case", "case!", "to"]
result.doc_namespace('case') #=> "String#upcase"
```

Expand All @@ -45,7 +45,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/repl_type_completor.
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/repl_type_completor.

When something is wrong, these methods will provide some debug information.
```ruby
Expand All @@ -54,7 +54,7 @@ ReplTypeCompletor.rbs_load_started?
ReplTypeCompletor.rbs_loaded?
ReplTypeCompletor.rbs_load_error
ReplTypeCompletor.last_completion_error
ReplTypeCompletor.analyze(code_to_complete, binding: binding)
ReplTypeCompletor.analyze(code_to_complete, binding: binding, filename: __FILE__)
```

## License
Expand Down
8 changes: 4 additions & 4 deletions repl_type_completor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Gem::Specification.new do |spec|

spec.summary = "Type based completion for REPL."
spec.description = "Type based completion for REPL."
# spec.homepage = "TODO: Put your gem's website or public repo URL here."
spec.homepage = "https://github.com/ruby/repl_type_completor"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.0.0"

spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"

# spec.metadata["homepage_uri"] = spec.homepage
# spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/ruby/repl_type_completor"
spec.metadata["documentation_uri"] = spec.homepage

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
Expand Down

0 comments on commit 6ac24d9

Please sign in to comment.