Okaeri Arie-sama
sayang:~ arie$ gem search haml && gem search haml --remote
*** LOCAL GEMS ***
haml (1.5.2)
An elegant, structured XHTML/XML templating engine. Comes with Sass,
a similar CSS templating engine.
*** REMOTE GEMS ***
Need to update 13 gems from http://gems.rubyforge.org
.............
complete
haml (1.7.0, 1.5.2, 1.5.1, 1.5.0, 1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0)
An elegant, structured XHTML/XML templating engine. Comes with Sass,
a similar CSS templating engine.
sayang:~ arie$ sudo gem update haml --rdoc --no-ri
Updating installed gems...
Need to update 13 gems from http://gems.rubyforge.org
.............
complete
Attempting remote update of haml
Successfully installed haml-1.7.0
Installing RDoc documentation for haml-1.7.0...
Gems: [haml] updated
sayang:~/2 arie$ rails forhaml --database=sqlite3 && haml --rails forhaml
--trace
&& cd fo
rhaml && script/about
[...]
create log/development.log
create log/test.log
Haml plugin added to forhaml
About your application's environment
Ruby version 1.8.6 (powerpc-darwin8.9.0)
RubyGems version 0.9.4
Rails version 1.2.3
Active Record version 1.15.3
Action Pack version 1.13.3
Action Web Service version 1.2.3
Action Mailer version 1.3.3
Active Support version 1.4.2
Application root /Users/arie/2/forhaml
Environment development
Database adapter sqlite3
sayang:~/2/forhaml arie$ script/generate model Book title:string
created_at:timestamp
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/book.rb
create test/unit/book_test.rb
create test/fixtures/books.yml
create db/migrate
create db/migrate/001_create_books.rb
sayang:~/2/forhaml arie$ cat db/migrate/001_create_books.rb
class CreateBooks < ActiveRecord::Migration
def self.up
create_table :books do |t|
t.column :title, :string
t.column :created_at, :timestamp
end
end
def self.down
drop_table :books
end
end
sayang:~/2/forhaml arie$ rake db:migrate --trace
(in /Users/arie/2/forhaml)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateBooks: migrating =====================================================
-- create_table(:books)
-> 0.0069s
== CreateBooks: migrated (0.0075s) ============================================
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
sayang:~/2/forhaml arie$ script/generate controller Demo index
exists app/controllers/
exists app/helpers/
create app/views/demo
exists test/functional/
create app/controllers/demo_controller.rb
create test/functional/demo_controller_test.rb
create app/helpers/demo_helper.rb
create app/views/demo/index.rhtml
sayang:~/2/forhaml arie$ script/runner 'puts Book.class'
Class
sayang:~/2/forhaml arie$ script/runner 'puts Book.count'
0
sayang:~/2/forhaml arie$ script/runner '%w(IdRubyHaml IdRubyTextile).each { |e|
Book.creat
e :title => e }; puts Book.count; puts Book.find(:all).to_yaml'
2
---
- !ruby/object:Book
attributes:
title: IdRubyHaml
id: "1"
created_at: 2007-07-09 19:15:44
- !ruby/object:Book
attributes:
title: IdRubyTextile
id: "2"
created_at: 2007-07-09 19:15:44
sayang:~/2/forhaml arie$ cat app/controllers/demo_controller.rb
class DemoController < ApplicationController
def index
@books = Book.find(:all)
end
end
sayang:~/2/forhaml arie$ cat app/views/demo/index.haml
%h1 Demo
%ol
= for i in @books
%li
= i.title
%li
= i.created_at.strftime("%x")
sayang:~/2/forhaml arie$ mongrel_rails start -d
sayang:~/2/forhaml arie$ ruby -r net/http -e 'Net::HTTP.get_print
URI.parse("http://localhost:3000/demo/")'
<h1>Demo</h1>
<ol>
<li>
IdRubyHaml
</li>
<li>
07/09/07
</li>
<li>
IdRubyTextile
</li>
<li>
07/09/07
</li>
#<Book:0x3519aac>#<Book:0x35199d0>
</ol>
sayang:~/2/forhaml arie$
-------- Original Message --------
Subject: [haml] Haml 1.7 - Now With Speed!
Date: Sat, 07 Jul 2007 14:52:50 -0700
From: Nathan Weizenbaum <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Haml 1.7 has been released!
In addition to various bugfixes and plenty of new features, Haml 1.7 is
now only 1.8 times slower than ERB. This is way down from 1.5, which was
3x slower. We've also introduced a new syntax for Sass attributes (the
more CSS-like "color: #f00" can now be used in addition to the old
":color #f00"), helpers for creating well-formatted HTML in helpers, and
plenty of other stuff. Check out the release notes at
http://haml.hamptoncatlin.com/release-notes!
- Nathan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml"
group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---
--
r9 = { nama: Arie, nick: ariekeren, ym!: riyari3,
blog: http://ariekusumaatmaja.wordpress.com,
myst: http://groups.yahoo.com/groups/id-ruby,
vilr: %Q~
function! WhitePearl()
perl << EOF
VIM::Msg("pearls are nice for necklaces");
VIM::Msg("rubys for rings");
VIM::Msg("pythons for bags");
VIM::Msg("tcls????");
EOF
endfunction
~ }