Using DBDeploy.Net with Rake - continuous-integration

We are trying to use DBDeploy.Net for managing our SQL Scripts in a .Net project. We also use a Rake script for automatic builds.
I am unable to find any documentation on how to use DBDeploy.Net with Rake. Is there a nice way of getting DBDeploy working with Rake? (I don't want to create a NAnt script for DBDeploy and call that from Rake)

Documentation for the command line execution of dbdeploy.NET has been added to https://github.com/brunomlopes/dbdeploy.net#command-line. A lot of new features have been added as well.

Does DbDeploy.net have a command line runner. If so check out the ExecTask from Albacore.
If you have just started working with DbDeploy.net and are open to options have a look at FluentMigrator. It has a command line runner.

Related

Undefined Step Definitions when Running Cucumber scripts in command line

I was previously using RubyMine to run cucumber test scripts and it works just fine, but I am looking for an alternative to run those scripts from command line.
When I try to run a specific .feature file from cmd, I get an error stating that my Ruby step definitions are undefined. I am assuming this is because they are not located in the same directory as the .feature file that I am trying to run.
Here is my cmd output:
Undefined Steps error output
Any suggestions welcome! Thanks
If you're running cucumber from your_directory. Then your .feature files should be in your_directory/features and step definitions (.rb files) in your_directory/features/step_definitions Subfolders are supported.
Look at https://docs.cucumber.io/guides/10-minute-tutorial/
If you're running Win10, check WSL - makes your life better ;-)

Use perlcassa in Window

I'm trying to use perlcassa perl package in Window app. I started make but it failed because of missing prerequisites like Thrift::XS and Tie::IxHash
Unfortunatelly such prerequisites are not available for Windows.
Any idea how to overcome this?
Or is there another Perl package for Cassandra that supports Windows?
Thanks,
Abed.
Using Cassandra command line solves the problem. It is easy, direct and no need for additional packages. i.e I wrote Cassadnra script and used -f option in Cassandra CLI to invoke it.

Ruby - watch for file with extension being updated

I am trying to auto compile my less files on centos.
Is it possible in ruby to watch a directory for changes to files ending in a specific extension and then execute a command when that happens?
I have tried inotify in a simple shell script but there are always problems when an ide creates temporary files etc.
You want inotify. A Ruby wrapper, rb-notify, is available.
The ZenTest gem includes the autotest command-line tool, which watches a test directory and runs tests when one of the files changes.
Go look at how that tool works. Using inotify is helpful but not necessary.
The basic idea for this is to write a loop with a sleep inside it. Use Ruby's Find class to locate the files that are candidates for processing. The Find documentation has example code to get that part started.

Adding VIM plugins to Janus setup

I recently switched over to using Janus from a custom set of vim plugins and .vimrc. I'm really enjoying the setup, but one thing I'm missing is the automatic completion of blocks in Ruby.
For example, when I type:
def method <enter>
It would complete the block:
def method
# cursor here
end
I was using some of Tim Pope's plugins and can't recall which one provided the functionality (Rails maybe?) Is there a way to get this functionality using Janus? Is there a reason why someone wouldn't want this? It seems really convenient to have.
According to janus documentation documentation:
If you want to add additional Vim plugins you can do so by adding a ~/.janus.rake like so:
vim_plugin_task "zencoding", "git://github.com/mattn/zencoding-vim.git"
vim_plugin_task "minibufexpl", "git://github.com/fholgado/minibufexpl.vim.git"
ant then just run rake or run rake for the pluging you setup, on ~/.vim, for example:
rake zenconding
You're talking about endwise.
Presumably you could just add this repo to the Janus rakefile, however I've not tested. This is likely not included in Janus because this can pretty much be emulated with snipMate which is included in Janus.
The janus customization documentation currently reccommends using the ~/.janus directory for vim plugins.
You can use git clone to install vim plugins into the ~/.janus directory. E.g.
cd ~/.janus
git clone https://github.com/vim-scripts/Rename2.git rename2
The old method for customization, using rakefile is in a separate branch that is not maintained.

Is it possible to run a Ruby project via Rake?

I've got a Ruby project started with NetBeans, so the Rake file has been generated. Is there a way that I can run the project over the command line?
It runs fine when I use F6 through NetBeans, as does my automated test suite with Alt+F6. I'm essentially looking for something like...
$ rake run
Does this exist?
The goal of ruby programming is (generally) to either write a web application, or write a program that can be run from the command line.
For a web application a rake run option might be worthwhile, but really the most common web applicaition framework is Rails, and for rails, you can just run a dedicated webserver running your web app with script/server.
For a commandline program, just run whichever ruby file you have intended as the main file (the one with the code that runs at startup). Ruby doesn't have any of the difficulties that Java does (e.g. having a jar file with the right Main-class attribute, and getting the classpath right, etc...). So you don't really need a rake run target, because there's no complexity that needs to be hidden in the rakefile.
Although Ken's right, you can certainly make a rake task to run your program. In lib/tasks/project.rake:
namespace :project do
task :run do
call_your_code()
end
end
and then rake project:run will do what you want.

Resources