Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
# Namespace for classes and modules that handle serving documentation over HTTP # @since 0.6.0
| SELECT s.id as SubID, s.subdomain AS Subdomain, s.name AS Company, u.email AS UEmail, u.first_name AS First_name, u.last_name AS Last_name, | |
| subs.subscription_plan_id AS PlanID, rp.amount AS Amount, s.created_at AS Created_At, current_login_at AS Last_Login, i_s.mtdb_id AS MtdbID, s.identity AS Identity | |
| FROM users u | |
| JOIN subscribers s ON s.id = u.subscriber_id | |
| JOIN infrastructure_production.subscribers i_s ON i_s.id = s.id AND i_s.referral_token_id != 4 | |
| JOIN infrastructure_production.subscriptions subs ON i_s.id = subs.subscriber_id | |
| JOIN infrastructure_production.subscription_plans sub_p ON sub_p.id = subs.subscription_plan_id AND sub_p.id NOT IN (6,12) AND sub_p.category != 'beta' | |
| JOIN infrastructure_production.renewal_periods rp ON rp.id = renewal_period_id | |
| WHERE UPPER(s.subdomain) NOT LIKE 'NBB' | |
| AND u.admin = 1 |
| before "deploy:update_code", "deploy:clear_release_path" | |
| namespace :deploy do | |
| desc "Clear the release_path for a new checkout" | |
| task :clear_release_path, :roles=>[:app] do | |
| run "rm -rf #{release_path}" | |
| end | |
| end |
| module Capistrano | |
| class Configuration | |
| module Servers | |
| # Identifies all servers that the given task should be executed on. | |
| # The options hash accepts the same arguments as #find_servers, and any | |
| # preexisting options there will take precedence over the options in | |
| # the task. | |
| def find_servers_for_task(task, options={}) | |
| find_servers(task.options.merge(options)) | |
| end |
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
# Namespace for classes and modules that handle serving documentation over HTTP # @since 0.6.0
| group :development, :test do | |
| gem 'ruby-debug' | |
| gem "rspec-rails", ">= 2.0.0.beta.17" | |
| end |
| boot.rb patches the initialzer to memoize the Bundler.require | |
| the preinitializer runs | |
| The environment.rb is loaded | |
| logging is required before the Rails::Initializer.run |
| describe Api::ApiController, "base controller" do | |
| integrate_views | |
| before(:all) do | |
| $api_token = User.first.single_access_token | |
| end | |
| after(:all) do | |
| ApplicationGlobals.subscriber = subscriber = Subscriber.find(0) | |
| subscriber.create_default_preferences! unless subscriber.preferences_set? |
| # bundle update vendor/bundler_gems | |
| # Sources | |
| source "http://gemcutter.org" | |
| source "http://gems.github.com" | |
| # Stack | |
| gem "rails", "2.3.4" | |
| gem "rack", "1.0.1" | |
| gem 'mysql', "2.7" |
| # Allows Tasks that have no servers to be skipped instead of raising a NoMatchingServersError | |
| module Capistrano | |
| class Configuration | |
| module Connections | |
| def execute_on_servers(options={}) | |
| raise ArgumentError, "expected a block" unless block_given? | |
| if task = current_task | |
| servers = find_servers_for_task(task, options) |
| namespace :bundler do | |
| task :install do | |
| run("#{sudo} gem install bundler --source=http://gemcutter.org") | |
| end | |
| task :symlink_vendor do | |
| shared_gems = File.join(shared_path, 'vendor/gems') | |
| release_gems = "#{release_path}/vendor/gems/" | |
| %w(cache gems specifications).each do |sub_dir| | |
| shared_sub_dir = File.join(shared_gems, sub_dir) |