Skip to content

Commit

Permalink
Imported source
Browse files Browse the repository at this point in the history
  • Loading branch information
morgoth committed Apr 13, 2019
0 parents commit f2498da
Show file tree
Hide file tree
Showing 115 changed files with 12,635 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global

# Ignore bundler config
/.bundle

# Ignore the build directory
/build

# Ignore Sass' cache
/.sass-cache

/node_modules
/bower_components
/tmp
21 changes: 21 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
source "https://rubygems.org"

def darwin_only(require_as)
RbConfig::CONFIG["host_os"] =~ /darwin/ && require_as
end

def linux_only(require_as)
RbConfig::CONFIG["host_os"] =~ /linux/ && require_as
end

gem "builder"
gem "kramdown"
gem "middleman"
gem "middleman-blog", ">= 4.0.0"
gem "middleman-deploy", ">= 2.0.0.pre.alpha"
gem "middleman-sprockets", ">= 4.0.0"
gem "middleman-syntax"
gem "sass"

gem "rb-inotify", "~> 0.9", require: linux_only("rb-inotify")
gem "rb-fsevent", require: darwin_only("rb-fsevent")
139 changes: 139 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.0.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
backports (3.13.0)
builder (3.2.3)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.5)
contracts (0.13.0)
dotenv (2.7.2)
erubis (2.7.0)
execjs (2.7.0)
fast_blank (1.0.0)
fastimage (2.1.5)
ffi (1.10.0)
haml (5.0.4)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashie (3.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
kramdown (1.17.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.0)
middleman (4.3.3)
coffee-script (~> 2.2)
haml (>= 4.0.5)
kramdown (~> 1.2)
middleman-cli (= 4.3.3)
middleman-core (= 4.3.3)
middleman-blog (4.0.3)
addressable (~> 2.3)
middleman-core (>= 4.0.0)
tzinfo (>= 0.3.0)
middleman-cli (4.3.3)
thor (>= 0.17.0, < 2.0)
middleman-core (4.3.3)
activesupport (>= 4.2, < 5.1)
addressable (~> 2.3)
backports (~> 3.6)
bundler
contracts (~> 0.13.0)
dotenv
erubis
execjs (~> 2.0)
fast_blank
fastimage (~> 2.0)
hamster (~> 3.0)
hashie (~> 3.4)
i18n (~> 0.9.0)
listen (~> 3.0.0)
memoist (~> 0.14)
padrino-helpers (~> 0.13.0)
parallel
rack (>= 1.4.5, < 3)
sassc (~> 2.0)
servolux
tilt (~> 2.0.9)
uglifier (~> 3.0)
middleman-deploy (2.0.0.pre.alpha)
middleman-core (>= 3.2)
net-sftp
ptools
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
middleman-syntax (3.0.0)
middleman-core (>= 3.2)
rouge (~> 2.0)
minitest (5.11.3)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (5.2.0)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.13.3.4)
tilt (>= 1.4.1, < 3)
padrino-support (0.13.3.4)
activesupport (>= 3.1)
parallel (1.17.0)
ptools (1.3.5)
public_suffix (3.0.3)
rack (2.0.7)
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
rouge (2.2.1)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.0.1)
ffi (~> 1.9)
rake
servolux (0.13.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
temple (0.8.1)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)

PLATFORMS
ruby

DEPENDENCIES
builder
kramdown
middleman
middleman-blog (>= 4.0.0)
middleman-deploy (>= 2.0.0.pre.alpha)
middleman-sprockets (>= 4.0.0)
middleman-syntax
rb-fsevent
rb-inotify (~> 0.9)
sass

BUNDLED WITH
1.17.3
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Installation

```
bundle install
npm install -g bower
bower install
middleman server
```

## Deploying

```
middleman build
middleman deploy
```
10 changes: 10 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "cowbell-labs.com",
"version": "0.0.0",
"dependencies": {
"jquery": "~1.12.2",
"bootstrap-sass": "3.4.1",
"html5shiv": "~3.7.0",
"respond": "~1.4.2"
}
}
34 changes: 34 additions & 0 deletions config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
activate :automatic_image_sizes

set :css_dir, "stylesheets"
set :js_dir, "javascripts"
set :images_dir, "images"
set :images_dir, "assets"
set :markdown_engine, :kramdown
set :sass_assets_paths, ["#{root}/bower_components/bootstrap-sass/assets/stylesheets"]

activate :sprockets
sprockets.append_path "#{root}/bower_components"
sprockets.append_path "#{root}/bower_components/bootstrap-sass/assets/stylesheets"

configure :build do
activate :minify_css
activate :minify_javascript
end

activate :syntax

activate :deploy do |deploy|
deploy.deploy_method = :git
deploy.branch = "master"
end

activate :blog do |blog|
blog.permalink = ":year-:month-:day-:title.html"
blog.sources = "articles/:title.html"
blog.layout = "article_layout"
end

