<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tymon Tobolski</title>
    <link>https://teamon.me/</link>
    <description>Recent content on Tymon Tobolski</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>© 2008-2025 Tymon Tobolski</copyright>
    <lastBuildDate>Fri, 07 May 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://teamon.me/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Only possible with Elixir - ubots case study</title>
      <link>https://teamon.me/talks/only-possible-with-elixir-ubots-case-study/</link>
      <pubDate>Fri, 07 May 2021 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/only-possible-with-elixir-ubots-case-study/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>Fun with Elixir Macros</title>
      <link>https://teamon.me/talks/elixirconfeu-fun-with-elixir-macros/</link>
      <pubDate>Tue, 16 Apr 2019 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/elixirconfeu-fun-with-elixir-macros/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>Building Thor-like CLI in Elixir</title>
      <link>https://teamon.me/2017/thor-like-cli-elixir-macros/</link>
      <pubDate>Fri, 22 Sep 2017 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2017/thor-like-cli-elixir-macros/</guid>
      <description>Most Ruby programmes are probably familiar with CLI toolkit Thor. In a nutshell it allows building command line interfaces using standard Ruby classes, like this:
class App &amp;lt; Thor desc &amp;#34;List things&amp;#34; def list puts &amp;#34;listing&amp;#34; end desc &amp;#34;Install something&amp;#34; def install(name) puts &amp;#34;installing #{name}&amp;#34; end end Here we will go through the minimal implementation in Ruby and then a similar one but this time in Elixir.
RUBY IMPLEMENTATION class Thor def self.</description>
    </item>
    
    <item>
      <title>Just4Fun Extra - Elixir (Podcast)</title>
      <link>https://teamon.me/talks/just4fun-elixir/</link>
      <pubDate>Sat, 19 Aug 2017 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/just4fun-elixir/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>Elixir GenStage &amp; Flow</title>
      <link>https://teamon.me/talks/elixir-genstage-flow/</link>
      <pubDate>Thu, 25 May 2017 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/elixir-genstage-flow/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>A different approach to testing Elixir with mocks/doubles</title>
      <link>https://teamon.me/2017/different-approach-to-elixir-mocks-doubles/</link>
      <pubDate>Sat, 25 Feb 2017 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2017/different-approach-to-elixir-mocks-doubles/</guid>
      <description>After watching J B Rainsberger&amp;rsquo;s talk &amp;ldquo;Integrated Tests Are A Scam&amp;rdquo; I decided to revisit the elixir ecosystem for available tools for mocks/doubles.
During that research I got an idea how it could be done a bit differently. There was no other option than to try it.
This is a proof of concept for a different approach to elixir test doubles. Some of the goals/issues I&amp;rsquo;ve tried to solve here are:</description>
    </item>
    
    <item>
      <title>Setting up Elixir cluster using Docker and Rancher</title>
      <link>https://teamon.me/2017/setting-up-elixir-cluster-using-docker-and-rancher/</link>
      <pubDate>Mon, 16 Jan 2017 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2017/setting-up-elixir-cluster-using-docker-and-rancher/</guid>
      <description>In the previous post we went through putting Elixir app inside Docker image. One downside of running Elixir inside Docker is that since containers have their own network, even when running on the same physical host, two Elixir nodes inside two separate containers can&amp;rsquo;t connect with each other by default.
What&amp;rsquo;s more, we are deploying Elixir (and all other) containers using Rancher that distributes containers across multiple physical machines. Because of this, we can&amp;rsquo;t expose ports from Docker container to host - on ever host there can be zero, one or more containers running the same application.</description>
    </item>
    
    <item>
      <title>Deploying Phoenix to production using Docker</title>
      <link>https://teamon.me/2017/deploying-phoenix-to-production-using-docker/</link>
      <pubDate>Sun, 15 Jan 2017 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2017/deploying-phoenix-to-production-using-docker/</guid>
      <description>This is a short tutorial on how we at Recruitee are running Phoenix and other Elixir applications with Docker. On production.
