framework 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/lib/framework/application.rb +31 -22
- data/lib/framework/generators/application_generator.rb +20 -43
- data/lib/framework/generators/migration_generator.rb +1 -1
- data/lib/framework/migration.rb +1 -10
- data/lib/framework/templates/migration.rb.erb +1 -3
- data/lib/framework/version.rb +1 -1
- data/lib/framework.rb +0 -1
- metadata +35 -37
- data/lib/framework/extensions/active_record/base_extension.rb +0 -38
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d306fda1beba1a5705e191bc0d832aac2d4d7ff225f4e9ece7290818c93a82e
|
|
4
|
+
data.tar.gz: e80f3a9069ebe9e26bfe8200d3f023ea213cacca283f1a1b97e7ab72d6b8c130
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18e936df7bf63b2c7953349b9cc5b6c17819f6b668c56d5ba746517213c9f783fdc0212d310d3ea449d2987db4c5155d44401a11ba49282ec70217b1fa4e718d
|
|
7
|
+
data.tar.gz: cef1db46ba193e61ea3a5f4a69f5da5443b04e529185178388ea8108309ad419ff3ed696d971b3ddcb4a051d496abb2269b3fcc41a2efd29a599277dd4a05619
|
data/README.md
CHANGED
|
@@ -3,11 +3,10 @@ Ruby Framework
|
|
|
3
3
|
|
|
4
4
|
[](http://badge.fury.io/rb/framework)
|
|
5
5
|
|
|
6
|
-
Framework to build Ruby applications for all your needs.
|
|
6
|
+
Framework to build Ruby applications for all your needs. Rails without web perks.
|
|
7
7
|
|
|
8
8
|
### Features
|
|
9
9
|
|
|
10
|
-
- Easy configuration to work with multiple databases
|
|
11
10
|
- ActiveRecord interface
|
|
12
11
|
- Customizable structure
|
|
13
12
|
- YAML configuration
|
|
@@ -70,7 +69,7 @@ Pretty similar to Rails (just a sample):
|
|
|
70
69
|
| | |____hello.rake
|
|
71
70
|
|____config
|
|
72
71
|
| |____application.yml
|
|
73
|
-
| |
|
|
72
|
+
| |____database.yml
|
|
74
73
|
| |____environment.rb
|
|
75
74
|
| |____initializers
|
|
76
75
|
| | |____time_zone.rb
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
require 'framework/root'
|
|
2
2
|
require 'framework/config'
|
|
3
|
-
require '
|
|
4
|
-
require '
|
|
5
|
-
require 'action_dispatch/middleware/callbacks'
|
|
3
|
+
require 'active_support/reloader'
|
|
4
|
+
require 'active_support/file_update_checker'
|
|
6
5
|
|
|
7
6
|
module Framework
|
|
8
7
|
class Application
|
|
9
|
-
CONFIG_PATH = "config/application.yml"
|
|
8
|
+
CONFIG_PATH = "config/application.yml".freeze
|
|
10
9
|
|
|
11
10
|
attr_reader :env
|
|
12
11
|
attr_accessor :logger
|
|
@@ -52,7 +51,7 @@ module Framework
|
|
|
52
51
|
|
|
53
52
|
def create_database!(name = nil)
|
|
54
53
|
name ||= 'default'
|
|
55
|
-
cfg = database_config[
|
|
54
|
+
cfg = name == 'default' ? database_config[env] : database_config.dig(env, name)
|
|
56
55
|
|
|
57
56
|
case cfg['adapter']
|
|
58
57
|
when 'postgresql'
|
|
@@ -70,7 +69,7 @@ module Framework
|
|
|
70
69
|
|
|
71
70
|
def drop_database!(name = nil)
|
|
72
71
|
name ||= 'default'
|
|
73
|
-
cfg = database_config[
|
|
72
|
+
cfg = name == 'default' ? database_config[env] : database_config.dig(env, name)
|
|
74
73
|
|
|
75
74
|
case cfg['adapter']
|
|
76
75
|
when 'postgresql'
|
|
@@ -84,15 +83,15 @@ module Framework
|
|
|
84
83
|
raise "Unknown adapter '#{cfg['adapter']}'"
|
|
85
84
|
end
|
|
86
85
|
|
|
87
|
-
puts "The database #{
|
|
86
|
+
puts "The database #{cfg['database']} has been successfully dropped"
|
|
88
87
|
end
|
|
89
88
|
|
|
90
89
|
def migrate_database(version = nil)
|
|
91
|
-
ActiveRecord::
|
|
90
|
+
ActiveRecord::Migrator.migrate root.join("db/migrate"), version.try(:to_i)
|
|
92
91
|
end
|
|
93
92
|
|
|
94
93
|
def rollback_database(steps = 1)
|
|
95
|
-
ActiveRecord::
|
|
94
|
+
ActiveRecord::Migrator.rollback root.join("db/migrate"), steps
|
|
96
95
|
end
|
|
97
96
|
|
|
98
97
|
# @return [Hash<String>]
|
|
@@ -102,8 +101,8 @@ module Framework
|
|
|
102
101
|
|
|
103
102
|
# @return [String] Database name
|
|
104
103
|
def database
|
|
105
|
-
adapter = database_config
|
|
106
|
-
database = database_config
|
|
104
|
+
adapter = database_config.dig(env, 'adapter')
|
|
105
|
+
database = database_config.dig(env, 'database')
|
|
107
106
|
adapter == 'sqlite3' ? root.join("db/sqlite/#{env}/#{database}.db") : database
|
|
108
107
|
end
|
|
109
108
|
|
|
@@ -112,7 +111,7 @@ module Framework
|
|
|
112
111
|
end
|
|
113
112
|
|
|
114
113
|
def db_connection(db_name = 'default')
|
|
115
|
-
ActiveRecord::Base.establish_connection(database_config
|
|
114
|
+
ActiveRecord::Base.establish_connection(db_name == 'default' ? database_config.dig(env) : database_config.dig(env, db_name))
|
|
116
115
|
ActiveRecord::Base.connection
|
|
117
116
|
end
|
|
118
117
|
|
|
@@ -177,33 +176,43 @@ module Framework
|
|
|
177
176
|
end
|
|
178
177
|
|
|
179
178
|
def establish_database_connection
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
env_dbs = database_config[env]
|
|
180
|
+
|
|
181
|
+
if env_dbs
|
|
182
|
+
# If all are hashes, then we have multiple connections
|
|
183
|
+
if env_dbs.all? { |item| item.is_a?(Hash) }
|
|
184
|
+
env_dbs.each do |_db_key, db_config|
|
|
185
|
+
ActiveRecord::Base.establish_connection(db_config.except('enable_logging'))
|
|
183
186
|
|
|
184
|
-
|
|
185
|
-
|
|
187
|
+
if db_config['enable_logging']
|
|
188
|
+
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
|
189
|
+
end
|
|
186
190
|
end
|
|
191
|
+
else
|
|
192
|
+
# We have flat one database
|
|
193
|
+
ActiveRecord::Base.establish_connection(env_dbs.except('enable_logging'))
|
|
187
194
|
end
|
|
188
195
|
end
|
|
189
196
|
end
|
|
190
197
|
|
|
191
198
|
# Used to create/drop db
|
|
192
199
|
def establish_postgres_connection(name = 'default')
|
|
193
|
-
if database_config
|
|
194
|
-
|
|
195
|
-
|
|
200
|
+
if database_config
|
|
201
|
+
conf = name == 'default' ? database_config.dig(env) : database_config.dig(env, name)
|
|
202
|
+
|
|
203
|
+
ActiveRecord::Base.establish_connection(conf.merge('database' => 'postgres',
|
|
204
|
+
'schema_search_path' => 'public'))
|
|
196
205
|
end
|
|
197
206
|
end
|
|
198
207
|
|
|
199
208
|
# @return [Hash]
|
|
200
209
|
def load_application_config
|
|
201
|
-
@config = Framework::Config.new(YAML.load(erb(CONFIG_PATH).result)[env])
|
|
210
|
+
@config = Framework::Config.new(YAML.load(erb(CONFIG_PATH).result, aliases: true)[env])
|
|
202
211
|
end
|
|
203
212
|
|
|
204
213
|
# @return [Hash]
|
|
205
214
|
def load_database_config
|
|
206
|
-
@database_config = YAML.load(erb('config/
|
|
215
|
+
@database_config = YAML.load(erb('config/database.yml').result, aliases: true)
|
|
207
216
|
end
|
|
208
217
|
|
|
209
218
|
# @param [String] path
|
|
@@ -50,49 +50,26 @@ module Framework
|
|
|
50
50
|
def create_database_config
|
|
51
51
|
db_name = name.underscore
|
|
52
52
|
|
|
53
|
-
create_file 'config/
|
|
53
|
+
create_file 'config/database.yml' do
|
|
54
54
|
<<-CONFIG.strip_heredoc
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
production:
|
|
74
|
-
<<: *common
|
|
75
|
-
database: #{db_name}_production
|
|
76
|
-
|
|
77
|
-
# second_one:
|
|
78
|
-
# development: &common
|
|
79
|
-
# adapter: postgresql
|
|
80
|
-
# username:
|
|
81
|
-
# password:
|
|
82
|
-
# database: second_sample_development
|
|
83
|
-
# min_messages: WARNING
|
|
84
|
-
# reconnect: true
|
|
85
|
-
# pool: 5
|
|
86
|
-
# encoding: unicode
|
|
87
|
-
# host: localhost
|
|
88
|
-
#
|
|
89
|
-
# test:
|
|
90
|
-
# <<: *common
|
|
91
|
-
# database: second_sample_test
|
|
92
|
-
#
|
|
93
|
-
# production:
|
|
94
|
-
# <<: *common
|
|
95
|
-
# database: second_sample_production
|
|
55
|
+
development: &common
|
|
56
|
+
adapter: postgresql
|
|
57
|
+
username:
|
|
58
|
+
password:
|
|
59
|
+
database: #{db_name}_development
|
|
60
|
+
min_messages: WARNING
|
|
61
|
+
reconnect: true
|
|
62
|
+
pool: 5
|
|
63
|
+
encoding: unicode
|
|
64
|
+
host: localhost
|
|
65
|
+
|
|
66
|
+
test:
|
|
67
|
+
<<: *common
|
|
68
|
+
database: #{db_name}_test
|
|
69
|
+
|
|
70
|
+
production:
|
|
71
|
+
<<: *common
|
|
72
|
+
database: #{db_name}_production
|
|
96
73
|
CONFIG
|
|
97
74
|
end
|
|
98
75
|
end
|
|
@@ -102,7 +79,7 @@ module Framework
|
|
|
102
79
|
<<-CONFIG.strip_heredoc
|
|
103
80
|
# Set up gems listed in the Gemfile.
|
|
104
81
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
|
105
|
-
require 'bundler/setup' if File.
|
|
82
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
|
106
83
|
|
|
107
84
|
require 'framework'
|
|
108
85
|
|
data/lib/framework/migration.rb
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
module Framework
|
|
2
|
-
class Migration < ActiveRecord::Migration[
|
|
3
|
-
|
|
4
|
-
def self.use_database(db_name)
|
|
5
|
-
define_method :connection do
|
|
6
|
-
@connection ||= begin
|
|
7
|
-
Framework::Logger.whishper "Using database: #{db_name}"
|
|
8
|
-
Framework.app.db_connection(db_name)
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
2
|
+
class Migration < ActiveRecord::Migration[7.0]
|
|
12
3
|
end
|
|
13
4
|
end
|
data/lib/framework/version.rb
CHANGED
data/lib/framework.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: framework
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergei Nikolaevich Zinin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -16,42 +16,42 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 7.0.4
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 7.0.4
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: activesupport
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 7.0.4
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 7.0.4
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: actionpack
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
47
|
+
version: 7.0.4
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
54
|
+
version: 7.0.4
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: awesome_print
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -70,82 +70,82 @@ dependencies:
|
|
|
70
70
|
name: rake
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: 12.3.0
|
|
76
73
|
- - "~>"
|
|
77
74
|
- !ruby/object:Gem::Version
|
|
78
|
-
version: '
|
|
75
|
+
version: '13.0'
|
|
76
|
+
- - ">="
|
|
77
|
+
- !ruby/object:Gem::Version
|
|
78
|
+
version: 13.0.6
|
|
79
79
|
type: :runtime
|
|
80
80
|
prerelease: false
|
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
|
82
82
|
requirements:
|
|
83
|
-
- - ">="
|
|
84
|
-
- !ruby/object:Gem::Version
|
|
85
|
-
version: 12.3.0
|
|
86
83
|
- - "~>"
|
|
87
84
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: '
|
|
85
|
+
version: '13.0'
|
|
86
|
+
- - ">="
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: 13.0.6
|
|
89
89
|
- !ruby/object:Gem::Dependency
|
|
90
90
|
name: thor
|
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
|
93
93
|
- - "~>"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
95
|
+
version: '1.2'
|
|
96
96
|
- - ">="
|
|
97
97
|
- !ruby/object:Gem::Version
|
|
98
|
-
version:
|
|
98
|
+
version: 1.2.1
|
|
99
99
|
type: :runtime
|
|
100
100
|
prerelease: false
|
|
101
101
|
version_requirements: !ruby/object:Gem::Requirement
|
|
102
102
|
requirements:
|
|
103
103
|
- - "~>"
|
|
104
104
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: '
|
|
105
|
+
version: '1.2'
|
|
106
106
|
- - ">="
|
|
107
107
|
- !ruby/object:Gem::Version
|
|
108
|
-
version:
|
|
108
|
+
version: 1.2.1
|
|
109
109
|
- !ruby/object:Gem::Dependency
|
|
110
110
|
name: bundler
|
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
|
112
112
|
requirements:
|
|
113
113
|
- - "~>"
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
|
-
version: '
|
|
115
|
+
version: '2.4'
|
|
116
116
|
- - ">="
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
|
-
version:
|
|
118
|
+
version: '2.4'
|
|
119
119
|
type: :development
|
|
120
120
|
prerelease: false
|
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
|
122
122
|
requirements:
|
|
123
123
|
- - "~>"
|
|
124
124
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: '
|
|
125
|
+
version: '2.4'
|
|
126
126
|
- - ">="
|
|
127
127
|
- !ruby/object:Gem::Version
|
|
128
|
-
version:
|
|
128
|
+
version: '2.4'
|
|
129
129
|
- !ruby/object:Gem::Dependency
|
|
130
130
|
name: rspec
|
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|
|
132
132
|
requirements:
|
|
133
|
-
- - ">="
|
|
134
|
-
- !ruby/object:Gem::Version
|
|
135
|
-
version: 3.8.0
|
|
136
133
|
- - "~>"
|
|
137
134
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '3.
|
|
135
|
+
version: '3.12'
|
|
136
|
+
- - ">="
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: 3.12.0
|
|
139
139
|
type: :development
|
|
140
140
|
prerelease: false
|
|
141
141
|
version_requirements: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
|
-
- - ">="
|
|
144
|
-
- !ruby/object:Gem::Version
|
|
145
|
-
version: 3.8.0
|
|
146
143
|
- - "~>"
|
|
147
144
|
- !ruby/object:Gem::Version
|
|
148
|
-
version: '3.
|
|
145
|
+
version: '3.12'
|
|
146
|
+
- - ">="
|
|
147
|
+
- !ruby/object:Gem::Version
|
|
148
|
+
version: 3.12.0
|
|
149
149
|
description: Allows to quickly build well structured complex Ruby apps.
|
|
150
150
|
email: zinin@xakep.ru
|
|
151
151
|
executables:
|
|
@@ -162,7 +162,6 @@ files:
|
|
|
162
162
|
- lib/framework/cli.rb
|
|
163
163
|
- lib/framework/config.rb
|
|
164
164
|
- lib/framework/db_listener.rb
|
|
165
|
-
- lib/framework/extensions/active_record/base_extension.rb
|
|
166
165
|
- lib/framework/generators/application_generator.rb
|
|
167
166
|
- lib/framework/generators/migration_generator.rb
|
|
168
167
|
- lib/framework/generators/multi_generator.rb
|
|
@@ -189,15 +188,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
189
188
|
requirements:
|
|
190
189
|
- - ">="
|
|
191
190
|
- !ruby/object:Gem::Version
|
|
192
|
-
version: 2.
|
|
191
|
+
version: 3.2.1
|
|
193
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
193
|
requirements:
|
|
195
194
|
- - ">="
|
|
196
195
|
- !ruby/object:Gem::Version
|
|
197
|
-
version: 2.
|
|
196
|
+
version: 3.2.1
|
|
198
197
|
requirements: []
|
|
199
|
-
|
|
200
|
-
rubygems_version: 2.7.9
|
|
198
|
+
rubygems_version: 3.4.8
|
|
201
199
|
signing_key:
|
|
202
200
|
specification_version: 4
|
|
203
201
|
summary: Ruby Application Framework for all your needs.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
module Framework
|
|
2
|
-
module Extensions
|
|
3
|
-
module ActiveRecord
|
|
4
|
-
module BaseExtension
|
|
5
|
-
extend ActiveSupport::Concern
|
|
6
|
-
|
|
7
|
-
module ClassMethods
|
|
8
|
-
|
|
9
|
-
# @override
|
|
10
|
-
# def inherited(child_class)
|
|
11
|
-
# super
|
|
12
|
-
#
|
|
13
|
-
# unless child_class == ::ActiveRecord::SchemaMigration
|
|
14
|
-
# if (chunks = child_class.name.split('::')).many?
|
|
15
|
-
# child_class.store_full_sti_class = false
|
|
16
|
-
# child_class.use_database(chunks.first.downcase)
|
|
17
|
-
# end
|
|
18
|
-
# end
|
|
19
|
-
# end
|
|
20
|
-
|
|
21
|
-
# Makes your model use different databases
|
|
22
|
-
# @param [String, Symbol] db_name
|
|
23
|
-
# @param [String] env
|
|
24
|
-
def use_database(db_name, env = nil)
|
|
25
|
-
env ||= Framework.app.env
|
|
26
|
-
env = env.to_s
|
|
27
|
-
db_name = db_name.to_s
|
|
28
|
-
|
|
29
|
-
# self.abstract_class = Framework.env != 'test'
|
|
30
|
-
# self.table_name = self.name.split('::').last.tableize if self.superclass == ::ActiveRecord::Base
|
|
31
|
-
establish_connection(Framework.app.database_config[db_name][env])
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
ActiveRecord::Base.send :include, Framework::Extensions::ActiveRecord::BaseExtension
|