plutus 0.5.2 → 0.7.0
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/README.markdown +116 -69
- data/Rakefile +7 -20
- data/app/assets/javascripts/plutus/application.js +15 -0
- data/app/assets/stylesheets/plutus/application.css +13 -0
- data/app/assets/stylesheets/plutus/main.css.scss +86 -0
- data/app/controllers/plutus/accounts_controller.rb +45 -0
- data/app/controllers/plutus/transactions_controller.rb +44 -0
- data/app/models/plutus/account.rb +60 -0
- data/app/models/plutus/amount.rb +16 -0
- data/app/models/plutus/asset.rb +83 -0
- data/app/models/plutus/credit_amount.rb +10 -0
- data/app/models/plutus/debit_amount.rb +10 -0
- data/app/models/plutus/equity.rb +84 -0
- data/app/models/plutus/expense.rb +83 -0
- data/app/models/plutus/liability.rb +78 -0
- data/app/models/plutus/revenue.rb +83 -0
- data/app/models/plutus/transaction.rb +83 -0
- data/app/views/{accounts → plutus/accounts}/index.html.erb +4 -2
- data/app/views/{accounts → plutus/accounts}/show.html.erb +8 -18
- data/app/views/plutus/transactions/index.html.erb +48 -0
- data/app/views/plutus/transactions/show.html.erb +46 -0
- data/config/database.yml +5 -0
- data/config/routes.rb +6 -0
- data/lib/generators/plutus/templates/migration.rb +17 -13
- data/lib/plutus.rb +3 -2
- data/lib/plutus/version.rb +3 -0
- data/spec/controllers/accounts_controller_spec.rb +22 -19
- data/spec/controllers/transactions_controller_spec.rb +23 -20
- data/spec/factories/account_factory.rb +30 -24
- data/spec/factories/amount_factory.rb +19 -0
- data/spec/factories/transaction_factory.rb +11 -6
- data/spec/models/account_spec.rb +61 -40
- data/spec/models/amount_spec.rb +12 -0
- data/spec/models/asset_spec.rb +46 -39
- data/spec/models/credit_amount_spec.rb +22 -0
- data/spec/models/debit_amount_spec.rb +22 -0
- data/spec/models/equity_spec.rb +51 -43
- data/spec/models/expense_spec.rb +49 -41
- data/spec/models/liability_spec.rb +48 -40
- data/spec/models/revenue_spec.rb +48 -41
- data/spec/models/transaction_spec.rb +77 -42
- data/spec/routing/accounts_routing_spec.rb +23 -20
- data/spec/routing/transactions_routing_spec.rb +23 -20
- data/spec/spec_helper.rb +3 -1
- metadata +208 -139
- data/.yardopts +0 -2
- data/VERSION.yml +0 -5
- data/app/controllers/accounts_controller.rb +0 -43
- data/app/controllers/transactions_controller.rb +0 -42
- data/app/models/account.rb +0 -57
- data/app/models/asset.rb +0 -81
- data/app/models/equity.rb +0 -82
- data/app/models/expense.rb +0 -81
- data/app/models/liability.rb +0 -76
- data/app/models/revenue.rb +0 -81
- data/app/models/transaction.rb +0 -27
- data/app/views/layouts/accounts.html.erb +0 -68
- data/app/views/layouts/transactions.html.erb +0 -68
- data/app/views/transactions/index.html.erb +0 -27
- data/app/views/transactions/show.html.erb +0 -24
- data/doc/Account.html +0 -300
- data/doc/AccountsController.html +0 -317
- data/doc/Asset.html +0 -610
- data/doc/CreatePlutusTables.html +0 -265
- data/doc/Equity.html +0 -610
- data/doc/Expense.html +0 -610
- data/doc/Liability.html +0 -588
- data/doc/Plutus.html +0 -91
- data/doc/Plutus/Engine.html +0 -100
- data/doc/PlutusGenerator.html +0 -312
- data/doc/Revenue.html +0 -610
- data/doc/Transaction.html +0 -156
- data/doc/TransactionsController.html +0 -317
- data/doc/_index.html +0 -204
- data/doc/class_list.html +0 -36
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -53
- data/doc/css/style.css +0 -310
- data/doc/file.README.html +0 -250
- data/doc/file_list.html +0 -38
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -250
- data/doc/js/app.js +0 -202
- data/doc/js/full_list.js +0 -149
- data/doc/js/jquery.js +0 -154
- data/doc/method_list.html +0 -275
- data/doc/top-level-namespace.html +0 -90
- data/fixture_rails_root/.gitignore +0 -4
- data/fixture_rails_root/Gemfile +0 -38
- data/fixture_rails_root/Gemfile.lock +0 -98
- data/fixture_rails_root/README +0 -256
- data/fixture_rails_root/Rakefile +0 -7
- data/fixture_rails_root/app/controllers/application_controller.rb +0 -3
- data/fixture_rails_root/app/helpers/application_helper.rb +0 -2
- data/fixture_rails_root/app/views/layouts/application.html.erb +0 -14
- data/fixture_rails_root/config.ru +0 -4
- data/fixture_rails_root/config/application.rb +0 -42
- data/fixture_rails_root/config/boot.rb +0 -13
- data/fixture_rails_root/config/database.yml +0 -22
- data/fixture_rails_root/config/environment.rb +0 -5
- data/fixture_rails_root/config/environments/development.rb +0 -26
- data/fixture_rails_root/config/environments/production.rb +0 -49
- data/fixture_rails_root/config/environments/test.rb +0 -35
- data/fixture_rails_root/config/initializers/backtrace_silencers.rb +0 -7
- data/fixture_rails_root/config/initializers/inflections.rb +0 -10
- data/fixture_rails_root/config/initializers/mime_types.rb +0 -5
- data/fixture_rails_root/config/initializers/secret_token.rb +0 -7
- data/fixture_rails_root/config/initializers/session_store.rb +0 -8
- data/fixture_rails_root/config/locales/en.yml +0 -5
- data/fixture_rails_root/config/routes.rb +0 -58
- data/fixture_rails_root/db/migrate/20101203193439_create_plutus_tables.rb +0 -33
- data/fixture_rails_root/db/schema.rb +0 -40
- data/fixture_rails_root/db/seeds.rb +0 -7
- data/fixture_rails_root/doc/README_FOR_APP +0 -2
- data/fixture_rails_root/lib/tasks/.gitkeep +0 -0
- data/fixture_rails_root/public/404.html +0 -26
- data/fixture_rails_root/public/422.html +0 -26
- data/fixture_rails_root/public/500.html +0 -26
- data/fixture_rails_root/public/favicon.ico +0 -0
- data/fixture_rails_root/public/images/rails.png +0 -0
- data/fixture_rails_root/public/index.html +0 -239
- data/fixture_rails_root/public/javascripts/application.js +0 -2
- data/fixture_rails_root/public/javascripts/controls.js +0 -965
- data/fixture_rails_root/public/javascripts/dragdrop.js +0 -974
- data/fixture_rails_root/public/javascripts/effects.js +0 -1123
- data/fixture_rails_root/public/javascripts/prototype.js +0 -6001
- data/fixture_rails_root/public/javascripts/rails.js +0 -175
- data/fixture_rails_root/public/robots.txt +0 -5
- data/fixture_rails_root/public/stylesheets/.gitkeep +0 -0
- data/fixture_rails_root/script/rails +0 -6
- data/fixture_rails_root/test/performance/browsing_test.rb +0 -9
- data/fixture_rails_root/test/test_helper.rb +0 -13
- data/fixture_rails_root/vendor/plugins/.gitkeep +0 -0
- data/plutus.gemspec +0 -176
- data/tasks/plutus_tasks.rake +0 -4
data/doc/Plutus.html
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
-
<title>Module: Plutus</title>
|
|
7
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
9
|
-
|
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
|
11
|
-
relpath = '';
|
|
12
|
-
if (relpath != '') relpath += '/';
|
|
13
|
-
</script>
|
|
14
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
15
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
16
|
-
|
|
17
|
-
</head>
|
|
18
|
-
<body>
|
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div id="header">
|
|
24
|
-
<div id="menu">
|
|
25
|
-
|
|
26
|
-
<a href="_index.html">Index (P)</a> »
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<span class="title">Plutus</span>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div id="search">
|
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="clear"></div>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<iframe id="search_frame"></iframe>
|
|
45
|
-
|
|
46
|
-
<div id="content"><h1>Module: Plutus
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</h1>
|
|
51
|
-
|
|
52
|
-
<dl class="box">
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<dt class="r1 last">Defined in:</dt>
|
|
62
|
-
<dd class="r1 last">lib/plutus.rb</dd>
|
|
63
|
-
|
|
64
|
-
</dl>
|
|
65
|
-
<div class="clear"></div>
|
|
66
|
-
|
|
67
|
-
<h2>Defined Under Namespace</h2>
|
|
68
|
-
<p class="children">
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Plutus/Engine.html" title="Plutus::Engine (class)">Engine</a></span>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
</p>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div id="footer">
|
|
85
|
-
Generated on Fri Dec 3 14:35:07 2010 by
|
|
86
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
87
|
-
0.6.2 (ruby-1.8.7).
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
</body>
|
|
91
|
-
</html>
|
data/doc/Plutus/Engine.html
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
-
<title>Class: Plutus::Engine</title>
|
|
7
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
9
|
-
|
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
|
11
|
-
relpath = '..';
|
|
12
|
-
if (relpath != '') relpath += '/';
|
|
13
|
-
</script>
|
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
16
|
-
|
|
17
|
-
</head>
|
|
18
|
-
<body>
|
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div id="header">
|
|
24
|
-
<div id="menu">
|
|
25
|
-
|
|
26
|
-
<a href="../_index.html">Index (E)</a> »
|
|
27
|
-
<span class='title'><span class='object_link'><a href="../Plutus.html" title="Plutus (module)">Plutus</a></span></span>
|
|
28
|
-
»
|
|
29
|
-
<span class="title">Engine</span>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div id="search">
|
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="clear"></div>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<iframe id="search_frame"></iframe>
|
|
45
|
-
|
|
46
|
-
<div id="content"><h1>Class: Plutus::Engine
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</h1>
|
|
51
|
-
|
|
52
|
-
<dl class="box">
|
|
53
|
-
|
|
54
|
-
<dt class="r1">Inherits:</dt>
|
|
55
|
-
<dd class="r1">
|
|
56
|
-
<span class="inheritName">Rails::Engine</span>
|
|
57
|
-
|
|
58
|
-
<ul class="fullTree">
|
|
59
|
-
<li>Object</li>
|
|
60
|
-
|
|
61
|
-
<li class="next">Rails::Engine</li>
|
|
62
|
-
|
|
63
|
-
<li class="next">Plutus::Engine</li>
|
|
64
|
-
|
|
65
|
-
</ul>
|
|
66
|
-
<a href="#" class="inheritanceTree">show all</a>
|
|
67
|
-
|
|
68
|
-
</dd>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<dt class="r2 last">Defined in:</dt>
|
|
79
|
-
<dd class="r2 last">lib/plutus.rb</dd>
|
|
80
|
-
|
|
81
|
-
</dl>
|
|
82
|
-
<div class="clear"></div>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<div id="footer">
|
|
94
|
-
Generated on Fri Dec 3 14:35:09 2010 by
|
|
95
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
96
|
-
0.6.2 (ruby-1.8.7).
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
</body>
|
|
100
|
-
</html>
|
data/doc/PlutusGenerator.html
DELETED
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
-
<title>Class: PlutusGenerator</title>
|
|
7
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
9
|
-
|
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
|
11
|
-
relpath = '';
|
|
12
|
-
if (relpath != '') relpath += '/';
|
|
13
|
-
</script>
|
|
14
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
15
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
16
|
-
|
|
17
|
-
</head>
|
|
18
|
-
<body>
|
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div id="header">
|
|
24
|
-
<div id="menu">
|
|
25
|
-
|
|
26
|
-
<a href="_index.html">Index (P)</a> »
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<span class="title">PlutusGenerator</span>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div id="search">
|
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="clear"></div>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<iframe id="search_frame"></iframe>
|
|
45
|
-
|
|
46
|
-
<div id="content"><h1>Class: PlutusGenerator
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</h1>
|
|
51
|
-
|
|
52
|
-
<dl class="box">
|
|
53
|
-
|
|
54
|
-
<dt class="r1">Inherits:</dt>
|
|
55
|
-
<dd class="r1">
|
|
56
|
-
<span class="inheritName">Rails::Generators::Base</span>
|
|
57
|
-
|
|
58
|
-
<ul class="fullTree">
|
|
59
|
-
<li>Object</li>
|
|
60
|
-
|
|
61
|
-
<li class="next">Rails::Generators::Base</li>
|
|
62
|
-
|
|
63
|
-
<li class="next">PlutusGenerator</li>
|
|
64
|
-
|
|
65
|
-
</ul>
|
|
66
|
-
<a href="#" class="inheritanceTree">show all</a>
|
|
67
|
-
|
|
68
|
-
</dd>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<dt class="r2">Includes:</dt>
|
|
76
|
-
<dd class="r2">Rails::Generators::Migration</dd>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<dt class="r1 last">Defined in:</dt>
|
|
83
|
-
<dd class="r1 last">lib/generators/plutus/plutus_generator.rb</dd>
|
|
84
|
-
|
|
85
|
-
</dl>
|
|
86
|
-
<div class="clear"></div>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<h2>
|
|
95
|
-
Class Method Summary
|
|
96
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
97
|
-
</h2>
|
|
98
|
-
|
|
99
|
-
<ul class="summary">
|
|
100
|
-
|
|
101
|
-
<li class="public ">
|
|
102
|
-
<span class="summary_signature">
|
|
103
|
-
|
|
104
|
-
<a href="#next_migration_number-class_method" title="next_migration_number (class method)">+ (Object) <strong>next_migration_number</strong>(dirname) </a>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</span>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
<span class="summary_desc"><div class='inline'><p>
|
|
118
|
-
Implement the required interface for Rails::Generators::Migration.
|
|
119
|
-
</p>
|
|
120
|
-
</div></span>
|
|
121
|
-
|
|
122
|
-
</li>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<li class="public ">
|
|
126
|
-
<span class="summary_signature">
|
|
127
|
-
|
|
128
|
-
<a href="#source_root-class_method" title="source_root (class method)">+ (Object) <strong>source_root</strong> </a>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
</span>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
142
|
-
|
|
143
|
-
</li>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
</ul>
|
|
147
|
-
|
|
148
|
-
<h2>
|
|
149
|
-
Instance Method Summary
|
|
150
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
151
|
-
</h2>
|
|
152
|
-
|
|
153
|
-
<ul class="summary">
|
|
154
|
-
|
|
155
|
-
<li class="public ">
|
|
156
|
-
<span class="summary_signature">
|
|
157
|
-
|
|
158
|
-
<a href="#create_migration_file-instance_method" title="#create_migration_file (instance method)">- (Object) <strong>create_migration_file</strong> </a>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
</span>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
172
|
-
|
|
173
|
-
</li>
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
</ul>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<div id="class_method_details" class="method_details_list">
|
|
184
|
-
<h2>Class Method Details</h2>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<div class="method_details first">
|
|
188
|
-
<p class="signature first" id="next_migration_number-class_method">
|
|
189
|
-
|
|
190
|
-
+ (<tt>Object</tt>) <strong>next_migration_number</strong>(dirname)
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
</p><div class="docstring">
|
|
195
|
-
<div class="discussion">
|
|
196
|
-
<p>
|
|
197
|
-
Implement the required interface for Rails::Generators::Migration. taken
|
|
198
|
-
from
|
|
199
|
-
http://github.com/rails/rails/blob/master/activerecord/lib/generators/active_record.rb
|
|
200
|
-
</p>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
205
|
-
<div class="tags">
|
|
206
|
-
|
|
207
|
-
</div><table class="source_code">
|
|
208
|
-
<tr>
|
|
209
|
-
<td>
|
|
210
|
-
<pre class="lines">
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
14
|
|
214
|
-
15
|
|
215
|
-
16
|
|
216
|
-
17
|
|
217
|
-
18
|
|
218
|
-
19
|
|
219
|
-
20</pre>
|
|
220
|
-
</td>
|
|
221
|
-
<td>
|
|
222
|
-
<pre class="code"><span class="info file"># File 'lib/generators/plutus/plutus_generator.rb', line 14</span>
|
|
223
|
-
|
|
224
|
-
<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='next_migration_number identifier id'>next_migration_number</span><span class='lparen token'>(</span><span class='dirname identifier id'>dirname</span><span class='rparen token'>)</span>
|
|
225
|
-
<span class='if if kw'>if</span> <span class='ActiveRecord constant id'>ActiveRecord</span><span class='colon2 op'>::</span><span class='Base constant id'>Base</span><span class='dot token'>.</span><span class='timestamped_migrations identifier id'>timestamped_migrations</span>
|
|
226
|
-
<span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span><span class='dot token'>.</span><span class='utc identifier id'>utc</span><span class='dot token'>.</span><span class='strftime identifier id'>strftime</span><span class='lparen token'>(</span><span class='string val'>"%Y%m%d%H%M%S"</span><span class='rparen token'>)</span>
|
|
227
|
-
<span class='else else kw'>else</span>
|
|
228
|
-
<span class='string val'>"%.3d"</span> <span class='mod op'>%</span> <span class='lparen token'>(</span><span class='current_migration_number identifier id'>current_migration_number</span><span class='lparen token'>(</span><span class='dirname identifier id'>dirname</span><span class='rparen token'>)</span> <span class='plus op'>+</span> <span class='integer val'>1</span><span class='rparen token'>)</span>
|
|
229
|
-
<span class='end end kw'>end</span>
|
|
230
|
-
<span class='end end kw'>end</span>
|
|
231
|
-
</pre>
|
|
232
|
-
</td>
|
|
233
|
-
</tr>
|
|
234
|
-
</table>
|
|
235
|
-
</div>
|
|
236
|
-
|
|
237
|
-
<div class="method_details ">
|
|
238
|
-
<p class="signature " id="source_root-class_method">
|
|
239
|
-
|
|
240
|
-
+ (<tt>Object</tt>) <strong>source_root</strong>
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
</p><table class="source_code">
|
|
245
|
-
<tr>
|
|
246
|
-
<td>
|
|
247
|
-
<pre class="lines">
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
8
|
|
251
|
-
9
|
|
252
|
-
10</pre>
|
|
253
|
-
</td>
|
|
254
|
-
<td>
|
|
255
|
-
<pre class="code"><span class="info file"># File 'lib/generators/plutus/plutus_generator.rb', line 8</span>
|
|
256
|
-
|
|
257
|
-
<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='source_root identifier id'>source_root</span>
|
|
258
|
-
<span class='@source_root ivar id'>@source_root</span> <span class='opasgn op'>||=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='dot token'>.</span><span class='dirname identifier id'>dirname</span><span class='lparen token'>(</span><span class='__FILE__ __file__ kw'>__FILE__</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='string val'>'templates'</span><span class='rparen token'>)</span>
|
|
259
|
-
<span class='end end kw'>end</span>
|
|
260
|
-
</pre>
|
|
261
|
-
</td>
|
|
262
|
-
</tr>
|
|
263
|
-
</table>
|
|
264
|
-
</div>
|
|
265
|
-
|
|
266
|
-
</div>
|
|
267
|
-
|
|
268
|
-
<div id="instance_method_details" class="method_details_list">
|
|
269
|
-
<h2>Instance Method Details</h2>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
<div class="method_details first">
|
|
273
|
-
<p class="signature first" id="create_migration_file-instance_method">
|
|
274
|
-
|
|
275
|
-
- (<tt>Object</tt>) <strong>create_migration_file</strong>
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
</p><table class="source_code">
|
|
280
|
-
<tr>
|
|
281
|
-
<td>
|
|
282
|
-
<pre class="lines">
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
22
|
|
286
|
-
23
|
|
287
|
-
24</pre>
|
|
288
|
-
</td>
|
|
289
|
-
<td>
|
|
290
|
-
<pre class="code"><span class="info file"># File 'lib/generators/plutus/plutus_generator.rb', line 22</span>
|
|
291
|
-
|
|
292
|
-
<span class='def def kw'>def</span> <span class='create_migration_file identifier id'>create_migration_file</span>
|
|
293
|
-
<span class='migration_template identifier id'>migration_template</span> <span class='string val'>'migration.rb'</span><span class='comma token'>,</span> <span class='string val'>'db/migrate/create_plutus_tables.rb'</span>
|
|
294
|
-
<span class='end end kw'>end</span>
|
|
295
|
-
</pre>
|
|
296
|
-
</td>
|
|
297
|
-
</tr>
|
|
298
|
-
</table>
|
|
299
|
-
</div>
|
|
300
|
-
|
|
301
|
-
</div>
|
|
302
|
-
|
|
303
|
-
</div>
|
|
304
|
-
|
|
305
|
-
<div id="footer">
|
|
306
|
-
Generated on Fri Dec 3 14:35:08 2010 by
|
|
307
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
308
|
-
0.6.2 (ruby-1.8.7).
|
|
309
|
-
</div>
|
|
310
|
-
|
|
311
|
-
</body>
|
|
312
|
-
</html>
|