Why would you want to do this? The main reason for choosing Docker was the unification of deployment. We are using many different technologies ranging from Ruby/Rails, Elixir/Phoenix to Java, Python or even PHP. Simply put, we want to use the best tool for the job, and while we would love to use only a single language/platform (Elixir/BEAM) for everything it just isn&amp;rsquo;t possible.</description>
    </item>
    
    <item>
      <title>Measuring and visualizing GenStage/Flow with Gnuplot</title>
      <link>https://teamon.me/2016/measuring-visualizing-genstage-flow-with-gnuplot/</link>
      <pubDate>Mon, 26 Dec 2016 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2016/measuring-visualizing-genstage-flow-with-gnuplot/</guid>
      <description>After my recent post about Elixir GenStage/Flow some people asked about follow-up on measurements and plotting, so here it is.
White lies Before we start, I need to admit to one thing. In the last post, I&amp;rsquo;ve written that I&amp;rsquo;ve used Repo.stream from Ecto. The truth is, I&amp;rsquo;ve used my own version of Repo.stream that has been in Recruitee codebase long before Ecto got one. This difference will be very important when we will talk about measuring progress.</description>
    </item>
    
    <item>
      <title>Tuning Elixir GenStage/Flow pipeline processing</title>
      <link>https://teamon.me/2016/tuning-elixir-genstage-flow-pipeline-processing/</link>
      <pubDate>Fri, 16 Dec 2016 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2016/tuning-elixir-genstage-flow-pipeline-processing/</guid>
      <description>There are many use cases for GenStage/Flow.
One of such cases that I recently faced was to get some records from PostgreSQL database, download files associated with these records from Amazon S3, extract text from these files and index this text into ElasticSearch.
This task can be represented as a pipeline with four steps:
SELECT record from database DOWNLOAD pdf file EXTRACT text from that file INDEX extracted text Since I was dealing with hundreds of thousands of records I had to find an efficient way of pipeline processing.</description>
    </item>
    
    <item>
      <title>Elixir Introduction</title>
      <link>https://teamon.me/talks/elixir-introduction/</link>
      <pubDate>Wed, 23 Nov 2016 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/elixir-introduction/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>Introducing Tesla — the flexible HTTP client for Elixir</title>
      <link>https://teamon.me/2016/tesla-flexible-http-for-elixir/</link>
      <pubDate>Wed, 07 Sep 2016 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2016/tesla-flexible-http-for-elixir/</guid>
      <description>After a year and a half year since the first commit it is time to finally write something about tesla — the flexible HTTP client library for Elixir.
The story behind it is dead simple - coming from ruby world I was missing the fantastic faraday equivalent, so there was no other option than filling the gap. (You probably figured out origins of the name by now.)
Why another HTTP client library?</description>
    </item>
    
    <item>
      <title>Setting up a Rails development environment on OS X using Docker</title>
      <link>https://teamon.me/2015/docker-compose/</link>
      <pubDate>Tue, 29 Sep 2015 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2015/docker-compose/</guid>
      <description>One of our designers wanted to make some changes to our job offer page. At first it seemed trivial - just change some HTML inside a rails app. Then we realised that we would need to setup the whole development environment on his Mac. With the help of homebrew this didn&amp;rsquo;t sound like a challenge at all. But then it came to my mind that this might be the perfect case for setting up a development environment using docker and docker-compose (formerly fig).</description>
    </item>
    
    <item>
      <title>8 qualities of great Technical Leader</title>
      <link>https://teamon.me/2015/8-qualities-of-great-technical-leader/</link>
      <pubDate>Tue, 08 Sep 2015 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2015/8-qualities-of-great-technical-leader/</guid>
      <description>As the development team working on a particular project grows, there becomes a need to divide the duties and responsibilities amongst all team members. After a few years of testing different options, we went with the Technical Leader approach and we are pretty confident with the role definition.
In contrast to the Senior/Regular/Junior classification, senior and intermediate developers can posses the role of Tech Lead.
Below are the eight qualities that every Tech Lead should posses.</description>
    </item>
    
    <item>
      <title>Event sourcing on Rails with RabbitMQ</title>
      <link>https://teamon.me/2014/event-sourcing-on-rails-with-rabbitmq/</link>
      <pubDate>Tue, 17 Jun 2014 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2014/event-sourcing-on-rails-with-rabbitmq/</guid>
      <description>A year ago I wrote about one of our dashboard applications and how we solved performance issues using Faye delayed messaging (now available as gem!).
