error management service for my Ruby on Rails project - ruby

I am looking for error management service for my Ruby on Rails project, Can any one suggest the best tool with lower price.
I have 5 Rails projects.
I found one tool http://www.batbugger.io/ is free in beta version, Does have any idea about that. It looks fine.
Thanks for your suggestion

I would go with https://github.com/errbit/errbit. Errbit use the same API as Airbrake, but is an open source solution. Errbit itself is a Rails webapp, and can centralize errors from multiple sources.
There is also a nice integration with GitHub (to create issues from errors) and Campfire (to get the errors directly inside the team chat room).

Related

Ruby/Sinatra: Load additional code without restarting web app

I want to build a plugin system for a web app I'm writing. I don't want to have to restart the application every time a plugin is added/removed/enabled/disabled. Also I won't know the names of the plugins or even how many there are (I want to make it 'infintely' expandable).
The obvious way would be to reload the app on every request (as in this question, the Sinatra FAQ, and with Sinatra-Contrib). Reloading on every request would have poor performance for a production environment, especially a popular app.
I have read an article about Kernel#load and that it reloads the file when called multiple times and Kernel#autoload which only loads the code if needed. But both methods require the name of the module/class to be hard-coded in.
Jenkins CI and WordPress imply they can do this. Jenkins says "1000+ community contributed Jenkins plugins" and WordPress says "48,492 plugins". So I imagine it must be possible, but maybe only in Java or PHP.
I am working with Ruby 2.2, Rack 1.6.5, and Sinatra 1.4.7. I'm developing on Windows and I plan to deploy to Linux. If what I want is impossible to do on Windows (annoyingly some things are :P) I will set up a dev server with Linux.
Thanks!
EDIT: I will also need to be able to unload plugins. I'm not aware of any unload/un-require methods

Releasing Ruby Application for Specific users

