• Stars
    star
    233
  • Rank 172,230 (Top 4 %)
  • Language
    Ruby
  • Created about 15 years ago
  • Updated almost 15 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use any HTML template as a theme generator for your Rails app.

Install any HTML theme/template into your Rails app¶ ↑

DESCRIPTION:¶ ↑

Use any HTML template as a theme generator for your Rails app.

Installs an HTML template, and its CSS, JavaScript and image assets into your Rails app, ready to go in an instant.

You just tell it which DOM elements are special, e.g. where to put the <%= yield %>, load your app in the browser and see the theme in action.

USAGE:¶ ↑

Simple case:

install_theme path/to/rails_app path/to/template content_path

Replace some DOM content with <%= yield :some_label %> with –partial:

install_theme path/to/rails_app path/to/template #content_box \
  --partial "header:#header h2 text()" \
  --partial sidebar:#sidebar"

NOTE: The order of the first two arguments has been reversed since the original public release. This is in preparation for path/to/template to be optional.

NOTE: The default behaviour of the css/xpath selectors has/is changing. Originally it replaced the internal content of the selected DOM node. Now, the default is to replace the entire DOM node. To replace the internal content of the DOM node use ‘/text()` (for xpath) or `:text` (for CSS paths) at the end of the selector.

For example, for CSS paths:

--partial ".header h2:text" # replaces contents of the h2 element
--partial ".header h2"        # replaces the h2 element itself

For Xpaths:

--partial "//div[@id='header']/h2/text()" # replaces contents of the h2 element
--partial "//div[@id='header']/h2"        # replaces the h2 element itself

The same goes for the content_path argument of the executable.

Similarly, in 0.7.0 the content_path argument is optional after the first time you install a specific theme (see ‘Theme Reuse’ section).

Haml Support:¶ ↑

If your application has Haml installed, the template/theme is automatically converted to Haml, and the css files converted to Sass.

Alternately, you can pass the flag –haml to force it.

Or pass the flag –erb to force erb template generation.

Theme Reuse:¶ ↑

Once you have installed a theme into an application once, that theme remembers the content path and partials you selected. You won’t have to type them again.

That is, after running the ‘install_theme` command above, you could apply the same theme to another Rails app using just:

install_theme path/to/app path/to/another_rails_app