From the very beginning we started with Service Oriented Architecure, which turned out to be the best decision we ever made. Each application in the suite (there are 8 of them at the time of writing) is responsible for only one part of the business process.</description>
    </item>
    
    <item>
      <title>How to make Rails, Grape and Her work together (with caching!)</title>
      <link>https://teamon.me/2014/how-to-make-rails-grape-and-her-work-together-with-caching.html.markd/</link>
      <pubDate>Mon, 24 Mar 2014 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2014/how-to-make-rails-grape-and-her-work-together-with-caching.html.markd/</guid>
      <description>If you follow our series on building APIs with Grape and Rails, you already know how to create powerful versioned APIs in a simple and straightforward way as well as improve Grape’s abilities with a number of useful tricks.
Building an interface, however, is often just the first step. The real challenge begins when your application needs to rely on data from several different APIs. It’s particularly difficult when you build applications using the Service Oriented Architecture pattern, which demands a scalable way for the software to communicate between various components.</description>
    </item>
    
    <item>
      <title>Rails Assets</title>
      <link>https://teamon.me/talks/rails-assets-wroclove/</link>
      <pubDate>Sun, 16 Mar 2014 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/rails-assets-wroclove/</guid>
      <description>Video</description>
    </item>
    
    <item>
      <title>Introduction to building APIs with Grape</title>
      <link>https://teamon.me/2014/introduction-to-building-apis-with-grape.markd/</link>
      <pubDate>Wed, 15 Jan 2014 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2014/introduction-to-building-apis-with-grape.markd/</guid>
      <description>As we at Monterail are no longer just a Rails shop, our projects have grown in size presenting us with an array of new challenges. All the Single Page Applications we code need reliable APIs versioning to work properly. Some of the bigger apps that we manage, built with Service Oriented Architecture pattern, demand a scalable way for our software to communicate between various components.
New challenges demand new solutions — we’d like to share one with you that has worked well for us.</description>
    </item>
    
    <item>
      <title>Angular.js replacements for jQuery-based libraries</title>
      <link>https://teamon.me/talks/angular-replacements-for-jquery/</link>
      <pubDate>Wed, 08 Jan 2014 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/angular-replacements-for-jquery/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>Rails Assets introduction</title>
      <link>https://teamon.me/talks/rails-assets-introduction-lrug/</link>
      <pubDate>Mon, 09 Dec 2013 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/rails-assets-introduction-lrug/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>Robust dashboard application with Faye</title>
      <link>https://teamon.me/2013/robust-dashboard-application-with-faye.markd/</link>
      <pubDate>Mon, 11 Feb 2013 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2013/robust-dashboard-application-with-faye.markd/</guid>
      <description>There’s a dashboard in one of our applications that shows data from various external services. The more data we were adding to this dashboard, the worse its performance and user experience was getting until the site eventually became unusable. It got to the point where its user had to wait 10 seconds or even more for the content to show up. Unfortunately, caching didn’t help much.
Here’s the story of what we did to reduce the load time.</description>
    </item>
    
    <item>
      <title>Introduction to Angular.js</title>
      <link>https://teamon.me/talks/angular-introduction/</link>
      <pubDate>Mon, 28 Jan 2013 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/angular-introduction/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>Scala DSL tutorial - writing a web framework router</title>
      <link>https://teamon.me/2012/scala-dsl-tutorial-writing-web-framework-router.markd/</link>
      <pubDate>Wed, 09 May 2012 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2012/scala-dsl-tutorial-writing-web-framework-router.markd/</guid>
      <description>Goal Recently released Play 2.0 framework brings new way of creating web services to Java community. It&amp;rsquo;s nice and fun, but I dislike few components. One of them is the router with its custom routes definitions file, separate compiler and weird logic. As a Ruby developer I started wondering if it could be implemented in Scala as simple DSL. The requirements were quite simple:
