[ANN] ZiYa 2.1.0 released...

28 views
Skip to first unread message

fernand...@gmail.com

unread,
May 27, 2009, 2:27:20 AM5/27/09
to ZiYa Plugin
All,

I have just pushed a new version of ZiYa out on github version
2.1.0.

This release contains the following items:

1) Added support drillable geographical heat maps
2) Added Sinatra based examples for basic charts and maps
3) Various code refactor and test suite improvements
4) Updated ziya-galeria sample app with requests charts and maps

I still need to revisit the docs and add more examples. I am all
ears if you would like to see specific charts/maps samples.

The new gem should be accessible on github by the time you read
this.

> sudo gem install derailed-ziya -v 2.1.0

There might still be some issues lurking here and there so please
make sure you test out your current code base in your dev or alpha env
before committing to 2.1.0

NOTE: With the incorporation of middleware in rails 2.3, I have
noticed that you could shave a lots of perf by generating the charts
xml in a rack/metal app vs going thru the rails stack. This is very
exciting for ZiYa users !!

Feel free to send me comments and feebacks....

Thank you all for your continued support and encouragements !!

-Fernand

roadcoder

unread,
May 31, 2009, 10:58:48 PM5/31/09
to ZiYa Plugin
Thanks for the update. It looks like there are some good things in
there!

Was the Sinatra example meant to be used as part of a rails app, or
standalone?

On May 27, 1:27 am, "fernand.gali...@gmail.com"

Fernand Galiana

unread,
Jun 1, 2009, 11:03:56 AM6/1/09
to ziya-...@googlegroups.com
Hi roadcoder,

   Thanks for taking a look !

   The sinatra apps are just a quick way to put some samples together. They are full sinatra applications
   to render charts and maps. With the advent of rack and rails, rack applications are a perfect way to power
   ZiYa. You can easily modifiy the sample sinatra apps to render just the xml and declare the sinatra app as a rack
   component within your rails application. My initial assesment shows this is a killer combination for ZiYa.

-Fernand

Navneet Aron

unread,
Jun 28, 2009, 5:03:58 PM6/28/09
to ZiYa Plugin
Hi Fernand,
I think you have created something really cool.. I'm about to try it.
However when I'm trying to install the gem using " sudo gem install
derailed-ziya"
or "sudo gem install derailed-ziya -v 2.1.0", I'm getting following
error:

could not find gem derailed-ziya locally or in a repository

Can you please let me know where can I get the 2.1.0 gem from?

BTW I've sucessfully install ziya 2.0.7 by using: sudo gem install
ziya and ran ziyafy from the applications root of my rails
application. I've made necessary changes to config/environment.rb and
initializer/ziya.rb . When I start my server, I get the following
error:

/usr/lib/ruby/gems/1.8/gems/ziya-2.0.7/lib/ziya.rb:27:in `initialize':
Unable to find themes directory `/home/navneet/couponsmeme/config/
initializers/../../public/charts/themes (RuntimeError)
Can you please tell me why are themes missing?

Thanks,
Navneet

On May 26, 11:27 pm, "fernand.gali...@gmail.com"

jea...@gmail.com

unread,
Jul 4, 2009, 10:02:24 AM7/4/09
to ZiYa Plugin
I get the same.

No luck installing ""sudo gem install derailed-ziya "
Also a missing themes directory, but I've managed to fix that by
copying the required files to the gem installation path. It seems the
gem does not install any themes by default.

I have a third problem: As soon as I add the initializer/ziya.rb, my
application server no longer starts up.

# Pull in the ZiYa gem framework
gem "ziya", "~> 2.0.0"
require 'ziya'

# Initializes the ZiYa Framework
Ziya.initialize()#:logger => RAILS_DEFAULT_LOGGER)#,
#:helpers_dir => File.join( File.dirname(__FILE__), %w[.. .. app
helpers ziya] ),
#:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public
charts themes]) )

As you can see above, I rely on the Ziya default logger and the
default themes and helpers.

Failing to run Ziya.initialize() comes with it's own problems.

Anyone have any insights to share ? Using Ziya can not be this tricky
(been at this for hours)

ciao

Fernand Galiana

unread,
Jul 4, 2009, 12:18:10 PM7/4/09
to ziya-...@googlegroups.com
Guys,

   My apologies for the pain points. I will update the documentation and hopefully this will make it clearer. Lots changes
   in 2.1.x and I need to be more diligent with this project documentation.

   Thanks for sticking with it and please report back if you have anymore install issues !

-Fernand
 
ZiYa Installation and first Chart Creation

1) Update your gem version to 1.3.1
2) Add git as a source

> gem sources -a http://gems.github.com

3) Install the ziya gem

> sudo gem install derailed-ziya

4) In your web app, to setup ziya

> ziyafy --charts

 5) Creating a ziya initializer

config/initializers/ziya.rb

gem 'derailed-ziya', '~> 2.1.0'

require 'ziya'

# Initializes the ZiYa Framework
Ziya.initialize(
  :logger     => RAILS_DEFAULT_LOGGER,

  :themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes])
)

6) Create a controller and define a chart callback

app/controllers/blee_controller.rb

class BleeController < ApplicationController
  helper Ziya::HtmlHelpers::Charts
  helper Ziya::YamlHelpers::Charts

  # Callback from the flash movie to get the chart's data
  def load_chart
    # Create a bar chart with 2 series composed of 3 data points each.
    # Chart will be rendered using the default look and feel
    chart = Ziya::Charts::Bar.new
    chart.add( :axis_category_text, %w[2006 2007 2008] )
    chart.add( :series, "Dogs", [10,20,30] )
    chart.add( :series, "Cats", [5,15,25] )
    respond_to do |fmt|
      fmt.xml { render :xml => chart.to_xml }
    end
  end
end

7) Create an associated view

app/views/blee/index.html.erb

<!-- Defines the necessary tag to embed a flash movie in your html page.
This will callback to your controller to fetch the necessary xml. -->
<%= ziya_chart load_chart_url -%>

8) Define a named route

   map.load_chart '/blee/load_chart', :controller => 'blee', :action => 'load_chart'

Fernand Galiana

unread,
Jul 4, 2009, 12:30:24 PM7/4/09
to ziya-...@googlegroups.com
Docs updated. Please visit http://ziya.liquidrail.com/docs/index.html

Thank you all for your support !!
Reply all
Reply to author
Forward
0 new messages