thor Questions
3
Solved
I have a thor-based Ruby script, but I want to deploy it as a gem in people's bin directories that people can hit without having to do thor mytool.
So instead they'd just use mytool
Is this possi...
Finlay asked 27/8, 2010 at 13:43
6
I'm having some trouble getting Thor to do this, so hopefully someone can point out what I'm doing wrong.
I have a main class class MyApp < Thor that I want to break out into separate files fo...
6
Solved
I've been trying to write a small library using Thor to help assist me in quick creating new projects and sites. I wrote this small method:
def ssh(cmd)
Net::SSH.start( server_ip, user, :port =&g...
1
Is it possible to create a Thor based Ruby executable that accepts namespaces? To allow, for example, the following from the commandline: ./thorfile greet:formal
Given I have the following thorfil...
Theoretician asked 3/7, 2011 at 8:39
1
Solved
This is my Ruby code:
require 'thor'
require 'thor/group'
module CLI
class Greet < Thor
desc 'hi', 'Say hi!'
method_option :name, :type => :string, :description => 'Name to greet', :...
1
Solved
my_gem hello name1 name2 name3 give me a
my_gem hello requires at least 1 argument: my_gem hello name
Should I just parse them and separate the arguments with a delimeter?
e.g
my_gem hell...
Sender asked 2/5, 2012 at 5:42
1
Solved
In my gem I'd like to have a an executable command with args like so:
foo generate project
foo generate config
foo say_hi
So I made
foo/bin/foo
#!/usr/bin/env ruby
require 'foo'
Foo::Foo.star...
2
Solved
I'm building a simple thor based generator for some internal projects, and can't seem to get bundle install running from the correct directory.
As I run the new [APP_NAME] function, it should crea...
2
Solved
Where can I find good examples of testing a Thor script with RSpec?
My searches have so far not turned up anything good.
1
Solved
This question started out here. But changed significantly as I learned more about Thor.
I'm trying to make a Thor::Group subcommand that takes an argument. Oddly, it works if there are no argument...
2
I am looking for a way to pass options to the ERB templating engine in thors template action.
I stumbled upon the bundler cli source where thors template action is being used like this:
opts = {:...
2
Solved
When calling thor commands on the command line, the methods are namespaced by their module/class structure, e.g.
class App < Thor
desc 'hello', 'prints hello'
def hello
puts 'hello'
end
end...
2
Solved
Is it possible to call a specific task first, when i run a thor task?
my Thorfile:
class Db < Thor
desc "show_Version", "some description ..."
def show_version # <= needs a database conn...
Dodson asked 11/11, 2010 at 9:21
2
Solved
How can I configure vim to use the same syntax highlighting for Thor as it does for ruby? When I'm editing a *.thor file, I can use :set syntax=ruby, which works, but is not permanent. Is there a w...
Ancillary asked 27/1, 2011 at 22:18
2
Solved
I find that I'm often running a sequence of routine 'cleanup' tasks before and after I make a git commit for my Rails 3 app.
I was thinking about putting these things into a Thor script, but one t...
Feme asked 26/1, 2011 at 6:33
1
Solved
Has anyone used both Boson and Thor?
Thor is very popular and has more followers and contributers than Boson, but Boson looks far more powerful than Thor and the architecture is very well thought ...
Mesothelium asked 13/9, 2010 at 0:47
© 2022 - 2024 — McMap. All rights reserved.