plutus 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/.yardopts +2 -0
  2. data/LICENSE +23 -0
  3. data/README.markdown +194 -0
  4. data/Rakefile +24 -0
  5. data/VERSION.yml +5 -0
  6. data/app/controllers/accounts_controller.rb +43 -0
  7. data/app/controllers/transactions_controller.rb +42 -0
  8. data/app/models/account.rb +57 -0
  9. data/app/models/asset.rb +81 -0
  10. data/app/models/equity.rb +82 -0
  11. data/app/models/expense.rb +81 -0
  12. data/app/models/liability.rb +76 -0
  13. data/app/models/revenue.rb +81 -0
  14. data/app/models/transaction.rb +27 -0
  15. data/app/views/accounts/index.html.erb +27 -0
  16. data/app/views/accounts/show.html.erb +69 -0
  17. data/app/views/layouts/accounts.html.erb +68 -0
  18. data/app/views/layouts/transactions.html.erb +68 -0
  19. data/app/views/transactions/index.html.erb +27 -0
  20. data/app/views/transactions/show.html.erb +24 -0
  21. data/doc/Account.html +300 -0
  22. data/doc/AccountsController.html +317 -0
  23. data/doc/Asset.html +610 -0
  24. data/doc/Equity.html +610 -0
  25. data/doc/Expense.html +610 -0
  26. data/doc/Liability.html +588 -0
  27. data/doc/Revenue.html +610 -0
  28. data/doc/Transaction.html +156 -0
  29. data/doc/TransactionsController.html +317 -0
  30. data/doc/_index.html +166 -0
  31. data/doc/class_list.html +36 -0
  32. data/doc/css/common.css +1 -0
  33. data/doc/css/full_list.css +53 -0
  34. data/doc/css/style.css +310 -0
  35. data/doc/file.README.html +250 -0
  36. data/doc/file_list.html +38 -0
  37. data/doc/frames.html +13 -0
  38. data/doc/index.html +250 -0
  39. data/doc/js/app.js +202 -0
  40. data/doc/js/full_list.js +149 -0
  41. data/doc/js/jquery.js +154 -0
  42. data/doc/method_list.html +235 -0
  43. data/doc/top-level-namespace.html +88 -0
  44. data/generators/plutus/USAGE +11 -0
  45. data/generators/plutus/plutus_generator.rb +9 -0
  46. data/generators/plutus/templates/plutus.rb +33 -0
  47. data/lib/plutus.rb +1 -0
  48. data/plutus.gemspec +122 -0
  49. data/rails/init.rb +1 -0
  50. data/spec/controllers/accounts_controller_spec.rb +25 -0
  51. data/spec/controllers/transactions_controller_spec.rb +25 -0
  52. data/spec/factories/account_factory.rb +29 -0
  53. data/spec/factories/transaction_factory.rb +6 -0
  54. data/spec/lib/plutus_spec.rb +0 -0
  55. data/spec/models/account_spec.rb +43 -0
  56. data/spec/models/asset_spec.rb +46 -0
  57. data/spec/models/equity_spec.rb +46 -0
  58. data/spec/models/expense_spec.rb +46 -0
  59. data/spec/models/liability_spec.rb +46 -0
  60. data/spec/models/revenue_spec.rb +46 -0
  61. data/spec/models/transaction_spec.rb +48 -0
  62. data/spec/rcov.opts +2 -0
  63. data/spec/routing/accounts_routing_spec.rb +29 -0
  64. data/spec/routing/transactions_routing_spec.rb +29 -0
  65. data/spec/schema.rb +31 -0
  66. data/spec/spec.opts +4 -0
  67. data/spec/spec_helper.rb +57 -0
  68. data/tasks/plutus_tasks.rake +4 -0
  69. metadata +150 -0
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ describe TransactionsController do
4
+ describe "routing" do
5
+ it "recognizes and generates #index" do
6
+ { :get => "/transactions" }.should route_to(:controller => "transactions", :action => "index")
7
+ end
8
+
9
+ it "recognizes and generates #show" do
10
+ { :get => "/transactions/1" }.should route_to(:controller => "transactions", :action => "show", :id => "1")
11
+ end
12
+
13
+ it "recognizes and generates #edit" do
14
+ { :get => "/transactions/1/edit" }.should_not be_routable
15
+ end
16
+
17
+ it "recognizes and generates #create" do
18
+ { :post => "/transactions" }.should_not be_routable
19
+ end
20
+
21
+ it "recognizes and generates #update" do
22
+ { :put => "/transactions/1" }.should_not be_routable
23
+ end
24
+
25
+ it "recognizes and generates #destroy" do
26
+ { :delete => "/transactions/1" }.should_not be_routable
27
+ end
28
+ end
29
+ end
data/spec/schema.rb ADDED
@@ -0,0 +1,31 @@
1
+ # This file is auto-generated from the current state of the database. Instead of editing this file,
2
+ # please use the migrations feature of Active Record to incrementally modify your database, and
3
+ # then regenerate this schema definition.
4
+ #
5
+ # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6
+ # to create the application database on another system, you should be using db:schema:load, not running
7
+ # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
9
+ #
10
+ # It's strongly recommended to check this file into your version control system.
11
+
12
+ ActiveRecord::Schema.define(:version => 20100419190249) do
13
+
14
+ create_table "accounts", :force => true do |t|
15
+ t.string "name"
16
+ t.string "type"
17
+ t.datetime "created_at"
18
+ t.datetime "updated_at"
19
+ end
20
+
21
+ create_table "transactions", :force => true do |t|
22
+ t.string "description"
23
+ t.integer "credit_account_id"
24
+ t.decimal "credit_amount"
25
+ t.integer "debit_account_id"
26
+ t.decimal "debit_amount"
27
+ t.datetime "created_at"
28
+ t.datetime "updated_at"
29
+ end
30
+
31
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,4 @@
1
+ --colour
2
+ --format progress
3
+ --loadby mtime
4
+ --reverse
@@ -0,0 +1,57 @@
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.join(File.dirname(__FILE__), '..', '..', '..','..','config','environment'))
5
+ require 'spec/autorun'
6
+ require 'spec/rails'
7
+
8
+ # Uncomment the next line to use webrat's matchers
9
+ #require 'webrat/integrations/rspec-rails'
10
+
11
+ # Requires supporting files with custom matchers and macros, etc,
12
+ # in ./support/ and its subdirectories.
13
+ Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
14
+
15
+ # Require in factories
16
+ Dir[File.expand_path(File.join(File.dirname(__FILE__),'factories','**','*.rb'))].each {|f| require f}
17
+
18
+ Spec::Runner.configure do |config|
19
+ # If you're not using ActiveRecord you should remove these
20
+ # lines, delete config/database.yml and disable :active_record
21
+ # in your config/boot.rb
22
+ config.use_transactional_fixtures = true
23
+ config.use_instantiated_fixtures = false
24
+ config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
25
+
26
+ # == Fixtures
27
+ #
28
+ # You can declare fixtures for each example_group like this:
29
+ # describe "...." do
30
+ # fixtures :table_a, :table_b
31
+ #
32
+ # Alternatively, if you prefer to declare them only once, you can
33
+ # do so right here. Just uncomment the next line and replace the fixture
34
+ # names with your fixtures.
35
+ #
36
+ # config.global_fixtures = :table_a, :table_b
37
+ #
38
+ # If you declare global fixtures, be aware that they will be declared
39
+ # for all of your examples, even those that don't use them.
40
+ #
41
+ # You can also declare which fixtures to use (for example fixtures for test/fixtures):
42
+ #
43
+ # config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
44
+ #
45
+ # == Mock Framework
46
+ #
47
+ # RSpec uses its own mocking framework by default. If you prefer to
48
+ # use mocha, flexmock or RR, uncomment the appropriate line:
49
+ #
50
+ # config.mock_with :mocha
51
+ # config.mock_with :flexmock
52
+ # config.mock_with :rr
53
+ #
54
+ # == Notes
55
+ #
56
+ # For more information take a look at Spec::Runner::Configuration and Spec::Runner
57
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :plutus do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,150 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: plutus
3
+ version: !ruby/object:Gem::Version
4
+ hash: 11
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 4
9
+ - 2
10
+ version: 0.4.2
11
+ platform: ruby
12
+ authors:
13
+ - Michael Bulat
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-11-19 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: The plutus plugin provides a complete double entry accounting system for use in any Ruby on Rails application. The plugin follows general Double Entry Bookkeeping practices. All calculations are done using BigDecimal in order to prevent floating point rounding errors. The plugin requires a decimal type on your database as well.
23
+ email: mbulat@crazydogsoftware.com
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files:
29
+ - LICENSE
30
+ - README.markdown
31
+ files:
32
+ - .yardopts
33
+ - LICENSE
34
+ - README.markdown
35
+ - Rakefile
36
+ - VERSION.yml
37
+ - app/controllers/accounts_controller.rb
38
+ - app/controllers/transactions_controller.rb
39
+ - app/models/account.rb
40
+ - app/models/asset.rb
41
+ - app/models/equity.rb
42
+ - app/models/expense.rb
43
+ - app/models/liability.rb
44
+ - app/models/revenue.rb
45
+ - app/models/transaction.rb
46
+ - app/views/accounts/index.html.erb
47
+ - app/views/accounts/show.html.erb
48
+ - app/views/layouts/accounts.html.erb
49
+ - app/views/layouts/transactions.html.erb
50
+ - app/views/transactions/index.html.erb
51
+ - app/views/transactions/show.html.erb
52
+ - doc/Account.html
53
+ - doc/AccountsController.html
54
+ - doc/Asset.html
55
+ - doc/Equity.html
56
+ - doc/Expense.html
57
+ - doc/Liability.html
58
+ - doc/Revenue.html
59
+ - doc/Transaction.html
60
+ - doc/TransactionsController.html
61
+ - doc/_index.html
62
+ - doc/class_list.html
63
+ - doc/css/common.css
64
+ - doc/css/full_list.css
65
+ - doc/css/style.css
66
+ - doc/file.README.html
67
+ - doc/file_list.html
68
+ - doc/frames.html
69
+ - doc/index.html
70
+ - doc/js/app.js
71
+ - doc/js/full_list.js
72
+ - doc/js/jquery.js
73
+ - doc/method_list.html
74
+ - doc/top-level-namespace.html
75
+ - generators/plutus/USAGE
76
+ - generators/plutus/plutus_generator.rb
77
+ - generators/plutus/templates/plutus.rb
78
+ - lib/plutus.rb
79
+ - plutus.gemspec
80
+ - rails/init.rb
81
+ - spec/controllers/accounts_controller_spec.rb
82
+ - spec/controllers/transactions_controller_spec.rb
83
+ - spec/factories/account_factory.rb
84
+ - spec/factories/transaction_factory.rb
85
+ - spec/lib/plutus_spec.rb
86
+ - spec/models/account_spec.rb
87
+ - spec/models/asset_spec.rb
88
+ - spec/models/equity_spec.rb
89
+ - spec/models/expense_spec.rb
90
+ - spec/models/liability_spec.rb
91
+ - spec/models/revenue_spec.rb
92
+ - spec/models/transaction_spec.rb
93
+ - spec/rcov.opts
94
+ - spec/routing/accounts_routing_spec.rb
95
+ - spec/routing/transactions_routing_spec.rb
96
+ - spec/schema.rb
97
+ - spec/spec.opts
98
+ - spec/spec_helper.rb
99
+ - tasks/plutus_tasks.rake
100
+ has_rdoc: true
101
+ homepage: http://github.com/mbulat/Plutus
102
+ licenses: []
103
+
104
+ post_install_message:
105
+ rdoc_options: []
106
+
107
+ require_paths:
108
+ - lib
109
+ required_ruby_version: !ruby/object:Gem::Requirement
110
+ none: false
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ hash: 3
115
+ segments:
116
+ - 0
117
+ version: "0"
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ hash: 3
124
+ segments:
125
+ - 0
126
+ version: "0"
127
+ requirements: []
128
+
129
+ rubyforge_project:
130
+ rubygems_version: 1.3.7
131
+ signing_key:
132
+ specification_version: 3
133
+ summary: A Plugin providing a Double Entry Accounting Engine for Rails
134
+ test_files:
135
+ - spec/controllers/accounts_controller_spec.rb
136
+ - spec/controllers/transactions_controller_spec.rb
137
+ - spec/factories/account_factory.rb
138
+ - spec/factories/transaction_factory.rb
139
+ - spec/lib/plutus_spec.rb
140
+ - spec/models/account_spec.rb
141
+ - spec/models/asset_spec.rb
142
+ - spec/models/equity_spec.rb
143
+ - spec/models/expense_spec.rb
144
+ - spec/models/liability_spec.rb
145
+ - spec/models/revenue_spec.rb
146
+ - spec/models/transaction_spec.rb
147
+ - spec/routing/accounts_routing_spec.rb
148
+ - spec/routing/transactions_routing_spec.rb
149
+ - spec/schema.rb
150
+ - spec/spec_helper.rb