bushido 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +23 -0
- data/Rakefile +9 -3
- data/app/controllers/bushido/data_controller.rb +4 -2
- data/app/controllers/bushido/envs_controller.rb +11 -3
- data/bushido.gemspec +1 -0
- data/lib/bushido/data.rb +44 -29
- data/lib/bushido/envs.rb +3 -31
- data/lib/bushido/hooks.rb +38 -0
- data/lib/bushido/ido_schema.rb +17 -0
- data/lib/bushido/middleware.rb +6 -5
- data/lib/bushido/models.rb +144 -0
- data/lib/bushido/orm/active_record.rb +44 -0
- data/lib/bushido/orm/mongoid.rb +31 -0
- data/lib/bushido/platform.rb +4 -1
- data/lib/bushido/schema.rb +42 -0
- data/lib/bushido/version.rb +1 -1
- data/lib/bushido.rb +17 -2
- data/lib/engine.rb +4 -7
- data/lib/generators/active_record/bushido_generator.rb +28 -0
- data/lib/generators/active_record/templates/migration.rb +20 -0
- data/lib/generators/bushido/bushido_generator.rb +14 -0
- data/lib/generators/bushido/install_generator.rb +24 -0
- data/lib/generators/bushido/orm_helpers.rb +21 -0
- data/lib/generators/mongoid/bushido_generator.rb +17 -0
- data/lib/generators/templates/README +5 -0
- data/lib/generators/templates/bushido.rb +10 -0
- data/lib/rails/#routes.rb# +16 -0
- data/test/controllers/envs_controller_test.rb +21 -0
- data/test/rails_app/Rakefile +9 -0
- data/test/rails_app/app/controllers/application_controller.rb +7 -0
- data/test/rails_app/app/helpers/application_helper.rb +2 -0
- data/test/rails_app/app/views/application/index.html.erb +1 -0
- data/test/rails_app/app/views/layouts/application.html.erb +14 -0
- data/test/rails_app/config/application.rb +50 -0
- data/test/rails_app/config/boot.rb +10 -0
- data/test/rails_app/config/database.yml +22 -0
- data/test/rails_app/config/environment.rb +5 -0
- data/test/rails_app/config/environments/development.rb +26 -0
- data/test/rails_app/config/environments/production.rb +49 -0
- data/test/rails_app/config/environments/test.rb +35 -0
- data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app/config/initializers/inflections.rb +10 -0
- data/test/rails_app/config/initializers/mime_types.rb +5 -0
- data/test/rails_app/config/initializers/secret_token.rb +7 -0
- data/test/rails_app/config/initializers/session_store.rb +8 -0
- data/test/rails_app/config/locales/en.yml +5 -0
- data/test/rails_app/config/routes.rb +62 -0
- data/test/rails_app/config.ru +4 -0
- data/test/rails_app/db/development.sqlite3 +0 -0
- data/test/rails_app/db/test.sqlite3 +0 -0
- data/test/rails_app/log/development.log +66 -0
- data/test/rails_app/log/production.log +0 -0
- data/test/rails_app/log/server.log +0 -0
- data/test/rails_app/log/test.log +0 -0
- data/test/rails_app/public/404.html +26 -0
- data/test/rails_app/public/422.html +26 -0
- data/test/rails_app/public/500.html +26 -0
- data/test/rails_app/public/favicon.ico +0 -0
- data/test/rails_app/public/javascripts/application.js +2 -0
- data/test/rails_app/public/javascripts/controls.js +965 -0
- data/test/rails_app/public/javascripts/dragdrop.js +974 -0
- data/test/rails_app/public/javascripts/effects.js +1123 -0
- data/test/rails_app/public/javascripts/prototype.js +6001 -0
- data/test/rails_app/public/javascripts/rails.js +191 -0
- data/test/rails_app/public/stylesheets/.gitkeep +0 -0
- data/test/rails_app/script/rails +6 -0
- data/test/test_helper.rb +9 -0
- metadata +154 -79
- data/config/routes.rb +0 -1
- data/test/routes_test.rb +0 -12
- data/test/test_executable.rb +0 -10
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'rails/generators/active_record'
|
2
|
+
require 'generators/bushido/orm_helpers'
|
3
|
+
|
4
|
+
module ActiveRecord
|
5
|
+
module Generators
|
6
|
+
class BushidoGenerator < ActiveRecord::Generators::Base
|
7
|
+
argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
|
8
|
+
|
9
|
+
include Bushido::Generators::OrmHelpers
|
10
|
+
source_root File.expand_path("../templates", __FILE__)
|
11
|
+
|
12
|
+
def generate_model
|
13
|
+
invoke "active_record:model", [name], :migration => false unless model_exists?
|
14
|
+
end
|
15
|
+
|
16
|
+
def copy_bushido_migration
|
17
|
+
migration_template "migration.rb", "db/migrate/bushido_create_#{table_name}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def inject_bushido_content
|
21
|
+
inject_into_class model_path, class_name, model_contents + <<-CONTENT
|
22
|
+
# Setup accessible (or protected) attributes for your model
|
23
|
+
attr_accessible :bushido_id, :bushido_version
|
24
|
+
CONTENT
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class BushidoCreate<%= table_name.camelize %> < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table(:<%= table_name %>) do |t|
|
4
|
+
t.string :bushido_id
|
5
|
+
t.string :bushido_version
|
6
|
+
|
7
|
+
<% for attribute in attributes -%>
|
8
|
+
t.<%= attribute.type %> :<%= attribute.name %>
|
9
|
+
<% end -%>
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
|
14
|
+
add_index :<%= table_name %>, :bushido_id, :unique => true
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
drop_table :<%= table_name %>
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Bushido
|
2
|
+
module Generators
|
3
|
+
class BushidoGenerator < Rails::Generators::NamedBase
|
4
|
+
namespace "bushido"
|
5
|
+
source_root File.expand_path("../templates", __FILE__)
|
6
|
+
|
7
|
+
desc "Generates a model with the given NAME (if one does not exist) with Bushido " <<
|
8
|
+
"configuration plus a migration file and devise routes."
|
9
|
+
|
10
|
+
hook_for :orm
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# require 'active_support/secure_random'
|
2
|
+
|
3
|
+
module Bushido
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
source_root File.expand_path("../../templates", __FILE__)
|
7
|
+
|
8
|
+
desc "Creates a Devise initializer and copy locale files to your application."
|
9
|
+
class_option :orm
|
10
|
+
|
11
|
+
def copy_initializer
|
12
|
+
template "bushido.rb", "config/initializers/bushido.rb"
|
13
|
+
end
|
14
|
+
|
15
|
+
# def copy_locale
|
16
|
+
# copy_file "../../../config/locales/en.yml", "config/locales/devise.en.yml"
|
17
|
+
# end
|
18
|
+
|
19
|
+
def show_readme
|
20
|
+
readme "README" if behavior == :invoke
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Bushido
|
2
|
+
module Generators
|
3
|
+
module OrmHelpers
|
4
|
+
def model_contents
|
5
|
+
<<-CONTENT
|
6
|
+
# Bind to a shared Bushido model
|
7
|
+
bushido :customer_lead
|
8
|
+
|
9
|
+
CONTENT
|
10
|
+
end
|
11
|
+
|
12
|
+
def model_exists?
|
13
|
+
File.exists?(File.join(destination_root, model_path))
|
14
|
+
end
|
15
|
+
|
16
|
+
def model_path
|
17
|
+
@model_path ||= File.join("app", "models", "#{file_path}.rb")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'generators/bushido/orm_helpers'
|
2
|
+
|
3
|
+
module Mongoid
|
4
|
+
module Generators
|
5
|
+
class bushidoGenerator < Rails::Generators::NamedBase
|
6
|
+
include bushido::Generators::OrmHelpers
|
7
|
+
|
8
|
+
def generate_model
|
9
|
+
invoke "mongoid:model", [name] unless model_exists?
|
10
|
+
end
|
11
|
+
|
12
|
+
def inject_bushido_content
|
13
|
+
inject_into_file model_path, model_contents, :after => "include Mongoid::Document\n"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bushido.setup do |config|
|
2
|
+
#We should abstract this way and intelligently pick the orm
|
3
|
+
|
4
|
+
# ==> ORM configuration
|
5
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
6
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
7
|
+
# available as additional gems.
|
8
|
+
require 'bushido/orm/<%= options[:orm] %>'
|
9
|
+
|
10
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module ActionDispatch::Routing
|
2
|
+
class RouteSet #:nodoc:
|
3
|
+
Mapper.class_eval do
|
4
|
+
def bushido_routes
|
5
|
+
puts "ADDING THE MOTHERFUCKING ROUTES"
|
6
|
+
|
7
|
+
Rails.application.routes.draw do
|
8
|
+
namespace 'bushido' do
|
9
|
+
resources :envs, :only => [ :update ]
|
10
|
+
match '/data' => "data#index"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class EnvsControllerTest < ActionController::TestCase
|
4
|
+
tests Bushido::EnvsController
|
5
|
+
|
6
|
+
# test "should route to envs" do
|
7
|
+
# assert_routing '/', { :controller => "application", :action => "turd"}
|
8
|
+
# #assert_routing '/bushido/envs/1.json', { :controller => "envs", :action => "update"}
|
9
|
+
# end
|
10
|
+
test "updates env var on post" do
|
11
|
+
post :controller => :envs, :action => :update,
|
12
|
+
:params => {
|
13
|
+
:key => ENV["BUSHIDO_APP_KEY"],
|
14
|
+
:id => "env_id",
|
15
|
+
:value => "env_value"
|
16
|
+
}
|
17
|
+
|
18
|
+
assert_equal 200, response.status
|
19
|
+
assert_equal ENV["env_id"], "env_value"
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,9 @@
|
|
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
|
+
require 'rake/testtask'
|
7
|
+
require 'rake/rdoctask'
|
8
|
+
|
9
|
+
Rails.application.load_tasks
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>dummy app</h1>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "active_model/railtie"
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_view/railtie"
|
7
|
+
require "action_mailer/railtie"
|
8
|
+
|
9
|
+
Bundler.require :default, :test
|
10
|
+
|
11
|
+
require "bushido"
|
12
|
+
|
13
|
+
puts "dummy app start"
|
14
|
+
puts Bushido::Data.inspect
|
15
|
+
puts Bushido::DataController.inspect
|
16
|
+
|
17
|
+
module Dummy
|
18
|
+
class Application < Rails::Application
|
19
|
+
# Settings in config/environments/* take precedence over those specified here.
|
20
|
+
# Application configuration should go into files in config/initializers
|
21
|
+
# -- all .rb files in that directory are automatically loaded.
|
22
|
+
|
23
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
24
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
25
|
+
|
26
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
27
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
28
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
29
|
+
|
30
|
+
# Activate observers that should always be running.
|
31
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
32
|
+
|
33
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
34
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
35
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
36
|
+
|
37
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
38
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
39
|
+
# config.i18n.default_locale = :de
|
40
|
+
|
41
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
42
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
43
|
+
|
44
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
45
|
+
config.encoding = "utf-8"
|
46
|
+
|
47
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
48
|
+
config.filter_parameters += [:password]
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test:
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Only use best-standards-support built into browsers
|
24
|
+
config.action_dispatch.best_standards_support = :builtin
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
|
43
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
+
# the I18n.default_locale when a translation can not be found)
|
45
|
+
config.i18n.fallbacks = true
|
46
|
+
|
47
|
+
# Send deprecation notices to registered listeners
|
48
|
+
config.active_support.deprecation = :notify
|
49
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,10 @@
|
|
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
|
@@ -0,0 +1,7 @@
|
|
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
|
+
Dummy::Application.config.secret_token = '9ccf744918100309e39c317bd4a9305c3c427febdad14a034c93b83234aaac4a3ab1a15af558424afe05229c44fd9876db82bd7cc586b38810dffdf0c98d4803'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_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
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,62 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
|
3
|
+
root :to => "application#index"
|
4
|
+
|
5
|
+
bushido_routes
|
6
|
+
# The priority is based upon order of creation:
|
7
|
+
# first created -> highest priority.
|
8
|
+
|
9
|
+
# Sample of regular route:
|
10
|
+
# match 'products/:id' => 'catalog#view'
|
11
|
+
# Keep in mind you can assign values other than :controller and :action
|
12
|
+
|
13
|
+
# Sample of named route:
|
14
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
15
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
16
|
+
|
17
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
18
|
+
# resources :products
|
19
|
+
|
20
|
+
# Sample resource route with options:
|
21
|
+
# resources :products do
|
22
|
+
# member do
|
23
|
+
# get 'short'
|
24
|
+
# post 'toggle'
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# collection do
|
28
|
+
# get 'sold'
|
29
|
+
# end
|
30
|
+
# end
|
31
|
+
|
32
|
+
# Sample resource route with sub-resources:
|
33
|
+
# resources :products do
|
34
|
+
# resources :comments, :sales
|
35
|
+
# resource :seller
|
36
|
+
# end
|
37
|
+
|
38
|
+
# Sample resource route with more complex sub-resources
|
39
|
+
# resources :products do
|
40
|
+
# resources :comments
|
41
|
+
# resources :sales do
|
42
|
+
# get 'recent', :on => :collection
|
43
|
+
# end
|
44
|
+
# end
|
45
|
+
|
46
|
+
# Sample resource route within a namespace:
|
47
|
+
# namespace :admin do
|
48
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
49
|
+
# # (app/controllers/admin/products_controller.rb)
|
50
|
+
# resources :products
|
51
|
+
# end
|
52
|
+
|
53
|
+
# You can have the root of your site routed with "root"
|
54
|
+
# just remember to delete public/index.html.
|
55
|
+
# root :to => "welcome#index"
|
56
|
+
|
57
|
+
# See how all your routes lay out with "rake routes"
|
58
|
+
|
59
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
60
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
61
|
+
# match ':controller(/:action(/:id(.:format)))'
|
62
|
+
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,66 @@
|
|
1
|
+
DEPRECATION WARNING: config.action_view.debug_rjs will be removed in 3.1, from 3.1 onwards you will need to install prototype-rails to continue to use RJS templates . (called from service at /Users/kevisazombie/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111)
|
2
|
+
|
3
|
+
|
4
|
+
Started GET "/" for 127.0.0.1 at 2011-06-24 17:56:21 -0700
|
5
|
+
Processing by ApplicationController#index as HTML
|
6
|
+
Completed 500 Internal Server Error in 20ms
|
7
|
+
|
8
|
+
ActionView::MissingTemplate (Missing template application/index with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/Users/kevisazombie/Projects/Web/bushidogem/test/rails_app/app/views", "/Users/kevisazombie/Projects/Web/bushidogem/app/views"):
|
9
|
+
|
10
|
+
|
11
|
+
Rendered /Users/kevisazombie/.rvm/gems/ruby-1.9.2-p180@bushidogem/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/missing_template.erb within rescues/layout (1.0ms)
|
12
|
+
|
13
|
+
|
14
|
+
Started GET "/" for 127.0.0.1 at 2011-06-24 17:56:28 -0700
|
15
|
+
Processing by ApplicationController#index as HTML
|
16
|
+
Completed 500 Internal Server Error in 4ms
|
17
|
+
|
18
|
+
ActionView::MissingTemplate (Missing template application/index with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/Users/kevisazombie/Projects/Web/bushidogem/test/rails_app/app/views", "/Users/kevisazombie/Projects/Web/bushidogem/app/views"):
|
19
|
+
|
20
|
+
|
21
|
+
Rendered /Users/kevisazombie/.rvm/gems/ruby-1.9.2-p180@bushidogem/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/missing_template.erb within rescues/layout (0.9ms)
|
22
|
+
|
23
|
+
|
24
|
+
Started GET "/" for 127.0.0.1 at 2011-06-24 17:57:14 -0700
|
25
|
+
Processing by ApplicationController#index as HTML
|
26
|
+
Rendered application/index.html.erb within layouts/application (1.7ms)
|
27
|
+
Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)
|
28
|
+
|
29
|
+
|
30
|
+
Started GET "/" for 127.0.0.1 at 2011-06-24 17:57:16 -0700
|
31
|
+
Processing by ApplicationController#index as HTML
|
32
|
+
Rendered application/index.html.erb within layouts/application (1.7ms)
|
33
|
+
Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)
|
34
|
+
DEPRECATION WARNING: config.action_view.debug_rjs will be removed in 3.1, from 3.1 onwards you will need to install prototype-rails to continue to use RJS templates . (called from <top (required)> at /Users/kevisazombie/Projects/Web/bushidogem/test/rails_app/app/controllers/application_controller.rb:1)
|
35
|
+
DEPRECATION WARNING: config.action_view.debug_rjs will be removed in 3.1, from 3.1 onwards you will need to install prototype-rails to continue to use RJS templates . (called from service at /Users/kevisazombie/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111)
|
36
|
+
|
37
|
+
|
38
|
+
Started GET "/" for 127.0.0.1 at 2011-06-24 17:58:13 -0700
|
39
|
+
Processing by ApplicationController#index as HTML
|
40
|
+
Rendered application/index.html.erb within layouts/application (1.7ms)
|
41
|
+
Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)
|
42
|
+
|
43
|
+
|
44
|
+
Started PUT "/" for 127.0.0.1 at 2011-06-24 17:58:43 -0700
|
45
|
+
Processing by ApplicationController#index as
|
46
|
+
Rendered application/index.html.erb within layouts/application (1.7ms)
|
47
|
+
Completed 200 OK in 13ms (Views: 12.8ms | ActiveRecord: 0.0ms)
|
48
|
+
|
49
|
+
|
50
|
+
Started PUT "/bushido/envs/cool.json" for 127.0.0.1 at 2011-06-24 17:59:16 -0700
|
51
|
+
Processing by Bushido::EnvsController#update as JSON
|
52
|
+
Parameters: {"value"=>"awesome", "id"=>"cool"}
|
53
|
+
Completed 500 Internal Server Error in 3ms
|
54
|
+
|
55
|
+
NameError (uninitialized constant Bushido::Hooks):
|
56
|
+
|
57
|
+
|
58
|
+
Rendered /Users/kevisazombie/.rvm/gems/ruby-1.9.2-p180@bushidogem/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.2ms)
|
59
|
+
Rendered /Users/kevisazombie/.rvm/gems/ruby-1.9.2-p180@bushidogem/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (4.0ms)
|
60
|
+
Rendered /Users/kevisazombie/.rvm/gems/ruby-1.9.2-p180@bushidogem/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (9.8ms)
|
61
|
+
|
62
|
+
|
63
|
+
Started PUT "/bushido/envs/cool.json" for 127.0.0.1 at 2011-06-24 18:00:03 -0700
|
64
|
+
Processing by Bushido::EnvsController#update as JSON
|
65
|
+
Parameters: {"value"=>"awesome", "id"=>"cool"}
|
66
|
+
Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.0ms)
|
File without changes
|
File without changes
|
File without changes
|