The defaults for each theme are stored in a file ‘install_theme.yml`.

INSTALL:¶ ↑

install_theme is distributed as a RubyGem, which installs the command line app automatically:

sudo gem install install_theme
install_theme -h

AUTHOR:¶ ↑

Dr Nic Williams (drnicwilliams.com)

LICENSE:¶ ↑

(The MIT License)

Copyright © 2009 Dr Nic Williams, Mocra mocra.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

ruby-on-rails-tmbundle

Ruby on Rails TextMate bundle [Learn it with PeepCode - http://peepcode.com/products/textmate-for-rails-2]
Ruby
893
star
2

github-tmbundle

TextMate bundle for working with GitHub
Ruby
229
star
3

appscrolls

The App Scrolls is a magical tool to generate new Rails apps and modify existing Rails applications (coming) to include your favourite, powerful magic.
Ruby
218
star
4

copy-as-rtf-tmbundle

Copy as RTF - a TextMate bundle to make copying syntax highlighted text into Keynote, etc easy peasy
Ruby
210
star
5

ruby-tmbundle

Ruby TextMate bundle
Ruby
161
star
6

choctop

Build and deploy tools for Cocoa apps using Sparkle for distributions and upgrades; it’s like Hoe but for Cocoa apps.
Ruby
155
star
7

javascript-node.tmbundle

TextMate bundle for node.js
133
star
8

newgem

New Gem Generator for RubyGems
Ruby
122
star
9

searchcraft

Instant Search for Rails and ActiveRecord using SQL materialized views
Ruby
107
star
10

groq-ruby

Groq Cloud runs LLM models fast and cheap. This is a convenience client library for Ruby.
Ruby
106
star
11

github-badges

GitHub Blog Badges for Everyone
JavaScript
104
star
12

tabtab

Create and install double-tab (‘tab tab’) auto-completions for any command-line application on any shell (bash, fish, ksh, etc)
Ruby
90
star
13

ruby-shoulda-tmbundle

TextMate bundle for Ruby Shoulda gem/Rails plugin
Ruby
88
star
14

rbiphonetest

Want to write iPhone apps with unit tests? Want to write them in Ruby?
Ruby
82
star
15

rubigen

Generator framework for your own Ruby framework
Ruby
75
star
16

macruby-tmbundle

MacRuby TextMate bundle
Ruby
59
star
17

objective-c-iphone-tmbundle

TextMate bundle for Objective-C and iPhone SDK
Ruby
50
star
18

jsunittest

JavaScript Unit Test suite; no dependencies (but same API as prototypejs' unittest suite)
JavaScript
45
star
19

jekyll_generator

A nice generator for a Jekyll website including Disqus comments integration
Ruby
45
star
20

Bundler.tmbundle

TextMate bundle for managing Gemfiles and bundler's commands
Ruby
44
star
21

html-tmbundle

HTML TextMate bundle
Ruby
43
star
22

Handlebars.tmbundle

TextMate bundle for Handlebars (and some SproutCore integration)
42
star
23

railsapp-vagrant

Sample Rails3 project with Vagrantfile + cookbooks
Ruby
39
star
24

javascript-jquery-tmbundle

JavaScript jQuery.tmbundle
38
star
25

magic_model_generator

Imagine you get offered $5,000 to write a basic website/admin application on a legacy database that has 200 interconnected tables. You’ll need to add all the associations and validations based on the existing schema. Imagine how long that would take! 1 day? 1 week? more? Try 1 minute. The Magic Model Generator does all this for you automatically.
Ruby
38
star
26

merb-tmbundle

Merb bundle for TextMate (uses Ruby, Ruby on Rails, Datamapper and Sequel bundles as necessary)
Ruby
36
star
27

promptcraft

Try new system prompts on your AI conversations. Over and over until you're happy.
Ruby
36
star
28

magic_multi_connections

Ruby
28
star
29

consul-discovery

Go package is a service discovery client for Consul
Go
25
star
30

oss-8steps-app

Ruby
25
star
31

Chef.tmbundle

TextMate bundle for authoring Chef recipes
24
star
32

dr-nic-magic-models

Dr Nic Magic Models - Ultra-thin, invisible models for ActiveRecord
Ruby
24
star
33

ruby-machinist-tmbundle

TextMate bundle for Machinist
Ruby
23
star
34

newjs

newjs - create new JavaScript libraries
Ruby
21
star
35

Backbone.tmbundle

20
star
36

Showoff.tmbundle

TextMate bundle for the Showoff presentation tool
Ruby
18
star
37

hobo-tmbundle

TextMate bundle for Hobo
Ruby
18
star
38

datamapper-tmbundle

TextMate bundle for DataMapper ORM
18
star
39

ruby-saml-idp-rails3-example

Ruby
18
star
40

rubycocoa-tmbundle

TextMate bundle for RubyCocoa
Ruby
17
star
41

tweet-tail

Get the latest search results streaming to your console
Ruby
17
star
42

personal-rails-generators

A set of rails generators to be cloned into ~/.rails/generators
Ruby
17
star
43

ninja-search-js

Do long drop down lists make you want to send out an assassin and hunt down web developers? Then I have the ninja for you.
JavaScript
17
star
44

github-shields

GitHub Pull Request status badges/shields
Go
17
star
45

babygopher-site

Landing page for getting yourself the Baby Gopher badge for your first Golang projects
16
star
46

javascript-unittest-tmbundle

JavaScript Unit Test TextMate Bundle [for prototype's unittest.js library]
16
star
47

I18n.tmbundle

TextMate bundle when working with i18n library in Ruby projects
Ruby
15
star
48

hillegass-macruby

MacRuby implementations of Cocoa Programming for Mac OS X projects
Ruby
14
star
49

iphoneruby

RENAMED: see rbiphonetest project
Ruby
14
star
50

docker-registry-dockerfile

Dockerfile and an example config file to run the docker-registry in standalone mode
Shell
13
star
51

drnic_js_test_helpers

JavaScript helper libraries for unit testing
JavaScript
13
star
52

macruby-examples

Little sample MacRuby/HotCocoa apps to demonstrate (mostly to myself) some ideas in isolation
Ruby
12
star
53

pastie-packer

Pack a folder (or selection) of files into a pastie; and then unpack it back into raw files
Ruby
12
star
54

ruby-state-machine-tmbundle

TextMate bundle for state_machine project
12
star
55

.dotfiles

Shell
11
star
56

ruby-c-extensions-tmbundle

TextMate bundle for developing C extensions for Ruby
11
star
57

google-gears-mechanizations

This JavaScript project provides an ActiveRecord-esque API for the Google Gears SQLite database.
JavaScript
11
star
58

pivotal-tracker-tmbundle

JavaScript
11
star
59

Bats.tmbundle

10
star
60

html-script-src.tmbundle

Insert <script src=".."> for popular JavaScript libraries (via http://scriptsrc.net/)
10
star
61

airports-chatgpt-plugin

ChatGPT plugin that returns airport information in Australia, written in Ruby/Sinatra.
Ruby
9
star
62

instantrails

Ye Olde InstantRails - imported from SVN to remember the good times
9
star
63

readwritesettings

ReadWriteSettings is a simple configuration / settings solution that uses an ERB enabled YAML file
Ruby
9
star
64

picasa_plucker

Download images from any Google Picasa web album to your computer
Ruby
9
star
65

mydemoapp

Demo app generated by App Scrolls
Ruby
9
star
66

chef-hub

chef cookbook for hub
Ruby
9
star
67

todos-bulk-api-demo

bulk_api working for simple Todo app
Ruby
9
star
68

tranexp

Translate text between two languages using www.tranexp.com
Ruby
8
star
69

magic_metaclass

Explicit metaclasses for Ruby
Ruby
8
star
70

ruby-doctest-tmbundle

TextMate bundle for RubyDocTest project
Ruby
8
star
71

s3sync

project to gemify and update s3sync.rb
Ruby
7
star
72

gemsonrails

Gems On Rails; aka ‘vendor everything’
Ruby
7
star
73

comment_replies

Embedded 'reply' links in blog comments
JavaScript
7
star
74

highrise-greasemonkey

Greasemonkey/GreaseKit extensions for 37signal's Highrise
JavaScript
6
star
75

php-helloworld

PHP
6
star
76

tenderlove-live-streaming-demo

Ruby
6
star
77

Rails-Generators.tmbundle

Ruby
6
star
78

hobo-meeting-app

A sample Hobo app - similar to meetup.com
JavaScript
6
star
79

ruby-chatgpt-plugin-random-numbers

This Ruby/Sinatra app is a ChatGPT plugin that provides a random number.
Ruby
6
star
80

kubernetes-the-kubernetes-way

This tutorial walks you through setting up Kubernetes the way the Kubernetes documentation suggests you might like to do it. A continuation of Kelsey's KTHW tutorial.
Shell
6
star
81

rotate-concourse-credentials

If a friend accidentally leaks credentials used by Concourse CI then here are two scripts to rotate the credentials across all your pipelines
Shell
6
star
82

gitlabhq-boshrelease

Deploy GitlabHQ to a single or multiple VMs with BOSH
Shell
5
star
83

codex-tmbundle

TextMate bundle for Codex project
Ruby
5
star
84

etcd-service-buildpack

Shell
5
star
85

faa-nasr

Tools to fetch, convert and compare the FAA's NASR data files
Ruby
5
star
86

redis-counter-example

Tiny example app that talks to redis
Go
5
star
87

jessica

This Cocoa application demonstrates the integration of ChocTop to generate a Custom DMG (rake dmg) and Sparkle XMLs and remote upload (rake feed and rake upload)
Objective-C
5
star
88

sparkleology

Takes a Mac OS X application name that uses Sparkle for auto-updates, and returns information about that application's Sparkle RSS feed or the latest download URL for that Application.
Ruby
5
star
89

default-twitter-auth-app

JavaScript
4
star
90

gas-uuid-generator

UUID Generator for Google Sheets
TypeScript
4
star
91

ci_demo_app

Ruby
4
star
92

threaded-gtalk-gmscript

JavaScript
4
star
93

go-lvm-client

Client library for LVM commands for the Go language
Go
4
star
94

rubycocoa-cloned-apps

RubyCocoa demo apps cloned from Objective-C demo apps. See both src.
Objective-C
3
star
95

todo-rails3-mongodb

Simple todo-list written in Rails 3 and MongoDB modified to work with EY Cloud services
Ruby
3
star
96

oss-8steps.showoff

RailsConf Tutorial slides: The 8 steps to doing Open Source Software
Ruby
3
star
97

blinksale-greasemonkey

Greasemonkey/GreaseKit extensions for Blinksale
Ruby
3
star
98

drnic-presentations

Dr Nic's presentation slides
JavaScript
3
star
99

github_organizations_scraper

Scrape Github Organization member information.
Ruby
3
star
100

svruby-awards

Ruby
3
star