Asciidoctor Slides without Ruby (but with jRuby) - reveal.js

I know that there are asciidoctor backends for reveal.js and deck.js but it seems that both are only available as ruby gems and not .jar packages.
While I know how to use the Gems from within a java build, I would like to use these backends without a reference to the ruby gem repository.
So are there already .jar packages available for those backends?

Maybe you could use gradle or maven to generate your slide-deck.
A third option might be to use asciidocctorj. At least the first two options are easy to use.

Related

Is it possible to disable Sass in Rails 6?

I work in a completely air-gapped environment in which I would love to use Ruby on Rails. I have the ability to cache dependencies for offline use in Nexus. The problem I'm having is that after I've cached all my dependencies for Rails 6 (including the NodeJS ones), node-sass is unable to install because it attempts to download a file from GitHub.
I'm completely fine without using a CSS pre-processor, and would much rather deal with vanilla CSS than deal with this dependency headache. Is it possible to disable just Sass support when creating a new Rails app? I'm able to use --skip-javascript to disable all javascript support, but since all the other dependencies are able to be installed, it would be a shame to have to disable them just because node-sass can't be installed offline. Is there an option like that for Sass?
I'm aware I could manually copy the .node file from the GitHub release page, however, I'm trying to make this process as minimalistic and automatable as possible.
I'm working with Fedora Linux if that's relevant.
Any help is appreciated.
Yes, I think --skip-sprockets option will disable Sass. You can also disable webpacker using --skip-javascript.
You may try below command.
rails new green-forest -S -J

How to deploy an Agda library on Travis CI?

I've read the .travis.yml in the agda-stdlib project, while it's very different and complex from a simple library that was written in Agda purely (without those Haskell codes and Shell scripts).
I'm confused with the stdlib's .tarvis.yml. I've installed agda via cabal install, but the stdlib is trying to clone and compile Agda on Travis CI, and there're a lot of commands that seems to be irrealavent to building it.
Also, agda-stdlib seems to be available on Ubuntu's source. This could be the 3rd approach to install it.
Also, the stdlib doesn't have dependencies, but I have. I don't know how to add a dependency either.
Conclusion of my question:
In the 3 choices of installing agda listed above, which one should I choose?
How to add an dependency that let the agda compiler knows I'm actually using it?
The standard library is a bit of a special case: it evolves in lock-step with the development version of Agda. As such it is often the case that it cannot be compiled with a version of Agda readily available in your distribution of choice (e.g. because it uses syntax that was not available beforehand!) and it is forced to pull the latest version from github.
Installing Agda
If your library is compatible with a distributed version then it will be far simpler for you to simply pull it from the repositories via apt-get install agda.
Alternatively Scott Fleischman has a basic example on how to use a docker image to typecheck your development: https://github.com/scott-fleischman/agda-travis
Installing your dependencies
If your project relies on dependencies then you do need to install them. In practice it'll probably mean fetching a bunch of tarballs via wget, and having a ~/.agda/libraries pointing at their library files.
Cf. the manual on library management

Dealing with a large c++ library in a Rails deployment

I have a Rails project that is going to be using OpenCV, and it depends on a certain version of it (2.4.6.1).
I'm looking for deployment advice. The Ubuntu opencv package is an earlier version and therefore not suitable.
I can see a number of possibilities, but I'm trying to think of what will work best.
Just write it up in a README and expect people to follow it: download this, apt-get that, etc...
Add opencv, tagged at the version we need, as a git subtree, and include a Rake task to build it.
Write a script to download and compile the needed code.
Something else ?
None of them seem all that great, to tell the truth.
Can your application be made to work with OpenCV 2.4.2? That is available in Ubuntu 13.04, and you could request it be backported to 12.04. If not, you could update the source package to 2.4.6.1 (which would require learning about debian packaging but might not be too difficult since you would be modifying an existing package instead of starting from scratch), upload it to a PPA, and instruct your users on Ubuntu to install OpenCV from there. You could also package your rails application and put it in the PPA, which would make overall installation even easier.

How should I generate a Rhodes extension from a Ruby gem?

I know there is no direct support for Ruby gems in the Rhomobile framework. I have read their (sparse!) documentation to migrate in gem support through extensions, but I cannot for the life of me figure out how exactly this should be implemented.
Besides the document linked above being very disjointed, what I can find can't be easily translated to what I need. I am trying to bring devise into my app, but the gem structure is very hierarchical and the example given in the Rhomobile documentation suggests that a given library should be a singular .rb file.
The exact example given is as follows:
Assuming your application is called “mynewapp”, create a directory
under app called lib (or whatever you wish to call it):
$ cd mynewapp
$ mkdir app/lib
$ cp /path/to/my_lib.rb app/lib/my_lib.rb
Then just require lib/my_lib in a given file within my app. Eg:
require 'lib/my_lib'
To translate to the devise gem, my assumption is that I couldn't do something similar, but would instead have to flatten the directory structure out in some way before I could use it. Is that the case or am I missing something? That's a lot of re-writing code...
Also, if anyone knows of any kind of guide to adding gems to the Rhodes framework, I would love to see it! I've looked through most of the official documentation and some non-official and nothing seems to address this at all.
Wow. I don't know how I overlooked this, but it's really simple and nothing like what I was assuming.
If you are using Rhodes via the RubyGems installation, you must add external Ruby libraries to your RubyGems installation directory for the ‘rhodes-framework’ gem. Your RubyGems installation directory can be found with gem env in a terminal.
From the same page linked in question.
My paths didn't match what was listed in that document because I'm using RVM, but I just ran find / -name rhodes-* and just looked for the one followed by /lib/framework.

How to update plugins version (of a rails project) when old version had manual changes

How to update many plugins version when old plugin's version had manual changes in project?
Is there any tool available for doing this?
or tell proper method for updating ruby plugin version if some plugins may have manual changes done before in the older plugin's version.
Best method when a plugin is required or preferred *might be to copy out the old plugin to a dummy directory for reviewing later, then
uninstall the plugin, (script/plugin uninstall plugin_name)
install the old (but unmodified version) plugin (script/plugin install plugin_name_source_address) - likely either from rubyforge or github
review against the saved version you put in the dummy directory using an editor capable of differential display (that is, which allows you to compare two files for variations. Notepad++ is one freebie that will do this, but there are a ton of editors that allow diff views)
(this may or may not be something you can script. idk. I'm not that good, but I don't know of a tool that will do it all for you)
do another uninstall on the plugin to clear it out, since it's job is done,
install the new version of the plugin (script/plugin install plugin_name_source_address)
and finally edit the new plugin as necessary to accommodate any customization that was performed by you or some third party to the original utility.
I say as necessary because some of the customizations may not even be required in the newer version, although I can't say for sure...
finally, once all your patches are re-added to the new plugin and it's been tested and verified, either delete the dummy directory or archive it for future reference.
See, and I didn't even cop out with a bundler answer. You DID ask for assistance with a plugin, right? ;)
I'm not quite following you, but surely but that's what the Gemfile is for?
Take a look at Bundler
Try to run "$gem install rails"(it will install the newer version of rails) and then install watever the gem it asks finally run "$bundle install"

Resources