pauldruziak / language-rspec Goto Github PK
View Code? Open in Web Editor NEWRSpec language package for Atom
RSpec language package for Atom
As reported by @paveldruzyak in #12
There are grammar bugs that are affecting the syntax highlighting for the following code snippets.
describe "\"test\"" do
#
end
describe "\\" do
#
end
describe "#{1 + 1}" do
#
end
Could you possibly add a setting where one could prefer, maybe, single quotes over double quotes when autocompleting?
I find myself replacing double quotes with single quotes all the time, which is a bit annoying to me.
Thank you,
Duplicate snippets are now an error as of Atom 1.25.0
Error is
$HOME/.atom/packages/language-rspec/snippets/language-rspec.cson: Duplicate key 'it (should do something)'
Howdy, just wanted to see if we could combine forces for the rspec package. I created one as well (https://github.com/jonmagic/atom-rspec-snippets) but decided to only convert the snippets and leave the grammar out.
I'd be happy to shut down my package and contribute to yours, although I'm curious about naming conventions. I called mine rspec-snippets
instead of language-rspec
because I wasn't sure how to name packages that had to do with DSL's. Really rspec is just ruby you know?
Anyways, curious to hear your thoughts and see what we should do with my package: https://github.com/jonmagic/atom-rspec-snippets
Have a great weekend! Cheers โจ
[Enter steps to reproduce below:]
Atom Version: 1.10.0
Electron Version: 1.3.5
System: linux 4.7.2-1-ARCH
Thrown From: language-rspec package, v0.5.0
Failed to activate the language-rspec package
At Path must be a string. Received undefined
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at basename (path.js:1357:5)
at Object._isRspecFile (/home/shaman/.atom/packages/language-rspec/lib/language-rspec.coffee:17:5)
at /home/shaman/.atom/packages/language-rspec/lib/language-rspec.coffee:6:22
at Workspace.module.exports.Workspace.observeTextEditors (/usr/lib/atom/src/workspace.js:332:9)
at Object.activate (/home/shaman/.atom/packages/language-rspec/lib/language-rspec.coffee:5:20)
at Package.module.exports.Package.activateNow (/usr/lib/atom/src/package.js:183:20)
at /usr/lib/atom/src/package.js:156:32
at Package.module.exports.Package.measure (/usr/lib/atom/src/package.js:92:15)
at /usr/lib/atom/src/package.js:149:26
at Package.module.exports.Package.activate (/usr/lib/atom/src/package.js:146:34)
at PackageManager.module.exports.PackageManager.activatePackage (/usr/lib/atom/src/package-manager.js:530:21)
at /usr/lib/atom/src/package-manager.js:511:29
at Config.module.exports.Config.transactAsync (/usr/lib/atom/src/config.js:337:18)
at PackageManager.module.exports.PackageManager.activatePackages (/usr/lib/atom/src/package-manager.js:506:19)
at PackageManager.module.exports.PackageManager.activate (/usr/lib/atom/src/package-manager.js:489:46)
at /usr/lib/atom/src/atom-environment.js:765:28
{
"core": {
"autoHideMenuBar": true,
"packagesWithKeymapsDisabled": [],
"themes": [
"one-dark-ui",
"solarized-dark-syntax"
]
}
}
# User
atom-beautify, v0.29.11 (inactive)
git-blame, v0.4.11 (inactive)
git-plus, v5.16.2 (inactive)
language-haml, v0.24.0 (inactive)
language-rspec, v0.5.0 (inactive)
linter, v1.11.16 (inactive)
linter-erb, v1.0.2 (inactive)
linter-haml, v1.2.1 (inactive)
linter-ruby, v1.2.2 (inactive)
linter-sass-lint, v1.7.1 (inactive)
rails-snippets, v2.8.0 (inactive)
rails-transporter, v1.6.5 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.5.0 (inactive)
one-light-ui, v1.5.0 (inactive)
one-dark-syntax, v1.3.0 (inactive)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.3 (inactive)
archive-view, v0.61.1 (inactive)
autocomplete-atom-api, v0.10.0 (inactive)
autocomplete-css, v0.11.2 (inactive)
autocomplete-html, v0.7.2 (inactive)
autocomplete-plus, v2.31.1 (inactive)
autocomplete-snippets, v1.11.0 (inactive)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (inactive)
background-tips, v0.26.1 (inactive)
bookmarks, v0.41.0 (inactive)
bracket-matcher, v0.82.1 (inactive)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (inactive)
dev-live-reload, v0.47.0 (inactive)
encoding-selector, v0.22.0 (inactive)
exception-reporting, v0.39.0 (inactive)
find-and-replace, v0.201.0 (inactive)
fuzzy-finder, v1.3.0 (inactive)
git-diff, v1.1.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (inactive)
image-view, v0.58.2 (inactive)
incompatible-packages, v0.26.1 (inactive)
keybinding-resolver, v0.35.0 (inactive)
line-ending-selector, v0.5.0 (inactive)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (inactive)
metrics, v0.53.1 (inactive)
notifications, v0.65.0 (inactive)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.241.2 (inactive)
snippets, v1.0.2 (inactive)
spell-check, v0.67.1 (inactive)
status-bar, v1.4.1 (inactive)
styleguide, v0.47.0 (inactive)
symbols-view, v0.113.0 (inactive)
tabs, v0.100.2 (inactive)
timecop, v0.33.2 (inactive)
tree-view, v0.208.2 (inactive)
update-package-dependencies, v0.10.0 (inactive)
welcome, v0.34.0 (inactive)
whitespace, v0.33.0 (inactive)
wrap-guide, v0.38.1 (inactive)
language-c, v0.52.1 (inactive)
language-clojure, v0.21.0 (inactive)
language-coffee-script, v0.47.2 (inactive)
language-csharp, v0.12.1 (inactive)
language-css, v0.37.1 (inactive)
language-gfm, v0.88.0 (inactive)
language-git, v0.15.0 (inactive)
language-go, v0.42.1 (inactive)
language-html, v0.45.1 (inactive)
language-hyperlink, v0.16.0 (inactive)
language-java, v0.23.0 (inactive)
language-javascript, v0.119.0 (inactive)
language-json, v0.18.2 (inactive)
language-less, v0.29.5 (inactive)
language-make, v0.22.2 (inactive)
language-mustache, v0.13.0 (inactive)
language-objective-c, v0.15.1 (inactive)
language-perl, v0.35.0 (inactive)
language-php, v0.37.2 (inactive)
language-property-list, v0.8.0 (inactive)
language-python, v0.45.0 (inactive)
language-ruby, v0.69.0 (inactive)
language-ruby-on-rails, v0.25.0 (inactive)
language-sass, v0.56.0 (inactive)
language-shellscript, v0.22.4 (inactive)
language-source, v0.9.0 (inactive)
language-sql, v0.23.0 (inactive)
language-text, v0.7.1 (inactive)
language-todo, v0.28.0 (inactive)
language-toml, v0.18.0 (inactive)
language-xml, v0.34.9 (inactive)
language-yaml, v0.26.0 (inactive)
# Dev
No dev packages
After upgrading Atom to 1.13.0
deprecation cop showed this warning.
Arguments to path.basename
must be strings
path.basename (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:31:10)
Object._isRspecFile (/Users/josefdiago/.atom/packages/language-rspec/lib/language-rspec.coffee:27:14)
<unknown> (/Users/josefdiago/.atom/packages/language-rspec/lib/language-rspec.coffee:11:22)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:334:16)
Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
As reported by @pcasaretto in #12
A little cleanup is in order.
I get the following message:
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.activate (/Users/mikecho/.atom/packages/language-rspec/lib/language-rspec.coffee:5:9)
Also, adjust a few snippet placeholders to better match their snippet's name.
Whenever I open an rspec file, it always assumes the file is a plain Ruby. I then have to manually switch it to rspec.
You can temporarily add pending status to specs by changing them from it
to xit
, but xit
doesn't get highlighted correctly.
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.activate (/Users/earlyshares/.atom/packages/language-rspec/lib/language-rspec.coffee:5:9)
Please add this symbols and methods
More usages
https://github.com/rails/rails/blob/v4.0.0/guides/source/layouts_and_rendering.md#the-status-option
Response Class HTTP Status Code Symbol
Informational 100 :continue
101 :switching_protocols
102 :processing
Success 200 :ok
201 :created
202 :accepted
203 :non_authoritative_information
204 :no_content
205 :reset_content
206 :partial_content
207 :multi_status
208 :already_reported
226 :im_used
Redirection 300 :multiple_choices
301 :moved_permanently
302 :found
303 :see_other
304 :not_modified
305 :use_proxy
306 :reserved
307 :temporary_redirect
308 :permanent_redirect
Client Error 400 :bad_request
401 :unauthorized
402 :payment_required
403 :forbidden
404 :not_found
405 :method_not_allowed
406 :not_acceptable
407 :proxy_authentication_required
408 :request_timeout
409 :conflict
410 :gone
411 :length_required
412 :precondition_failed
413 :request_entity_too_large
414 :request_uri_too_long
415 :unsupported_media_type
416 :requested_range_not_satisfiable
417 :expectation_failed
422 :unprocessable_entity
423 :locked
424 :failed_dependency
426 :upgrade_required
423 :precondition_required
424 :too_many_requests
426 :request_header_fields_too_large
Server Error 500 :internal_server_error
501 :not_implemented
502 :bad_gateway
503 :service_unavailable
504 :gateway_timeout
505 :http_version_not_supported
506 :variant_also_negotiates
507 :insufficient_storage
508 :loop_detected
510 :not_extended
511 :network_authentication_required
context :symbol do
# Work
end
Does not result in :symbol
being highlighted as a symbol because it has no context in the editor.
Hi,
i recently get some deprecation warnings, maybe you could fix them?
`Arguments to path.basename must be strings
path.basename - /Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:31:10
Object._isRspecFile - /Users/dphilpot/.atom/packages/language-rspec-plus/lib/language-rspec.coffee:27:14
- /Users/dphilpot/.atom/packages/language-rspec-plus/lib/language-rspec.coffee:11:22
Workspace.observeTextEditors - /Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:305:53
Object.activate - /Users/dphilpot/.atom/packages/language-rspec-plus/lib/language-rspec.coffee:8:29
Package.activateNow - /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:218:19`
Toggle quotes does not work on a RSpec file. However, if I change the syntax to Ruby, it does. It is because Toggle quotes looks for .string.quoted
[1] and Rspec only assigns .string
.
Arguments to path.basename
must be strings
path.basename (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:31:10)
Object._isRspecFile (/Users/John/.atom/packages/language-rspec/lib/language-rspec.coffee:27:14)
<unknown> (/Users/John/.atom/packages/language-rspec/lib/language-rspec.coffee:11:22)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:334:16)
Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
Hello,
I installed your plugin on Ubuntu where I installed ruby and rails with rbenv.
Every time if I do crtl+shift+t I see a message that ruby cannot be found..
Ruby is in the path if I looked at
process.env.PATH and which ruby
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.