I am new to Ruby and I have written a small app, that consists of around 50 .rb files and 6 folders. The purpose of app is to be an SDK for Ruby users, to interact with my API. It also uses few gems. Now I want to release this app for specific users, but looking at the internet for the solution really confused me (may be just because I'm new to it) and MOST of the posts found were for Rails
Being through several posts, what I find to be reasonable is to make a gem out of it and publish this gem at rubygems.org. (but this also makes it fully public)
Question:
Is this the correct approach in my specific scenario?
How can I manage the dependencies? (This part is very confusing, I will need more guidelines on this)
How to limit audience? (I have personal git server, would this be of any help)
Other Info:
App is developed in Ruby version 2.1.8, It makes http Get/Post requests using TLS, and is NOT a Rails or web app
I have been through several SO posts like THIS, THIS etc. But I couldn't understand it for my case.
I created a project in Jetbrains' IDE, called RubyMine. My project doesn't have bin folder, etc. but only my own folders and .rb files. And most of the solutions also talk about bin.
Any help will be appreciated.
Gemfury is probably what you're looking for. You'll package your library as a gem the same way as if you were going to publish it publicly on RubyGems, but Gemfury lets you restrict access to it to only the people you want to allow.

HL7 FHIR .NET Models - include profiles created using Forge (DSTU 2)

I have been working with the HL7 FHIR .NET API reference implementation - utilizing the existing resource models embedded in the library. Now, I am trying to use the Forge tool to modify the resources (contraints/extensions) to suit my requirements.
I noticed that the HL7 publishing mechanism does not generate C# models from DSTU 2 onwards and was wondering - what is the best way of converting profiles created using Forge into C# resource classes such that they may be included into the HL7.Fhir.Model assembly that is part of the reference implementation.
The generation of the models not being part of the official build is correct.
This has now moved to https://github.com/ewoutkramer/fhir-net-api where the rest of the API is maintained more easily.
It is done using T4 templates on the output from the official builds.
There is a simple process for updating the models with the new versions of the spec, and we keep it fresh as people need it, and for each connectathon we publish a new build in NuGet and have a branch of the code in GitHub.
(Its a powershell script that downloads all the latest build outputs and puts them in the appropriate folders, then you need to run the t4 templates in Visual Studio)
Such as this one for the May Connectathon in Montreal
https://github.com/ewoutkramer/fhir-net-api/tree/ft-connectathon-may2016
This is able to be done yourself with a little assistance.
As for generating code for a profile, we haven't done that as yet, but will theoretically be possible.
Don't know that I'd advise this at the moment while the profiles are in so much development and change.

XPage Osgi plug in development

background
I have designed many tools in the past year or so that is designed to help me program for XPages. These tools include primarily helper java classes, extended logging (making use of OpenLogger and my own stuff), and a few other things that I personally feel I cannot work without. It has been discussed with my employer, and we feel that it might be a good idea to start publishing these items to openNTF. Since these tools are made up of about 3 .nsfs, all designed to use the same java code, key javascript classes, css, and even a custom control or two, I would like to consolidate key items into a plug-in that can be installed at the server and client level. I want to do this consolidation before I even think about publishing any of the work I've done so far. It would just be far too much work to maintain, not just for me, but for potential users. I have not really found any information on how to do such a thing in google searches. I also have to make sure that I am able to make use of the ExtLib libraries, openNTF Domino API, and the Notes API.
my questions
How does one best go about designing such plug-ins? Must a designer
use eclipse, or is this it possible to do this directly in the Notes
Designer?
How does a designer best go about keeping a server and client up to date while designing and updating the plug-in code? Is this why GitHub is often used?
Where is the best place to get material to get started in this direction? I sort of feel lost in the woods, knowing I need to head north, but not having a compass for that first step.
Thank you very much for your input.
In my experience, I found that diving into plug-in development is a huge PITA until you get used to it, but it's definitely worth it overall.
As for whether you can use Designer for plugin development: yes, but you will likely eventually want to not do so. I started out by using Designer for this sort of thing for a while, presumably with the same sentiment as you: why bother installing another instance of Eclipse when I'm already sitting in one all day? However, between Designer's age (it's roughly equivalent to, I think, Eclipse 3.4), oddities when it comes to working sets between the "Applications" and "Project Explorer" views, and, in my case, my desire to use a Mac app, I ended up switching.
There are two major starting points: the XSP Starter Kit (http://www.openntf.org/internal/home.nsf/project.xsp?name=XSP%20Starter%20Kit) and Niklas Heidloff's video on setting up Eclipse for XPages development (http://www.openntf.org/main.nsf/blog.xsp?permaLink=NHEF-8RVB5H). The latter mentions the XPages SDK (http://www.openntf.org/internal/home.nsf/project.xsp?name=XPages%20SDK%20for%20Eclipse%20RCP), which is also useful. In my setup, I found the video largely useful, but some aspects either difficult to find (IBM's downloads are shifting sands) or optional (debugging, which will depend on whether or not you're using Eclipse on Windows).
Those resources should generally get you set up. The main thing to worry about when setting up your Eclipse environment will be making sure your Plug-In Execution Environment is properly done. If you're following the SDK setup instructions, that SHOULD get you where you need to be.
The next thing to know about is the way plugins are structured. Each plugin you want to install in Designer or Domino will also be paired with a feature project (a feature can house several plugins), and potentially an update site - the last one is optional if you just want to import the features into an Update Site NSF. That's how I often do my normal plugin development: export the paired feature to a directory and then import the feature into the server's Update Site NSF and then install in Designer from there using Application -> Install. You can also set things up so that you deploy into the server's plugin/feature directories instead of taking the step of installing into an update site if you'd prefer. GitHub doesn't really come into play for this aspect - it's more about sharing/collaborating with your code and also having a remote storage location for your git repositories (which I highly advise).
And as for the "lost in the woods" feeling: yep, you'll have that for a good while. There are lots of moving parts and esoteric concepts to get a hold of all at once. If you mostly follow the above links and then start with some basics from the XSP Starter Kit (which is itself a plugin project that you can pair with a feature) - say, printing text in the Activator class and making an implicit global variable just to make sure it works - that should help get your feet wet.
It's best done in Eclipse. You can debug your code running on the server from there, as well as run it directly from there. The editors are also more up-to-date. You want:
Eclipse for RCP and RAP developers
XPages SDK for Eclipse RCP (from OpenNTF)
XPages Debug Plugin (from OpenNTF - basically allows you to load the plugins to the Domino server dynamically, rather than exporting to an Update Site all the time)
XSP Starter Kit on OpenNTF is a good starting point for a plugin. There are various references to the library id, which has to be unique for your plugin. Basically, references to org.openntf.xsp.starter need changing to whatever you want to call your plugin. You're also best advised to remove what you don't need. I tend to work in a copy of the Starter, remove stuff, build and if there are errors with required classes (Activator.java obviously will be required and some others), then paste them back in from the Starter.
XPages OpenLog Logger is a good cross-reference, that was built from XPages Starter Kit. It's pretty much stripped down and you'll be able to see what had to be changed. A lot of the elements of the XSP Starter Kit correspond to Java classes you'll probably be familiar with from your XPages Java development.
GitHub etc tend to be used as source control, which is useful for working out what's changed from time to time.

Continuous Integration setup for ruby projects on linux server

I would like to use open source tools if possible.
here are 2 links I found but haven't tried them -
http://pivots.pivotallabs.com/users/chad/blog/articles/471-continuous-integration-in-a-box-exploring-tsttcpw
http://laurentbois.com/category/continuous-integration/
Try this CruiseControl.rb
http://cruisecontrolrb.thoughtworks.com/
CruiseControl.rb is written in Ruby and designed for ruby.
Another one is Hudson, it is built in Java, but it has a plugin for ruby
https://hudson.dev.java.net/
Give Cinabox a try (I'm the author). It is intended to make this as simple as possible, and uses cruisecontrol.rb. There is a screencast and readme. If you have problems, open a ticket using the LightHouse link in the readme.
Good Luck!
There is a lightweight CI server written in Sinatra called Integrity which you might want to take a look at. I mainly used it because it supports git.
Git Reference

Resources