statically compiled statically typed easy to use extensible it should provide (again, statically typed) reverse router use type inference as much as possible do not use much parentheses Design So basically, what is a router?</description>
    </item>
    
    <item>
      <title>Scala for Ruby programmers</title>
      <link>https://teamon.me/talks/scala-for-ruby-programmers/</link>
      <pubDate>Mon, 15 Aug 2011 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/talks/scala-for-ruby-programmers/</guid>
      <description> </description>
    </item>
    
    <item>
      <title>Rails timeline_fu and workflow integration</title>
      <link>https://teamon.me/2011/rails-timeline-fu-workflow-integration/</link>
      <pubDate>Mon, 18 Apr 2011 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2011/rails-timeline-fu-workflow-integration/</guid>
      <description>Quick tip on how to integrate timeline_fu and workflow callbacks.
class MyModel &amp;lt; ActiveRecord::Base include Workflow workflow do state :foo do event :barrize, :transitions_to =&amp;gt; :bar end state :bar end # This few lines below provides integration between timeline_fu and workflow workflow_spec.state_names.each do |state| define_model_callbacks :&amp;#34;#{state}_entry&amp;#34; define_model_callbacks :&amp;#34;#{state}_exit&amp;#34; define_method(:&amp;#34;on_#{state}_entry&amp;#34;) {|*args| run_callbacks(:&amp;#34;#{state}_entry&amp;#34;) } define_method(:&amp;#34;on_#{state}_exit&amp;#34;) {|*args| run_callbacks(:&amp;#34;#{state}_exit&amp;#34;) } end # For example for states :foo and :bar it allows to setup timeline_fu event like: fires :model_entered_foo, :on =&amp;gt; :foo_entry fires :model_entered_bar, :on =&amp;gt; :bar_entry fires :model_exited_foo, :on =&amp;gt; :foo_exit fires :model_exited_foo, :on =&amp;gt; :bar_exit end </description>
    </item>
    
    <item>
      <title>Rails 3 remote update form</title>
      <link>https://teamon.me/2010/rails-3-remote-update-form/</link>
      <pubDate>Tue, 17 Aug 2010 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2010/rails-3-remote-update-form/</guid>
      <description>Rails 3 brings some nice unobstrusive javascript. This very short tutorial will show how to make simple yet powerful ajax update form.
First, grab jquery-ujs file (or gem). Next, create some model and REST controller.
Controller needs a small change: class FooController &amp;lt; ApplicationController def update @foo = Foo.find(params[:id]) if @foo.update_attributes(params[:foo]) render :json =&amp;gt; &amp;#34;Foo successfully updated&amp;#34; else render :json =&amp;gt; @foo.errors, :status =&amp;gt; 406 end end end Thats pretty self explaining: when object is valid send notice message, else send errors as json array.</description>
    </item>
    
    <item>
      <title>Better (scoped) rails engines routing</title>
      <link>https://teamon.me/2010/better-scoped-rails-engines-routing/</link>
      <pubDate>Tue, 03 Aug 2010 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2010/better-scoped-rails-engines-routing/</guid>
      <description>Rails engines are really great, but they are missing one thing - putting in router scope. Fortunately, this can be easily fixed.
Instead of engine&amp;rsquo;s config/routes.rb file put all router stuff in lib/engine.rb like that:
# my_engine/lib/engine.rb require &amp;#34;my_engine&amp;#34; require &amp;#34;rails&amp;#34; module MyEngine class Engine &amp;lt; Rails::Engine end module Routes def self.draw(map) map.instance_exec do match &amp;#34;/my_engine&amp;#34;, :to =&amp;gt; &amp;#34;my_engine#foo&amp;#34; end end end end # my_app/config/routes.rb MyApp::Application.routes.draw do MyEngine::Routes.draw(self) end # $ rake routes my_engine /my_engine {:controller=&amp;gt;&amp;#34;my_engine&amp;#34;, :action=&amp;gt;&amp;#34;foo&amp;#34;} And now it is possible to add scope:</description>
    </item>
    
    <item>
      <title>Webapp testing with Webrat and [your language]</title>
      <link>https://teamon.me/2010/webapp-testing-with-webrat-and-your-language/</link>
      <pubDate>Thu, 04 Feb 2010 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2010/webapp-testing-with-webrat-and-your-language/</guid>
      <description>Webrat was written mainly to improve Rails&amp;rsquo; web applications testing. But what if webapp is written in something else? The answer is simple - webrat!
