This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using the default profile... | |
Feature: Discovering | |
Scenario: Visitors are enticed into reading a book # features/discovering.feature:3 | |
Given there is a book called "Redpoint" # features/step_definitions/discovering_steps.rb:1 | |
And an administrator has entered details about the concept # features/step_definitions/discovering_steps.rb:5 | |
When I visit the home page # features/step_definitions/discovering_steps.rb:10 | |
Frame number: 0/49 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= render partial:'countdown', locals: {book: @book} | |
- tile_order = !@book.tile_order.nil? ? @book.tile_order.split(',') : (0..@book.chapters_count).to_a | |
- binding.pry | |
.grid#b{:isotope => true} | |
.gutter-sizer | |
- tile_order.each do |i| | |
.item.col-2 | |
.item-wrapper | |
= render partial:'img_tile', locals: {:index => (i.to_i) - 1} | |
- if @book.slug == 'redpoint' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Delivered-To: walidvb@gmail.com | |
Received: by 10.182.93.133 with SMTP id cu5csp123251obb; | |
Tue, 24 Jun 2014 04:10:33 -0700 (PDT) | |
X-Received: by 10.224.55.83 with SMTP id t19mr513479qag.42.1403608233720; | |
Tue, 24 Jun 2014 04:10:33 -0700 (PDT) | |
Return-Path: <walid+caf_=walidvb=gmail.com@pigeonholepublishing.com> | |
Received: from mail-qc0-f177.google.com (mail-qc0-f177.google.com [209.85.216.177]) | |
by mx.google.com with ESMTPS id l65si26570923qge.91.2014.06.24.04.10.33 | |
for <walidvb@gmail.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search(hashtag) | |
@client = Twitter::REST::Client.new do |config| | |
config.consumer_key = ENV["TWITTER_CONSUMER_KEY"] | |
config.consumer_secret = ENV["TWITTER_CONSUMER_SECRET"] | |
config.access_token = ENV["TWITTER_ACCESS_TOKEN"] | |
config.access_token_secret = ENV["TWITTER_ACCESS_SECRET"] | |
end | |
@client.search(hashtag).attrs[:statuses] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<my-tumblr></my-tumblr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: Book is private | |
Given there is a published book | |
And the book is private | |
When I visit the book | |
Then I should be on the home page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if fetching /*, fetch /app/* | |
if ! request.referer is collinfontaine.ch | |
if ! (/drupal/user || /drupal/admin || drupal/node/*/edit) | |
rewrite /drupal to /app #to avoid people visiting the drupal site | |
if crawler | |
rewrite / to /drupal/home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Chapter < ActiveRecord::Base | |
has_attached_file :file, | |
:storage => :filesystem | |
def to_file | |
if Rails.env != "test" | |
#open(file.url) { |f| @content = f.read} | |
@content = file.copy_to_local_file.read | |
@filename = file_file_name | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Book | |
has_many chapters | |
accepts_nested_attributes_for :chapters, :allow_destroy => true | |
Chapter | |
belongs_to :book | |
has_one :storyboard | |
has_many :tiles, :through => :storyboard | |
accepts_nested_attributes_for :tiles, :allow_destroy => true | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----o-----master | |
\------o-------int | |
\--------------br1 | |
To: | |
-----o-----master | |
\--------------int |