wangyuhere / atom-rails-rspec Goto Github PK
View Code? Open in Web Editor NEWToggle spec and tested file of rails project in atom editor
License: MIT License
Toggle spec and tested file of rails project in atom editor
License: MIT License
If a file and its spec are both open on different sides of a spilt pane, toggling opens a second copy of the file in the current pane, rather than switching to the other pane. It would be nice if the focus switched to the existing instance of the file.
[Enter steps to reproduce:]
Atom: 1.33.1 x64
Electron: 2.0.16
OS: Unknown Windows version
Thrown From: rails-rspec package 0.3.2
Uncaught TypeError: Cannot read property 'substring' of undefined
At C:\Users\Python\.atom\packages\rails-rspec\lib\rails.coffee:18
TypeError: Cannot read property 'substring' of undefined
at Rails.module.exports.Rails.toggleSpecFile (/packages/rails-rspec/lib/rails.coffee:18:25)
at Object.toggleSpecFile (/packages/rails-rspec/lib/rails-rspec.coffee:21:52)
at /packages/rails-rspec/lib/rails-rspec.coffee:14:51)
at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:350034)
at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:348509)
at AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:1:669041)
at EventEmitter.t (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:1:676425)
at emitThree (events.js:136:13)
at EventEmitter.emit (events.js:217:7)
-1:12.7.0 intentions:highlight (input.hidden-input)
-1:12.5.0 command-palette:toggle (input.hidden-input)
-0:54.7.0 editor:consolidate-selections (input.hidden-input)
-0:54.7.0 core:cancel (input.hidden-input)
-0:20.8.0 rails-rspec:toggle-spec-file (input.hidden-input)
atom-django 0.3.2
atom-ide-ui 0.13.0
atom-runner 2.7.1
autocomplete-factory-girl 0.3.0
autocomplete-python 1.11.0
busy-signal 2.0.0
ide-python 1.2.0
ide-ruby 0.3.0
intentions 1.1.5
language-django 0.1.1
linter 2.2.0
linter-ruby 1.2.6
linter-ui-default 1.7.1
platformio-ide-terminal undefined
rails-rspec 0.3.2
ruby-test 1.0.2
script 3.18.1
terminal-plus 0.14.5
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:808:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:733:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:185:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:163:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:177:12)
PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:355:14)
For instance in a view spec (e.g., spec/views/foo/bar.html.erb_spec.rb
) it will try to open the wrong file (e.g., app/views/foo/bar.html.erb.rb
instead of app/views/foo/bar.html.erb
).
Any ideas?
Use a config schema instead. See the configuration section
of https://atom.io/docs/latest/hacking-atom-package-word-count and
https://atom.io/docs/api/latest/Config for more details
Package.activateConfig (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:263:11)
Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:234:14)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:770:25)
Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:219:20)
handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:153:19)
Similar behaviour like in Sublime Text plugin: https://github.com/sporto/rails_go_to_spec
Will this plugin support non-rails projects?
Specs are still in spec
, but no app
folder.
From Atom deprecation cop:
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 useatom.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/keiter/.atom/packages/rails-rspec/lib/rails-rspec.coffee:9:9)
[Enter steps to reproduce:]
Atom: 1.16.0 x64
Electron: 1.3.13
OS: Mac OS X 10.11.6
Thrown From: rails-rspec package 0.3.2
Uncaught TypeError: Cannot read property 'length' of undefined
At /Users/jlynch/.atom/packages/rails-rspec/lib/rails.coffee:18
TypeError: Cannot read property 'length' of undefined
at Rails.module.exports.Rails.toggleSpecFile (/packages/rails-rspec/lib/rails.coffee:18:40)
at Object.toggleSpecFile (/packages/rails-rspec/lib/rails-rspec.coffee:21:52)
at /packages/rails-rspec/lib/rails-rspec.coffee:14:51)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/app.asar/src/atom-environment.js:1179:28)
at EventEmitter.outerCallback (/app.asar/src/application-delegate.js:312:25)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
-5:23.1.0 application:open (input.hidden-input)
4x -0:47.2.0 rails-rspec:toggle-spec-file (input.hidden-input)
aligner-scss 1.1.0
atom-ctags 5.0.0
busy-signal 1.3.0
cucumber 0.6.0
cucumber-step-jump 0.4.1
expand-selection-to-quotes 0.11.0
intentions 1.1.2
language-haml 0.24.1
linter 2.1.2
linter-haml 2.0.1
linter-ruby 1.2.5
linter-scss-lint 3.1.0
linter-ui-default 1.2.2
linter-write-good 0.9.0
rails-rspec 0.3.2
rubocop-auto-correct 1.5.1
ruby-syntax-replacer 0.5.1
test-gutter 0.1.1
test-gutter-rspec 0.1.0
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.