Requirements: Ruby
Installation: gem install mechanize webrat Done.
Now create file test.rb and put in there:
require &amp;#34;webrat&amp;#34; # configuration Webrat.configure do |config| config.mode = :mechanize end class MechanizeWorld &amp;lt; Webrat::MechanizeAdapter include Webrat::Matchers include Webrat::Methods Webrat::Methods.delegate_to_session :response_code, :response_body end Spec::Runner.configure do |config| include Webrat::Methods end # Tests start here describe &amp;#34;Awesome system&amp;#34; do it &amp;#34;should work&amp;#34; do visit &amp;#34;http://0.</description>
    </item>
    
    <item>
      <title>Merb &#43; db4o</title>
      <link>https://teamon.me/2009/merb-db4o/</link>
      <pubDate>Wed, 29 Jul 2009 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2009/merb-db4o/</guid>
      <description>Mini tutorial o tym jak skorzystać z obiektowej bazy db4o w merbie - takie małe proof of concept.
Wymagania &amp;amp; instalacja JRuby - Przykład instalacji można znaleźć na przykład w jednym z poprzednich postów db4o - .jar dostępny razem z rdb4o merb - gem install merb-core rdb4o git clone git://github.com/teamon/rdb4o.git cd rdb4o rake install merbrdb4o git clone git://github.com/teamon/merb_rdb4o.git cd merb_rdb4o rake jruby:install Aplikacja 1. Wygenerowanie szkieletu aplikacji (core zamiast app - nie chcemy DataMapperowego syfu :P) merb-gen core awesome cd awesome 2.</description>
    </item>
    
    <item>
      <title>Ruby - bound/unbound method, inherited, included, extended</title>
      <link>https://teamon.me/2009/ruby-bound-unbound-method-inherited-included-extended/</link>
      <pubDate>Wed, 03 Jun 2009 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2009/ruby-bound-unbound-method-inherited-included-extended/</guid>
      <description>Bound i unbound method Ruby pozwala na &amp;ldquo;wyciągnięcie&amp;rdquo; pojedynczej metody z obiektu w postaci obiektu Method, który można później wywołać. Ruby dostarcza dwa rodzaje metod - Method oraz UnboundMethod. Podstawową różnicą między tymi dwoma jest to, że Method możemy wywołać, a UnboundMethod nie. Spowodowane jest to tym, iż obiekt UnboundMethod nie ma zadeklarowanego odbiorcy metody. Obiekt UnboundMethod można oczywiście &amp;ldquo;przypiąć&amp;rdquo; do odpowiedniego obiektu, ale o tym za chwilę.
Na początek prosty przykład.</description>
    </item>
    
    <item>
      <title>Ruby - ! poprzez method_missing</title>
      <link>https://teamon.me/2009/ruby-method-missing/</link>
      <pubDate>Thu, 07 May 2009 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2009/ruby-method-missing/</guid>
      <description>Dla tych co nie wiedzą co to method_missing i co chodzi z ! polecam posty na blogu radarka: Ruby a metody z &amp;lsquo;?&amp;rsquo; i &amp;lsquo;!&amp;rsquo; w nazwie oraz method_missing w Rubym - nie pomiń niczego!.
