puts "%DEBUG%:myVar:#{myVar*.strip*}****"

http://ruby-doc.org//core-2.2.0/String.html#method-i-strip


Lee Hambley
http://lee.hambley.name/
+49 (0) 170 298 5667

On 25 February 2015 at 22:00, <deadbeef...@gmail.com> wrote:

> that worked, sort of.  I'm getting either CRLF or LF as the trailing
> character(s).   Can you show me an example of using a chomp on a variable?
> I've tried
>
>       puts "%DEBUG%:myVar:#{myVar}.chomp(\r\n)****"
>
> but that doesn't work.
>
>
>
> On Wednesday, February 25, 2015 at 1:55:44 PM UTC-6, Lee Hambley wrote:
>>
>> I'm not sure how to assign the output of a command to a variable within
>>> config/deploy.rb that can then be later included in an execute command.
>>
>>
>> Exactly like that, variables are variables. You could use the
>> set()/fetch() API, but there's no need.
>>
>> Also http://ruby-doc.org/core-1.9.3/File.html#method-c-basename
>>
>> Lee Hambley
>> http://lee.hambley.name/
>> +49 (0) 170 298 5667
>>
>> On 25 February 2015 at 20:12, <deadb...@gmail.com> wrote:
>>
>>>
>>> Sorry my brain was thinking config/deploy.rb and not shell.
>>>
>>> If I was in a shell I could do
>>>
>>> var=` basename /var/www/app/release/201501222`
>>> echo $var
>>>
>>> I'm not sure how to assign the output of a command to a variable within
>>> config/deploy.rb that can then be later included in an execute command.
>>>
>>> --d
>>>
>>>
>>> On Wednesday, February 25, 2015 at 12:50:15 PM UTC-6, Lee Hambley wrote:
>>>>
>>>> http://en.wikipedia.org/wiki/Basename
>>>>
>>>> Lee Hambley
>>>> http://lee.hambley.name/
>>>> +49 (0) 170 298 5667
>>>>
>>>> On 25 February 2015 at 19:38, <deadb...@gmail.com> wrote:
>>>>
>>>>>
>>>>> If release_path = /Deploy/nrpe/releases/20150225183149
>>>>>
>>>>> Is there a variable to access the 20150225183149 part?  Or some other
>>>>> method?
>>>>>
>>>>>
>>>>>
>>>>> Thank you
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Capistrano" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to capistrano+...@googlegroups.com.
>>>>> To view this discussion on the web, visit https://groups.google.com/d/
>>>>> msgid/capistrano/3d2e61f8-8040-481f-ab30-53c9cfaab13a%40googl
>>>>> egroups.com
>>>>> <https://groups.google.com/d/msgid/capistrano/3d2e61f8-8040-481f-ab30-53c9cfaab13a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Capistrano" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to capistrano+...@googlegroups.com.
>>> To view this discussion on the web, visit https://groups.google.com/d/
>>> msgid/capistrano/d90f7656-d23e-4aad-8b66-4139527c1451%40googlegroups.com
>>> <https://groups.google.com/d/msgid/capistrano/d90f7656-d23e-4aad-8b66-4139527c1451%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to capistrano+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/e3e58258-be50-4991-969b-164923349cf0%40googlegroups.com
> <https://groups.google.com/d/msgid/capistrano/e3e58258-be50-4991-969b-164923349cf0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLVRbpKjovHQTQp%2BuQWR3iU9%2BzYcMTrdbdqBNmv4aApG6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to