accountability 0.1.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6b8115dd4e33d3e29a0ab8c565cf65a2abff5abf19672a31f69fedcf5e460917
4
+ data.tar.gz: 5d728906709560706013b88cf94bfcaa264e85fe1f902bff332fa0a697b9bc7e
5
+ SHA512:
6
+ metadata.gz: 4bba25e227a5aeb7f621fdbdf2fdcc77225900e8746db22b7876a067fbe778e55bec4ee84e2c978ac99ff5b143d5886a99d603c11f33d154e17db70d4ff5c1cb
7
+ data.tar.gz: eac570ee48dd6c4443f417c414d3c2da83252f562e094385440ce38fc08c989098630a02a8b25e19d9f687b40956f442d655a5d42b6987ae003cd5a218042944
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2019 Joshua Stowers
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # ActsAsBillable
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'acts_as_billable'
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install acts_as_billable
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1 @@
1
+ //= link_directory ../stylesheets/acts_as_billable .css
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ * require_tree acts_as_billable
14
+ *= require_self
15
+ */
@@ -0,0 +1,3 @@
1
+ class ActsAsBillable::ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
3
+ end
@@ -0,0 +1,5 @@
1
+ require_dependency 'acts_as_billable/application_controller'
2
+
3
+ class ActsAsBillable::PagesController < ActsAsBillable::ApplicationController
4
+ def dashboard; end
5
+ end
@@ -0,0 +1,2 @@
1
+ module ActsAsBillable::ApplicationHelper
2
+ end
@@ -0,0 +1,3 @@
1
+ class ActsAsBillable::ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,2 @@
1
+ class ActsAsBillable::Product < ApplicationRecord
2
+ end
@@ -0,0 +1 @@
1
+ <h1>Billing Dashboard</h1>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <title>Acts as billable</title>
6
+ <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
8
+
9
+ <%= stylesheet_link_tag "acts_as_billable/application", media: "all" %>
10
+ </head>
11
+ <body>
12
+
13
+ <%= yield %>
14
+
15
+ </body>
16
+ </html>
data/config/routes.rb ADDED
@@ -0,0 +1,4 @@
1
+ ActsAsBillable::Engine.routes.draw do
2
+ get 'dashboard', to: 'pages#dashboard', as: :dashboard
3
+ root to: 'pages#dashboard'
4
+ end
@@ -0,0 +1,51 @@
1
+ class CreateActsAsBillableTables < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :acts_as_billable_products do |t|
4
+ # ProductOffering
5
+ t.integer :status, default: 0, null: false # Active, Disabled
6
+ t.string :scoped_ids, array: true
7
+
8
+ # LineItem
9
+ t.belongs_to :product, null: true
10
+ t.belongs_to :contract, null: true
11
+ t.belongs_to :ledger, null: false
12
+ t.integer :schedule, default: 0, null: false # Weekly, Biweekly, Monthly, Annually
13
+
14
+ # Shared
15
+ t.string :name, default: nil, null: false
16
+ t.text :description, default: nil, null: true
17
+ t.decimal :price, default: 0.00, precision: 8, scale: 2, null: false
18
+
19
+ t.timestamps
20
+ end
21
+
22
+ create_table :acts_as_billable_adjustments do |t|
23
+ # Coupon
24
+ t.integer :status, default: 0, null: false # Active, Disabled
25
+ t.string :scoped_ids, array: true
26
+
27
+ # Discount
28
+ t.belongs_to :adjustment, null: true
29
+ t.belongs_to :ledger, null: false
30
+ t.belongs_to :contract, null: true
31
+ t.integer :schedule, default: 0, null: false # Weekly, Biweekly, Monthly, Annually
32
+
33
+ # Shared
34
+ t.string :name, default: nil, null: false
35
+ t.text :description, default: nil, null: true
36
+ t.decimal :amount, default: 0.00, precision: 8, scale: 2, null: false
37
+ end
38
+
39
+ create_table :acts_as_billable_ledgers do |t|
40
+ t.belongs_to :billable, polymorphic: true, index: true
41
+ end
42
+
43
+ create_table :acts_as_billable_payments do |t|
44
+
45
+ end
46
+
47
+ create_table :acts_as_billable_contracts do |t|
48
+
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,5 @@
1
+ require 'acts_as_billable/engine'
2
+
3
+ module ActsAsBillable
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,3 @@
1
+ class ActsAsBillable::Engine < ::Rails::Engine
2
+ isolate_namespace ActsAsBillable
3
+ end
@@ -0,0 +1,3 @@
1
+ module ActsAsBillable
2
+ VERSION = '0.1.0'.freeze
3
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: accountability
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Joshua Stowers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-08-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 6.0.0.rc2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 6.0.0.rc2
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: In Development - Coming Soon
42
+ email:
43
+ - joshua.stowers@elevatesystems.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - MIT-LICENSE
49
+ - README.md
50
+ - app/assets/config/acts_as_billable_manifest.js
51
+ - app/assets/stylesheets/acts_as_billable/application.css
52
+ - app/controllers/acts_as_billable/application_controller.rb
53
+ - app/controllers/acts_as_billable/pages_controller.rb
54
+ - app/helpers/acts_as_billable/application_helper.rb
55
+ - app/models/acts_as_billable/application_record.rb
56
+ - app/models/acts_as_billable/product.rb
57
+ - app/views/acts_as_billable/pages/dashboard.html.erb
58
+ - app/views/layouts/acts_as_billable/application.html.erb
59
+ - config/routes.rb
60
+ - db/migrate/20190814000455_create_acts_as_billable_tables.rb
61
+ - lib/acts_as_billable.rb
62
+ - lib/acts_as_billable/engine.rb
63
+ - lib/acts_as_billable/version.rb
64
+ homepage: https://elevatesystems.com
65
+ licenses:
66
+ - MIT
67
+ metadata:
68
+ allowed_push_host: https://rubygems.org/
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubygems_version: 3.0.4
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: All-in-one billing management solution
88
+ test_files: []