Załóżmy, że piszemy bibliotekę dodającą sporo metod do klasy String i chcielibyśmy, żeby każda metoda miała swój odpowiednik zakończony !.
Można to zrobić w taki sposób:
class String def plural self !~ /s$/ ? self + &amp;#34;s&amp;#34; : self # tylko dla przykładu end def plural!</description>
    </item>
    
    <item>
      <title>JRuby &#43; Merb &#43; Sequel</title>
      <link>https://teamon.me/2009/jruby-merb-sequel/</link>
      <pubDate>Wed, 01 Apr 2009 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2009/jruby-merb-sequel/</guid>
      <description>Ktoś pewnie stwierdzi &amp;ldquo;kolejny post o Merbie, bezsensu za chwile i tak się połączy z Rails&amp;rdquo;. Kiedy to nastąpi to jeszcze nie wiadomo, poza tym Merb aż tak szybko nie zniknie a migracja na Rails3 ma być w miare bezbolesna. Ale ja nie o tym. DataMapper mnie ostatnio wkurzył, co chwile coś się wywala, coś nie działa. Doszedłem do wniosku, że mam dość. Wybór padł na Sequela. A skoro Sequel działa pod JRuby (w przeciwieństwie do DataMapper) to dlaczego by nie pobawić się też z Javową implementacją Ruby.</description>
    </item>
    
    <item>
      <title>Datamapper: asocjajcje polimorficzne (i nie tylko)</title>
      <link>https://teamon.me/2009/datamapper-asocjacje-polimorficzne/</link>
      <pubDate>Wed, 04 Mar 2009 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2009/datamapper-asocjacje-polimorficzne/</guid>
      <description>Większości znających Ruby on Rails temat &amp;ldquo;Polymorphic Associations&amp;rdquo; nie jest zapewne obcy ( z wiki railsów nie działa). W skrócie chodzi o relacje odnoszącą się do obiektów z różnych klas. (Nie umiem tłumaczyć, ale skoro nadal to czytasz to pewnie wiesz o.c.b.)
Przejdźmy do konkretów. O ile w ActiveRecord wystarczy dodac :polymorphic =&amp;gt; true to w api Datamappera nie znalazłem takie opcji. Jednak nic nie stoi na przeszkodzie aby napisać to samemu.</description>
    </item>
    
    <item>
      <title>Merb: cucumber &#43; webrat, czyli wszystko o testowaniu</title>
      <link>https://teamon.me/2008/merb-cucumber-webrat/</link>
      <pubDate>Tue, 02 Dec 2008 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2008/merb-cucumber-webrat/</guid>
      <description>Tym razem będzie o testowaniu aplikacji napisanej w Merbie. Większość pewnie zna framework testujący RSpec. Razem z RSpecem dostępny jest Story Runner. Jednak jak można wyczytać na stronie projektu:
RSpec’s Story Runner is now deprecated and will be extracted out to a separate gem soon. For more info on cucumber, see http://github.com/aslakhellesoy/cucumber/wikis I to właśnie wspomnianego ogórka opisze.
Cucumber podobnie jak RSpec Story Runner służy do testowania (i dokumentacji) aplikacji za pomocą czytelnych dla każdego scenariuszy zapisanych w formie zwykłego tekstu.</description>
    </item>
    
    <item>
      <title>Merb: flash</title>
      <link>https://teamon.me/2008/merb-flash/</link>
      <pubDate>Fri, 31 Oct 2008 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2008/merb-flash/</guid>
      <description>UPDATE: Zamiast calej zabawy - plugin merb-flash :)
Kontynuując serię o sztuczkach w Merbie tym razem przedstawię coś, czego najbardziej mi zabrakło - railsowego flasha.
Twórcy Merba zrezygnowali z takiego rozwiązania, i postawili na dodatkowy parametr _message przekazywany w url jako zakodowany ciąg znaków.
redirect resource(@product), :message =&amp;gt; &amp;#34;Product was successfully created&amp;#34; Jednak według mnie to rozwiązanie jest po prostu brzydkie. Podpatrując nieco z pluginu merb_has_flash zamieniłem ów :message na wersję wykorzystującą sesje bez zmieniania API.</description>
    </item>
    
    <item>
      <title>Merb: kolorowy logger</title>
      <link>https://teamon.me/2008/merb-kolorowy-logger/</link>
      <pubDate>Fri, 31 Oct 2008 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2008/merb-kolorowy-logger/</guid>
      <description>Merb wczoraj został wypuszczony na świat w wersji RC4. Z tej okazji* rozpoczynam cykl kilku postów z przydatnymi sztuczkami związanymi z tym właśnie frameworkiem. Na pierwszy ogień idzie kolorowanie wiadomości z merbowego loggera.
