Skip to content

Instantly share code, notes, and snippets.

@kiko
kiko / build
Last active August 29, 2015 14:22
<snip>
=> autossh-1.4e_1: running pre-install hook: 00-lib32 ...
=> autossh-1.4e_1: running pre-install hook: 02-script-wrapper ...
=> autossh-1.4e_1: running do_install ...
mkdir -p -m 755 /usr/bin
mkdir -p -m 755 /usr/share/doc/autossh
mkdir -p -m 755 /usr/share/examples/autossh
mkdir -p -m 755 /usr/man/man1
cp autossh /usr/bin
--- a/app-template/_attachments/index.html
+++ b/app-template/_attachments/index.html
@@ -16,7 +16,7 @@
var dbname = document.location.href.split('/')[3];
var design = unescape(document.location.href).split('/')[5];
var DB = $.couch.db(dbname);
- DB.view(design+"/example",{success: function(json) {
+ DB.view(design+"/example",{group: true, success: function(json) {
$("#view").html(json.rows.map(function(row) {
return '<li>'+row.key+'</li>';
> ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
> cat validate_test.rb
require 'not_naughty'
Person = Struct.new(:name) do
extend NotNaughty
validates(:name) { presence and length :minimum => 4 }
end
require 'innate'
class Main
Innate.node '/'
def index
render_template('hi.erb')
end
end
require 'innate'
class Main
Innate.node '/'
def index
render_template('title')
end
def title
--- a/lib/innate/helper/partial.rb
+++ b/lib/innate/helper/partial.rb
@@ -72,15 +72,15 @@ module Innate
ext = File.extname(path)
basename = File.basename(path, ext)
- ext = ext[1..-1]
-
+ ext = ext[1..-1] || action.node.provide[action.wish].to_s
+
index a0bb57b..8fd9de9 100644
--- a/lib/ramaze/controller.rb
+++ b/lib/ramaze/controller.rb
@@ -14,7 +14,7 @@ module Ramaze
def self.inherited(into)
Innate::Node.included(into)
- into.engine(:Nagoro) if LIST.empty?
+ into.provide(:html => :nagoro) if LIST.empty?
LIST << into
diff --git a/model/page.rb b/model/page.rb
index f31c90c..0609aa0 100644
--- a/model/page.rb
+++ b/model/page.rb
@@ -96,6 +96,7 @@ class Page
File.open(file, 'w+'){|i|
i.puts content.gsub(/\r\n|\r/, "\n")
}
+ G.add(File.join(language, "#{@name}#{EXT}")) unless @revision
message = G.better_commit(comment, :files => [repo_file], :author => author)
require 'ramaze'
class TestController < Ramaze::Controller
provide :html => :haml
def index
%(= render_template('foo', {:bar => {:a => 1, :b => 2}}))
end
def foo
> rake
(in /home/kiko/projects/testing/abs/subtle-hg/src/subtle-build)
CC build/shared.wm.o
CC build/array.o
CC build/client.o
CC build/display.o
CC build/event.o
CC build/ewmh.o
CC build/grab.o
CC build/panel.o