<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sentia &#124; Sydney IT Consultancy, Software Development, Ruby on Rails, Web Application Development, Rails Development, Test Driven Development, Microsoft.Net, Asp.Net , Agile, Continuous Integration Training, iPhone development &#187; open source</title>
	<atom:link href="http://www.sentia.com.au/category/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sentia.com.au</link>
	<description>Sentia company website and blog about all things development, Ruby on Rails, Microsoft .Net, ASP.Net, C#.Net, Agile web development, Test Driven Development</description>
	<lastBuildDate>Thu, 02 Feb 2012 07:16:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Integrating CBA&#8217;s BPOINT gateway using ActiveMerchant</title>
		<link>http://www.sentia.com.au/2011/12/integrating-cbas-bpoint-gateway-using-activemerchant/</link>
		<comments>http://www.sentia.com.au/2011/12/integrating-cbas-bpoint-gateway-using-activemerchant/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 06:49:47 +0000</pubDate>
		<dc:creator>mario</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=1135</guid>
		<description><![CDATA[Recently a client of ours wanted to use the Commonwealth Bank &#8230; <a href="http://www.sentia.com.au/2011/12/integrating-cbas-bpoint-gateway-using-activemerchant/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently a client of ours wanted to use the Commonwealth Bank of Australia (CBA)&#8217;s <a title="BPOINT gateway" href="http://www.bpoint.com.au/bpoint/business/">BPOINT gateway</a> for their web application. The first thing we do is usually turn to <a title="ActiveMerchant" href="https://github.com/Shopify/active_merchant">ActiveMerchant</a> to see if there is already a gateway class for the merchant. In this case we couldn&#8217;t find a gateway class or anything or any sort of implementation in ruby.</p>
<p>So today we&#8217;re releasing our open source BPOINT plugin for ActiveMerchant. Installation instructions and usage are available at the GitHub project page: <a title="ActiveMerchant BPOINT on Github" href="https://github.com/Sentia/activemerchant-bpoint">https://github.com/Sentia/activemerchant-bpoint</a>.</p>
<p>It&#8217;s very simple to setup and use, good luck and enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2011/12/integrating-cbas-bpoint-gateway-using-activemerchant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Did someone say lunch</title>
		<link>http://www.sentia.com.au/2010/08/did-someone-say-lunch/</link>
		<comments>http://www.sentia.com.au/2010/08/did-someone-say-lunch/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 05:10:54 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[sentia]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=786</guid>
		<description><![CDATA[Sentia has developed a tradition of Friday company lunches. The &#8230; <a href="http://www.sentia.com.au/2010/08/did-someone-say-lunch/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Sentia has developed a tradition of Friday company lunches. The issue that has been coming up is simplest way to get the order together and as Sentia continues to grow it takes longer as you can&#8217;t just interrupt developers mid code session.</p>
<p>So the solution seems to be to create a simple lunch order app. Once its done we will release open source if anyone else wants to use it.</p>
<p>In the mean time if anyone wants to take part in the build please get in touch</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2010/08/did-someone-say-lunch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone application intergration with Web Application</title>
		<link>http://www.sentia.com.au/2009/08/iphone-application-intergration-with-web-application/</link>
		<comments>http://www.sentia.com.au/2009/08/iphone-application-intergration-with-web-application/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 04:13:14 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[application development]]></category>
		<category><![CDATA[ruby on]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=354</guid>
		<description><![CDATA[We are working on integrating an iPhone application with a &#8230; <a href="http://www.sentia.com.au/2009/08/iphone-application-intergration-with-web-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are working on integrating an iPhone application with a Ruby on Rails web application. Its actually not that hard, the <a href="http://www.iphoneonrails.com/">ObjectResource</a> framework which was developed by Ryan Daigle. It works really well and allows you to easy interact with your rails application with little hassle.</p>
<p>Ill post more about this soon</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/08/iphone-application-intergration-with-web-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comatose, Authlogic and FCKEditor</title>
		<link>http://www.sentia.com.au/2009/08/comatose-authlogic-and-fckeditor/</link>
		<comments>http://www.sentia.com.au/2009/08/comatose-authlogic-and-fckeditor/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 23:47:44 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[authlogic]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[comatose]]></category>
		<category><![CDATA[fckeditor]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=309</guid>
		<description><![CDATA[Ok so we are using comatose and Authlogic for an &#8230; <a href="http://www.sentia.com.au/2009/08/comatose-authlogic-and-fckeditor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ok so we are using comatose and Authlogic for an app we are building for a client. We also wanted to use FCKEditor for comatose to give it a little more buzz.</p>
<p>Firstly you need to install Comatose. Go to your project root directory in terminal and type the following.</p>
<pre class="brush: ruby; title: ; notranslate">
./script/plugin source http://mattmccray.com/svn/rails/plugins
./script/plugin install comatose
./script/generate comatose_migration
rake migrate
</pre>
<p>Then you need to install fckEditor. To do so go to the root of your app in terminal and type the following</p>
<pre class="brush: ruby; title: ; notranslate">
ruby script/plugin install svn://rubyforge.org//var/svn/fckeditorp/trunk/fckeditor
</pre>
<p>In the Comatose _form.html.erb page you need to change</p>
<pre class="brush: ruby; title: ; notranslate">
&lt;%= f.text_area :body, :rows=&gt;20, :tabindex=&gt;2 %&gt;
</pre>
<p>to this so that the fckeditor appears when creating and editing pages.</p>
<pre class="brush: ruby; title: ; notranslate">
&lt;%= fckeditor_textarea('page', 'body', :width =&gt; '100%', :height =&gt; '500px') %&gt;
</pre>
<p>Once you have Comatose and FCKEditor installed and running the final step is to get it all working with Authlogic.</p>
<p>So in your environment.rb file you need to add the following.</p>
<pre class="brush: ruby; title: ; notranslate">
Comatose.configure do |config|
  #Custom class we wrote to handle current_user etc
  config.admin_includes &lt;&lt; :user_methodss
  # Calls :login_required as a before_filter
    config.admin_authorization = :require_user
end
</pre>
<p>This will force comatose to have require a user to be logged in to use the system. The :user_methodss class is a class we wrote to handle the login methods of Autlogic. You can replace this with your own if you want ill include the class we created below.</p>
<pre class="brush: ruby; title: ; notranslate">
module UserMethods
  module ClassMethods
    def permission_required(permission_name,actions, notice=nil)
      notice ||= &quot;You don't have access to that part of the site.&quot;
      actions = [actions].flatten
      before_filter(:only =&gt; actions) { |controller| require_or_redirect(permission_name, controller, notice) }
    end

    def require_or_redirect(permission_name, controller, notice)
      user = controller.send(:current_user)

      if !user.can?(permission_name)
        # @permission_missing is used for should_require_permission test
        controller.instance_variable_set(&quot;@permission_missing&quot;, true)
        controller.send(:redirect_back_or_to, &quot;/&quot;, notice)
      end
    end
  end

  def self.included(base)
    base.extend(ClassMethods)
  end

  protected 

  # Redirects back or if that fails, redirects to the supplied path
  # Also accepts a notice if you want to flash something
  def redirect_back_or_to(path, notice=nil)
    flash[:notice] = notice unless notice.blank?
    begin
      redirect_to :back
    rescue ActionController::RedirectBackError
      redirect_to path
    end
  end

  # Returns the param to use in a find command for objects with a
  # possible cross-db sort
  def cross_database_order(order, direction, sort_methods_allowed)
    return &quot;#{ order } #{ direction }&quot; if !cross_database_sort?(order, sort_methods_allowed)
  end

  # Returns true if the given order looks like a cross db sort
  # Allowed_methods should be an array of association objects to
  # methods allowed to be called on them.
  def cross_database_sort?(order, allowed_methods)
    return allowed_methods.include?(order)
  end

  # Performs a sort on the given objects by calling methods rather than
  # using a db lookup.
  def cross_database_sort(objects_to_sort, order, direction, sort_methods_allowed)
    if cross_database_sort?(order, sort_methods_allowed)
      methods = order.split(&quot;.&quot;)
      association_name, method = order.split(&quot;.&quot;)
      objects_to_sort = objects_to_sort.sort_by do |object|
        methods.each do |meth|
          next if object.nil?
          object = object.send(meth)
        end
        &quot;#{ object }&quot;
      end
      objects_to_sort.reverse! if direction == &quot;desc&quot;
    end

    return objects_to_sort
  end

  private

  # ActionMailer views don't have access to the request, so we need
  # to set these variables manually.
  def setup_host_for_mail
    ActionMailer::Base.default_url_options[:host] = request.host_with_port
  end

  def logout
    current_user_session.destroy if current_user_session
  end

  def current_user_session
    return @current_user_session if defined?(@current_user_session)
    @current_user_session = UserSession.find
  end

  def current_user
    return @current_user if defined?(@current_user)
    @current_user = current_user_session &amp;&amp; current_user_session.user
  end

  def require_user
    unless current_user
      store_location
      flash[:notice] = &quot;You must be logged in to access this page&quot;
      redirect_to new_user_session_url
      return false
    end
  end

  def require_no_user
    if current_user
      store_location
      flash[:notice] = &quot;You must be logged out to access this page&quot;
      redirect_to &quot;/&quot;
      return false
    end
  end

  def store_location
    session[:return_to] = request.request_uri
  end

  def redirect_back_or_default(default)
    redirect_to(session[:return_to] || default)
    session[:return_to] = nil
  end
end
</pre>
<p>Worth noting the &#8220;ss&#8221; in user_methodss is not a mistake. Because of the way Comatose handles the string/symbol you pass in it wouldn&#8217;t render :user_methods but instead looked for :users_methods which was incorrect so this was our little hack to get around that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/08/comatose-authlogic-and-fckeditor/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Lowpro + prototype and Firefox 3.5</title>
		<link>http://www.sentia.com.au/2009/07/lowpro-prototype-and-firefox-35/</link>
		<comments>http://www.sentia.com.au/2009/07/lowpro-prototype-and-firefox-35/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 01:19:45 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lowpro]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=311</guid>
		<description><![CDATA[So it turns out lowpro is broken in the latest &#8230; <a href="http://www.sentia.com.au/2009/07/lowpro-prototype-and-firefox-35/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So it turns out lowpro is broken in the latest Firefox. Anyways DanWebb has released a fix for this which you can read more about <a href="http://www.danwebb.net/2009/7/2/low-pro-for-prototype-and-firefox-3-5">here</a>. </p>
<p>Now this didn&#8217;t solve my issues all together. I ran into an issue as the JavaScript was loading before the page was completely loading and thus the behaviours were not been added.</p>
<p>So the solution is to add the following</p>
<pre class="brush: jscript; title: ; notranslate">
Event.observe(window, 'load', function() {
  Event.addBehavior({
    // assign behaviors
  });
}
</pre>
<p>That way the behaviours don&#8217;t get added until after the DOM has fully loaded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/07/lowpro-prototype-and-firefox-35/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding your own login method to Authlogic</title>
		<link>http://www.sentia.com.au/2009/06/adding-your-own-login-method-to-authlogic/</link>
		<comments>http://www.sentia.com.au/2009/06/adding-your-own-login-method-to-authlogic/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 02:51:39 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[authlogic]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=294</guid>
		<description><![CDATA[So on a new project we are working on we &#8230; <a href="http://www.sentia.com.au/2009/06/adding-your-own-login-method-to-authlogic/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So on a new project we are working on we have a need for a user to be able to login via either their &#8220;Login&#8221; or &#8220;Mobile&#8221; number. Now we are using the <a href="http://github.com/binarylogic/authlogic/tree/master">Authlogic</a> gem which is a great gem and comes with all default methods for login etc and allows you to customise this very easily.</p>
<p>So firstly you need to add the following to your UserSession model. What this does is overwrite the default login method with the one we are defining below called &#8220;find_by_username_or_mobile&#8221;.</p>
<pre class="brush: ruby; title: ; notranslate">
class UserSession &lt; Authlogic::Session::Base
  find_by_login_method :find_by_username_or_mobile
end
</pre>
<p>Then in your user model its as simply as creating the class method for login. Now of course the password is still apart of the login process but we only wanted to allow users to either login via their login or mobile so no need to change the password methods.</p>
<pre class="brush: ruby; title: ; notranslate">
class User &lt; ActiveRecord::Base
  def self.find_by_username_or_mobile(login)
    find_by_login(login) || find_by_mobile(login)
  end
end
</pre>
<p>So give it a try and let us know how you go hope this helps</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/06/adding-your-own-login-method-to-authlogic/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>&#8220;Open in TextMate&#8221; from Leopard Finder</title>
		<link>http://www.sentia.com.au/2009/06/open-in-textmate-from-leopard-finder/</link>
		<comments>http://www.sentia.com.au/2009/06/open-in-textmate-from-leopard-finder/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 22:58:59 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mac osx]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[finder]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=277</guid>
		<description><![CDATA[Henrik Nyh has written a great little plugin that allows &#8230; <a href="http://www.sentia.com.au/2009/06/open-in-textmate-from-leopard-finder/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Henrik Nyh has written a great little plugin that allows you to open files in <a href="http://macromates.com/">TextMate</a> from finder. Now most developers are used to doing this via terminal but this is very helpful so check it out</p>
<p>So click here to view the <a href="http://henrik.nyh.se/2007/10/open-in-textmate-from-leopard-finder">Open in Textmate button</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/06/open-in-textmate-from-leopard-finder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sentia rails application templates now on GitHub</title>
		<link>http://www.sentia.com.au/2009/05/sentia-rails-application-templates-now-on-github/</link>
		<comments>http://www.sentia.com.au/2009/05/sentia-rails-application-templates-now-on-github/#comments</comments>
		<pubDate>Wed, 13 May 2009 06:19:28 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[application templates]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=255</guid>
		<description><![CDATA[We have just made a project on github to store &#8230; <a href="http://www.sentia.com.au/2009/05/sentia-rails-application-templates-now-on-github/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We have just made a project on github to store our rails application templates that we talked about <a href="http://sentia.com.au/2009/05/application-templates-in-ruby-on-rails/">here</a>. You can check it out <a href="http://github.com/Sentia/Sentia-Rails-Application-Templates/tree/master">here</a>. Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/05/sentia-rails-application-templates-now-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open source flash charts like google analytics</title>
		<link>http://www.sentia.com.au/2009/03/open-source-flash-charts-like-google-analytics/</link>
		<comments>http://www.sentia.com.au/2009/03/open-source-flash-charts-like-google-analytics/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 22:02:48 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[charting]]></category>
		<category><![CDATA[flash charts]]></category>
		<category><![CDATA[google charts]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=187</guid>
		<description><![CDATA[We all want our charts to look like the ones &#8230; <a href="http://www.sentia.com.au/2009/03/open-source-flash-charts-like-google-analytics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We all want our charts to look like the ones in google analytics. Well know there is a way the &#8220;Open Flash Chart&#8221; project. The guys over at <a href="http://pullmonkey.com">pull monkey</a> have released a plugin for rails that helps you get in these great charts. Ill be testing this plugin very soon and ill put up my experience and a little walk through. In the mean time if you want to check out the project have a look <a href="http://pullmonkey.com/projects/open_flash_chart2">here</a></p>
<p>Here is an example of what the charts look like</p>
<p><center><img src="http://sentia.com.au/wp-content/uploads/2009/03/picture-3.png" alt="picture 3 Open source flash charts like google analytics" title="Flash Chart" /></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/03/open-source-flash-charts-like-google-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