Merb.logger jak sama nazwa służy do logowania informacji. Jakich i gdzie zależy od ustawień dla danego środowiska (config/environments/*.rb). Pliki konfiguracyjne merba są proste, czytelne i opatrzone komentarzem, więc nie ma sensu ich opisywać. Istotne natomiast jest to, że czasami łatwo się w logach pogubić, szczególnie podczas pracy nad projektem.</description>
    </item>
    
    <item>
      <title>Merb: rake stats</title>
      <link>https://teamon.me/2008/merb-rake-stats/</link>
      <pubDate>Fri, 01 Aug 2008 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2008/merb-rake-stats/</guid>
      <description>Dzisiaj bez komentarza.
# lib/tasks/stats.rake desc &amp;#34;LOC statistic&amp;#34; task :stats do STATISTICS_DIRS = { :controllers =&amp;gt; &amp;#39;app/controllers&amp;#39;, :helpers =&amp;gt; &amp;#39;app/helpers&amp;#39;, :models =&amp;gt; &amp;#39;app/models&amp;#39;, :lib =&amp;gt; &amp;#39;lib&amp;#39;, :spec =&amp;gt; &amp;#39;spec&amp;#39; } EMPTY_STATS = { :lines =&amp;gt; 0, :loc =&amp;gt; 0, :classes =&amp;gt; 0, :modules =&amp;gt; 0, :methods =&amp;gt; 0 } def show_line(name, stats, color = nil) ce = color ? &amp;#34;\033[0m&amp;#34; : &amp;#34;&amp;#34; puts &amp;#34;| #{color}#{name.to_s.capitalize.ljust(20)}#{ce} &amp;#34; + &amp;#34;| #{color}#{stats[:lines].to_s.rjust(7)}#{ce} &amp;#34; + &amp;#34;| #{color}#{stats[:loc].</description>
    </item>
    
    <item>
      <title>Merb: fixtures</title>
      <link>https://teamon.me/2008/merb-fixtures/</link>
      <pubDate>Wed, 30 Jul 2008 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2008/merb-fixtures/</guid>
      <description>Ostatnio szukałem jakiegoś dobrego narzędzia do fixtures (nie mam pojęcia jak to można po polsku nazwa) w Merbie i znalazłem projekt na githubie merb-fixtures. Niestety okazało się, że sprawia pewne problemy w szczególności z dm-is-nested_set z paczki dm-more DataMappera. Jednak postanowiłem się nie poddawać i korzystając z kodu merb-fixtures napisać coś własnego.
Cała zawartość pliku fixtures.rb prezentuje się tak:
module Fixtures class Manager class &amp;lt;&amp;lt; self def init @@fixtures = {} end def load Merb.</description>
    </item>
    
    <item>
      <title>Prostsze formularze w Ruby on Rails</title>
      <link>https://teamon.me/2008/prostsze-formularze-ruby-on-rails/</link>
      <pubDate>Wed, 16 Jul 2008 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/2008/prostsze-formularze-ruby-on-rails/</guid>
      <description>Zawsze irytowało mnie pisanie formularzy. Ciągłe powtarzanie kodu w stylu:
&amp;lt;p&amp;gt; &amp;lt;%= f.label :field %&amp;gt; &amp;lt;%= f.text_field :field %&amp;gt; &amp;lt;/p&amp;gt; wydało mi się nieco bezsensowne. Na szczęście jest na to rozwiązanie. Helper form_for posiada parametr :builder który pozwala na ustawienie własnego FormBuildera - klasy obsługującej &amp;ldquo;budowanie&amp;rdquo; pól formularza.
Mój wymarzony formularz wygląda teraz mniej więcej tak:
&amp;lt;% standard_form_for @user do |f| -%&amp;gt; &amp;lt;%= errors_for :user %&amp;gt; &amp;lt;% f.fieldset do %&amp;gt; &amp;lt;%= f.</description>
    </item>
    
    <item>
      <title>About</title>
      <link>https://teamon.me/about/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/about/</guid>
      <description>Engineer 2022–now: Bitfreighter, Senior Software Engineer (Elixir) 2021–2022: Upside Financing, Senior Software Engineer (Elixir) 2019–2021: Cabify, Principal Software Engineer (Go, Infrastructure) 2017–2019: Cabify, Software Engineer (Elixir, Infrastructure) 2016–2017: Recruitee, Software Engineer (Ruby, Elixir, Infrastructure) 2013–2016: Monterail, CTO (Everything) 2011–2013: Monterail, Software Engineer (Ruby) Enterpreneur 2025–now: Teampath - Track real work across tools, Co-founder 2021–2022: MoonHome - Remote Development Environments, Founder 2020–now: ubots - Apps for Slack, Co-founder 2019–2024: JAMA Music Studio, Co-founder Student 2009-2012 Politechnika Wrocławska, Bachelor of Science, Computer Science Human </description>
    </item>
    
    <item>
      <title>Code</title>
      <link>https://teamon.me/code/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/code/</guid>
      <description>Open source projects tesla - Middleware-based Elixir HTTP client mix_docker - Put your Elixir app inside docker rails-assets.org - The solution to managing assets in Rails sickle - Ruby library for building complex CLI tools redis-browser - Redis Database Browser play-navigator - Better router for Play Framework 2.x play-scalaz - Scalaz integration for Play 2.x optparse - Scala CLI parser based on shapeless plan-pwr.pl - Schedule generator for PWR More at my GitHub</description>
    </item>
    
    <item>
      <title>Improved Phoenix application directory structure</title>
      <link>https://teamon.me/howto/improved-directory-structure/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/howto/improved-directory-structure/</guid>
      <description>What is this about? Newly generated Phoenix (v1.7) applications come with a lib directory that is split into two subdirectories:
myapp for application code myapp_web for web code (HTTP endpoint, router, controller, views, etc.) It looks like this:
myapp ├── application.ex ├── mailer.ex └── repo.ex myapp_web ├── components ├── controllers ├── endpoint.ex ├── gettext.ex ├── router.ex └── telemetry.ex When the application grows and more and more modules are added you might end up with a long list of files in the lib/myapp directory that looks similar to this:</description>
    </item>
    
    <item>
      <title>Overriding configuration with local files</title>
      <link>https://teamon.me/howto/config-files/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/howto/config-files/</guid>
      <description>What is this about? The default configuration files for new Phoenix projects looks like this:
config ├── config.exs ├── dev.exs ├── prod.exs ├── runtime.exs └── test.exs While this is all good there is still room for improvement especially for local development or testing.
How to? First of all, while we should never put production secrets in our code repository, after years of working with different approaches I&amp;rsquo;ve come to the conclusion that it&amp;rsquo;s fine to put development secrets directly in the config/dev.</description>
    </item>
    
    <item>
      <title>Run code on application startup</title>
      <link>https://teamon.me/howto/run-code-on-startup/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/howto/run-code-on-startup/</guid>
      <description>What is this about? When buliding Elixir applications we often need to run some code on application startup. For example, we may want to run database migrations, attach telemetry handlers, or perform some additional checks.
Is it usually most useful to perform these actions before you start the HTTP Endpoint and the application starts accepting requests. This will allow the deployment system (or load balancer) to check that the application is healthy before sending traffic to it.</description>
    </item>
    
    <item>
      <title>Useful custom Ecto Repo functions</title>
      <link>https://teamon.me/howto/ecto-repo-functions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://teamon.me/howto/ecto-repo-functions/</guid>
      <description>What is this about? There are few functions that I end up adding to every single Elixir project I work on. They are not included in Ecto by default but I find them very useful.
fetch/2 and fetch_by/3 are similar to get/3 and get_by/3 but they return {:ok, record} or {:error, :not_found} which makes pattern matching easier.
count/2 is just a shortcut for aggregate/3 (I can never remember the syntax for aggregate/3).</description>
    </item>
    
  </channel>
</rss>