activate :asset_hash do |f|
f.ignore = ["stylesheets/wufoo.css"]
end
28 changes: 28 additions & 0 deletions data/people.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
- slug: "szymon-nowak"
name: "Szymon Nowak"
github: "szimek"
twitter: "szimek"
description: "<strong>Started working with Ruby on Rails back in&nbsp;2006</strong>. Later worked briefly at IBM, but quickly returned to Ruby and web development. Likes to experiment with cutting-edge web technologies."
- slug: "wojciech-wnetrzak"
name: "Wojciech Wnętrzak"
github: "morgoth"
twitter: "morgoth85"
url: "http://urizen.pl/"
description: "<strong>Has been programming web applications using Ruby on Rails since&nbsp;2008</strong>. Enjoys improving his logical thinking skills by playing contract bridge in a local league.<br><br>"
- slug: "tomasz-subik"
name: "Tomasz Subik"
github: "tsubik"
url: "http://tsubik.com/"
description: "<strong>Has been crafting web applications since&nbsp;2007.</strong> Used to work with .NET platform, switched over to the Rails stack but also enjoys building mobile apps using Cordova, JavaScript and Angular. Amateur ice hockey player."
- slug: "miroslaw-boruta"
name: "Mirosław Boruta"
twitter: "m1rk00"
github: "MBO"
url: "http://mirobor.pl/"
description: "<strong>Former Linux admin, turned into Ruby on Rails developer in 2009.</strong> Likes digging into other people's source code to understand how and why it works. Amateur photographer."
- slug: "maciej-jarczok"
name: "Maciej Jarczok"
github: "jmak"
twitter: "maciej_jarczok"
url: "http://larxon.com/"
description: "<strong>Vector and raster graphic expert, highly experienced in HTML5 and CSS3.</strong> Has been working in the Ruby environment for years. Huge fan of SASS, COMPASS, HAML and SMACSS for front-end development."
29 changes: 29 additions & 0 deletions data/projects.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- slug: "tiramizoo"
name: "tiramizoo"
url: "https://www.tiramizoo.com"
description: "German startup aiming to provide same-day local delivery services in Germany."

- slug: "nurph"
name: "Nurph"
url: "http://nurph.com/"
description: "Real-time discussion platform for Twitter community."

- slug: "cramlr"
name: "Cramlr"
url: "http://cramlr.com/"
description: "Flashcards application, part of <a href='http://www.tutoria.de'>Tutoria</a> - a&nbsp;German e-learning platform."

- slug: "socialguide"
name: "SocialGuide"
url: "http://www.socialguide.com/"
description: "Formerly Talkwit.TV. Identifies, captures and analyzes conversation on Twitter in real-time for almost every TV program aired in U.S."

- slug: "freeletics"
name: "Freeletics"
url: "http://www.freeletics.com/"
description: "Personalized high intensity trainings and training plans."

- slug: "sharedrop"
name: "ShareDrop"
url: "https://www.sharedrop.io/"
description: "Open source, peer to peer file sharing application. Lets you share files with others in the same local network."
1 change: 1 addition & 0 deletions data/sitemap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
url: http://cowbell-labs.com/
7 changes: 7 additions & 0 deletions data/testimonials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- text: "Szymon and Wojciech proved to be highly qualified software architects and developers, who can accurately advice the solution to challenging problems on all levels of project lifecycle."
signature: "Michael Loehr, tiramizoo CEO"
image: michael.jpg

- text: "Wojciech and Szymon implemented many tricky Nurph features over a period when the code-base was spread across numerous technologies and dependencies, including Redis, Node.js, and Rails."
signature: "Neil Cauldwell, Nurph"
image: neil.jpg
1 change: 1 addition & 0 deletions source/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Errordocument 404 /404.html
12 changes: 12 additions & 0 deletions source/404.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Cowbell Labs - Page Not Found
description: The requested page has not been found.
---

<section id="notfound">
<div class="container">
<h3 class="title">Page Not Found</h3>

<p>The requested page has not been found.</p>
</div>
</section>
1 change: 1 addition & 0 deletions source/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cowbell-labs.com
25 changes: 25 additions & 0 deletions source/articles.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Cowbell Labs - Ruby on Rails and JavaScript Development Experts
description: Cowbell Labs is a Ruby on Rails and JavaScript development agency that specializes in web and mobile applications.
---

<section id="articles">
<div class="container">
<h3 class="title">Articles</h3>

<ul>
<% blog.articles.each do |article| %>
<li>
<%= link_to article.title, article %>
<em class="text-muted">
&mdash;
published by <%= article.data.author %> on
<time datetime="<%= article.date.to_s %>">
<%= article.date.strftime("%B %d, %Y") %>
</time>
</em>
</li>
<% end %>
</ul>
</div>
</section>
44 changes: 44 additions & 0 deletions source/articles/active-model-errors-details.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: How to use ActiveModel errors details
date: 2015/01/22
description: How to use ActiveModel::Errors#details to return type of used validator in Rails
author: Wojciech Wnętrzak
tags: rails
hacker_news_id: 8928939
---

Rails just got a [new feature](https://github.com/rails/rails/commit/cb74473db68900d336844d840dda6e10dc03fde1) that allows for returning the type of a validator used on an invalid attribute.

~~~ ruby
class User < ActiveRecord::Base
validates :name, presence: true
end

user = User.new
user.valid?
user.errors.details
# => {name: [{error: :blank}]}
~~~

It will be useful in API applications, where you don't want to return translated error messages, but rather symbols that are then used by API clients to construct proper user notifications.

You can also pass additional options to provide a context for an error object:

~~~ ruby
class User < ActiveRecord::Base
validate :adulthood

def adulthood
errors.add(:age, :too_young, years_limit: 18) if age < 18
end
end

user = User.new(age: 15)
user.valid?
user.errors.details
# => {age: [{error: :too_young, years_limit: 18}]}
~~~

All built in validators populate details hash by default.

This feature will be available in Rails 5.0, but you don't have to wait for the release to start using it in your Rails 4.x application. All you have to do is install the [active_model-errors_details](https://github.com/cowbell/active_model-errors_details) gem which backports the feature.
Loading

0 comments on commit f2498da

Please sign in to comment.