4 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/unit/helpers/front_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class FrontHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/rapid/helper.rb:
--------------------------------------------------------------------------------
1 | module Hobo
2 | module Rapid
3 | module Helper
4 | # functions have moved to HoboRapidHelper
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/public/images/rails.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tslocke/hobo/HEAD/integration_tests/agility_bootstrap/public/images/rails.png
--------------------------------------------------------------------------------
/hobo_jquery_ui/taglibs/hobo_jquery_ui.dryml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | protect_from_forgery
3 | end
4 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/projects/new_for_owner.dryml:
--------------------------------------------------------------------------------
1 |
2 | asdfasdfsadf asdf
3 |
4 |
--------------------------------------------------------------------------------
/doc/manual/faq/88-conditional-validations.markdown:
--------------------------------------------------------------------------------
1 | # Conditional validations
2 |
3 | Originally written by jonas on 2010-11-18.
4 |
5 | Hobo supports conditional validations?
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/user_controller/USAGE:
--------------------------------------------------------------------------------
1 | USAGE:
2 | This generator is used by the user_resource generator to generate
3 | app/controllers/users_controller.rb
4 |
--------------------------------------------------------------------------------
/hobo_clean_admin/lib/hobo_clean_admin/railtie.rb:
--------------------------------------------------------------------------------
1 | require 'hobo_clean'
2 | require 'rails'
3 | module HoboCleanAdmin
4 | class Railtie < Rails::Railtie
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/hobo_clean_sidemenu/vendor/assets/images/100-ACD3E6-DBE1E5-H.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tslocke/hobo/HEAD/hobo_clean_sidemenu/vendor/assets/images/100-ACD3E6-DBE1E5-H.png
--------------------------------------------------------------------------------
/hobo_clean_sidemenu/vendor/assets/images/100-DBE1E5-FCFEF5-H.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tslocke/hobo/HEAD/hobo_clean_sidemenu/vendor/assets/images/100-DBE1E5-FCFEF5-H.png
--------------------------------------------------------------------------------
/hobo_clean_sidemenu/vendor/assets/images/300-3B5F87-ACD3E6-H.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tslocke/hobo/HEAD/hobo_clean_sidemenu/vendor/assets/images/300-3B5F87-ACD3E6-H.png
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/lists/lists.dryml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/hobo_support/Gemfile:
--------------------------------------------------------------------------------
1 | source "http://rubygems.org"
2 |
3 | gem 'rubydoctest', :git => 'git://github.com/bryanlarsen/rubydoctest.git'
4 |
5 | gemspec
6 |
7 | gem 'yard'
8 |
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/assets/images/rails.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tslocke/hobo/HEAD/integration_tests/agility_bootstrap/app/assets/images/rails.png
--------------------------------------------------------------------------------
/doc/manual/faq/6-how-do-you-make-a-multi.markdown:
--------------------------------------------------------------------------------
1 | # How do you make a multi-page form?
2 |
3 | Originally written by Tom on 2008-10-17.
4 |
5 | (reminder to myself to answer this)
--------------------------------------------------------------------------------
/hobo_clean_sidemenu/lib/hobo_clean_sidemenu/railtie.rb:
--------------------------------------------------------------------------------
1 | require 'hobo_clean'
2 | require 'rails'
3 | module HoboCleanSidemenu
4 | class Railtie < Rails::Railtie
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/hobo_fields/README.txt:
--------------------------------------------------------------------------------
1 | = HoboFields
2 |
3 | Rich field types and migration-generator for Rails.
4 |
5 | Part of the Hobo project
6 |
7 | http://hobocentral.net/hobo_fields
8 |
9 |
--------------------------------------------------------------------------------
/doc/manual/faq/2-how-do-you-start-a-new.markdown:
--------------------------------------------------------------------------------
1 | # How do you start a new app using edge Hobo?
2 |
3 | Originally written by Tom on 2008-10-17.
4 |
5 | (reminder to myself to answer this)
--------------------------------------------------------------------------------
/doc/manual/faq/40-hobo-facebooker.markdown:
--------------------------------------------------------------------------------
1 | # Hobo & Facebooker
2 |
3 | Originally written by atsyed on 2010-02-16.
4 |
5 | Anyone tried developing Facebook apps using Hobo and Facebooker?
--------------------------------------------------------------------------------
/doc/manual/faq/8-how-do-you-add-file-upload.markdown:
--------------------------------------------------------------------------------
1 | # How do you add file-upload to an app?
2 |
3 | Originally written by Tom on 2008-10-17.
4 |
5 | (reminder to myself to answer this)
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/subsite/templates/application.dryml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/subsite/templates/controller.rb.erb:
--------------------------------------------------------------------------------
1 | class <%= subsite_name %>::<%= subsite_name %>SiteController < ApplicationController
2 |
3 | hobo_controller
4 |
5 | end
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/user_model/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 |
3 | This generator is used by the user_resource generator to generate a
4 | user model file into app/models.
5 |
6 |
--------------------------------------------------------------------------------
/hobo_jquery/lib/hobo_jquery/railtie.rb:
--------------------------------------------------------------------------------
1 | require 'hobo_rapid'
2 | require 'hobo_jquery'
3 | require 'rails'
4 | module HoboJquery
5 | class Railtie < Rails::Railtie
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/controllers/bats_controller.rb:
--------------------------------------------------------------------------------
1 | class BatsController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/users/edit.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite3
2 |
3 | hobo/taglib-docs
4 |
5 | */pkg
6 |
7 | dryml/lib/doc
8 | dryml/tmp
9 | dryml/doc
10 | .yardoc
11 | .rvmrc
12 | Gemfile.lock
13 | .svn
14 |
15 | */*.gem
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/admin_subsite/templates/application.dryml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/controllers/foobazs_controller.rb:
--------------------------------------------------------------------------------
1 | class FoobazsController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/doc/manual/faq/51-how-do-i-improve-hobo-s.markdown:
--------------------------------------------------------------------------------
1 | # how do I improve Hobo's speed?
2 |
3 | Originally written by kevinpfromnm on 2010-08-04.
4 |
5 | reminder to add performance enhancement recipe
--------------------------------------------------------------------------------
/doc/tutorials/665-this-is-spam-it-should-be.markdown:
--------------------------------------------------------------------------------
1 | # This is spam. It should be invisible to non-administrators
2 |
3 | Originally written by Spam Test on 2011-12-26.
4 |
5 | *test*
6 |
7 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/assets/templates/application.dryml.erb:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/hobo_jquery_ui/lib/hobo_jquery_ui/railtie.rb:
--------------------------------------------------------------------------------
1 | require 'hobo_jquery'
2 | require 'hobo_jquery_ui'
3 | require 'rails'
4 | module HoboJqueryUi
5 | class Railtie < Rails::Railtie
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/hobo_jquery_ui/vendor/assets/javascripts/hobo_jquery_ui.js:
--------------------------------------------------------------------------------
1 | //= require_tree .
2 |
3 | // prevent conflict between jquery-ui and bootstrap
4 | $.widget.bridge('jqbutton', $.ui.button );
5 |
6 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/bats_controller.rb:
--------------------------------------------------------------------------------
1 | class BatsController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/users/edit.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/doc/manual/faq/101-hobo-copy-clone-dup-a-record.markdown:
--------------------------------------------------------------------------------
1 | # Hobo copy (clone / dup) a record
2 |
3 | Originally written by OmniBus on 2012-06-14.
4 |
5 | How to using Hobo to copy (clone / dup) a record?
--------------------------------------------------------------------------------
/doc/manual/faq/19-different-coloured-cards.markdown:
--------------------------------------------------------------------------------
1 | # Different coloured cards
2 |
3 | Originally written by robi on 2008-10-29.
4 |
5 | How do you make different coloured cards for different models?
--------------------------------------------------------------------------------
/doc/manual/faq/37-generating-rss-feed.markdown:
--------------------------------------------------------------------------------
1 | # Generating RSS Feed
2 |
3 | Originally written by raghu_mark on 2009-08-11.
4 |
5 | Hi, can someone post a recipe to Generate RSS feed for the cookbook?
--------------------------------------------------------------------------------
/dryml/TODO.txt:
--------------------------------------------------------------------------------
1 | - remove actionview requirement
2 | - get Hobo working
3 | - standalone generators
4 | - get it working in Sinatra
5 | - get it working in rtomayko/tilt
6 | - get it working in Rails3
7 |
--------------------------------------------------------------------------------
/hobo_support/lib/generators/plugin/templates/railtie.rb.erb:
--------------------------------------------------------------------------------
1 | require '<%= @filename %>'
2 | require 'rails'
3 |
4 | module <%= @module_name %>
5 | class Railtie < Rails::Railtie
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/foobazs_controller.rb:
--------------------------------------------------------------------------------
1 | class FoobazsController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/doc/manual/faq/real-websites.markdown:
--------------------------------------------------------------------------------
1 | # What real websites have been put together with Hobo?
2 |
3 | There's an old list here: http://hobocentral.net/gallery/. Please
4 | let us know of others!
5 |
6 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/resource.irt:
--------------------------------------------------------------------------------
1 | invoke 'hobo:resource' , %w(house alpha:string -q)
2 |
3 | eval_file '../partials/_house_controller_tests.rb'
4 |
5 | eval_file '../partials/_house_model_tests.rb'
6 |
--------------------------------------------------------------------------------
/integration_tests/agility/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Agility::Application
5 |
--------------------------------------------------------------------------------
/doc/manual/faq/48-does-hobo-work-with-x.markdown:
--------------------------------------------------------------------------------
1 | # Does Hobo work with x?
2 |
3 | Originally written by kevinpfromnm on 2010-08-04.
4 |
5 | jruby
6 | enterprise ruby
7 | passenger(mod_rails)
8 | rails plugin x
--------------------------------------------------------------------------------
/doc/manual/faq/75-how-can-i-add-markdown-previews.markdown:
--------------------------------------------------------------------------------
1 | # How can I add markdown previews to an edit box?
2 |
3 | Originally written by kevinpfromnm on 2010-08-22.
4 |
5 | Reminder to add recipe on markdown
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/foos/bug-305-test.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%# ,f,dec,s,tt,d,dt,tl,md,hh,bool1,bool2,es,v %>
6 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/controllers/bazs_controller.rb:
--------------------------------------------------------------------------------
1 | class BazsController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | autocomplete
6 |
7 | auto_actions :all
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the rails application
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the rails application
5 | Agility::Application.initialize!
6 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Agility::Application
5 |
--------------------------------------------------------------------------------
/integration_tests/agility/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle
2 | db/*.sqlite3
3 | log/*.log
4 | tmp/
5 | app/views/taglibs/auto/**/*
6 | config/hobo_routes.rb
7 | patches-master
8 | chromedriver.log
9 | public/system/projects/reports/**
--------------------------------------------------------------------------------
/integration_tests/agility/app/controllers/project_memberships_controller.rb:
--------------------------------------------------------------------------------
1 | class ProjectMembershipsController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :write_only
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/foos/bug-305-test.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%# ,f,dec,s,tt,d,dt,tl,md,hh,bool1,bool2,es,v %>
6 |
--------------------------------------------------------------------------------
/doc/manual/faq/4-how-do-you-disable-account-related.markdown:
--------------------------------------------------------------------------------
1 | # How do you disable account related features? (e.g. if using LDAP)
2 |
3 | Originally written by Tom on 2008-10-17.
4 |
5 | (place holder to myself to answer this)
--------------------------------------------------------------------------------
/doc/manual/faq/5-what-naming-conventions-should-be-followed.markdown:
--------------------------------------------------------------------------------
1 | # What naming conventions should be followed in the model layer?
2 |
3 | Originally written by Tom on 2008-10-17.
4 |
5 | (reminder to myself to answer this)
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/bazs_controller.rb:
--------------------------------------------------------------------------------
1 | class BazsController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | autocomplete
6 |
7 | auto_actions :all
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the rails application
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the rails application
5 | Agility::Application.initialize!
6 |
--------------------------------------------------------------------------------
/dryml/Gemfile:
--------------------------------------------------------------------------------
1 | source "http://rubygems.org"
2 |
3 | gem 'rubydoctest', :git => 'git://github.com/bryanlarsen/rubydoctest.git'
4 | gem 'hobo_support', :path => '../hobo_support'
5 |
6 | gemspec
7 |
8 | gem 'yard'
9 |
10 |
--------------------------------------------------------------------------------
/hobo/app/helpers/hobo_helper_base.rb:
--------------------------------------------------------------------------------
1 | module HoboHelperBase
2 |
3 | def add_to_controller(controller)
4 | controller.send(:include, self)
5 | controller.hide_action(self.instance_methods)
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/views/comma_list.dryml:
--------------------------------------------------------------------------------
1 |
2 | <%= this.join(join || ", ") %>
3 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/unit/story_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StoryTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/unit/task_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TaskTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle
2 | db/*.sqlite3
3 | log/*.log
4 | tmp/
5 | app/views/taglibs/auto/**/*
6 | config/hobo_routes.rb
7 | patches-master
8 | chromedriver.log
9 | public/system/projects/reports/**
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/project_memberships_controller.rb:
--------------------------------------------------------------------------------
1 | class ProjectMembershipsController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :write_only
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/doc/manual/faq/15-how-do-you-force-go-back.markdown:
--------------------------------------------------------------------------------
1 | # How do you force (go back to) an earlier migration?
2 |
3 | Originally written by jlapides on 2008-10-19.
4 |
5 | Not sure what the exact syntax is with regard to the migration name.
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/assets/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 |
3 | This generator copies the files `application.dryml`,
4 | `application.css`, `dryml-support.js`,
5 | `config/initializers/dryml_taglibs.rb`, `app/models/guest.rb`.
6 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/install_default_plugins/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 |
3 | Installs the default set of Hobo plugins to a subsite. It is called from the wizard and subsite generators, it is not likely to be useful on its own.
4 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/subsite_taglib.irt:
--------------------------------------------------------------------------------
1 | user_resource_name = 'User'
2 | eval_file '../partials/_subsite_taglib_variables.rb'
3 |
4 | invoke 'hobo:subsite_taglib', %w[ subs -q]
5 | eval_file '../partials/_subsite_taglib_noopt.rb'
6 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/unit/project_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProjectTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/setup_wizard/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 | This wizard is used by bin/hobo to configure a new
3 | created application. You can use it directly in order
4 | to overwrite any file of the original installation.
5 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/subsite_taglib/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 | This generator is used to generate
3 | app/views/taglibs/_site.dryml, and is used by the
4 | subsite and admin_site generators. Do not use directly.
5 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/foos/bug_414_test.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/unit/story_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StoryTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/unit/task_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TaskTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_subsite_taglib_admin_invite_only.rb:
--------------------------------------------------------------------------------
1 | desc "Taglib admin invite-only file matches with #{user_resource_name}"
2 | file_include?("app/views/taglibs/subs_site.dryml", tags, invite_only)
3 | test_value_eql? true
4 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/functional/user_mailer_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class UserMailerTest < ActionMailer::TestCase
4 | # replace this with your real tests
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/unit/story_status_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StoryStatusTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/unit/project_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProjectTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/doc/manual/faq/10-create-a-hobo-cheat-sheet.markdown:
--------------------------------------------------------------------------------
1 | # Create a Hobo cheat sheet
2 |
3 | Originally written by marton on 2008-10-17.
4 |
5 | I would like to have a cheat sheet, where all possible hobofields, overview of all default taglibs and so on.
--------------------------------------------------------------------------------
/hobo/test/irt/generators/user_model.irt:
--------------------------------------------------------------------------------
1 | invoke 'hobo:user_model', %w(-q)
2 |
3 | eval_file '../partials/_default_user_model_tests.rb'
4 |
5 | invoke 'hobo:user_model', %w(account -q)
6 |
7 | eval_file '../partials/_account_user_model_tests.rb'
8 |
--------------------------------------------------------------------------------
/hobo_jquery/vendor/assets/javascripts/hobo_jquery.js:
--------------------------------------------------------------------------------
1 | //= require_tree .
2 |
3 | jQuery(document).ready(function() {
4 | jQuery(document).hjq();
5 | });
6 | jQuery(window).bind('page:change', function() {
7 | jQuery(document).hjq();
8 | })
9 |
--------------------------------------------------------------------------------
/hobo_support/lib/hobo_support/implies.rb:
--------------------------------------------------------------------------------
1 | class TrueClass
2 |
3 | def implies(x=nil)
4 | block_given? ? yield : x
5 | end
6 |
7 | end
8 |
9 | class FalseClass
10 |
11 | def implies(x)
12 | true
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/unit/task_assignment_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TaskAssignmentTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/foos/bug_414_test.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/doc/manual/faq/9-how-do-you-make-two-or.markdown:
--------------------------------------------------------------------------------
1 | # How do you make two (or more) Hobo apps talk to each other RESTfully?
2 |
3 | Originally written by ph0rque on 2008-10-17.
4 |
5 | I know there's the rails way, but does hobo facilitate this in any way?
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_subsite_taglib_noopt.rb:
--------------------------------------------------------------------------------
1 | desc "Taglib file matches"
2 | file_include?("app/views/taglibs/subs_site.dryml", tags) === true &&
3 | file_exclude?("app/views/taglibs/subs_site.dryml", invite_only)
4 | test_value_eql? true
5 |
--------------------------------------------------------------------------------
/hobo_fields/lib/generators/hobo/migration/templates/migration.rb.erb:
--------------------------------------------------------------------------------
1 | class <%= @migration_class_name %> < ActiveRecord::Migration
2 | def self.up
3 | <%= @up %>
4 | end
5 |
6 | def self.down
7 | <%= @down %>
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/controllers/tasks_controller.rb:
--------------------------------------------------------------------------------
1 | class TasksController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :write_only, :edit
6 |
7 | auto_actions_for :story, :create
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/config/boot.rb:
--------------------------------------------------------------------------------
1 | require 'rubygems'
2 |
3 | # Set up gems listed in the Gemfile.
4 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5 |
6 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
7 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/unit/project_membership_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProjectMembershipTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/functional/user_mailer_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class UserMailerTest < ActionMailer::TestCase
4 | # replace this with your real tests
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/unit/story_status_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StoryStatusTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/controller/templates/controller.rb.erb:
--------------------------------------------------------------------------------
1 | class <%= class_name %>Controller < <%= @subsite ? "#{@subsite}::#{@subsite}SiteController" : "ApplicationController" %>
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/integration_tests/agility/doc/README_FOR_APP:
--------------------------------------------------------------------------------
1 | Use this README file to introduce your application and point to useful places in the API for learning more.
2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
3 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/functional/front_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class FrontControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/functional/tasks_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TasksControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/unit/task_assignment_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TaskAssignmentTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/doc/manual/faq/66-i-don-t-want-users-to.markdown:
--------------------------------------------------------------------------------
1 | # I don't want users to be able to select, or edit, or view x field.
2 |
3 | Originally written by kevinpfromnm on 2010-08-05.
4 |
5 | I have some fields that should not be visible to everyone or possibly even anyone.
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/controller/controller_generator.rb:
--------------------------------------------------------------------------------
1 | module Hobo
2 | class ControllerGenerator < Rails::Generators::NamedBase
3 | source_root File.expand_path('../templates', __FILE__)
4 | include Generators::Hobo::Controller
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/integration_tests/agility/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-Agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/functional/stories_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StoriesControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/tasks_controller.rb:
--------------------------------------------------------------------------------
1 | class TasksController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :write_only, :edit
6 |
7 | auto_actions_for :story, :create
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/config/boot.rb:
--------------------------------------------------------------------------------
1 | require 'rubygems'
2 |
3 | # Set up gems listed in the Gemfile.
4 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5 |
6 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
7 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/unit/project_membership_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProjectMembershipTest < ActiveSupport::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/doc/manual/faq/87-routes-and-actions.markdown:
--------------------------------------------------------------------------------
1 | # Routes and actions
2 |
3 | Originally written by jonas on 2010-11-18.
4 |
5 | Is there any way to generate the actions but not the routes?
6 |
7 | I want to add the routes manually because im using i18n_routing plugin.
--------------------------------------------------------------------------------
/hobo_jquery/vendor/assets/javascripts/hobo-jquery/hjq-filter-menu.js:
--------------------------------------------------------------------------------
1 | /* filter_menu */
2 | jQuery.fn.hjq_filter_menu = function(annotations) {
3 | this.find('select').on('change', function() {
4 | jQuery(this).parents('form').submit();
5 | });
6 | };
7 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/controllers/stories_controller.rb:
--------------------------------------------------------------------------------
1 | class StoriesController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all, :except => :index
6 |
7 | auto_actions_for :project, [:new, :create]
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/functional/projects_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProjectsControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/doc/README_FOR_APP:
--------------------------------------------------------------------------------
1 | Use this README file to introduce your application and point to useful places in the API for learning more.
2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
3 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/functional/front_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class FrontControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/functional/tasks_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TasksControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/doc/manual/faq/64-how-do-i-change-the-navigation.markdown:
--------------------------------------------------------------------------------
1 | # How do I change the navigation tabs along the top?
2 |
3 | Originally written by kevinpfromnm on 2010-08-05.
4 |
5 | I don't what x to show but still want the index page available or x to show only for administrators.
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-Agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/functional/stories_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StoriesControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/dryml/features/support/models/post.rb:
--------------------------------------------------------------------------------
1 | class Post
2 | attr_accessor :title
3 |
4 | def initialize(options={})
5 | self.title = options[:title] || 'A Post'
6 | end
7 |
8 | # needed for field= to work
9 | def [](idx)
10 | send(idx)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/hobo/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 |
3 | match 'dryml/:action', :controller => 'dryml_support', :as => 'dryml_support'
4 | match 'dev/:action', :controller => 'dev', :as => 'dev_support' if Rails.application.config.hobo.developer_features
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/user_controller/templates/accept_invitation.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Welcome to , . To accept your invitation, please choose your password.
4 |
5 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/user_controller.irt:
--------------------------------------------------------------------------------
1 | invoke 'hobo:user_controller', %w[-q]
2 |
3 | eval_file '../partials/_default_users_controller_tests.rb'
4 |
5 | invoke 'hobo:user_controller' , %w(accounts -q)
6 |
7 | eval_file '../partials/_accounts_users_controller_tests.rb'
8 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/functional/story_statuses_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StoryStatusesControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/stories_controller.rb:
--------------------------------------------------------------------------------
1 | class StoriesController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all, :except => :index
6 |
7 | auto_actions_for :project, [:new, :create]
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/functional/projects_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProjectsControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/views/links_for_collection.dryml:
--------------------------------------------------------------------------------
1 |
2 | <%= this.empty? ? "(none)" : context_map { view }.safe_join(", ") %>
3 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/user_mailer/activation.erb:
--------------------------------------------------------------------------------
1 | <%= @user %>,
2 |
3 | To activate your account for <%= @app_name %>, click on this link:
4 |
5 | <%= activate_user_url :id => @user, :key => @key %>
6 |
7 | Thank you,
8 |
9 | The <%= @app_name %> team.
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/hobo_clean_admin/taglibs/hobo_clean_admin.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | View Site
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/forms/forms.dryml:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/functional/project_memberships_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProjectMembershipsControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/functional/story_statuses_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StoryStatusesControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/doc/manual/faq/3-how-do-you-customise-the-look.markdown:
--------------------------------------------------------------------------------
1 | # How do you customise the look of an app?
2 |
3 | Originally written by Tom on 2008-10-17.
4 |
5 | (reminder to myself to write this up - tricks, tips and common techniques that take advantage of Hobo's automatically generated CSS classes)
--------------------------------------------------------------------------------
/doc/manual/faq/dryml-overriding.markdown:
--------------------------------------------------------------------------------
1 | # What dryml view files are available for overriding?
2 |
3 | and when are they used by Hobo (i.e. what cases gets them parsed)? (new.dryml, edit.dryml, show.dryml, index.dryml, new_for_user.dryml, edit_for_user.dryml??? x_form.dryml???)
4 |
5 | FIXME
--------------------------------------------------------------------------------
/integration_tests/agility/db/migrate/20110419124628_install_acts_as_list.rb:
--------------------------------------------------------------------------------
1 | class InstallActsAsList < ActiveRecord::Migration
2 | def self.up
3 | add_column :tasks, :position, :integer
4 | end
5 |
6 | def self.down
7 | remove_column :tasks, :position
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/user_mailer/activation.erb:
--------------------------------------------------------------------------------
1 | <%= @user %>,
2 |
3 | To activate your account for <%= @app_name %>, click on this link:
4 |
5 | <%= activate_user_url :id => @user, :key => @key %>
6 |
7 | Thank you,
8 |
9 | The <%= @app_name %> team.
10 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/dryml/lib/dryml/railtie/template_handler.rb:
--------------------------------------------------------------------------------
1 | module Dryml
2 | class Railtie
3 | class TemplateHandler
4 |
5 | def self.call(template)
6 | "Dryml.call_render(self, local_assigns, '#{template.identifier}')"
7 | end
8 |
9 | end
10 | end
11 | end
12 |
13 |
14 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/functional/project_memberships_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ProjectMembershipsControllerTest < ActionController::TestCase
4 | # Replace this with your real tests.
5 | test "the truth" do
6 | assert true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/doc/manual/faq/38-step-by-step-paperclip-tutorial.markdown:
--------------------------------------------------------------------------------
1 | # Step by step paperclip tutorial
2 |
3 | Originally written by sanjayayogi on 2009-10-07.
4 |
5 | Something a complete newbie can follow, for file uploads.
6 |
7 |
--------------------------------------------------------------------------------
/doc/manual/faq/dryml-without-hobo.markdown:
--------------------------------------------------------------------------------
1 | # Is DRYML able to be used in Rails without Hobo?
2 |
3 | Yes, see the [README](https://github.com/Hobo/hobo/blob/master/dryml/README). Note that DRYML requires ActionView so although you can use outside Rails, you'll be pulling in a lot of Rails as a dependency.
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/db/migrate/20110419124628_install_acts_as_list.rb:
--------------------------------------------------------------------------------
1 | class InstallActsAsList < ActiveRecord::Migration
2 | def self.up
3 | add_column :tasks, :position, :integer
4 | end
5 |
6 | def self.down
7 | remove_column :tasks, :position
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/inputs/sti_type_input.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/doc/manual/faq/72-will-memcache-work-with-hobo.markdown:
--------------------------------------------------------------------------------
1 | # Will memcache work with hobo?
2 |
3 | Originally written by kevinpfromnm on 2010-08-08.
4 |
5 | I've googled and found no answer. can memcache be implemented with
6 | hobo? or are the pages and dryml to dynamic to make any sense in
7 | running memcache?
--------------------------------------------------------------------------------
/doc/manual/faq/91-how-to-disable-user.markdown:
--------------------------------------------------------------------------------
1 | # How to disable user?
2 |
3 | Originally written by piotroslav on 2010-12-31.
4 |
5 | Hello,
6 |
7 | I am trying to find a way to disable user (change his state). I tried to figure out if I need to change rapid_user_pages.dryml, but it didn't work out. Any hints?
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/stories/show.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/integration_tests/agility/db/migrate/20120922204625_add_color_to_stories.rb:
--------------------------------------------------------------------------------
1 | class AddColorToStories < ActiveRecord::Migration
2 | def self.up
3 | add_column :stories, :color, :string, :default => "#000000"
4 | end
5 |
6 | def self.down
7 | remove_column :stories, :color
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/doc/manual/faq/17-how-to-get-a-hobo-app.markdown:
--------------------------------------------------------------------------------
1 | # How to get a Hobo app working on Heroku.com
2 |
3 | Originally written by Bart on 2008-10-20.
4 |
5 | This question answered by recipe: [Running a Hobo Application on Heroku](/tutorials/6-running-a-hobo-application-on-heroku)
6 |
7 | Anybody have a recipe that works?
--------------------------------------------------------------------------------
/doc/manual/faq/63-how-do-i-setup-full-text.markdown:
--------------------------------------------------------------------------------
1 | # How do I setup full text search?
2 |
3 | Originally written by kevinpfromnm on 2010-08-05.
4 |
5 | This question answered by recipe: [How to get full text search working with Sunspot](/tutorials/57-how-to-get-full-text-search)
6 |
7 | reminder to post sunspot recipe
--------------------------------------------------------------------------------
/doc/manual/faq/94-how-do-i-modify-the-htmlsanitizer.markdown:
--------------------------------------------------------------------------------
1 | # How do I modify the HTMLSanitizer whitelist?
2 |
3 | Originally written by lossius on 2011-04-18.
4 |
5 | For a :html field I would like to alter the whitelist used by HoboFields::HTMLSanitizer in order to permit additional tags. Is there a way of doing that?
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/admin_subsite/templates/users_index.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Invite a new user
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/user_resource/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 |
3 | This generator invokes the user_model, user_mailer and
4 | user_controller generators. It is invoked by the setup_wizard
5 | generator.
6 |
7 | Usage:
8 |
9 | rails generate hobo:user_resource [NAME=user] [options]
10 |
11 |
--------------------------------------------------------------------------------
/hobo_rapid/README.markdown:
--------------------------------------------------------------------------------
1 | RAPID is the standard Hobo tag library.
2 |
3 | #### Note
4 |
5 | Many of the tags require a javascript plugin such as hobo_jquery to function.
6 |
7 | The `` tag requires an implementation of ``. This can be provided by hobo-jquery-ui or hobo-bootstrap-ui.
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/html/stylesheet.dryml:
--------------------------------------------------------------------------------
1 |
3 |
4 | <%= stylesheet_link_tag *(comma_split(name) + [deunderscore_attributes(attributes)]) %>
5 |
6 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/stories/show.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/db/migrate/20120922204625_add_color_to_stories.rb:
--------------------------------------------------------------------------------
1 | class AddColorToStories < ActiveRecord::Migration
2 | def self.up
3 | add_column :stories, :color, :string, :default => "#000000"
4 | end
5 |
6 | def self.down
7 | remove_column :stories, :color
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/activation_email.rb:
--------------------------------------------------------------------------------
1 | module Generators
2 | module Hobo
3 | ActivationEmail = classy_module do
4 |
5 | class_option :activation_email,
6 | :type => :boolean,
7 | :desc => "Send an email to activate the account"
8 |
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/routes/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 | This generator prepares the auto routes for your Application.
3 | It is automatically used internally, so you should not use it manually
4 |
5 | Example:
6 | rails generate hobo:routes
7 |
8 | This will create:
9 | config/hobo_routes.rb
10 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/user_mailer/templates/activation.erb:
--------------------------------------------------------------------------------
1 | <%%= @<%= name.underscore -%> %>,
2 |
3 | To activate your account for <%%= @app_name %>, click on this link:
4 |
5 | <%%= activate_from_email_url :id => @<%= name.underscore -%>, :key => @key %>
6 |
7 | Thank you,
8 |
9 | The <%%= @app_name %> team.
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require File.expand_path('../config/application', __FILE__)
5 | require 'rake'
6 |
7 | Agility::Application.load_tasks
8 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/performance/browsing_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 | require 'rails/performance_test_help'
3 |
4 | # Profiling results for each test method are written to tmp/performance.
5 | class BrowsingTest < ActionDispatch::PerformanceTest
6 | def test_homepage
7 | get '/'
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV["RAILS_ENV"] = "test"
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | include Factory::Syntax::Methods
7 |
8 | # Add more helper methods to be used by all tests here...
9 | end
10 |
--------------------------------------------------------------------------------
/dryml/ext/mkrf_conf.rb:
--------------------------------------------------------------------------------
1 | require 'rubygems'
2 |
3 | # the whole reason this file exists: to return an error if openssl
4 | # isn't installed.
5 | require 'openssl'
6 |
7 | f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w") # create dummy rakefile to indicate success
8 | f.write("task :default\n")
9 | f.close
10 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/taglib.rb:
--------------------------------------------------------------------------------
1 | module Generators
2 | module Hobo
3 | Taglib = classy_module do
4 |
5 | class_option :user_resource_name,
6 | :type => :string,
7 | :desc => "User Resource Name",
8 | :default => 'user'
9 |
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_subsite_taglib_admin.rb:
--------------------------------------------------------------------------------
1 | desc "Taglib admin file matches inclusions"
2 | file_include?( "app/views/taglibs/subs_site.dryml", tags )
3 | test_value_eql? true
4 |
5 | desc "Taglib admin file matches exclusions"
6 | file_exclude?("app/views/taglibs/subs_site.dryml", invite_only)
7 | test_value_eql? true
8 |
--------------------------------------------------------------------------------
/hobo_fields/lib/hobo_fields/types/raw_html_string.rb:
--------------------------------------------------------------------------------
1 | module HoboFields
2 | module Types
3 | class RawHtmlString < HoboFields::Types::Text
4 |
5 | def to_html(xmldoctype = true)
6 | self.html_safe
7 | end
8 |
9 | HoboFields.register_type(:raw_html, self)
10 |
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/html/aside.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
<%= body %>
5 |
6 |
--------------------------------------------------------------------------------
/hobo_support/lib/hobo_support/fixes/pp.rb:
--------------------------------------------------------------------------------
1 | # --- Fix pp dumps - these break sometimes without this --- #
2 | require 'pp'
3 | module PP::ObjectMixin
4 |
5 | alias_method :orig_pretty_print, :pretty_print
6 | def pretty_print(q)
7 | orig_pretty_print(q)
8 | rescue
9 | "[#PP-ERROR#]"
10 | end
11 |
12 | end
13 |
14 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/user_mailer/forgot_password.erb:
--------------------------------------------------------------------------------
1 | <%= @user %>,
2 |
3 | If you have forgotten your password for <%= @app_name %>, you can choose
4 | a new one by clicking on this link:
5 |
6 | <%= reset_password_user_url :id => @user, :key => @key %>
7 |
8 | Thank you,
9 |
10 | The <%= @app_name %> team.
11 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require File.expand_path('../config/application', __FILE__)
5 | require 'rake'
6 |
7 | Agility::Application.load_tasks
8 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/html/footer.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/html/header.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
<%= body %>
5 |
6 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/views/nil_view.dryml:
--------------------------------------------------------------------------------
1 |
10 | <%= scope.nil_view || "(Not Available)" %>
11 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/performance/browsing_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 | require 'rails/performance_test_help'
3 |
4 | # Profiling results for each test method are written to tmp/performance.
5 | class BrowsingTest < ActionDispatch::PerformanceTest
6 | def test_homepage
7 | get '/'
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV["RAILS_ENV"] = "test"
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | include Factory::Syntax::Methods
7 |
8 | # Add more helper methods to be used by all tests here...
9 | end
10 |
--------------------------------------------------------------------------------
/dryml/features/support/strip_formatter.rb:
--------------------------------------------------------------------------------
1 | require 'rexml/document'
2 | require 'rexml/formatters/default'
3 |
4 | # strip whitespace when formatting XML
5 |
6 | class StripFormatter < REXML::Formatters::Default
7 |
8 | protected
9 |
10 | def write_text(node, output)
11 | output << node.to_s.strip
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/assets.irt:
--------------------------------------------------------------------------------
1 | desc "hobo:assets invoke"
2 | invoke 'hobo:assets', %w(-q)
3 |
4 | files_exist? %w( app/views/taglibs/application.dryml app/assets/stylesheets/application.scss app/assets/stylesheets/front.scss app/assets/javascripts/application.js app/assets/javascripts/front.js app/models/guest.rb )
5 | test_value_eql? true
6 |
--------------------------------------------------------------------------------
/hobo_jquery_ui/vendor/assets/javascripts/hobo-jquery-ui/hjq-tabs.js:
--------------------------------------------------------------------------------
1 | /* tabs */
2 | (function($) {
3 | $.fn.hjq_tabs = function(annotations) {
4 | this.tabs(this.hjq('getOptions', annotations));
5 | if(annotations.sortable) {
6 | this.find(".ui-tabs-nav").sortable();
7 | }
8 | };
9 | })( jQuery );
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/foos/show.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= link_to "editors", :controller => "foos", :action => "show_editors", :id => this.id %>
5 |
6 |
7 |
--------------------------------------------------------------------------------
/integration_tests/agility/db/migrate/20110419140701_projcet_contributors.rb:
--------------------------------------------------------------------------------
1 | class ProjcetContributors < ActiveRecord::Migration
2 | def self.up
3 | add_column :project_memberships, :contributor, :boolean, :default => false
4 | end
5 |
6 | def self.down
7 | remove_column :project_memberships, :contributor
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/user_mailer/forgot_password.erb:
--------------------------------------------------------------------------------
1 | <%= @user %>,
2 |
3 | If you have forgotten your password for <%= @app_name %>, you can choose
4 | a new one by clicking on this link:
5 |
6 | <%= reset_password_user_url :id => @user, :key => @key %>
7 |
8 | Thank you,
9 |
10 | The <%= @app_name %> team.
11 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/subsite/templates/site.scss.erb:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the stylesheet manifest file for the <%= name %> subsite.
3 | * Files or plugins referenced from here or placed in the <%= name %>/
4 | * directory will be included.
5 | *
6 | *= require_self
7 | *= require application
8 | *= require_tree ./<%= name %>
9 | */
10 |
--------------------------------------------------------------------------------
/hobo_jquery_ui/vendor/assets/stylesheets/combobox.css:
--------------------------------------------------------------------------------
1 |
2 | // stolen from clean.css
3 | .combobox .ui-button { margin-left: -1px; }
4 | .combobox .ui-button-icon-only .ui-button-text { padding: 0; }
5 | .combobox button.ui-button-icon-only { width: 20px; }
6 | .combobox .ui-autocomplete-input { margin-right: 0; }
7 | .combobox {white-space: nowrap;}
8 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/cards/search_card.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/integration_tests/agility/config/initializers/smtp.rb:
--------------------------------------------------------------------------------
1 | #ActionMailer::Base.delivery_method = :smtp
2 | #ActionMailer::Base.smtp_settings = {
3 | # :address => "smtp.example.com",
4 | # :port => 25,
5 | # :domain => "example.com",
6 | # :authentication => :login,
7 | # :user_name => "username",
8 | # :password => "password",
9 | #}
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/script/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3 |
4 | APP_PATH = File.expand_path('../../config/application', __FILE__)
5 | require File.expand_path('../../config/boot', __FILE__)
6 | require 'rails/commands'
7 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/admin_subsite/templates/site.scss.erb:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the stylesheet manifest file for the <%= name %> subsite.
3 | * Files or plugins referenced from here or placed in the <%= name %>/
4 | * directory will be included.
5 | *
6 | *= require_self
7 | *= require application
8 | *= require_tree ./<%= name %>
9 | */
10 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/extensions/action_view/tag_helper.rb:
--------------------------------------------------------------------------------
1 | ActionView::Helpers::TagHelper.module_eval do
2 |
3 | alias_method :tag_without_doctype, :tag
4 |
5 | def tag(name, options = nil, open = false, escape = true)
6 | open = !scope.xmldoctype if defined?(scope)
7 | tag_without_doctype(name, options, open, escape)
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/extensions/active_record/associations/proxy.rb:
--------------------------------------------------------------------------------
1 | module ActiveRecord
2 | module Associations
3 | class CollectionProxy #:nodoc:
4 | def origin
5 | proxy_association.owner
6 | end
7 |
8 | def origin_attribute
9 | proxy_association.reflection.name
10 | end
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/admin_subsite.irt:
--------------------------------------------------------------------------------
1 | invoke 'hobo:assets', %w[ -q ]
2 | invoke 'hobo:admin_subsite', %w[ -q ]
3 | desc "Admin Subsite files exist"
4 | files_exist? %w( app/controllers/admin/admin_site_controller.rb app/controllers/admin/users_controller.rb app/helpers/admin/users_helper.rb app/views/taglibs/admin_site.dryml )
5 | test_value_eql? true
6 |
--------------------------------------------------------------------------------
/hobo_jquery/app/helpers/hobo_jquery_helper.rb:
--------------------------------------------------------------------------------
1 | module HoboJqueryHelper
2 | def data_rapid(tag, options = {}, attributes = {})
3 | if attributes['data_rapid']
4 | hash = ActiveSupport::JSON.decode(attributes['data_rapid'])
5 | else
6 | hash = {}
7 | end
8 | hash[tag] = options
9 | hash.to_json
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/hobo_rapid/lib/hobo_rapid/previous_uri_filter.rb:
--------------------------------------------------------------------------------
1 | module HoboRapid
2 | # this after_filter is useful for the after_submit tag
3 | class PreviousUriFilter
4 | def self.filter(controller)
5 | if controller.request.get?
6 | controller.session[:previous_uri] = controller.request.path
7 | end
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/hobo_support/lib/hobo_support/kernel.rb:
--------------------------------------------------------------------------------
1 | module Kernel
2 |
3 | def dbg(*args)
4 | puts "---DEBUG---"
5 | args.each do |a|
6 | if a.is_a?(String) && a =~ /\n/
7 | puts %("""\n) + a + %(\n"""\n)
8 | else
9 | p a
10 | end
11 | end
12 | puts "-----------"
13 | args.first
14 | end
15 |
16 | end
17 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/foos/show.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= link_to "editors", :controller => "foos", :action => "show_editors", :id => this.id %>
5 |
6 |
7 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/db/migrate/20110419140701_projcet_contributors.rb:
--------------------------------------------------------------------------------
1 | class ProjcetContributors < ActiveRecord::Migration
2 | def self.up
3 | add_column :project_memberships, :contributor, :boolean, :default => false
4 | end
5 |
6 | def self.down
7 | remove_column :project_memberships, :contributor
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/doc/manual/faq/how-do-I-get-help.markdown:
--------------------------------------------------------------------------------
1 | # How Do I Get Help?
2 |
3 | The fastest way to get an answer is by asking in [Hobo Users](http://groups.google.com/group/hobousers). Before asking, it is recommended to search the documentation (the manual you are reading right now) and the Hobo Users archive. You might not be the first person with the same question!
4 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/admin_subsite/templates/controller.rb.erb:
--------------------------------------------------------------------------------
1 | class <%= subsite_name %>::<%= subsite_name %>SiteController < ApplicationController
2 |
3 | hobo_controller
4 |
5 | before_filter :admin_required
6 |
7 | private
8 |
9 | def admin_required
10 | redirect_to home_page unless current_user.administrator?
11 | end
12 |
13 | end
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/assets/templates/front_site.dryml.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/hobo_fields/Gemfile:
--------------------------------------------------------------------------------
1 | source "http://rubygems.org"
2 |
3 | gem 'rubydoctest', :git => 'git://github.com/bryanlarsen/rubydoctest.git'
4 | gem 'rails', '3.2.12'
5 | gem 'yard'
6 | gemspec :path => "../hobo_support"
7 | gemspec
8 | platform :ruby do
9 | gem 'sqlite3'
10 | end
11 | platform :jruby do
12 | gem 'activerecord-jdbcsqlite3-adapter'
13 | end
14 |
--------------------------------------------------------------------------------
/hobo_jquery/lib/hobo_jquery.rb:
--------------------------------------------------------------------------------
1 | module HoboJquery
2 | @@root = Pathname.new File.expand_path('../..', __FILE__)
3 | def self.root; @@root; end
4 |
5 | EDIT_LINK_BASE = "https://github.com/Hobo/hobodoc/edit/master/hobo_jquery"
6 |
7 | require 'hobo_jquery/railtie' if defined?(Rails)
8 |
9 | class Engine < ::Rails::Engine
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/config/initializers/smtp.rb:
--------------------------------------------------------------------------------
1 | #ActionMailer::Base.delivery_method = :smtp
2 | #ActionMailer::Base.smtp_settings = {
3 | # :address => "smtp.example.com",
4 | # :port => 25,
5 | # :domain => "example.com",
6 | # :authentication => :login,
7 | # :user_name => "username",
8 | # :password => "password",
9 | #}
10 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/script/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3 |
4 | APP_PATH = File.expand_path('../../config/application', __FILE__)
5 | require File.expand_path('../../config/boot', __FILE__)
6 | require 'rails/commands'
7 |
--------------------------------------------------------------------------------
/doc/manual/faq/100-tabbed-layout-can-i-do-this.markdown:
--------------------------------------------------------------------------------
1 | # Tabbed Layout, can I do this?
2 |
3 | Originally written by lepodo on 2012-02-07.
4 |
5 | Hey guys, Need some help, I'm aiming to do a tabbed layout design, one tab with a small text editor with a save function, and the other leading to a webpage, can I do this with Hobo? A response would be much appreciated!
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/model/model_generator.rb:
--------------------------------------------------------------------------------
1 | require 'rails/generators/active_record'
2 | require 'generators/hobo_support/model'
3 |
4 | module Hobo
5 | class ModelGenerator < ActiveRecord::Generators::Base
6 | source_root File.expand_path('../templates', __FILE__)
7 |
8 | include Generators::HoboSupport::Model
9 |
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/23-how-to-customize-the-login-page.markdown:
--------------------------------------------------------------------------------
1 | # How to customize the Login page
2 |
3 | Originally written by brett on 2008-11-03.
4 |
5 | In particular, since the login page is narrower and the name of my app is long it wraps and doesn't look good. Would like to create a short app name to be used on the login page in place of the regular app name.
6 |
7 |
--------------------------------------------------------------------------------
/doc/manual/faq/30-how-to-create-a-iphone-or.markdown:
--------------------------------------------------------------------------------
1 | # How to create a iPhone or mobile layout
2 |
3 | Originally written by marton on 2009-01-13.
4 |
5 | This question answered by recipe: [Appcelerator Titanium (Mobile App) and Hobo](/tutorials/1802-appcelerator-titanium-mobile-app-and-hobo)
6 |
7 | I would like to see how you can make a iphone interface to a hobo app.
--------------------------------------------------------------------------------
/dryml/features/support/models/discussion.rb:
--------------------------------------------------------------------------------
1 | class Discussion
2 | attr_accessor :name
3 | attr_accessor :posts
4 |
5 | def initialize(options={})
6 | self.name = options[:name] || 'Some Discussion'
7 | self.posts = options[:posts] || []
8 | end
9 |
10 | # needed for field= to work
11 | def [](idx)
12 | send(idx)
13 | end
14 | end
15 |
16 |
--------------------------------------------------------------------------------
/dryml/lib/dryml/parser/text.rb:
--------------------------------------------------------------------------------
1 | module Dryml::Parser
2 |
3 | class Text < REXML::Text
4 |
5 | def parent=(parent)
6 | # Bypass immediate super
7 | REXML::Child.instance_method(:parent=).bind(self).call(parent)
8 | Text.check(@string, /, nil) if @raw and @parent && Text.respond_to?(:check)
9 | end
10 |
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/user_mailer/templates/invite.erb:
--------------------------------------------------------------------------------
1 | <%%= @<%= name.underscore %> %>,
2 |
3 | You have been invited to join <%%= @app_name %>. If you wish to accept, please click on the following link
4 |
5 | <%%= accept_invitation_from_email_url :id => @<%= name.underscore %>, :key => @key %>
6 |
7 | Thank you,
8 |
9 | The <%%= @app_name %> team.
10 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_house_model_tests.rb:
--------------------------------------------------------------------------------
1 | desc "All Model files exists"
2 | files_exist? %w[ app/models/house.rb ]
3 | test_value_eql? true
4 |
5 | desc "Model injection matches"
6 | file_include? 'app/models/house.rb',
7 | 'hobo_model',
8 | 'fields do',
9 | /alpha\s+\:string/
10 | test_value_eql? true
11 |
--------------------------------------------------------------------------------
/hobo_fields/lib/generators/hobo/model/model_generator.rb:
--------------------------------------------------------------------------------
1 | require 'rails/generators/active_record'
2 | require 'generators/hobo_support/model'
3 |
4 | module Hobo
5 | class ModelGenerator < ActiveRecord::Generators::Base
6 | source_root File.expand_path('../templates', __FILE__)
7 |
8 | include Generators::HoboSupport::Model
9 |
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/11-how-to-safely-upgrade-to-a.markdown:
--------------------------------------------------------------------------------
1 | # How to safely upgrade to a new hobo version
2 |
3 | Originally written by marton on 2008-10-17.
4 |
5 | This question answered by recipe: [Upgrade an app to the latest version of Hobo](/tutorials/5-upgrade-an-app-to-the-latest)
6 |
7 | It is always a question to me how to safely upgrade without loosing information.
8 |
--------------------------------------------------------------------------------
/doc/manual/faq/90-installing-plugins.markdown:
--------------------------------------------------------------------------------
1 | # Installing plugins
2 |
3 | Originally written by cbenedict on 2010-12-10.
4 |
5 | I was attempting to install Bryan Larsen's jquery hobo plugin. When I did:
6 |
7 | ruby script/plugin install -v git://github.com/bryanlarsen/hobo-jquery.git
8 |
9 | I get:
10 | plugin: version unknown
11 |
12 | What is the problem?
--------------------------------------------------------------------------------
/doc/manual/faq/98-asynchronous-job-handling.markdown:
--------------------------------------------------------------------------------
1 | # Asynchronous Job Handling
2 |
3 | Originally written by JezChatfield on 2012-01-02.
4 |
5 | I have some long running and repetitive tasks that should be executed without forcing the user to be either logged in, or waiting for termination. Think of processing large data sets, or downloading third party reports.
6 |
7 |
--------------------------------------------------------------------------------
/hobo_clean_admin/lib/hobo_clean_admin.rb:
--------------------------------------------------------------------------------
1 | module HoboCleanAdmin
2 |
3 | VERSION = File.read(File.expand_path('../../VERSION', __FILE__)).strip
4 | @@root = Pathname.new File.expand_path('../..', __FILE__)
5 | def self.root; @@root; end
6 |
7 | require 'hobo_clean_admin/railtie' if defined?(Rails)
8 |
9 | class Engine < ::Rails::Engine
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/hobo_jquery_ui/lib/hobo_jquery_ui.rb:
--------------------------------------------------------------------------------
1 | module HoboJqueryUi
2 | @@root = Pathname.new File.expand_path('../..', __FILE__)
3 | def self.root; @@root; end
4 |
5 | EDIT_LINK_BASE = "https://github.com/Hobo/hobodoc/edit/master/hobo_jquery_ui"
6 |
7 | require 'hobo_jquery_ui/railtie' if defined?(Rails)
8 |
9 | class Engine < ::Rails::Engine
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/assets/templates/application.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the global stylesheet manifest file. Files or plugins
3 | * referenced from here or placed in the application/ directory will be
4 | * included in all subsites. This file is included by front.css and all
5 | * subsites.
6 | *
7 | *= require_self
8 | *= require_tree ./application
9 | */
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/users/show.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Assigned Tasks
4 |
5 |
Story:
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/user_mailer/templates/forgot_password.erb:
--------------------------------------------------------------------------------
1 | <%%= @<%= name.underscore -%> %>,
2 |
3 | If you have forgotten your password for <%%= @app_name %>, you can choose
4 | a new one by clicking on this link:
5 |
6 | <%%= reset_password_from_email_url :id => @<%= name.underscore -%>, :key => @key %>
7 |
8 | Thank you,
9 |
10 | The <%%= @app_name %> team.
11 |
--------------------------------------------------------------------------------
/hobo_clean_admin/vendor/assets/stylesheets/admin_tweaks.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #333;
3 | background-image: none;
4 | }
5 |
6 | .page-header {
7 | background: #555;
8 | }
9 |
10 | .page-header.sidemenu {
11 | background: none;
12 | }
13 |
14 | .page-header h1 a {
15 | color:#FCFFF5;
16 | }
17 |
18 | #main-nav-container {
19 | background:#555555
20 | }
21 |
--------------------------------------------------------------------------------
/hobo_support/lib/hobo_support/xss.rb:
--------------------------------------------------------------------------------
1 | require 'active_support/core_ext/string/output_safety'
2 | class Array
3 | # it always returns an html_safe? string preserving the html_safe?
4 | # items and separator, excaping the rest
5 | def safe_join(sep=$,)
6 | map {|i| ERB::Util.html_escape(i)}.join(ERB::Util.html_escape(sep)).html_safe
7 | end
8 | end
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/taglibs/themes/clean/clean.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/doc/manual/faq/7-how-would-you-make-a-hobo.markdown:
--------------------------------------------------------------------------------
1 | # How would you make a Hobo site completely private?
2 |
3 | Originally written by Tom on 2008-10-17.
4 |
5 | This question answered by recipe: [Make a private Hobo app](/tutorials/10-make-a-private-hobo-app)
6 |
7 | That is, only signed up users can get in, and only admins can invite people.
8 |
9 | (reminder to myself to answer this)
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/users/show.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Assigned Tasks
4 |
5 |
Story:
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/doc/manual/faq/27-auto-completion.markdown:
--------------------------------------------------------------------------------
1 | # Auto Completion
2 |
3 | Originally written by kevinpfromnm on 2008-11-18.
4 |
5 | Wondering if there's a nice hoboized way to do auto completion since live-search tag exists and works. I'd like to be able to search a rather large list of writers (over 13000 and growing) by email and figured a live search would be best way from an interface standpoint.
--------------------------------------------------------------------------------
/doc/manual/faq/86-i18n-database.markdown:
--------------------------------------------------------------------------------
1 | # I18n database
2 |
3 | Originally written by jonas on 2010-11-18.
4 |
5 | In project without hobo im using easy_globalize2_accessors and globalize2 for translating data. Im been having troubles to get this working in hobo (language tab selector and validations for the model_translations fields in the model's form).
6 |
7 | Any ideas?
8 |
9 | Thanks.
--------------------------------------------------------------------------------
/doc/tutorials/sidebar.markdown:
--------------------------------------------------------------------------------
1 | * [Hobo in Two Minutes](two-minutes)
2 | * [Screencast](screencast)
3 | * [Full Tutorial](agility)
4 | * [Adding a Hobo subsite to a Rails app](subsite)
5 | * [Dynamic Ajax Select](dynamic_ajax_select_menus)
6 | * [The Caching Tags](caching)
7 | * [Upgrading a Hobo 1.0 app](upgrade)
8 | * [User Contributed Recipes](recipes)
9 | {.navigation .nav .nav-list}
10 |
--------------------------------------------------------------------------------
/dryml/features/support/models/author.rb:
--------------------------------------------------------------------------------
1 | class Author
2 | attr_accessor :id
3 | attr_accessor :name
4 |
5 | def initialize(options={})
6 | self.id = options[:id] || 1
7 | self.name = options[:name] || 'Nobody'
8 | end
9 |
10 | # needed for field= to work
11 | def [](idx)
12 | send(idx)
13 | end
14 |
15 | def url
16 | "/authors/#{id}"
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/extensions/active_record/hobo_methods.rb:
--------------------------------------------------------------------------------
1 | ActiveRecord::Base.class_eval do
2 | def self.hobo_model
3 | include Hobo::Model
4 | fields(false) # force hobo_fields to load
5 | end
6 | def self.hobo_user_model
7 | include Hobo::Model
8 | include Hobo::Model::UserBase
9 | end
10 | alias_method :has_hobo_method?, :respond_to_without_attributes?
11 | end
12 |
--------------------------------------------------------------------------------
/hobo_fields/lib/hobo_fields/railtie.rb:
--------------------------------------------------------------------------------
1 | require 'hobo_fields'
2 | require 'rails'
3 |
4 | module HoboFields
5 | class Railtie < Rails::Railtie
6 |
7 | ActiveSupport.on_load(:active_record) do
8 | require 'hobo_fields/extensions/active_record/attribute_methods'
9 | require 'hobo_fields/extensions/active_record/fields_declaration'
10 | end
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/html/if_ie.dryml:
--------------------------------------------------------------------------------
1 |
9 |
10 | <%=raw "" %>
11 |
12 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/views/a_or_an.dryml:
--------------------------------------------------------------------------------
1 |
2 | <%=
3 | (word =~ /^[aeiou]/i ? "An " : "A ") + word
4 | %>
5 |
6 |
8 | <%=
9 | (word =~ /^[aeiou]/i ? "an " : "a ") + word
10 | %>
11 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/taglibs/themes/clean/clean.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/assets/templates/front.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the stylesheet manifest file for the front subsite (which
3 | * is your whole application if you don't have any subsites). Files
4 | * or plugins referenced from here or placed in the front/ directory
5 | * will be included.
6 | *
7 | *= require_self
8 | *= require application
9 | *= require_tree ./front
10 | */
11 |
--------------------------------------------------------------------------------
/doc/manual/faq/43-recipes-as-screencasts.markdown:
--------------------------------------------------------------------------------
1 | # Recipes as screencasts?
2 |
3 | Originally written by mydoghasworms on 2010-03-15.
4 |
5 | Sorry, not really a request for a recipe, but it would be great if some of these recipes (e.g. Tom's "Replicate the look-and-feel of an existing site") or topics such as Beginner- Intermediate- and Advanced DRYML could be covered as (or converted into) screencasts.
--------------------------------------------------------------------------------
/hobo/test/irt/generators/user_resource.irt:
--------------------------------------------------------------------------------
1 | invoke 'hobo:user_resource' , %w(-q)
2 |
3 | eval_file '../partials/_default_users_controller_tests.rb'
4 |
5 | eval_file '../partials/_default_user_model_tests.rb'
6 |
7 | invoke 'hobo:user_resource' , %w(account -q)
8 |
9 | eval_file '../partials/_accounts_users_controller_tests.rb'
10 |
11 | eval_file '../partials/_account_user_model_tests.rb'
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/65-how-do-i-setup-groups-for.markdown:
--------------------------------------------------------------------------------
1 | # How do I setup groups for permissions?
2 |
3 | Originally written by kevinpfromnm on 2010-08-05.
4 |
5 | This question answered by recipe: [Setting up unix like permissions with hobo](/tutorials/58-setting-up-unix-like-permissions-with)
6 |
7 | I have different classes of users that will have differing rights. What's the best approach for setting this up?
--------------------------------------------------------------------------------
/hobo/app/helpers/hobo_view_hint_helper.rb:
--------------------------------------------------------------------------------
1 | module HoboViewHintHelper
2 | extend HoboHelperBase
3 | protected
4 | # --- ViewHint Helpers --- #
5 |
6 | def this_field_name
7 | this_parent.class.try.human_attribute_name(this_field) || this_field
8 | end
9 |
10 | def this_field_help
11 | this_parent.class.try.attribute_help(this_field.to_sym) || ""
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/hobo_fields/lib/hobo_fields/types/serialized_object.rb:
--------------------------------------------------------------------------------
1 | module HoboFields
2 | module Types
3 | class SerializedObject < Object
4 |
5 | COLUMN_TYPE = :text
6 |
7 | def self.declared(model, name, options)
8 | model.serialize name, options.delete(:class) || Object
9 | end
10 |
11 | HoboFields.register_type(:serialized, self)
12 |
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/integration_tests/agility/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7 | # Mayor.create(:name => 'Daley', :city => cities.first)
8 |
--------------------------------------------------------------------------------
/doc/manual/faq/82-apply-scopes.markdown:
--------------------------------------------------------------------------------
1 | # apply_scopes
2 |
3 | Originally written by Etern on 2010-10-05.
4 |
5 | The code for apply scopes will ignore any blank parameters, but what if you want to check if a parameter is false or nil?
6 |
7 | i.e.
8 |
9 | Model.apply_scopes(:completed_is => false)
10 |
11 | Apply_scopes seems to ignore this, and if you use find, you aren't able to use paginate on it.
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/admin_subsite/templates/admin_tag_injection.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <%= name.titleize %>
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/front_controller/USAGE:
--------------------------------------------------------------------------------
1 | Description:
2 |
3 | The hobo_front_controller generator creates a basic 'front
4 | controller' and related views to get your app development kick started.
5 |
6 | It takes a single argument -- the name of the controller
7 |
8 | The front controller provides a simple front-page, ready to be
9 | customized, and a search page.
10 |
11 |
12 |
--------------------------------------------------------------------------------
/hobo_fields/lib/hobo_fields/types/password_string.rb:
--------------------------------------------------------------------------------
1 | module HoboFields
2 | module Types
3 | class PasswordString < String
4 |
5 | COLUMN_TYPE = :string
6 |
7 | HoboFields.register_type(:password, self)
8 |
9 | def to_html(xmldoctype = true)
10 | I18n.t("hobo.password_hidden", :default => "[password hidden]").html_safe
11 | end
12 |
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/controllers/front_controller.rb:
--------------------------------------------------------------------------------
1 | class FrontController < ApplicationController
2 |
3 | hobo_controller
4 |
5 | def index; end
6 |
7 | def summary
8 | if !current_user.administrator?
9 | redirect_to user_login_path
10 | end
11 | end
12 |
13 | def search
14 | if params[:query]
15 | site_search(params[:query])
16 | end
17 | end
18 |
19 | end
20 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7 | # Mayor.create(:name => 'Daley', :city => cities.first)
8 |
--------------------------------------------------------------------------------
/hobo_support/lib/hobo_support/blankslate.rb:
--------------------------------------------------------------------------------
1 | # Define BlankSlate in case ActiveSupport aint present
2 | unless defined? BlankSlate
3 | unless defined? BlankSlate
4 | class BlankSlate
5 | instance_methods.reject { |m| m =~ /^__/ || m =~ /^(object_id|instance_eval)$/ }.each { |m| undef_method m }
6 | def initialize(me)
7 | @me = me
8 | end
9 | end
10 | end
11 | end
12 |
13 |
14 |
--------------------------------------------------------------------------------
/doc/manual/faq/78-how-can-i-translate-everything.markdown:
--------------------------------------------------------------------------------
1 | # How can i translate everything.
2 |
3 | Originally written by tonlap on 2010-08-30.
4 |
5 | Hello, we try to create a new hobo project in german.
6 | But when we manipulate the dryml files, some parts remain unchanged.
7 | For example the "canel" button:
8 |
9 |
10 |
11 | What can i do with it to change "Cancel" to "Abbrechen"?
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_default_user_model_tests.rb:
--------------------------------------------------------------------------------
1 | desc "All files exists"
2 | files_exist? %w( app/models/user.rb )
3 | test_value_eql? true
4 |
5 | desc "User Model injection matches"
6 | file_include? 'app/models/user.rb',
7 | 'hobo_user_model',
8 | 'fields do',
9 | /name\s+:string/,
10 | /email_address\s+:email_address/
11 | test_value_eql? true
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/front_controller.rb:
--------------------------------------------------------------------------------
1 | class FrontController < ApplicationController
2 |
3 | hobo_controller
4 |
5 | def index; end
6 |
7 | def summary
8 | if !current_user.administrator?
9 | redirect_to user_login_path
10 | end
11 | end
12 |
13 | def search
14 | if params[:query]
15 | site_search(params[:query])
16 | end
17 | end
18 |
19 | end
20 |
--------------------------------------------------------------------------------
/doc/manual/books.markdown:
--------------------------------------------------------------------------------
1 | Books
2 | {.document-title}
3 |
4 | Rapid Rails 3 with Hobo 1.3
5 |
6 |
7 |
8 |
9 | Rapid Rails with Hobo 1.0
10 |
11 |
12 |
13 |
14 | Hobo 1.0 at Work
15 |
--------------------------------------------------------------------------------
/doc/manual/faq/20-how-to-use-controller-buttons-in.markdown:
--------------------------------------------------------------------------------
1 | # How to use controller buttons in table-plus?
2 |
3 | Originally written by Niko on 2008-10-29.
4 |
5 | What is the recommended way to use for example a "delete-button" inside your table-plus construct?
6 |
7 | With I do see the alert box and the spinning "Removing..." overlay, but there seems to be no controller called on the back-end side...
--------------------------------------------------------------------------------
/doc/manual/faq/39-attaching-uploading-multiple-pictures-to-a.markdown:
--------------------------------------------------------------------------------
1 | # Attaching/uploading multiple pictures to a model
2 |
3 | Originally written by salamandyr on 2009-12-24.
4 |
5 | I'd like a recipe that walks through how to associate multiple image uploads with a single model instance, e.g. allow browse/attach for one to many images when adding a new item to a model, or editing an existing item in the model.
6 |
7 | Thanks! :)
--------------------------------------------------------------------------------
/hobo/app/controllers/dryml_support_controller.rb:
--------------------------------------------------------------------------------
1 | class DrymlSupportController < ActionController::Base
2 |
3 | def edit_source
4 | dryml_editor = ENV['DRYML_EDITOR']
5 | if dryml_editor
6 | file = File.join(Rails.root, params[:file])
7 | command = dryml_editor.sub(":file", file).sub(":line", params[:line])
8 | system(command)
9 | end
10 | render :nothing => true
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/extensions/enumerable.rb:
--------------------------------------------------------------------------------
1 | module Enumerable
2 | def group_by_with_metadata(&block)
3 | r=group_by_without_metadata(&block)
4 | if respond_to?(:origin)
5 | r.each do |k,v|
6 | v.origin = origin
7 | v.origin_attribute = origin_attribute
8 | v.member_class = member_class
9 | end
10 | end
11 | r
12 | end
13 | alias_method_chain :group_by, :metadata
14 | end
15 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/model/guest.rb:
--------------------------------------------------------------------------------
1 | module Hobo
2 | module Model
3 | class Guest
4 |
5 | alias_method :has_hobo_method?, :respond_to?
6 |
7 | def to_s
8 | "guest"
9 | end
10 |
11 | def guest?
12 | true
13 | end
14 |
15 | def signed_up?
16 | false
17 | end
18 |
19 | def login
20 | "guest"
21 | end
22 |
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_subsite_taglib_variables.rb:
--------------------------------------------------------------------------------
1 | tags = %(
2 |
3 |
4 | )
5 |
6 | invite_only = %(
7 |
8 | <%= h this.state.titleize %>
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/pages/pages.dryml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/story_statuses/index4.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/front_controller/templates/controller.rb.erb:
--------------------------------------------------------------------------------
1 | class <%= class_name %>Controller < ApplicationController
2 |
3 | hobo_controller
4 |
5 | def index; end
6 |
7 | def summary
8 | if !current_user.administrator?
9 | redirect_to user_login_path
10 | end
11 | end
12 |
13 | def search
14 | if params[:query]
15 | site_search(params[:query])
16 | end
17 | end
18 |
19 | end
20 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_house_controller_tests.rb:
--------------------------------------------------------------------------------
1 | desc "All controller files exists"
2 | files_exist? %w( app/controllers/houses_controller.rb app/helpers/houses_helper.rb )
3 |
4 | test_value_eql? true
5 |
6 | desc "Controller injection matches"
7 | file_include? 'app/controllers/houses_controller.rb',
8 | 'hobo_model_controller',
9 | 'auto_actions :all'
10 |
11 | test_value_eql? true
12 |
--------------------------------------------------------------------------------
/hobo/test/irt/readme.txt:
--------------------------------------------------------------------------------
1 | In order to run the tests, you need git and irt installed, then run:
2 |
3 | $ rake test:irt
4 |
5 | or if you are testing a local repo of hobo, you need to set the:
6 |
7 | $ export HOBODEV=
8 |
9 | With HOBODEV set, if you are using rvm, the /.rvmrc file will be duplicated into
10 | the created testapp, so your test will use the same rvm settings.
11 |
--------------------------------------------------------------------------------
/hobo_fields/lib/hobo_fields/types/html_string.rb:
--------------------------------------------------------------------------------
1 | module HoboFields
2 | module Types
3 | class HtmlString < RawHtmlString
4 |
5 | include SanitizeHtml
6 |
7 | def self.declared(model, name, options)
8 | model.before_save { |record| record[name] = HoboFields::SanitizeHtml.sanitize(record[name]) }
9 | end
10 |
11 | HoboFields.register_type(:html, self)
12 | end
13 |
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/controllers/foos_controller.rb:
--------------------------------------------------------------------------------
1 | class FoosController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all
6 |
7 | show_action :show_editors
8 | show_action :refresh_bug305part
9 |
10 | index_action :bug_414_test do
11 | @my_table = [ { "left" => "unlucky", "right" => 13 },
12 | { "left" => "the answer", "right" => 42} ]
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/fixtures/projects.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/fixtures/stories.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/fixtures/tasks.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/fixtures/users.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_account_user_model_tests.rb:
--------------------------------------------------------------------------------
1 | desc "Account Model files exist"
2 | files_exist? %w(app/models/account.rb)
3 | test_value_eql? true
4 |
5 | desc "Account Model injection matches"
6 | file_include? 'app/models/account.rb',
7 | 'hobo_user_model',
8 | 'fields do',
9 | /name\s+\:string/ ,
10 | /email_address\s+\:email_address/
11 | test_value_eql? true
12 |
--------------------------------------------------------------------------------
/hobo_jquery/vendor/assets/javascripts/hobo-jquery/hjq-search-results.js:
--------------------------------------------------------------------------------
1 | /* search_results */
2 | (function($) {
3 | var first_run = true;
4 | $.fn.hjq_search_results = function(annotations) {
5 | // the first run is page load. Subsequent initializations will happen on ajax update.
6 | if(first_run) first_run = false;
7 | else $("#search-results-box").hjq_dialog_box("open");
8 | }
9 | })( jQuery );
10 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/fixtures/story_statuses.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/story_statuses/index4.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/fixtures/project_memberships.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/fixtures/task_assignments.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/controllers/foos_controller.rb:
--------------------------------------------------------------------------------
1 | class FoosController < ApplicationController
2 |
3 | hobo_model_controller
4 |
5 | auto_actions :all
6 |
7 | show_action :show_editors
8 | show_action :refresh_bug305part
9 |
10 | index_action :bug_414_test do
11 | @my_table = [ { "left" => "unlucky", "right" => 13 },
12 | { "left" => "the answer", "right" => 42} ]
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/fixtures/projects.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/fixtures/stories.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/fixtures/tasks.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/fixtures/users.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/81-periodic-ajax-refresh.markdown:
--------------------------------------------------------------------------------
1 | # Periodic Ajax Refresh
2 |
3 | Originally written by Etern on 2010-09-25.
4 |
5 | Hi All,
6 |
7 | I'm looking for a way to have my ajax hobo page automatically request for new data from the server every X seconds. I know for rails, you can use 'periodically_call_remote', but that doesn't seem to tie in with the update/part/part-local structure of hobo.
8 |
9 | Any help would be much appreciated. Thanks.
--------------------------------------------------------------------------------
/doc/manual/faq/datamapper.markdown:
--------------------------------------------------------------------------------
1 | # What's the difference between Datamapper and Hobo Fields?
2 |
3 | DataMapper and HoboFields both allow you to define and maintain your scheme inside of your models. The big difference is that HoboFields is an extension to ActiveRecord while DataMapper replaces ActiveRecord.
4 |
5 | You can use DataMapper or any other ORM in your Hobo application, but you also lose [Rich Types](/manual/hobo_fields/rich_types).
6 |
7 |
--------------------------------------------------------------------------------
/dryml/CHANGES.txt:
--------------------------------------------------------------------------------
1 | CHANGES:
2 |
3 | - Hobo::Dryml moved to Dryml
4 | - Hobo.static_tags moved to Dryml.static_tags
5 | - core.dryml moved to dryml/taglibs
6 | - generator_directories moved from constant to parameter to Dryml.enable
7 | - APPLICATION_TAGLIB not necessarily loaded automatically
8 | - generator input and output directors no longer hardcoded, must be passed to #enable
9 | - a bunch of functions in hobo.rb moved to dryml.rb
10 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/rapid/taglibs/rapid.dryml:
--------------------------------------------------------------------------------
1 |
10 |
11 | <% Rails.logger.warn ' should be replaced with ' %>
12 |
--------------------------------------------------------------------------------
/hobo_support/lib/generators/hobo_support/eval_template.rb:
--------------------------------------------------------------------------------
1 | module Generators
2 | module HoboSupport
3 | EvalTemplate = classy_module do
4 |
5 | private
6 | def eval_template(template_name)
7 | source = File.expand_path(find_in_source_paths(template_name))
8 | context = instance_eval('binding')
9 | ERB.new(::File.binread(source), nil, '-').result(context)
10 | end
11 |
12 | end
13 | end
14 | end
--------------------------------------------------------------------------------
/integration_tests/agility/db/migrate/20110419124953_project_ownership.rb:
--------------------------------------------------------------------------------
1 | class ProjectOwnership < ActiveRecord::Migration
2 | def self.up
3 | add_column :projects, :owner_id, :integer
4 |
5 | add_index :projects, [:owner_id]
6 | end
7 |
8 | def self.down
9 | remove_column :projects, :owner_id
10 |
11 | remove_index :projects, :name => :index_projects_on_owner_id rescue ActiveRecord::StatementInvalid
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/fixtures/story_statuses.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/46-automating-task-via-cron.markdown:
--------------------------------------------------------------------------------
1 | # Automating task via cron
2 |
3 | Originally written by cbenedict on 2010-07-18.
4 |
5 | How would I go about creating a task that loads the hobo environment, logs me in as administrator, and allows me to call methods on models without having to build methods on controllers to fake this out (and then calling wget or some such via cron)? The use case is sending out daily email reminders. Thanks in advance.
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/invite_only.rb:
--------------------------------------------------------------------------------
1 | module Generators
2 | module Hobo
3 | InviteOnly = classy_module do
4 |
5 | class_option :invite_only,
6 | :aliases => '-i',
7 | :type => :boolean,
8 | :desc => "Add features for an invite only website"
9 |
10 | private
11 |
12 | def invite_only?
13 | options[:invite_only]
14 | end
15 |
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/hobo_fields/lib/hobo_fields/types/text.rb:
--------------------------------------------------------------------------------
1 | require 'active_support/core_ext/string/output_safety'
2 | module HoboFields
3 | module Types
4 | class Text < String
5 |
6 | COLUMN_TYPE = :text
7 |
8 | def to_html(xmldoctype = true)
9 | ERB::Util.html_escape(self).gsub("\n", " \n").html_safe
10 | end
11 |
12 | HoboFields.register_type(:text, self)
13 |
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/hobo_rapid.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/fixtures/project_memberships.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/fixtures/task_assignments.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/32-alow-inplace-editing-of-table-plus.markdown:
--------------------------------------------------------------------------------
1 | # Alow inplace editing of table-plus fields
2 |
3 | Originally written by Clarksta on 2009-04-22.
4 |
5 | Sometimes its a step too far to click the edit control on a table row to view the edit page for that row. So for example in the Agility tutorial, allow editing of the status of a story in the table-plus on the project show page. (Just like the ajaxified editor right on the story page)
6 |
7 | Thanks
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/db/migrate/20110419124953_project_ownership.rb:
--------------------------------------------------------------------------------
1 | class ProjectOwnership < ActiveRecord::Migration
2 | def self.up
3 | add_column :projects, :owner_id, :integer
4 |
5 | add_index :projects, [:owner_id]
6 | end
7 |
8 | def self.down
9 | remove_column :projects, :owner_id
10 |
11 | remove_index :projects, :name => :index_projects_on_owner_id rescue ActiveRecord::StatementInvalid
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/doc/manual/faq/36-how-do-i-specify-primary-and.markdown:
--------------------------------------------------------------------------------
1 | # How do I specify primary and foreign keys for legacy tables?
2 |
3 | Originally written by smvanbru on 2009-06-29.
4 |
5 | I have live legacy tables that I'd like to access with Hobo.
6 |
7 | As such, I'd like to create models around them, but not modify them. One thing I need to do in the models, is specify what the the primary key and foreign keys are. How do I do this with Hobo models?
8 |
9 | Thanks!
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/html/javascript.dryml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | <%= javascript_include_tag name %>
6 |
7 |
8 |
9 | <%= javascript_include_tag this %>
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/assets/stylesheets/front.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the stylesheet manifest file for the front subsite (which
3 | * is your whole application if you don't have any subsites). Files
4 | * or plugins referenced from here or placed in the front/ directory
5 | * will be included.
6 | *
7 | *= require_self
8 | *= require application
9 | *= require hobo_clean
10 | *= require jquery-ui/redmond
11 | *= require_tree ./front
12 | */
13 |
--------------------------------------------------------------------------------
/doc/blog/2008-02-08-docs-1.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | wordpress_id: 192
3 | author_login: admin
4 | layout: page
5 | comments: []
6 |
7 | author: Tom
8 | title: Docs 1
9 | published: true
10 | tags: []
11 |
12 | date: 2008-02-08 11:42:14 +00:00
13 | categories:
14 | - General
15 | author_email: tom@hobocentral.net
16 | wordpress_url: http://hobocentral.net/blog/docs/docs-1/
17 | author_url: http://www.hobocentral.net
18 | status: publish
19 | ---
20 | # This is a page
21 |
--------------------------------------------------------------------------------
/hobo_jquery_ui/vendor/assets/javascripts/hobo-jquery-ui/hjq-autocomplete.js:
--------------------------------------------------------------------------------
1 | /* autocomplete */
2 | (function($) {
3 | $.fn.hjq_autocomplete = function(annotations) {
4 | this.autocomplete(this.hjq('getOptions', annotations)).on("focus", function() {
5 | if($(this).hasClass("nil-value")) {
6 | this.value='';
7 | $(this).removeClass("nil-value");
8 | }
9 | });
10 | };
11 | })( jQuery );
12 |
13 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/html/image.dryml:
--------------------------------------------------------------------------------
1 |
9 | <%=
10 | image_tag(src, Hash[deunderscore_attributes(attributes)])
11 | %>
12 |
--------------------------------------------------------------------------------
/integration_tests/agility/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format
4 | # (all these examples are active by default):
5 | # ActiveSupport::Inflector.inflections do |inflect|
6 | # inflect.plural /^(ox)$/i, '\1en'
7 | # inflect.singular /^(ox)en/i, '\1'
8 | # inflect.irregular 'person', 'people'
9 | # inflect.uncountable %w( fish sheep )
10 | # end
11 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/factories/user_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :user do
3 | name 'Test User'
4 | email_address 'test@example.com'
5 | administrator false
6 | password "test123"
7 | state "active"
8 | end
9 |
10 | factory :admin, :class => User do
11 | name 'Admin User'
12 | email_address 'admin@example.com'
13 | administrator true
14 | password "test123"
15 | state "active"
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/doc/manual/faq/77-how-do-i-change-the-order.markdown:
--------------------------------------------------------------------------------
1 | # How do I change the order of fields in my form or show page?
2 |
3 | Originally written by kevinpfromnm on 2010-08-22.
4 |
5 | It appear that by default text, date and text area input objects are shown
6 | in a New or Edit page prior to any relational input objects, such as
7 | dropdown combos. Is there any way to specify the order without resorting to
8 | too much .dryml?
9 |
10 | Regards
11 |
12 | Christopher
--------------------------------------------------------------------------------
/hobo/Gemfile:
--------------------------------------------------------------------------------
1 | source "http://rubygems.org"
2 |
3 | gem 'rubydoctest', :git => 'git://github.com/bryanlarsen/rubydoctest.git'
4 | gem 'rails', '3.2.12'
5 | gemspec :path => "../dryml"
6 | gemspec :path => "../hobo_support"
7 | gemspec :path => "../hobo_fields"
8 | gemspec
9 | gem 'will_paginate', :git => 'git://github.com/Hobo/will_paginate.git'
10 | platform :ruby do
11 | gem 'sqlite3'
12 | end
13 | platform :jruby do
14 | gem 'activerecord-jdbcsqlite3-adapter'
15 | end
16 |
--------------------------------------------------------------------------------
/hobo_clean_sidemenu/lib/hobo_clean_sidemenu.rb:
--------------------------------------------------------------------------------
1 | module HoboCleanSidemenu
2 |
3 | VERSION = File.read(File.expand_path('../../VERSION', __FILE__)).strip
4 | @@root = Pathname.new File.expand_path('../..', __FILE__)
5 | def self.root; @@root; end
6 |
7 | EDIT_LINK_BASE = "https://github.com/Hobo/hobodoc/edit/master/hobo_clean_sidemenu"
8 |
9 | require 'hobo_clean_sidemenu/railtie' if defined?(Rails)
10 |
11 | class Engine < ::Rails::Engine
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/hobo_fields/lib/hobo_fields/types/lifecycle_state.rb:
--------------------------------------------------------------------------------
1 | module HoboFields
2 | module Types
3 | class LifecycleState < String
4 |
5 | COLUMN_TYPE = :string
6 |
7 | class << self
8 | attr_accessor :model_name
9 | end
10 |
11 | def to_html(xmldoctype = true)
12 | I18n.t("activerecord.attributes.#{self.class.model_name.underscore}.lifecycle.states.#{self}", :default => self).html_safe
13 | end
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/doc/blog/2013-02-20-2-0-0-pre10.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | author: Bryan Larsen
4 | title: "2.0.0.pre10"
5 | date: 2013-02-20 12:00:00 +00:00
6 | author_email: bryan@larsen.st
7 | ---
8 | Sure enough, the bug fix in 2.0.0.pre9 had a regression: some of the cancel links were broken. So here's a 2.0.0.pre10. I definitely hope to have 2.0.0 final available soon.
9 |
10 | We've also added a new tutorial [upgrading a Hobo 1.0 app to Hobo 2.0](/tutorials/upgrade).
11 |
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/41-dynamic-select-menus.markdown:
--------------------------------------------------------------------------------
1 | # Dynamic select menus
2 |
3 | Originally written by marton on 2010-02-22.
4 |
5 | I would like to see how to link/filter two selectors in a form or as inline editor fields.
6 | when choosing one, the second list is refreshed.
7 | these are typical Select-one (or belongs-to).
8 |
9 | Railscasts.com have a screencast on this topic for generic rails: http://railscasts.com/episodes/88-dynamic-select-menus
10 |
11 | /MartOn
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/know-about-rails.markdown:
--------------------------------------------------------------------------------
1 | # What do you need to know about Rails to get started?
2 |
3 | Hobo is built on top of Rails. This is great because there are tons of documentation written for Rails, and you can use that to improve your Hobo application. Spending some time reading about Rails and even trying to create a vanilla Rails application will probably be very useful.
4 |
5 | You can start with the official Rails guide: http://guides.rubyonrails.org/getting_started.html
6 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format
4 | # (all these examples are active by default):
5 | # ActiveSupport::Inflector.inflections do |inflect|
6 | # inflect.plural /^(ox)$/i, '\1en'
7 | # inflect.singular /^(ox)en/i, '\1'
8 | # inflect.irregular 'person', 'people'
9 | # inflect.uncountable %w( fish sheep )
10 | # end
11 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/factories/user_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :user do
3 | name 'Test User'
4 | email_address 'test@example.com'
5 | administrator false
6 | password "test123"
7 | state "active"
8 | end
9 |
10 | factory :admin, :class => User do
11 | name 'Admin User'
12 | email_address 'admin@example.com'
13 | administrator true
14 | password "test123"
15 | state "active"
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/doc/manual/faq/71-how-do-i-rename-or-delete.markdown:
--------------------------------------------------------------------------------
1 | # How do I rename or delete a model?
2 |
3 | Originally written by kevinpfromnm on 2010-08-08.
4 |
5 | Hi,
6 | As you can guess, i am pretty new to hobo, ruby and rails. Enjoying it
7 | though and expecting will learn soon to get past basics:
8 | Currently however please let me know how to rename an existing model
9 | and/or delete an existing model created through hobo
10 | "hobo_model_resource".
11 |
12 | regards
13 | Au
--------------------------------------------------------------------------------
/hobo/lib/hobo/model/lifecycles/state.rb:
--------------------------------------------------------------------------------
1 | module Hobo
2 | module Model
3 | module Lifecycles
4 |
5 | class State < Struct.new(:name, :on_enter, :transitions_out)
6 |
7 | include Actions
8 |
9 | def initialize(*args)
10 | super
11 | self.transitions_out = []
12 | end
13 |
14 |
15 | def activate!(record)
16 | fire_event(record, on_enter)
17 | end
18 |
19 | end
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/doc/manual/faq/26-multi-model-signup-form-and-lifecycle.markdown:
--------------------------------------------------------------------------------
1 | # Multi-model Signup Form and Lifecycle
2 |
3 | Originally written by Bean on 2008-11-15.
4 |
5 | Let's say I have multiple models in addition to 'user' that I want to create and populate on the signup form. Let's say I wanted to use a presenter pattern,and wrap it in a transaction. When 'create' is called on user, it executes the 'create' defined in the lifecycle. do_signup doesn't do the job. How do I handle this?
6 |
7 | Thanks!
--------------------------------------------------------------------------------
/hobo_clean/lib/hobo_clean.rb:
--------------------------------------------------------------------------------
1 | require 'hobo_rapid'
2 | require 'hobo_jquery'
3 |
4 | module HoboClean
5 |
6 | VERSION = File.read(File.expand_path('../../VERSION', __FILE__)).strip
7 | @@root = Pathname.new File.expand_path('../..', __FILE__)
8 | def self.root; @@root; end
9 |
10 | EDIT_LINK_BASE = "https://github.com/Hobo/hobodoc/edit/master/hobo_clean"
11 |
12 | require 'hobo_clean/railtie' if defined?(Rails)
13 |
14 | class Engine < ::Rails::Engine
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/doc/blog/2006-11-06-hello-world.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | wordpress_id: 1
3 | author_login: admin
4 | layout: post
5 | comments: []
6 |
7 | author: Tom
8 | title: Welcome to the Hobo Blog :-)
9 | published: true
10 | tags: []
11 |
12 | date: 2006-11-06 09:31:26 +00:00
13 | categories:
14 | - General
15 | author_email: tom@hobocentral.net
16 | author_url: http://www.hobocentral.net
17 | status: publish
18 | ---
19 | I'm so glad Wordpress didn't turn that smiley into a cute little gif. Old Skool man!
20 |
--------------------------------------------------------------------------------
/integration_tests/agility/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Agility::Application.config.session_store :cookie_store, :key => '_agility_session'
4 |
5 | # Use the database for sessions instead of the cookie-based default,
6 | # which shouldn't be used to store highly confidential information
7 | # (create the session table with "rails generate session_migration")
8 | # Agility::Application.config.session_store :active_record_store
9 |
--------------------------------------------------------------------------------
/integration_tests/agility/test/factories/project_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :story do
3 | title "Sample Story"
4 | body "lorem ipsum blah blah blah"
5 | project
6 | color "#000000"
7 | end
8 |
9 | factory :project do
10 | name "Sample Project"
11 | end
12 |
13 | factory :story_status do
14 | name "status"
15 | end
16 |
17 | factory :task do
18 | description "Task"
19 | position 1
20 | story
21 | end
22 |
23 | end
24 |
--------------------------------------------------------------------------------
/doc/manual/faq/85-how-do-you-organize-your-dryml.markdown:
--------------------------------------------------------------------------------
1 | # How do you organize your .dryml
2 |
3 | Originally written by pehrlich on 2010-11-11.
4 |
5 | What do you find works best for keeping your pages and extensions neat and organized? When you extend a page, do you keep the parameter tags in the order that they appear, or just whichever way you ended up writing them? Or do sort them in some other way, such as wording vs layout vs data?
6 |
7 | How about your application.dryml, what works best there?
--------------------------------------------------------------------------------
/doc/manual/faq/has-one.markdown:
--------------------------------------------------------------------------------
1 | # How come Hobo doesn't display an input for my `has_one`?
2 |
3 | Historically, has_one was a bastard cousin to has_many that made it
4 | difficult to support. We also haven't generally found the need for it,
5 | perhaps because it's not available to us. In the meantime you can
6 | approximate a has_one by using a has_many with validates_length_of to
7 | constrain it to a single item.
8 |
9 | That being said, Peter Pavlovich is working on support for has_one.
10 |
11 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/views/foos/show_editors.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
15 | <%= link_to( "exit editors", this, :id => "exit" ) %>
16 |
17 |
18 |
--------------------------------------------------------------------------------
/doc/manual/faq/50-routing-and-performance.markdown:
--------------------------------------------------------------------------------
1 | # routing and performance
2 |
3 | Originally written by kevinpfromnm on 2010-08-04.
4 |
5 | I was perusing over the initializers in my project, and I saw we have
6 | a hobo initializer. It tells the modelrouter to reload routes on
7 | every page request. The way I understand it, these initializers get
8 | loaded into every environment. Does that mean the hobo router is
9 | reloading its routes on every request, even in production?
10 |
11 | Thanks.
--------------------------------------------------------------------------------
/doc/manual/faq/security.markdown:
--------------------------------------------------------------------------------
1 | # What about security?
2 |
3 | *After the latest mass assignment kerfuffle, what needs to be done to
4 | make Hobo resistant to simple attack?*
5 |
6 | Hobo adds a permission system to Hobo models that will protect them
7 | from mass assignment vulnerabilities. If you have any models in your
8 | app that are not Hobo models, they may still be vulnerable to the
9 | Rails mass-assignment vulnerability and should still be protected via
10 | attr_accessible or similar
11 |
12 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/buttons/update_button.dryml:
--------------------------------------------------------------------------------
1 |
13 | <%
14 | raise Hobo::Error.new("unsupported")
15 | %>
16 |
17 |
--------------------------------------------------------------------------------
/integration_tests/agility/README:
--------------------------------------------------------------------------------
1 | This is the integration test suite for Hobo.
2 |
3 | # Installation
4 |
5 | Install Firefox & Google Chrome.
6 |
7 | Install [ChromeDriver](http://code.google.com/p/selenium/wiki/ChromeDriver)
8 |
9 | Install [capybara-webkit](https://github.com/thoughtbot/capybara-webkit)
10 |
11 | `bundle install`. Do NOT run bundle update. Upgrading capybara often
12 | breaks something somewhere.
13 |
14 | `rake db:migrate`
15 |
16 | # Running
17 |
18 | `rake test:integration`
19 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Agility::Application.config.session_store :cookie_store, :key => '_agility_session'
4 |
5 | # Use the database for sessions instead of the cookie-based default,
6 | # which shouldn't be used to store highly confidential information
7 | # (create the session table with "rails generate session_migration")
8 | # Agility::Application.config.session_store :active_record_store
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/test/factories/project_factory.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :story do
3 | title "Sample Story"
4 | body "lorem ipsum blah blah blah"
5 | project
6 | color "#000000"
7 | end
8 |
9 | factory :project do
10 | name "Sample Project"
11 | end
12 |
13 | factory :story_status do
14 | name "status"
15 | end
16 |
17 | factory :task do
18 | description "Task"
19 | position 1
20 | story
21 | end
22 |
23 | end
24 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/html/section_group.dryml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/views/foos/show_editors.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
15 | <%= link_to( "exit editors", this, :id => "exit" ) %>
16 |
17 |
18 |
--------------------------------------------------------------------------------
/doc/manual/faq/54-how-can-i-change-the-front.markdown:
--------------------------------------------------------------------------------
1 | # how can I change the front page?
2 |
3 | Originally written by kevinpfromnm on 2010-08-04.
4 |
5 | This question answered by recipe: [Replicate the look-and-feel of an existing site](/tutorials/11-replicate-the-look-and-feel-of)
6 |
7 | How can I radically change the index.dryml page? I do not want to
8 | extend the page tag, as I already have developed a completely
9 | different template than the default tabbed first page that hobo
10 | generators provide.
--------------------------------------------------------------------------------
/hobo_support/test/hobosupport/implies.rdoctest:
--------------------------------------------------------------------------------
1 | # HoboSupport - implies
2 |
3 | doctest_require: '../../lib/hobo_support'
4 | {.hidden}
5 |
6 | The implies operator comes from Eiffel. Often comes in handy in Hobo's model-permission methods.
7 |
8 | ## `TrueClass#implies` and `FalseClass#implies`
9 |
10 | >> false.implies true
11 | => true
12 |
13 | >> false.implies false
14 | => true
15 |
16 | >> true.implies true
17 | => true
18 |
19 | >> true.implies false
20 | => false
21 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/README:
--------------------------------------------------------------------------------
1 | This is the integration test suite for Hobo.
2 |
3 | # Installation
4 |
5 | Install Firefox & Google Chrome.
6 |
7 | Install [ChromeDriver](http://code.google.com/p/selenium/wiki/ChromeDriver)
8 |
9 | Install [capybara-webkit](https://github.com/thoughtbot/capybara-webkit)
10 |
11 | `bundle install`. Do NOT run bundle update. Upgrading capybara often
12 | breaks something somewhere.
13 |
14 | `rake db:migrate`
15 |
16 | # Running
17 |
18 | `rake test:integration`
19 |
--------------------------------------------------------------------------------
/doc/manual/faq/67-how-do-i-make-sure-permissions.markdown:
--------------------------------------------------------------------------------
1 | # How do I make sure permissions are right for each model/user?
2 |
3 | Originally written by kevinpfromnm on 2010-08-08.
4 |
5 | It would be very useful to have a section with "effective permissions"
6 | for user/objects on the summary page. Let's say I want to know what
7 | user Bob can do. That's not easy to track down manually, and I fear
8 | that I might have given an user to many rights.
9 |
10 | How do you guys make sure that nothing slips through?
--------------------------------------------------------------------------------
/dryml/cucumber.yml:
--------------------------------------------------------------------------------
1 | <%
2 | rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3 | rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4 | std_opts = "--require features --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
5 | %>
6 | default: <%= std_opts %> features
7 | wip: --tags @wip:3 --wip features
8 | rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
9 |
10 |
--------------------------------------------------------------------------------
/doc/manual/faq/58-how-do-i-get-pagination-to.markdown:
--------------------------------------------------------------------------------
1 | # How do I get pagination to work for child collections on a show page defined with the children view hint?
2 |
3 | Originally written by kevinpfromnm on 2010-08-04.
4 |
5 | This question answered by recipe: [Children Viewhint and Paginate](/tutorials/55-children-viewhint-and-paginate)
6 |
7 | I have what I hope to be a simple question. How do I get pagination to work for child collections on a show page defined with the children view hint?
8 |
9 | Thanks,
10 | Chuck
--------------------------------------------------------------------------------
/hobo_jquery_ui/vendor/assets/javascripts/hobo-jquery-ui/hjq-toggle.js:
--------------------------------------------------------------------------------
1 | /* toggle */
2 | (function($) {
3 | $.fn.hjq_toggle = function(annotations) {
4 | this.on("click", "div.toggle > h3", function(event) {
5 | $this = $(this)
6 | $this.toggleClass('ui-state-active ui-corner-top ui-corner-all');
7 | $this.next().toggleClass('hidden ui-accordion-content-active');
8 | $this.children("span.ui-icon").toggleClass('ui-icon-triangle-1-s ui-icon-triangle-1-e')
9 | });
10 | }
11 | })( jQuery );
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/editors.dryml:
--------------------------------------------------------------------------------
1 | # Are there any editors that cope with DRYML?
2 |
3 | Textmate: [hobo-tmbundle](https://github.com/drnic/hobo-tmbundle)
4 |
5 | VI: [vim-rails](https://github.com/tpope/vim-rails) &&
6 | [hobo-vim](https://github.com/solars/hobo-vim)
7 |
8 | Any other editor that knows how to deal with .html.erb files also
9 | generally works well for DRYML. Emacs users [have several
10 | choices](http://rinari.rubyforge.org/Rhtml-Setup.html#Rhtml-Setup).
11 | RadRails is also used by others in the community.
12 |
--------------------------------------------------------------------------------
/doc/manual/faq/editors.markdown:
--------------------------------------------------------------------------------
1 | # Are there any editors that cope with DRYML?
2 |
3 | Textmate: [hobo-tmbundle](https://github.com/drnic/hobo-tmbundle)
4 |
5 | VI: [vim-rails](https://github.com/tpope/vim-rails) &&
6 | [hobo-vim](https://github.com/solars/hobo-vim)
7 |
8 | Any other editor that knows how to deal with .html.erb files also
9 | generally works well for DRYML. Emacs users [have several
10 | choices](http://rinari.rubyforge.org/Rhtml-Setup.html#Rhtml-Setup).
11 | RadRails is also used by others in the community.
12 |
--------------------------------------------------------------------------------
/dryml/features/step_definitions/dom_comparison.rb:
--------------------------------------------------------------------------------
1 | Then /^the output DOM should be:$/ do |expected_html|
2 | expected_rendered = ''
3 | actual_rendered = ''
4 | formatter = StripFormatter.new
5 | # wrap in html tag, as REXML gets grumpy if there's more than one root node
6 | formatter.write(REXML::Document.new("#{expected_html}"), expected_rendered)
7 | formatter.write(REXML::Document.new("#{@rendered_dom}"), actual_rendered)
8 | actual_rendered.should eq(expected_rendered)
9 | end
10 |
11 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/model.irt:
--------------------------------------------------------------------------------
1 | invoke 'hobo:model', %w(house alpha:string -q)
2 |
3 | eval_file '../partials/_house_model_tests.rb'
4 |
5 | invoke 'hobo:model', %w(nest/ed alpha:string -q)
6 |
7 | desc "Nested files exist"
8 | files_exist? %w( app/models/nest/ed.rb app/models/nest.rb )
9 | test_value_eql? true
10 |
11 | desc "Nested injection matches"
12 | file_include? 'app/models/nest/ed.rb',
13 | 'hobo_model',
14 | 'fields do',
15 | /alpha\s+\:string/
16 | test_value_eql? true
17 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the global stylesheet manifest file. Files or plugins
3 | * referenced from here or placed in the application/ directory will be
4 | * included in all subsites. This file is included by front.css and all
5 | * subsites.
6 | *
7 | *= require_self
8 | *= require hobo_rapid
9 | *= require hobo_jquery
10 | *= require hobo_jquery_ui
11 | *= require hobo_simple_color
12 | *= require hobo_tokeninput
13 | *= require_tree ./application
14 | */
15 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/mailers/user_mailer.rb:
--------------------------------------------------------------------------------
1 | class UserMailer < ActionMailer::Base
2 | default :from => "no-reply@#{host}"
3 |
4 | def forgot_password(user, key)
5 | @user, @key = user, key
6 | mail( :subject => "#{app_name} -- forgotten password",
7 | :to => user.email_address )
8 | end
9 |
10 |
11 | def activation(user, key)
12 | @user, @key = user, key
13 | mail( :subject => "#{app_name} -- activate",
14 | :to => user.email_address )
15 | end
16 |
17 | end
18 |
--------------------------------------------------------------------------------
/doc/manual/faq/16-comments-in-hobo.markdown:
--------------------------------------------------------------------------------
1 | # Comments in Hobo
2 |
3 | Originally written by adamski on 2008-10-20.
4 |
5 | This question answered by recipe: [Simple Cross-Model Comments](/tutorials/7-simple-cross-model-comments)
6 |
7 | I've been trying to get acts_as_commentable working in Hobo.
8 |
9 | Tom also pointed out a part of hobo called Rapid Comments (http://github.com/jgarlick/rapid_comments) but thats totally undocumented at the moment.
10 |
11 | So I wrote my own and realised how easy it is! See recipe link below.
--------------------------------------------------------------------------------
/doc/manual/faq/47-hobo-thingybob-returns-command-not-found.markdown:
--------------------------------------------------------------------------------
1 | # `hobo thingybob` returns "Command Not Found"
2 |
3 | Originally written by eengnerd on 2010-07-19.
4 |
5 | I successfully installed rails and generated a rails app connected to mysql database and then issued the command:
6 |
7 | sudo gem install hobo
8 |
9 | which ran just fine.
10 |
11 | Then typed the command:
12 |
13 | hobo thingybob
14 |
15 | and got the message:
16 |
17 | "Command not found"
18 |
19 | Why not?
20 |
21 | Arthur
--------------------------------------------------------------------------------
/hobo/bin/hobo:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'fileutils'
3 |
4 | if ENV["HOBODEV"]
5 | dev_root = File.expand_path ENV["HOBODEV"], FileUtils.pwd
6 | $:.unshift "#{dev_root}/hobo_support/lib"
7 | else
8 | require 'rubygems'
9 | end
10 |
11 | begin
12 | require 'hobo_support/command'
13 | rescue LoadError
14 | puts "The 'hobo_support' gem is not installed.
15 | You probably need to set the HOBODEV environment variable to your local hobo git-repository path."
16 | exit
17 | end
18 |
19 | HoboSupport::Command.run(:hobo)
20 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/user_mailer.irt:
--------------------------------------------------------------------------------
1 | git_reset_app
2 |
3 | invoke 'hobo:user_mailer', %w[ user -q ]
4 |
5 | eval_file '../partials/_user_mailer_tests.rb'
6 |
7 | ############
8 |
9 | git_reset_app
10 |
11 | desc "User Mailer --invite-only files exist"
12 | invoke 'hobo:user_mailer', %w[ user --invite-only -q ]
13 |
14 | eval_file '../partials/_user_mailer_tests.rb'
15 |
16 | desc "user_mailer.rb file content invite"
17 | file_include? 'app/mailers/user_mailer.rb',
18 | 'def invite'
19 | test_value_eql? true
20 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/lists/labelled_item_list.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/doc/tutorials/screencast.markdown:
--------------------------------------------------------------------------------
1 | Watch Hobo in action! (Full-screen recommended)
4 |
5 |
7 |
8 |
9 | Higher quality: quicktime | vimeo
10 |
11 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_default_users_controller_tests.rb:
--------------------------------------------------------------------------------
1 | desc "All user controller files exists"
2 | files_exist? %w( app/controllers/users_controller.rb app/helpers/users_helper.rb )
3 | test_value_eql? true
4 |
5 |
6 | desc "User controller injection matches"
7 | file_include? 'app/controllers/users_controller.rb',
8 | 'class UsersController < ApplicationController',
9 | 'hobo_user_controller',
10 | 'auto_actions :all, :except => [ :index, :new, :create ]'
11 | test_value_eql? true
12 |
13 |
--------------------------------------------------------------------------------
/hobo_jquery_ui/vendor/assets/javascripts/hobo-jquery-ui/hjq-combobox.js:
--------------------------------------------------------------------------------
1 | /* combobox */
2 | (function($) {
3 | $.fn.hjq_combobox = function(annotations) {
4 | var select = this.find('select');
5 | if(!select.attr('disabled')) {
6 | var options = this.hjq('getOptions', annotations);
7 | options.selected = options.selected || function(event, ui) {
8 | $(this).trigger('change');
9 | }
10 | select.combobox(options);
11 | }
12 | }
13 | })( jQuery );
14 |
--------------------------------------------------------------------------------
/integration_tests/agility/db/migrate/20110419132125_add_project_membership.rb:
--------------------------------------------------------------------------------
1 | class AddProjectMembership < ActiveRecord::Migration
2 | def self.up
3 | create_table :project_memberships do |t|
4 | t.datetime :created_at
5 | t.datetime :updated_at
6 | t.integer :project_id
7 | t.integer :user_id
8 | end
9 | add_index :project_memberships, [:project_id]
10 | add_index :project_memberships, [:user_id]
11 | end
12 |
13 | def self.down
14 | drop_table :project_memberships
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/mailers/user_mailer.rb:
--------------------------------------------------------------------------------
1 | class UserMailer < ActionMailer::Base
2 | default :from => "no-reply@#{host}"
3 |
4 | def forgot_password(user, key)
5 | @user, @key = user, key
6 | mail( :subject => "#{app_name} -- forgotten password",
7 | :to => user.email_address )
8 | end
9 |
10 |
11 | def activation(user, key)
12 | @user, @key = user, key
13 | mail( :subject => "#{app_name} -- activate",
14 | :to => user.email_address )
15 | end
16 |
17 | end
18 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_accounts_users_controller_tests.rb:
--------------------------------------------------------------------------------
1 | desc "All controller files exists"
2 | files_exist? %w( app/controllers/accounts_controller.rb app/helpers/accounts_helper.rb )
3 | test_value_eql? true
4 |
5 |
6 | desc "Controller injection matches"
7 | file_include? 'app/controllers/accounts_controller.rb',
8 | 'class AccountsController < ApplicationController',
9 | 'hobo_user_controller',
10 | 'auto_actions :all, :except => [ :index, :new, :create ]'
11 | test_value_eql? true
12 |
--------------------------------------------------------------------------------
/hobo_fields/bin/hobofields:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'fileutils'
3 |
4 | if ENV["HOBODEV"]
5 | dev_root = File.expand_path ENV["HOBODEV"], FileUtils.pwd
6 | $:.unshift "#{dev_root}/hobo_support/lib"
7 | else
8 | require 'rubygems'
9 | end
10 |
11 | begin
12 | require 'hobo_support/command'
13 | rescue LoadError
14 | puts "The 'hobo_support' gem is not installed.
15 | You probably need to set the HOBODEV environment variable to the local repository path."
16 | exit
17 | end
18 |
19 | HoboSupport::Command.run(:hobofields)
20 |
--------------------------------------------------------------------------------
/hobo_fields/test/prepare_testapp.rb:
--------------------------------------------------------------------------------
1 | require 'fileutils'
2 | require 'tmpdir'
3 |
4 | TESTAPP_PATH = ENV['TESTAPP_PATH'] || File.join(Dir.tmpdir, 'hobo_fields_testapp')
5 | system %(rake test:prepare_testapp TESTAPP_PATH=#{TESTAPP_PATH})
6 | system %(echo "gem 'kramdown'" >> #{TESTAPP_PATH}/Gemfile)
7 | system %(echo "gem 'RedCloth'" >> #{TESTAPP_PATH}/Gemfile)
8 | FileUtils.chdir TESTAPP_PATH
9 | require "#{TESTAPP_PATH}/config/environment"
10 | require 'rails/generators'
11 | Rails::Generators.configure!(Rails.application.config.generators)
12 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/assets/stylesheets/application.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the global stylesheet manifest file. Files or plugins
3 | * referenced from here or placed in the application/ directory will be
4 | * included in all subsites. This file is included by front.css and all
5 | * subsites.
6 | *
7 | *= require_self
8 | *= require hobo_rapid
9 | *= require hobo_jquery
10 | *= require hobo_jquery_ui
11 | *= require hobo_simple_color
12 | *= require hobo_tokeninput
13 | *= require_tree ./application
14 | */
15 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/db/migrate/20110419132125_add_project_membership.rb:
--------------------------------------------------------------------------------
1 | class AddProjectMembership < ActiveRecord::Migration
2 | def self.up
3 | create_table :project_memberships do |t|
4 | t.datetime :created_at
5 | t.datetime :updated_at
6 | t.integer :project_id
7 | t.integer :user_id
8 | end
9 | add_index :project_memberships, [:project_id]
10 | add_index :project_memberships, [:user_id]
11 | end
12 |
13 | def self.down
14 | drop_table :project_memberships
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/doc/manual/faq/1-how-do-you-do-a-recently.markdown:
--------------------------------------------------------------------------------
1 | # How do you do a 'recently active' query in SQL?
2 |
3 | Originally written by Tom on 2008-10-16.
4 |
5 | e.g. say `User has_many :recipes`, how would you write a query that ordered the users who most recently created a recipe first?
6 |
7 | Here's what I tried and it don't be working!
8 |
9 | SELECT * FROM "users"
10 | ORDER BY (select created_at from recipes where recipes.user_id = users.id order by created_at limit 1)
11 | LIMIT 6
12 |
13 | (Yes, my SQL really is that bad)
--------------------------------------------------------------------------------
/doc/manual/faq/61-change-add-modelname-from-select-area.markdown:
--------------------------------------------------------------------------------
1 | # Change "Add ModelName" from select area in 1..n relation
2 |
3 | Originally written by kevinpfromnm on 2010-08-04.
4 |
5 | Hi all,
6 |
7 | I have 1...n relation and hobo creates a select area for it. In this
8 | select area the selected item is "Add ModelName".
9 | Can anyone tell me how to change the text in this select area?
10 | I've already did this for a 1...1 relation but I don't know how to do
11 | this in a 1...n relation.
12 |
13 | Thanks.
14 | Best regards,
15 | Hugo
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/i18n/t.dryml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/extensions/i18n.rb:
--------------------------------------------------------------------------------
1 | I18n.module_eval do
2 | class << self
3 |
4 | def translate_with_show_keys(key, options = {})
5 | translation = translate_without_show_keys(key, options)
6 | return translation unless translation.is_a?(String)
7 | keys = normalize_keys(locale, key, options[:scope]).join('.')
8 | "[#{keys}]" + translation
9 | end
10 | alias_method_chain :translate, :show_keys
11 |
12 | alias_method :t_without_show_keys, :t
13 | alias_method :t, :translate_with_show_keys
14 |
15 | end
16 | end
17 |
18 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/assets/stylesheets/front.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the stylesheet manifest file for the front subsite (which
3 | * is your whole application if you don't have any subsites). Files
4 | * or plugins referenced from here or placed in the front/ directory
5 | * will be included.
6 | *
7 | *= require_self
8 | *= require application
9 | *= require hobo_rapid
10 | *= require hobo_jquery
11 | *= require hobo_jquery_ui
12 | *= require jquery-ui/redmond
13 | *= require hobo_bootstrap
14 | *= require_tree ./front
15 | */
16 |
--------------------------------------------------------------------------------
/doc/manual/faq/legacy-databases.markdown:
--------------------------------------------------------------------------------
1 | # Can Hobo work with legacy databases, and how?
2 |
3 | Hobo supports legacy databases using the same mechanisms that Rails and ActiveRecord do. The only thing really Hobo specific to keep in mind is that the `fields` declaration in your model is optional. In Rails, it serves two primary purposes: to enable the migration generation tool to work, and to enable rich type declaration.
4 |
5 | The former purpose is not necessary with legacy data, so you only need to add `fields` declaration for columns that you wish to declare as a rich type.
--------------------------------------------------------------------------------
/hobo/app/helpers/hobo_debug_helper.rb:
--------------------------------------------------------------------------------
1 | module HoboDebugHelper
2 | extend HoboHelperBase
3 | protected
4 | def abort_with(*args)
5 | raise args.*.pretty_inspect.join("-------\n")
6 | end
7 |
8 | def log_debug(*args)
9 | return if not logger
10 | logger.debug("\n### DRYML Debug ###")
11 | logger.debug(args.*.pretty_inspect.join("-------\n"))
12 | logger.debug("DRYML THIS = #{this.typed_id rescue this.inspect}")
13 | logger.debug("###################\n")
14 | args.first unless args.empty?
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/hobo/test/doctest/prepare_testapp.rb:
--------------------------------------------------------------------------------
1 | require 'fileutils'
2 | require 'tmpdir'
3 |
4 | TESTAPP_PATH = ENV['TESTAPP_PATH'] || File.join(Dir.tmpdir, 'hobo_testapp')
5 | system %(rake test:prepare_testapp TESTAPP_PATH=#{TESTAPP_PATH})
6 | system %(echo "gem 'mocha', :require => false" >> #{TESTAPP_PATH}/Gemfile)
7 | system %(echo "gem 'test-unit'" >> #{TESTAPP_PATH}/Gemfile)
8 | FileUtils.chdir TESTAPP_PATH
9 | require "#{TESTAPP_PATH}/config/environment"
10 | require 'rails/generators'
11 | Rails::Generators.configure!(Rails.application.config.generators)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/integration_tests/agility/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 | # Make sure the secret is at least 30 characters and all random,
6 | # no regular words or you'll be exposed to dictionary attacks.
7 | Agility::Application.config.secret_token = '2b52f50f9588312e7f54c1da19e86baf2d6c8ee9be0003836ce903bb193ad6035ed38c6c90d923c61057c788d9e64d500655de0242c7e2115939f3afe1e2980f'
8 |
--------------------------------------------------------------------------------
/dryml/features/replace_parameters.feature:
--------------------------------------------------------------------------------
1 | Feature: replace parameters
2 |
3 | Scenario: simple replace parameter
4 | Given a file named "doctest_taglib.dryml" with:
5 | """
6 |
7 |
8 |
9 | """
10 | And a file named "doctest.dryml" with:
11 | """
12 | Hello World
13 | """
14 | When I include the taglib "doctest_taglib"
15 | When I render "doctest.dryml"
16 | Then the output DOM should be:
17 | """
18 | Hello World
19 | """
20 |
21 |
22 |
--------------------------------------------------------------------------------
/dryml/lib/dryml/parser/element.rb:
--------------------------------------------------------------------------------
1 | module Dryml::Parser
2 |
3 | class Element < REXML::Element
4 |
5 | def initialize(*args)
6 | super
7 | @elements = Dryml::Parser::Elements.new(self)
8 | end
9 |
10 | def dryml_name
11 | expanded_name.sub(/:.*/, "")
12 | end
13 |
14 | attr_accessor :start_tag_source, :source_offset
15 |
16 | attr_writer :has_end_tag
17 | def has_end_tag?
18 | @has_end_tag
19 | end
20 |
21 | def parameter_tag?
22 | expanded_name =~ /:$/
23 | end
24 |
25 | end
26 |
27 | end
28 |
--------------------------------------------------------------------------------
/doc/manual/faq/application-dryml-reload.markdown:
--------------------------------------------------------------------------------
1 | # My changes to application.dryml are being ignored.
2 |
3 | Development mode in Hobo 2.0 is a lot faster than development mode in
4 | Hobo 1.3. Part of the reason is because it's a little bit pickier
5 | about what files it reloads when things change. To force a reload of
6 | application.dryml or front_site.dryml, simply touch the dryml file for
7 | your current view. For example, if you touch app/views/foos/show.dryml
8 | and then reload /foos/17, all changed DRYML files that are required by
9 | show.dryml will be reloaded.
10 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/assets/templates/application.js:
--------------------------------------------------------------------------------
1 | // This file is included in all sites and subsites. This is a
2 | // manifest file that'll be compiled into including all the files
3 | // listed below. Add new JavaScript/Coffee code in separate files in
4 | // the application directory and they'll automatically be included.
5 | // It's not advisable to add code directly here, but if you do, it'll
6 | // appear at the bottom of the the compiled file.
7 | //
8 | //= require jquery
9 | //= require jquery_ujs
10 | //= require jquery-ui
11 | //= require_tree ./application
12 |
--------------------------------------------------------------------------------
/hobo/lib/hobo/model/scopes/apply_scopes.rb:
--------------------------------------------------------------------------------
1 | module Hobo
2 | module Model
3 | module Scopes
4 | module ApplyScopes
5 |
6 | def apply_scopes(scopes)
7 | result = scoped
8 | scopes.each_pair do |scope, arg|
9 | if arg.is_a?(Array)
10 | result = result.send(scope, *arg) unless arg.first.blank?
11 | else
12 | result = result.send(scope, arg) unless arg.blank?
13 | end
14 | end
15 | result
16 | end
17 |
18 | end
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/hobo/test/irt/generators/partials/_user_mailer_tests.rb:
--------------------------------------------------------------------------------
1 |
2 | desc "User Mailer files exist"
3 | files_exist? ["app/mailers/user_mailer.rb", "app/views/user_mailer/forgot_password.erb"]
4 | test_value_eql? true
5 |
6 | desc "user_mailer.rb file content"
7 | file_include? 'app/mailers/user_mailer.rb',
8 | 'class UserMailer'
9 | test_value_eql? true
10 |
11 | desc "forgot_password.erb file content"
12 | file_include? 'app/views/user_mailer/forgot_password.erb',
13 | '<%= @user %>',
14 | 'If you have forgotten'
15 | test_value_eql? true
16 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 | # Make sure the secret is at least 30 characters and all random,
6 | # no regular words or you'll be exposed to dictionary attacks.
7 | Agility::Application.config.secret_token = '2b52f50f9588312e7f54c1da19e86baf2d6c8ee9be0003836ce903bb193ad6035ed38c6c90d923c61057c788d9e64d500655de0242c7e2115939f3afe1e2980f'
8 |
--------------------------------------------------------------------------------
/doc/manual/faq/79-how-can-you-generate-an-empty.markdown:
--------------------------------------------------------------------------------
1 | # How can you generate an empty page?
2 |
3 | Originally written by tonlap on 2010-08-30.
4 |
5 | We created a calender with a rails plugin and it worked. Now we have the calender-page and we try to implemt it inside a ne page. But how do you create one?
6 | When you generate a new page without any database customizations there is an error.
7 | We can create the menu entry but can't create the rest like there is at Home.
8 |
9 | rgds tonlap
10 |
11 | I like the approach of Hobo but it's not so easy to get started with.
--------------------------------------------------------------------------------
/doc/manual/faq/22-limit-a-classified-site-to-one.markdown:
--------------------------------------------------------------------------------
1 | # Limit a classified site to one region ?
2 |
3 | Originally written by daveporter on 2008-10-30.
4 |
5 | OK We have a site something like the POD Classified app...
6 |
7 | I have a similar application in development, but for vehicles.
8 |
9 | But I'm in Australia and if someone is in Queensland they would not want to look at cars in Western Australia for example.
10 |
11 | So I want to know how to limit the viewing of classified vehicles to one state, being a drop down control always visible ?
12 |
13 | Dave Porter
14 |
--------------------------------------------------------------------------------
/doc/tutorials/6-running-a-hobo-application-on-heroku.markdown:
--------------------------------------------------------------------------------
1 | # Running a Hobo Application on Heroku
2 |
3 | Originally written by Owen on 2008-10-20.
4 |
5 | This recipe answers [How to get a Hobo app working on Heroku.com](/manual/faq/17-how-to-get-a-hobo-app)
6 |
7 | This is link to a draft in PDF format.
8 |
9 | This was done a while ago...needs testing! Describes how to upload and run an app developed on your laptop to Heroku, including mirgrating existing data.
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/dryml/lib/dryml/parser/elements.rb:
--------------------------------------------------------------------------------
1 | module Dryml::Parser
2 |
3 | class Elements < REXML::Elements
4 |
5 | # Override to ensure DRYML elements are created
6 | def add(element=nil)
7 | rv = nil
8 | if element.nil?
9 | Dryml::Parser::Element.new("", self, @element.context)
10 | elsif not element.kind_of?(Element)
11 | Dryml::Parser::Element.new(element, self, @element.context)
12 | else
13 | @element << element
14 | element.context = @element.context
15 | element
16 | end
17 | end
18 |
19 | end
20 |
21 | end
22 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/subsite/templates/site.js.erb:
--------------------------------------------------------------------------------
1 | // This is a manifest file for the <%= name %> subsite. It will be
2 | // compiled into including all the files listed below. Add new
3 | // JavaScript/Coffee code in separate files in the <%= name %>
4 | // directory and they'll automatically be included in the compiled
5 | // file accessible from http://example.com/assets/<%= name %>.js It's
6 | // not advisable to add code directly here, but if you do, it'll
7 | // appear at the bottom of the the compiled file.
8 | //
9 | //= require application
10 | //= require_tree ./<%= name %>
11 |
--------------------------------------------------------------------------------
/hobo_jquery/vendor/assets/javascripts/hobo-jquery/hjq-live-search.js:
--------------------------------------------------------------------------------
1 | /* live_search */
2 | (function($) {
3 | $.fn.hjq_live_search = function(annotations) {
4 | var form=this.children("form");
5 | // form.on("rapid:ajax:success.live_search", function() {
6 | // $.each(form.hjq("getUpdateIds", form.data('rapid').form.ajax_attrs), function() {
7 | // $("#"+this).trigger("rapid:open_search_results");
8 | // });
9 | // });
10 |
11 | // TODO: call form.trigger('submit') on keystroke pause
12 | }
13 | })( jQuery );
14 |
--------------------------------------------------------------------------------
/hobo_rapid/lib/hobo_rapid.rb:
--------------------------------------------------------------------------------
1 | ActiveSupport::Dependencies.autoload_paths |= [File.dirname(__FILE__)]
2 | ActiveSupport::Dependencies.autoload_once_paths |= [File.dirname(__FILE__)]
3 |
4 | module HoboRapid
5 |
6 | VERSION = File.read(File.expand_path('../../VERSION', __FILE__)).strip
7 | @@root = Pathname.new File.expand_path('../..', __FILE__)
8 | def self.root; @@root; end
9 |
10 | EDIT_LINK_BASE = "https://github.com/Hobo/hobodoc/edit/master/hobo_rapid"
11 |
12 | require 'hobo_rapid/railtie' if defined?(Rails)
13 |
14 | class Engine < ::Rails::Engine
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/cards/card.dryml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/integration_tests/agility/app/models/bat.rb:
--------------------------------------------------------------------------------
1 | class Bat < ActiveRecord::Base
2 |
3 | hobo_model # Don't put anything above this
4 |
5 | fields do
6 | name :string
7 | timestamps
8 | end
9 |
10 | belongs_to :baz
11 |
12 |
13 | # --- Permissions --- #
14 |
15 | def create_permitted?
16 | acting_user.administrator?
17 | end
18 |
19 | def update_permitted?
20 | acting_user.administrator?
21 | end
22 |
23 | def destroy_permitted?
24 | acting_user.administrator?
25 | end
26 |
27 | def view_permitted?(field)
28 | true
29 | end
30 |
31 | end
32 |
--------------------------------------------------------------------------------
/doc/tutorials/62-full-stack-testing-a-hobo-application.markdown:
--------------------------------------------------------------------------------
1 | # Full stack testing a Hobo Application
2 |
3 | Originally written by umuro on 2010-12-04.
4 |
5 | Reuse of DRYML and controller logic in Hobo allows us to apply the same test pattern for all the controllers in the project.
6 | Roll your application complete with functional and acceptance tests. RSpec, Steak, Capybara, FactoryGirl and Shoulda are hands-on demonstrated on a project:
7 |
8 | __[Full stack testing a Hobo Application](http://conceptspace.wikidot.com/blog:all-about-testing-hobo-organizations-revisited)__
9 |
10 |
11 |
--------------------------------------------------------------------------------
/hobo/lib/generators/hobo/admin_subsite/templates/site.js.erb:
--------------------------------------------------------------------------------
1 | // This is a manifest file for the <%= name %> subsite. It will be
2 | // compiled into including all the files listed below. Add new
3 | // JavaScript/Coffee code in separate files in the <%= name %>
4 | // directory and they'll automatically be included in the compiled
5 | // file accessible from http://example.com/assets/<%= name %>.js It's
6 | // not advisable to add code directly here, but if you do, it'll
7 | // appear at the bottom of the the compiled file.
8 | //
9 | //= require application
10 | //= require_tree ./<%= name %>
11 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/inputs/or_cancel.dryml:
--------------------------------------------------------------------------------
1 |
3 |
4 | orCancel
5 |
6 | orCancel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/integration_tests/agility_bootstrap/app/models/bat.rb:
--------------------------------------------------------------------------------
1 | class Bat < ActiveRecord::Base
2 |
3 | hobo_model # Don't put anything above this
4 |
5 | fields do
6 | name :string
7 | timestamps
8 | end
9 |
10 | belongs_to :baz
11 |
12 |
13 | # --- Permissions --- #
14 |
15 | def create_permitted?
16 | acting_user.administrator?
17 | end
18 |
19 | def update_permitted?
20 | acting_user.administrator?
21 | end
22 |
23 | def destroy_permitted?
24 | acting_user.administrator?
25 | end
26 |
27 | def view_permitted?(field)
28 | true
29 | end
30 |
31 | end
32 |
--------------------------------------------------------------------------------
/doc/manual/faq/this.markdown:
--------------------------------------------------------------------------------
1 | # What's the difference between `this` and `@foos`
2 |
3 | The default index action for a hobo controller named FoosController will assign the list of foos to both `this` and `@foos`.
4 |
5 | In the view, `this` will change, always holding the current context while `@foos` won't change unless you do it yourself.
6 |
7 | Hobo controllers contain methods that ensure that those two variables are initially set to the same value. So these three lines are essentially identical.
8 |
9 | @foos = Foo.all
10 | self.this = Foo.all
11 | @foos = self.this = Foo.all
12 |
13 |
--------------------------------------------------------------------------------
/doc/manual/why.markdown:
--------------------------------------------------------------------------------
1 | Why Hobo?
2 | {.document-title}
3 |
4 | When choosing a technology stack, you have a large number of alternatives to choose from. We believe Ruby on Rails and Hobo are appropriate for most projects. What are Hobo's advantages over it's competitors?
5 |
6 | * [Hobo vs ActiveAdmin/RailsAdmin/Django: Flexibility Matters](/manual/flexibility-matters)
7 |
8 | * [Hobo/Rails vs Server Side Javascript](/manual/vs-node)
9 |
10 | * [Hobo vs Client Side Javascript](/manual/vs-client-side)
11 |
12 | * [Beginners and Advanced Users](/manual/who)
13 |
14 | * [Security](/manual/security)
15 |
--------------------------------------------------------------------------------
/hobo_rapid/taglibs/forms/submit.dryml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/doc/manual/faq/83-internationalization-i18n.markdown:
--------------------------------------------------------------------------------
1 | # Internationalization i18n
2 |
3 | Originally written by charlesdeb on 2010-10-10.
4 |
5 | Dear folks,
6 |
7 | Does anyone have any simple code that they have use to internationalise a project? The hobo documentation explains how to set up the translation keys - and that works fine for me. I am wondering more about what I need to do to set up language choice drop downs and then have my URLs reflect that. I have tried following the info on the Rails website, but Hobo seems to break a couple of their suggestions.
8 |
9 | cheers,
10 |
11 | charles de b
--------------------------------------------------------------------------------
/doc/tutorials/29-national-characters-to-ascii-letters-for.markdown:
--------------------------------------------------------------------------------
1 | # National characters to ascii letters for user-friendly URLs
2 |
3 | Originally written by Adam Hoscilo on 2009-06-18.
4 |
5 | Simple way to have nice URLs:
6 | 1. use this lib:
7 | 2. in your Model add 'to\_param' method that looks something like this:
8 |
9 | example:
10 |
11 | def to_param
12 | "#{self.id}-#{self.name.to_textual_id}"
13 | end
14 |
15 | I've made few changes to that lib. My version looks like this:
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------