eco_apps_master 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/eco_apps_master.rb +13 -0
- data/lib/eco_apps_master/controllers/core_services_controller.rb +18 -0
- data/lib/eco_apps_master/controllers/routes.rb +3 -0
- data/lib/eco_apps_master/models/app.rb +7 -0
- data/lib/eco_apps_master/models/app_migration.rb +16 -0
- data/lib/eco_apps_master/models/app_sweeper.rb +20 -0
- data/spec/spec.opts +5 -0
- data/spec/test_app/app/controllers/application_controller.rb +10 -0
- data/spec/test_app/app/helpers/application_helper.rb +3 -0
- data/spec/test_app/config/app_config.yml +24 -0
- data/spec/test_app/config/boot.rb +110 -0
- data/spec/test_app/config/database.yml +3 -0
- data/spec/test_app/config/environment.rb +13 -0
- data/spec/test_app/config/environments/development.rb +17 -0
- data/spec/test_app/config/environments/production.rb +28 -0
- data/spec/test_app/config/environments/test.rb +28 -0
- data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/test_app/config/initializers/inflections.rb +10 -0
- data/spec/test_app/config/initializers/mime_types.rb +5 -0
- data/spec/test_app/config/initializers/new_rails_defaults.rb +21 -0
- data/spec/test_app/config/initializers/session_store.rb +15 -0
- data/spec/test_app/config/routes.rb +43 -0
- data/spec/test_app/db/test.sqlite3 +0 -0
- data/spec/test_app/log/test.log +337 -0
- data/spec/test_app/spec/controllers/core_services_controller_spec.rb +11 -0
- data/spec/test_app/spec/models/app_migration_spec.rb +9 -0
- data/spec/test_app/spec/models/app_spec.rb +9 -0
- data/spec/test_app/spec/spec_helper.rb +60 -0
- metadata +99 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'active_record'
|
3
|
+
require 'action_controller'
|
4
|
+
|
5
|
+
require 'eco_apps_master/models/app'
|
6
|
+
require 'eco_apps_master/models/app_sweeper'
|
7
|
+
require 'eco_apps_master/models/app_migration'
|
8
|
+
|
9
|
+
IN_ECO_APPS_MASTER = true
|
10
|
+
|
11
|
+
require 'eco_apps'
|
12
|
+
require 'eco_apps_master/controllers/core_services_controller'
|
13
|
+
ActionController::Routing::Routes.add_configuration_file(File.join(File.dirname(__FILE__),"eco_apps_master/controllers/routes.rb"))
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CoreServicesController < ActionController::Base
|
2
|
+
caches_action :show
|
3
|
+
cache_sweeper :app_sweeper, :only => [:reset_config]
|
4
|
+
ip_limited_access
|
5
|
+
|
6
|
+
def reset_config
|
7
|
+
app = App.find_or_create_by_name(params[:app][:name])
|
8
|
+
app.attributes = params[:app]
|
9
|
+
app.save
|
10
|
+
render :xml => "<info>ok</info>", :status => :ok
|
11
|
+
end
|
12
|
+
|
13
|
+
def show
|
14
|
+
app = App.find_by_name(params[:id])
|
15
|
+
render :xml => (app.blank? ? {:error => "not exist"} : app).to_xml
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class AppMigration < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :apps do |t|
|
4
|
+
t.string :name, :url
|
5
|
+
t.text :database, :api
|
6
|
+
t.timestamps
|
7
|
+
end
|
8
|
+
add_index :apps, :name
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.down
|
12
|
+
drop_table :apps
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
AppMigration.up unless App.table_exists?
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class AppSweeper < ActionController::Caching::Sweeper
|
2
|
+
observe App
|
3
|
+
|
4
|
+
def after_create(obj)
|
5
|
+
expire_cache_for(obj)
|
6
|
+
end
|
7
|
+
|
8
|
+
def after_destroy(obj)
|
9
|
+
expire_cache_for(obj)
|
10
|
+
end
|
11
|
+
|
12
|
+
def after_update(obj)
|
13
|
+
expire_cache_for(obj)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
def expire_cache_for(obj)
|
18
|
+
expire_action(url_for(:controller => '/core_services', :action => 'show', :id=>obj.name, :format=>"xml"))
|
19
|
+
end
|
20
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Filters added to this controller apply to all controllers in the application.
|
2
|
+
# Likewise, all the methods added will be available for all controllers.
|
3
|
+
|
4
|
+
class ApplicationController < ActionController::Base
|
5
|
+
helper :all # include all helpers, all the time
|
6
|
+
protect_from_forgery # See ActionController::RequestForgeryProtection for details
|
7
|
+
|
8
|
+
# Scrub sensitive parameters from your log
|
9
|
+
# filter_parameter_logging :password
|
10
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Configuration of app
|
2
|
+
name: test_app
|
3
|
+
|
4
|
+
#options
|
5
|
+
#url: #url of app
|
6
|
+
#api: #api of this app
|
7
|
+
|
8
|
+
#mock settings for other app (basically used in development environment)
|
9
|
+
#development:
|
10
|
+
# scenario: #other app's name
|
11
|
+
# url:
|
12
|
+
# database:
|
13
|
+
# adapter: mysql
|
14
|
+
# encoding: utf8
|
15
|
+
# database: lpr_development
|
16
|
+
# host: localhost
|
17
|
+
# user: root
|
18
|
+
# password: root
|
19
|
+
# other app's settings
|
20
|
+
|
21
|
+
# columns needed for readonly models in test
|
22
|
+
#readonly_for_test:
|
23
|
+
# study_records:
|
24
|
+
# integer: interaction_id, user_id, scenario_id
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# Don't change this file!
|
2
|
+
# Configure your app in config/environment.rb and config/environments/*.rb
|
3
|
+
|
4
|
+
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
5
|
+
|
6
|
+
module Rails
|
7
|
+
class << self
|
8
|
+
def boot!
|
9
|
+
unless booted?
|
10
|
+
preinitialize
|
11
|
+
pick_boot.run
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def booted?
|
16
|
+
defined? Rails::Initializer
|
17
|
+
end
|
18
|
+
|
19
|
+
def pick_boot
|
20
|
+
(vendor_rails? ? VendorBoot : GemBoot).new
|
21
|
+
end
|
22
|
+
|
23
|
+
def vendor_rails?
|
24
|
+
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
25
|
+
end
|
26
|
+
|
27
|
+
def preinitialize
|
28
|
+
load(preinitializer_path) if File.exist?(preinitializer_path)
|
29
|
+
end
|
30
|
+
|
31
|
+
def preinitializer_path
|
32
|
+
"#{RAILS_ROOT}/config/preinitializer.rb"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class Boot
|
37
|
+
def run
|
38
|
+
load_initializer
|
39
|
+
Rails::Initializer.run(:set_load_path)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class VendorBoot < Boot
|
44
|
+
def load_initializer
|
45
|
+
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
46
|
+
Rails::Initializer.run(:install_gem_spec_stubs)
|
47
|
+
Rails::GemDependency.add_frozen_gem_path
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
class GemBoot < Boot
|
52
|
+
def load_initializer
|
53
|
+
self.class.load_rubygems
|
54
|
+
load_rails_gem
|
55
|
+
require 'initializer'
|
56
|
+
end
|
57
|
+
|
58
|
+
def load_rails_gem
|
59
|
+
if version = self.class.gem_version
|
60
|
+
gem 'rails', version
|
61
|
+
else
|
62
|
+
gem 'rails'
|
63
|
+
end
|
64
|
+
rescue Gem::LoadError => load_error
|
65
|
+
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
66
|
+
exit 1
|
67
|
+
end
|
68
|
+
|
69
|
+
class << self
|
70
|
+
def rubygems_version
|
71
|
+
Gem::RubyGemsVersion rescue nil
|
72
|
+
end
|
73
|
+
|
74
|
+
def gem_version
|
75
|
+
if defined? RAILS_GEM_VERSION
|
76
|
+
RAILS_GEM_VERSION
|
77
|
+
elsif ENV.include?('RAILS_GEM_VERSION')
|
78
|
+
ENV['RAILS_GEM_VERSION']
|
79
|
+
else
|
80
|
+
parse_gem_version(read_environment_rb)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def load_rubygems
|
85
|
+
min_version = '1.3.2'
|
86
|
+
require 'rubygems'
|
87
|
+
unless rubygems_version >= min_version
|
88
|
+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
89
|
+
exit 1
|
90
|
+
end
|
91
|
+
|
92
|
+
rescue LoadError
|
93
|
+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
94
|
+
exit 1
|
95
|
+
end
|
96
|
+
|
97
|
+
def parse_gem_version(text)
|
98
|
+
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
99
|
+
end
|
100
|
+
|
101
|
+
private
|
102
|
+
def read_environment_rb
|
103
|
+
File.read("#{RAILS_ROOT}/config/environment.rb")
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# All that for this:
|
110
|
+
Rails.boot!
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file
|
2
|
+
|
3
|
+
# Specifies gem version of Rails to use when vendor/rails is not present
|
4
|
+
RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
|
5
|
+
|
6
|
+
# Bootstrap the Rails environment, frameworks, and default configuration
|
7
|
+
require File.join(File.dirname(__FILE__), 'boot')
|
8
|
+
|
9
|
+
Rails::Initializer.run do |config|
|
10
|
+
config.gem 'eco_apps_master'
|
11
|
+
config.gem 'eco_apps'
|
12
|
+
config.time_zone = 'UTC'
|
13
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# In the development environment your application's code is reloaded on
|
4
|
+
# every request. This slows down response time but is perfect for development
|
5
|
+
# since you don't have to restart the webserver when you make code changes.
|
6
|
+
config.cache_classes = false
|
7
|
+
|
8
|
+
# Log error messages when you accidentally call methods on nil.
|
9
|
+
config.whiny_nils = true
|
10
|
+
|
11
|
+
# Show full error reports and disable caching
|
12
|
+
config.action_controller.consider_all_requests_local = true
|
13
|
+
config.action_view.debug_rjs = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# The production environment is meant for finished, "live" apps.
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.action_controller.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
config.action_view.cache_template_loading = true
|
11
|
+
|
12
|
+
# See everything in the log (default is :info)
|
13
|
+
# config.log_level = :debug
|
14
|
+
|
15
|
+
# Use a different logger for distributed setups
|
16
|
+
# config.logger = SyslogLogger.new
|
17
|
+
|
18
|
+
# Use a different cache store in production
|
19
|
+
# config.cache_store = :mem_cache_store
|
20
|
+
|
21
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
22
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
23
|
+
|
24
|
+
# Disable delivery errors, bad email addresses will be ignored
|
25
|
+
# config.action_mailer.raise_delivery_errors = false
|
26
|
+
|
27
|
+
# Enable threaded mode
|
28
|
+
# config.threadsafe!
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# The test environment is used exclusively to run your application's
|
4
|
+
# test suite. You never need to work with it otherwise. Remember that
|
5
|
+
# your test database is "scratch space" for the test suite and is wiped
|
6
|
+
# and recreated between test runs. Don't rely on the data there!
|
7
|
+
config.cache_classes = true
|
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.action_controller.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
config.action_view.cache_template_loading = true
|
16
|
+
|
17
|
+
# Disable request forgery protection in test environment
|
18
|
+
config.action_controller.allow_forgery_protection = false
|
19
|
+
|
20
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
21
|
+
# The :test delivery method accumulates sent emails in the
|
22
|
+
# ActionMailer::Base.deliveries array.
|
23
|
+
config.action_mailer.delivery_method = :test
|
24
|
+
|
25
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
26
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
27
|
+
# like if you have constraints or database-specific column types
|
28
|
+
# config.active_record.schema_format = :sql
|
@@ -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 do debug a problem that might steem 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,21 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# These settings change the behavior of Rails 2 apps and will be defaults
|
4
|
+
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
5
|
+
|
6
|
+
if defined?(ActiveRecord)
|
7
|
+
# Include Active Record class name as root for JSON serialized output.
|
8
|
+
ActiveRecord::Base.include_root_in_json = true
|
9
|
+
|
10
|
+
# Store the full class name (including module namespace) in STI type column.
|
11
|
+
ActiveRecord::Base.store_full_sti_class = true
|
12
|
+
end
|
13
|
+
|
14
|
+
ActionController::Routing.generate_best_match = false
|
15
|
+
|
16
|
+
# Use ISO 8601 format for JSON serialized times and dates.
|
17
|
+
ActiveSupport.use_standard_json_time_format = true
|
18
|
+
|
19
|
+
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
20
|
+
# if you're including raw json in an HTML page.
|
21
|
+
ActiveSupport.escape_html_entities_in_json = false
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying cookie session data integrity.
|
4
|
+
# If you change this key, all old sessions 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
|
+
ActionController::Base.session = {
|
8
|
+
:key => '_test_app_session',
|
9
|
+
:secret => '008b0b745dfb9337a04a63118b7da51780f377bb579db8bdddbc4fbf548b470ed211663a31762fa7cec761a7d87ac129f2506ea38c23836cd0d2636efa5b21a1'
|
10
|
+
}
|
11
|
+
|
12
|
+
# Use the database for sessions instead of the cookie-based default,
|
13
|
+
# which shouldn't be used to store highly confidential information
|
14
|
+
# (create the session table with "rake db:sessions:create")
|
15
|
+
# ActionController::Base.session_store = :active_record_store
|
@@ -0,0 +1,43 @@
|
|
1
|
+
ActionController::Routing::Routes.draw do |map|
|
2
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
+
|
4
|
+
# Sample of regular route:
|
5
|
+
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
6
|
+
# Keep in mind you can assign values other than :controller and :action
|
7
|
+
|
8
|
+
# Sample of named route:
|
9
|
+
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
10
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
11
|
+
|
12
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
13
|
+
# map.resources :products
|
14
|
+
|
15
|
+
# Sample resource route with options:
|
16
|
+
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
17
|
+
|
18
|
+
# Sample resource route with sub-resources:
|
19
|
+
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
20
|
+
|
21
|
+
# Sample resource route with more complex sub-resources
|
22
|
+
# map.resources :products do |products|
|
23
|
+
# products.resources :comments
|
24
|
+
# products.resources :sales, :collection => { :recent => :get }
|
25
|
+
# end
|
26
|
+
|
27
|
+
# Sample resource route within a namespace:
|
28
|
+
# map.namespace :admin do |admin|
|
29
|
+
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
30
|
+
# admin.resources :products
|
31
|
+
# end
|
32
|
+
|
33
|
+
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
34
|
+
# map.root :controller => "welcome"
|
35
|
+
|
36
|
+
# See how all your routes lay out with "rake routes"
|
37
|
+
|
38
|
+
# Install the default routes as the lowest priority.
|
39
|
+
# Note: These default routes make all actions in every controller accessible via GET requests. You should
|
40
|
+
# consider removing or commenting them out if you're using named routes and resources.
|
41
|
+
map.connect ':controller/:action/:id'
|
42
|
+
map.connect ':controller/:action/:id.:format'
|
43
|
+
end
|
Binary file
|
@@ -0,0 +1,337 @@
|
|
1
|
+
# Logfile created on Tue Jul 06 15:58:35 +0800 2010 [4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
2
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
3
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
4
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
5
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
6
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
7
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
8
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
9
|
+
[4;36;1mComment Columns (0.0ms)[0m [0;1mMysql::Error: Table 'article_development.comments' doesn't exist: SHOW FIELDS FROM `article_development`.`comments`[0m
|
10
|
+
[4;36;1mSQL (0.3ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
11
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
12
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
13
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
14
|
+
[4;36;1mComment Columns (0.0ms)[0m [0;1mSHOW FIELDS FROM `article_development`.`comments`[0m
|
15
|
+
[4;35;1mSQL (0.0ms)[0m [0mBEGIN[0m
|
16
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mROLLBACK[0m
|
17
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
18
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
19
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
20
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
21
|
+
[4;36;1mComment Columns (0.0ms)[0m [0;1mSHOW FIELDS FROM `article_development`.`comments`[0m
|
22
|
+
[4;35;1mSQL (0.0ms)[0m [0mBEGIN[0m
|
23
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mROLLBACK[0m
|
24
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
25
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
26
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
27
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
28
|
+
[4;36;1mComment Columns (2.6ms)[0m [0;1mSHOW FIELDS FROM `article_development`.`comments`[0m
|
29
|
+
[4;35;1mSQL (0.0ms)[0m [0mBEGIN[0m
|
30
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mROLLBACK[0m
|
31
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
32
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
33
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
34
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
35
|
+
[4;36;1mComment Columns (0.0ms)[0m [0;1mSHOW FIELDS FROM `article_development`.`comments`[0m
|
36
|
+
[4;35;1mSQL (0.2ms)[0m [0mBEGIN[0m
|
37
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mROLLBACK[0m
|
38
|
+
[4;36;1mSQL (0.9ms)[0m [0;1m SELECT name
|
39
|
+
FROM sqlite_master
|
40
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
41
|
+
[0m
|
42
|
+
[4;35;1mSQL (0.4ms)[0m [0mselect sqlite_version(*)[0m
|
43
|
+
[4;36;1mSQL (0.2ms)[0m [0;1m SELECT name
|
44
|
+
FROM sqlite_master
|
45
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
46
|
+
[0m
|
47
|
+
[4;35;1mSQL (1.3ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
48
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
49
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
50
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
51
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
52
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
53
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
54
|
+
[4;36;1mSQL (2.9ms)[0m [0;1m SELECT name
|
55
|
+
FROM sqlite_master
|
56
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
57
|
+
[0m
|
58
|
+
[4;35;1mSQL (0.4ms)[0m [0mselect sqlite_version(*)[0m
|
59
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
60
|
+
FROM sqlite_master
|
61
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
62
|
+
[0m
|
63
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
64
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
65
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
66
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
67
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
68
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
69
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
70
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
71
|
+
FROM sqlite_master
|
72
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
73
|
+
[0m
|
74
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
75
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
76
|
+
FROM sqlite_master
|
77
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
78
|
+
[0m
|
79
|
+
[4;35;1mSQL (10.7ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
80
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
81
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
82
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
83
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT DATABASE() as db[0m
|
84
|
+
[4;36;1mSQL (0.3ms)[0m [0;1mBEGIN[0m
|
85
|
+
[4;35;1mSQL (0.2ms)[0m [0mROLLBACK[0m
|
86
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
87
|
+
FROM sqlite_master
|
88
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
89
|
+
[0m
|
90
|
+
[4;35;1mSQL (0.4ms)[0m [0mselect sqlite_version(*)[0m
|
91
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
92
|
+
FROM sqlite_master
|
93
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
94
|
+
[0m
|
95
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
96
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
97
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
98
|
+
[4;36;1mSQL (0.3ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
99
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
100
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
101
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
102
|
+
[4;36;1mSQL (10.4ms)[0m [0;1m SELECT name
|
103
|
+
FROM sqlite_master
|
104
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
105
|
+
[0m
|
106
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
107
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
108
|
+
FROM sqlite_master
|
109
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
110
|
+
[0m
|
111
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
112
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
113
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
114
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
115
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT DATABASE() as db[0m
|
116
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
117
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
118
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
119
|
+
FROM sqlite_master
|
120
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
121
|
+
[0m
|
122
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
123
|
+
[4;36;1mSQL (10.9ms)[0m [0;1m SELECT name
|
124
|
+
FROM sqlite_master
|
125
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
126
|
+
[0m
|
127
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
128
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
129
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
130
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
131
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
132
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
133
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
134
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
135
|
+
FROM sqlite_master
|
136
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
137
|
+
[0m
|
138
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
139
|
+
[4;36;1mSQL (11.1ms)[0m [0;1m SELECT name
|
140
|
+
FROM sqlite_master
|
141
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
142
|
+
[0m
|
143
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
144
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
145
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
146
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
147
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
148
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
149
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
150
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
151
|
+
FROM sqlite_master
|
152
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
153
|
+
[0m
|
154
|
+
[4;35;1mSQL (0.5ms)[0m [0mselect sqlite_version(*)[0m
|
155
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
156
|
+
FROM sqlite_master
|
157
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
158
|
+
[0m
|
159
|
+
[4;35;1mSQL (4.1ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
160
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
161
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
162
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
163
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT DATABASE() as db[0m
|
164
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
165
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
166
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
167
|
+
FROM sqlite_master
|
168
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
169
|
+
[0m
|
170
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
171
|
+
[4;36;1mSQL (12.1ms)[0m [0;1m SELECT name
|
172
|
+
FROM sqlite_master
|
173
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
174
|
+
[0m
|
175
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
176
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
177
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
178
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
179
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
180
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
181
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
182
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
183
|
+
FROM sqlite_master
|
184
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
185
|
+
[0m
|
186
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
187
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
188
|
+
FROM sqlite_master
|
189
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
190
|
+
[0m
|
191
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
192
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
193
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
194
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
195
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
196
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
197
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
198
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
199
|
+
FROM sqlite_master
|
200
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
201
|
+
[0m
|
202
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
203
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
204
|
+
FROM sqlite_master
|
205
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
206
|
+
[0m
|
207
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
208
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
209
|
+
[4;35;1mSQL (0.4ms)[0m [0mSELECT DATABASE() as db[0m
|
210
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
211
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
212
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
213
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
214
|
+
[4;36;1mSQL (2.0ms)[0m [0;1m SELECT name
|
215
|
+
FROM sqlite_master
|
216
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
217
|
+
[0m
|
218
|
+
[4;35;1mSQL (0.5ms)[0m [0mselect sqlite_version(*)[0m
|
219
|
+
[4;36;1mSQL (0.2ms)[0m [0;1m SELECT name
|
220
|
+
FROM sqlite_master
|
221
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
222
|
+
[0m
|
223
|
+
[4;35;1mSQL (16.6ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
224
|
+
[4;36;1mSQL (2.1ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
225
|
+
[4;35;1mSQL (1.4ms)[0m [0mSELECT DATABASE() as db[0m
|
226
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
227
|
+
[4;35;1mSQL (0.3ms)[0m [0mSELECT DATABASE() as db[0m
|
228
|
+
[4;36;1mSQL (0.3ms)[0m [0;1mBEGIN[0m
|
229
|
+
[4;35;1mSQL (0.3ms)[0m [0mROLLBACK[0m
|
230
|
+
[4;36;1mSQL (0.9ms)[0m [0;1m SELECT name
|
231
|
+
FROM sqlite_master
|
232
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
233
|
+
[0m
|
234
|
+
[4;35;1mSQL (0.4ms)[0m [0mselect sqlite_version(*)[0m
|
235
|
+
[4;36;1mSQL (0.2ms)[0m [0;1m SELECT name
|
236
|
+
FROM sqlite_master
|
237
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
238
|
+
[0m
|
239
|
+
[4;35;1mSQL (1.2ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
240
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
241
|
+
[4;35;1mSQL (1.3ms)[0m [0mSELECT DATABASE() as db[0m
|
242
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
243
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT DATABASE() as db[0m
|
244
|
+
[4;36;1mSQL (1.3ms)[0m [0;1mBEGIN[0m
|
245
|
+
[4;35;1mSQL (0.2ms)[0m [0mROLLBACK[0m
|
246
|
+
[4;36;1mSQL (0.4ms)[0m [0;1m SELECT name
|
247
|
+
FROM sqlite_master
|
248
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
249
|
+
[0m
|
250
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
251
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
252
|
+
FROM sqlite_master
|
253
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
254
|
+
[0m
|
255
|
+
[4;35;1mSQL (0.0ms)[0m [0mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
256
|
+
[4;36;1mSQL (2.6ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
257
|
+
[4;35;1mSQL (2.2ms)[0m [0mSELECT DATABASE() as db[0m
|
258
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
|
259
|
+
[4;35;1mSQL (0.0ms)[0m [0mSELECT DATABASE() as db[0m
|
260
|
+
[4;36;1mSQL (0.0ms)[0m [0;1mBEGIN[0m
|
261
|
+
[4;35;1mSQL (0.0ms)[0m [0mROLLBACK[0m
|
262
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
263
|
+
FROM sqlite_master
|
264
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
265
|
+
[0m
|
266
|
+
[4;35;1mSQL (0.0ms)[0m [0mselect sqlite_version(*)[0m
|
267
|
+
[4;36;1mSQL (92.4ms)[0m [0;1mCREATE TABLE "apps" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "url" varchar(255), "database" text, "api" text, "created_at" datetime, "updated_at" datetime) [0m
|
268
|
+
[4;35;1mSQL (19.2ms)[0m [0mCREATE INDEX "index_apps_on_name" ON "apps" ("name")[0m
|
269
|
+
[4;36;1mSQL (6.1ms)[0m [0;1m SELECT name
|
270
|
+
FROM sqlite_master
|
271
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
272
|
+
[0m
|
273
|
+
[4;36;1mSQL (6.3ms)[0m [0;1m SELECT name
|
274
|
+
FROM sqlite_master
|
275
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
276
|
+
[0m
|
277
|
+
[4;35;1mSQL (0.7ms)[0m [0m SELECT name
|
278
|
+
FROM sqlite_master
|
279
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
280
|
+
[0m
|
281
|
+
[4;36;1mApp Create (0.0ms)[0m [0;1mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-07 10:03:06', '2010-07-07 10:03:06', 'http://www.test.com', NULL, NULL)[0m
|
282
|
+
[4;35;1mApp Create (0.3ms)[0m [0mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-07 10:03:06', '2010-07-07 10:03:06', '/test', NULL, NULL)[0m
|
283
|
+
|
284
|
+
|
285
|
+
Processing CoreServicesController#reset_config (for 0.0.0.0 at 2010-07-07 18:03:06) [POST]
|
286
|
+
Parameters: {"app"=>{"name"=>"test", "url"=>"http://www.test.com"}}
|
287
|
+
[4;36;1mApp Load (15.8ms)[0m [0;1mSELECT * FROM "apps" WHERE ("apps"."name" = 'test') LIMIT 1[0m
|
288
|
+
[4;35;1mApp Create (13.6ms)[0m [0mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-07 10:03:06', '2010-07-07 10:03:06', '/test', NULL, NULL)[0m
|
289
|
+
[4;36;1mApp Update (0.3ms)[0m [0;1mUPDATE "apps" SET "updated_at" = '2010-07-07 10:03:06', "url" = 'http://www.test.com' WHERE "id" = 1[0m
|
290
|
+
Completed in 69ms (View: 1, DB: 37) | 200 OK [http://test.host/core_services/reset_config?app%5Bname%5D=test&app%5Burl%5D=http%3A%2F%2Fwww.test.com]
|
291
|
+
[4;35;1mApp Load (2.7ms)[0m [0mSELECT * FROM "apps" LIMIT 1[0m
|
292
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
293
|
+
FROM sqlite_master
|
294
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
295
|
+
[0m
|
296
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
297
|
+
FROM sqlite_master
|
298
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
299
|
+
[0m
|
300
|
+
[4;35;1mSQL (0.0ms)[0m [0m SELECT name
|
301
|
+
FROM sqlite_master
|
302
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
303
|
+
[0m
|
304
|
+
[4;36;1mApp Create (31.3ms)[0m [0;1mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-27 09:21:23', '2010-07-27 09:21:23', 'http://www.test.com', NULL, NULL)[0m
|
305
|
+
[4;35;1mApp Create (0.0ms)[0m [0mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-27 09:21:23', '2010-07-27 09:21:23', '/test', NULL, NULL)[0m
|
306
|
+
|
307
|
+
|
308
|
+
Processing CoreServicesController#reset_config (for 0.0.0.0 at 2010-07-27 17:21:23) [POST]
|
309
|
+
Parameters: {"app"=>{"name"=>"test", "url"=>"http://www.test.com"}}
|
310
|
+
[4;36;1mApp Load (9.0ms)[0m [0;1mSELECT * FROM "apps" WHERE ("apps"."name" = 'test') LIMIT 1[0m
|
311
|
+
[4;35;1mApp Create (0.0ms)[0m [0mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-27 09:21:24', '2010-07-27 09:21:24', '/test', NULL, NULL)[0m
|
312
|
+
[4;36;1mApp Update (0.0ms)[0m [0;1mUPDATE "apps" SET "url" = 'http://www.test.com' WHERE "id" = 1[0m
|
313
|
+
Completed in 65ms (View: 0, DB: 40) | 200 OK [http://test.host/core_services/reset_config?app%5Bname%5D=test&app%5Burl%5D=http%3A%2F%2Fwww.test.com]
|
314
|
+
[4;35;1mApp Load (0.0ms)[0m [0mSELECT * FROM "apps" LIMIT 1[0m
|
315
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
316
|
+
FROM sqlite_master
|
317
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
318
|
+
[0m
|
319
|
+
[4;36;1mSQL (0.0ms)[0m [0;1m SELECT name
|
320
|
+
FROM sqlite_master
|
321
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
322
|
+
[0m
|
323
|
+
[4;35;1mSQL (0.0ms)[0m [0m SELECT name
|
324
|
+
FROM sqlite_master
|
325
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
326
|
+
[0m
|
327
|
+
[4;36;1mApp Create (0.0ms)[0m [0;1mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-27 09:23:51', '2010-07-27 09:23:51', 'http://www.test.com', NULL, NULL)[0m
|
328
|
+
[4;35;1mApp Create (0.0ms)[0m [0mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-27 09:23:51', '2010-07-27 09:23:51', '/test', NULL, NULL)[0m
|
329
|
+
|
330
|
+
|
331
|
+
Processing CoreServicesController#reset_config (for 0.0.0.0 at 2010-07-27 17:23:51) [POST]
|
332
|
+
Parameters: {"app"=>{"name"=>"test", "url"=>"http://www.test.com"}}
|
333
|
+
[4;36;1mApp Load (0.0ms)[0m [0;1mSELECT * FROM "apps" WHERE ("apps"."name" = 'test') LIMIT 1[0m
|
334
|
+
[4;35;1mApp Create (0.5ms)[0m [0mINSERT INTO "apps" ("name", "created_at", "updated_at", "url", "api", "database") VALUES('test', '2010-07-27 09:23:51', '2010-07-27 09:23:51', '/test', NULL, NULL)[0m
|
335
|
+
[4;36;1mApp Update (0.0ms)[0m [0;1mUPDATE "apps" SET "updated_at" = '2010-07-27 09:23:51', "url" = 'http://www.test.com' WHERE "id" = 1[0m
|
336
|
+
Completed in 90ms (View: 0, DB: 0) | 200 OK [http://test.host/core_services/reset_config?app%5Bname%5D=test&app%5Burl%5D=http%3A%2F%2Fwww.test.com]
|
337
|
+
[4;35;1mApp Load (0.0ms)[0m [0mSELECT * FROM "apps" LIMIT 1[0m
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../spec_helper')
|
2
|
+
|
3
|
+
describe CoreServicesController do
|
4
|
+
|
5
|
+
#Delete this example and add some real ones
|
6
|
+
it "should reset config" do
|
7
|
+
post :reset_config, :app => {:name => "test", :url => "http://www.test.com"}
|
8
|
+
App.first.name.should == "test"
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../spec_helper')
|
2
|
+
|
3
|
+
describe "app" do
|
4
|
+
it "should set url to '/:app_name' if it's null" do
|
5
|
+
App.create(:name => "test", :url => "http://www.test.com").url.should == "http://www.test.com"
|
6
|
+
App.create(:name => "test").url.should == "/test"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
|
2
|
+
# from the project root directory.
|
3
|
+
ENV["RAILS_ENV"] = "test"
|
4
|
+
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
5
|
+
require 'spec'
|
6
|
+
require 'spec/rails'
|
7
|
+
|
8
|
+
Spec::Runner.configure do |config|
|
9
|
+
# If you're not using ActiveRecord you should remove these
|
10
|
+
# lines, delete config/database.yml and disable :active_record
|
11
|
+
# in your config/boot.rb
|
12
|
+
config.use_transactional_fixtures = true
|
13
|
+
config.use_instantiated_fixtures = false
|
14
|
+
config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
|
15
|
+
|
16
|
+
# == Fixtures
|
17
|
+
#
|
18
|
+
# You can declare fixtures for each example_group like this:
|
19
|
+
# describe "...." do
|
20
|
+
# fixtures :table_a, :table_b
|
21
|
+
#
|
22
|
+
# Alternatively, if you prefer to declare them only once, you can
|
23
|
+
# do so right here. Just uncomment the next line and replace the fixture
|
24
|
+
# names with your fixtures.
|
25
|
+
#
|
26
|
+
# config.global_fixtures = :table_a, :table_b
|
27
|
+
#
|
28
|
+
# If you declare global fixtures, be aware that they will be declared
|
29
|
+
# for all of your examples, even those that don't use them.
|
30
|
+
#
|
31
|
+
# You can also declare which fixtures to use (for example fixtures for test/fixtures):
|
32
|
+
#
|
33
|
+
# config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
|
34
|
+
#
|
35
|
+
# == Mock Framework
|
36
|
+
#
|
37
|
+
# RSpec uses it's own mocking framework by default. If you prefer to
|
38
|
+
# use mocha, flexmock or RR, uncomment the appropriate line:
|
39
|
+
#
|
40
|
+
# config.mock_with :mocha
|
41
|
+
# config.mock_with :flexmock
|
42
|
+
# config.mock_with :rr
|
43
|
+
#
|
44
|
+
# == Notes
|
45
|
+
#
|
46
|
+
# For more information take a look at Spec::Runner::Configuration and Spec::Runner
|
47
|
+
end
|
48
|
+
|
49
|
+
def should_diff(klass, method, d_value = 1, &block)
|
50
|
+
before = klass.send(method)
|
51
|
+
yield if block_given?
|
52
|
+
klass.send(method).should == before + d_value
|
53
|
+
end
|
54
|
+
|
55
|
+
def should_not_diff(klass, method, &block)
|
56
|
+
before = klass.send(method)
|
57
|
+
yield if block_given?
|
58
|
+
klass.send(method).should == before
|
59
|
+
end
|
60
|
+
|
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: eco_apps_master
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Idapted Ltd
|
13
|
+
autorequire: eco_apps_master
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-08-02 00:00:00 +08:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: eco_apps
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
version: "0"
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
32
|
+
description:
|
33
|
+
email: tech-team@idapted.com
|
34
|
+
executables: []
|
35
|
+
|
36
|
+
extensions: []
|
37
|
+
|
38
|
+
extra_rdoc_files: []
|
39
|
+
|
40
|
+
files:
|
41
|
+
- lib/eco_apps_master/models/app_migration.rb
|
42
|
+
- lib/eco_apps_master/models/app.rb
|
43
|
+
- lib/eco_apps_master/models/app_sweeper.rb
|
44
|
+
- lib/eco_apps_master/controllers/core_services_controller.rb
|
45
|
+
- lib/eco_apps_master/controllers/routes.rb
|
46
|
+
- lib/eco_apps_master.rb
|
47
|
+
has_rdoc: true
|
48
|
+
homepage: http://developer.idapted.com/
|
49
|
+
licenses: []
|
50
|
+
|
51
|
+
post_install_message:
|
52
|
+
rdoc_options: []
|
53
|
+
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
version: "0"
|
70
|
+
requirements: []
|
71
|
+
|
72
|
+
rubyforge_project:
|
73
|
+
rubygems_version: 1.3.6
|
74
|
+
signing_key:
|
75
|
+
specification_version: 3
|
76
|
+
summary: Eco Apps enables you to develop an eco-system of Rails applications that function as a single system.
|
77
|
+
test_files:
|
78
|
+
- spec/spec.opts
|
79
|
+
- spec/test_app/spec/spec_helper.rb
|
80
|
+
- spec/test_app/spec/models/app_migration_spec.rb
|
81
|
+
- spec/test_app/spec/models/app_spec.rb
|
82
|
+
- spec/test_app/spec/controllers/core_services_controller_spec.rb
|
83
|
+
- spec/test_app/db/test.sqlite3
|
84
|
+
- spec/test_app/log/test.log
|
85
|
+
- spec/test_app/app/helpers/application_helper.rb
|
86
|
+
- spec/test_app/app/controllers/application_controller.rb
|
87
|
+
- spec/test_app/config/environments/test.rb
|
88
|
+
- spec/test_app/config/environments/production.rb
|
89
|
+
- spec/test_app/config/environments/development.rb
|
90
|
+
- spec/test_app/config/database.yml
|
91
|
+
- spec/test_app/config/initializers/inflections.rb
|
92
|
+
- spec/test_app/config/initializers/session_store.rb
|
93
|
+
- spec/test_app/config/initializers/new_rails_defaults.rb
|
94
|
+
- spec/test_app/config/initializers/backtrace_silencers.rb
|
95
|
+
- spec/test_app/config/initializers/mime_types.rb
|
96
|
+
- spec/test_app/config/environment.rb
|
97
|
+
- spec/test_app/config/boot.rb
|
98
|
+
- spec/test_app/config/routes.rb
|
99
|
+
- spec/test_app/config/app_config.yml
|