Jeff Nixon | 27 Apr 21:36
Picon

Ramaze a/r helpers

What is the difference between a Controller.a method like  #{UsersController.a('Remove', :remove_target, tgt.id)} and a Controller.r method? I'm pretty new to Ramaze and i'm just wondering when the best time to use each of them is.


Thanks!

--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ramaze/-/pMk68T6EvWIJ.
To post to this group, send email to ramaze-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to ramaze+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.
Jeff Nixon | 20 Apr 22:40
Picon

Ramaze help

I want to conditionally display content in a view based on a session variable. I'm not clear at this stage if there is a built in template language that would allow me to use conditional statements. Below is my first stab at the controller and view code. Can you point me in the right direction for documentation or examples? Any insight is much appreciated.


controller/presentationtest.rb:

class PresentationsController < Ramaze::Controller
map '/presentations'
  def authenticate(password)
  if password = 'ammpresentations'
  session[:logged_in] = true
  end
  end
end

view/presentations.xhtml:

<p>
Please login below to view the Presentations. 
</p>

<form action="#{PresentationsController.r(:authenticate)}" method="POST">
    <label for="password">Password</label>
    <input type="password" name="password" />

    <br /><br />

    <input type="submit" value="Login" />
</form>

<!-- conditional check goes here; logged_in = true -->

// here is the content that will be displayed, once you enter password //

<a href="#" >Presentation 1</a><br>
<a href="#" >Presentation 2</a><br>
<a href="#" >Presentation 3</a> 

<!-- end of conditional section --> 

--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ramaze/-/sOj3wqRefiIJ.
To post to this group, send email to ramaze-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to ramaze+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.
Yorick Peterse | 14 Apr 19:44
Picon
Gravatar

Ramaze 2012.04.14

Rubyists,

Ramaze 2012.04.14 was just released, this release is mostly a bug fix
release. This release does not contain any of the Innate/Ramaze
improvements as mentioned in the previous release announcement, those
will be put in the next release (of which the date has not yet been
confirmed).

## Changelog

* The Redis adapter (Ramaze::Cache::Redis) has been fixed so that it
  works with sessions, previously this would result in "Can't convert
  into symbol" errors and the like. This problem was caused by not
  encoding data using Marshal. Thanks to EdvardM for reporting the
  issue.
* The Redis cache adapter namespaces keys just like the other adapters.
* Ramaze::Cache::MemCache has been updated for the latest version of
  Dalli and should no longer display deprecation warnings. The minimum
  required version of Dalli has been set to at least 2.0.2.
* Various documentation improvements and additions.
* The HTML of the pagination helper can now be customized, thanks to
  Leucos and bougyman for adding it.

I also like to remind you that the next release of Ramaze will *not* be
backwards compatible with previous releases. This is because manveru
made a few changes to Innate that make it *a lot* faster, this change
however, required the removal of the middleware compiler (in order to
keep Innate under 2k LOC). In the coming days Ramaze will be updated so
that it will work properly with these changes. An announcement will be
made when these changes have been comitted so that developers can
prepare for this release.

As always, for any information or questions you're more than welcome to
join the IRC channel #ramaze on freenode.

Yorick

kez | 12 Apr 16:03
Picon
Gravatar

Conflicting sessions?

Hello -

I am using Sequel to store session objects (Ramaze::Cache.options.session = Ramaze::Cache::Sequel.using(...)) and am experiencing session overwriting/conflicts between browsers.  E.g.:

 - Open Safari and log in as User 1
 - Open Firefox and log in as User 2
 - Switch back to Safari and refresh; We are now running as User 2

Am I right in thinking that the session ID is keyed off the IP of the user logging in, so the most recent matching key in the session store wins out? (e.g. User 2).

Do I need to somehow tie the session to a cookie stored on a per-browser basis?  I (obviously) do not have a great understanding of this stuff, so any insight would be greatly appreciated.  What I am looking for is something similar to how Google behaves (multiple browsers can have different users logged in).

Cheers!

- kez

--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ramaze/-/bh3NY1BpkVgJ.
To post to this group, send email to ramaze-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to ramaze+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.
Lucas Sampaio | 6 Apr 20:52
Picon
Gravatar

Ramaze Plugin

Hello everybody,

I'm starting to program in Ruby and I'm really impressed with Ramaze's simplicity and flexibility, and I wan't to spend my time with this framework. But I can't found any doc about plugins... is it possible in Ramaze? How can I extend it's functionality through plugins or even gems?

Att,
Lucas Sampaio

--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ramaze/-/o4QtoIdFasAJ.
To post to this group, send email to ramaze-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to ramaze+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.
hhuai | 26 Mar 17:02
Picon

How to define a custom helper and use for view?

I'm readed a lots of documents and googled it, nothing to help.

--

-- 
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To post to this group, send email to ramaze@...
To unsubscribe from this group, send email to ramaze+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.

Davor Serfez | 18 Mar 00:38
Picon

Webrick SSL certificate authentication in Ramaze

Hi,
I'm a Ruby/Ramaze noob, but found it is quite easy to write simple web apps and find it really a great product.
I would like to use webrick to serve a simple Ramaze app over SSL and to authenticate clients with certificates.
There are examples on the internetz on how to configure webrick for that, but couldn't find any mention on how to implement in Ramaze/Rack.
I guess the SSL configuration for webrick has to be integrated somewhere around in config.ru or start.rb, but besides that I'm clueless.

Any help is appreciated.

SSL with cert auth works like a charm with Apache, and I can get certificate information in the app from 'request.env' (to use in the app for authorization), but webrick is already there with ruby/ramaze and the Apache/nginx path is overhead in my situation. Running the app on webrick with stunnel for SSL doesn't provide certificate information to the app, so that is no-go for me.

Thanks,
Davor

--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ramaze/-/n0iKxkWkhpMJ.
To post to this group, send email to ramaze-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to ramaze+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.
Roy Wright | 10 Mar 21:38
Picon

setting Ramaze.options.mode

Howdy!

What's your preferred method for setting Ramaze.options.mode for the
different runtime environments?

Basically the issue I'm looking at is using different database
connections for :dev, :live, and :test (also used for defining
middleware).  I'm wanting to select the connection in app.rb before
requiring my models.  The Ramaze.options.mode defaults to :dev.  I can
set it to :test in my spec/spec_helper.rb and features/support/env.rb
before requiring app.rb.  But how should I handle live deployments?

TIA,
Roy

--

-- 
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To post to this group, send email to ramaze@...
To unsubscribe from this group, send email to ramaze+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.

Yorick Peterse | 7 Mar 19:48
Picon
Gravatar

Ramaze 2012.03.07

Rubyists,

Today marks the day of another Ramaze release, Ramaze 2012.03.07. With
this release also comes a new version of Innate, also 2012.03. A full
list of the changes of both frameworks can be found below.

However, there is one important change that you should be aware of:
Ramaze is no longer dual licensed under the GPL/Ruby licenses but
instead is now licensed under the MIT license. This license gives more
freedom and is a lot easier to understand. For those interested the
conversation that started the idea of changing the license can be found
here: https://gist.github.com/1664358.

If you have any questions about this license change feel free to reply
to this email, send me or Michael an email or join the IRC channel.
The contact details can be found at the bottom of this email.

## Changelog for Ramaze

* Various documentation improvements, massive thanks to John Pagonis for
  his contributions.
* CSRF tokens are re-generated on valid requests. This fixes the problem
  of these tokens being invalidated after 15 minutes regardless of
  valid requests being executed or not.
* View adapters automatically install required Gems using
  Ramaze.setup().
* Support for the Slim template engine thanks to Marc Weber.
* Various small code cleanups such as the removal of trailing
  whitespace, YARD formatting issues, etc.

## Changelog for Innate

* Fixed various YARD formatting issues.
* The render helper can now render views that don't have corresponding
  methods when the trait :needs_method is set to true. This means that
  for example render_view(:foo) works if there's a view "foo" but not
  method "foo()". Previously doing this would trigger an error saying  
  the render call required a method.
* Fixed an issue for Rack::Cascade in Rack 1.4.1.
* The speed of Innate::Cache has been improved and should trigger less
  warnings.

## Upcoming Changes

With this email I'd also like to announce some upcoming changes in both
Innate and Ramaze. Earlier today Michael managed to make some patches
for Innate that resulted in a massive performance increase (from 300
reqs/sec to around 2000).

However, for this patch to be pulled into Innate various changes have to
be made which in turn would lead to Innate using more than 2k LOC. To
work around this we've been thinking of throwing a few things (that were
annoying in the first place) away. These are Innate::Session and the
middleware compiler. The former isn't a huge issue as Rack already has a
perfectly fine way of handling sessions. The latter however is a very
big change and will break a lot of existing applications out there,
hence this announcement.

The removal of the middleware compiler would mean that all the methods
related to "compiling" the middleware list (methods such as
Innate.middleware!) will be removed, thus breaking existing code that
relies on the presence of these methods.

The advantage of this is that both Innate and Ramaze will instead use
the code provided by Rack, thus making it easier for us to maintain both
frameworks as well as making it easier for others to use Rack
middlewares without having to learn how to use the middleware compiler.

While none of these changes have been pushed to Github yet it's more
than likely that this will happen in the near future as we agreed that
such big performance improvements were worth the effort of breaking
existing code. Once we have determined in which version these changes
will be included I'll send another email to notify developers so that
they can prepare themselves and their projects.

## Contact Details

Yorick Peterse: yorickpeterse@...
Michael Fellinger: m.fellinger@...
IRC channel: #ramaze on Freenode

Yorick

Roy Wright | 13 Feb 01:42
Picon

Can't figure out Paginator.navigation

Howdy,

I'm working with a legacy PostgreSQL database and am learning Sequel
for the ORM.  The first table that has the potential to have enough
rows to justify pagination that I'm tackling is the hash_table.  The
pagination appears to be working in that I can limit the number of
rows displayed (yes, 5 is a really small limit, but also pretty
obvious when trying to get it to work) and iterate with the
Paginator.each method.

The problem is that Paginator.navigation is always returning an empty
string and I just don't see what I'm missing.  Probably something
simple.  So I created the following gist with, hopefully, all the
relevant code fragments:

https://gist.github.com/1812150

Thank you,
Roy

--

-- 
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To post to this group, send email to ramaze@...
To unsubscribe from this group, send email to ramaze+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.

Rich | 4 Jan 13:11
Picon

Using Gestalt in Views

Can anyone advise on how to use Gestalt in Views, perhaps with a helpful example?  I have searched documentation, examples, specs  extensively but I am still in the dark.  I have managed to use Gestalt successfully only in a controller.


(not sure of group etiquette yet so TIA anyway.)


--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ramaze/-/4uRCtYOzFE8J.
To post to this group, send email to ramaze-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to ramaze+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.

Gmane