stripe_invoice 0.1.0 → 0.2.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 +4 -4
- data/README.rdoc +61 -1
- data/lib/generators/stripe_invoice/install_generator.rb +9 -6
- data/lib/stripe_invoice/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca38f3b597240b313cf72a6e8a8995804d89a0bb
|
4
|
+
data.tar.gz: c89b782ea2e23bc25811e2297f4bb4b0b921bc19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d082aaa12c5700e5057b77e0e04b1e0796e0f01f590616edd3c310b2d59d09af4a81e7221a24b87257fb198f1d8e3e3213569f1cebc863cf81d7e5388eeeb4df
|
7
|
+
data.tar.gz: 91652c4e4341c8f757ffb4169f85771498e1426ff49efe987dd6f9f8ad41b15691ce899c4b14a12108f604fbc8e8cc35c0d4d6cb3cf7bbd6b538ae9064a74872
|
data/README.rdoc
CHANGED
@@ -1,3 +1,63 @@
|
|
1
1
|
= StripeInvoice
|
2
2
|
|
3
|
-
|
3
|
+
StripeInvoice makes it easy for you to show invoices/receipts to the customers of your [Koudoku](https://github.com/andrewculver/koudoku/)-based Rails application.
|
4
|
+
It downloads the last 100 invoices via the Stripe API, stores them in a table in the database and renders a basic
|
5
|
+
invoice template.
|
6
|
+
|
7
|
+
## Features
|
8
|
+
|
9
|
+
- Show invoices & receipts to your customers
|
10
|
+
- Automatically assign Invoice # for new invoices
|
11
|
+
- Download invoices as PDF
|
12
|
+
|
13
|
+
## Requirements
|
14
|
+
|
15
|
+
StripeInvoice is opinionated on which gems your application uses.
|
16
|
+
|
17
|
+
1. [Koudoku](https://github.com/andrewculver/koudoku/) to handle subscriptions
|
18
|
+
2. [Devise](https://github.com/plataformatec/devise) for user authentication
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
StripeInvoice is hosted on RubyGems.org. To use it, just add the following line to your `Gemfile` and run `bundle install`:
|
25
|
+
|
26
|
+
```
|
27
|
+
gem 'stripe_invoice'
|
28
|
+
```
|
29
|
+
|
30
|
+
|
31
|
+
To setup your application run the following commands from the command line:
|
32
|
+
|
33
|
+
```
|
34
|
+
rails generator stripe_invoice:install
|
35
|
+
rake db:migrate
|
36
|
+
```
|
37
|
+
|
38
|
+
This will add necessary migrations to your application and run them. Additionally it will mount StripeInvoice into your application
|
39
|
+
at `/stripe_invoice`
|
40
|
+
|
41
|
+
### Accessing the invoices
|
42
|
+
|
43
|
+
To view the invoices log into your application
|
44
|
+
|
45
|
+
### Customizing the views
|
46
|
+
|
47
|
+
You probably want to customize the views for your application. You can easily install the views files (written with HAML)
|
48
|
+
to your application by running `rails g stripe_invoice:views` from the command line.
|
49
|
+
The views will be installed into `app/views/stripe_invoice/invoices/` folder
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
## Contribution
|
54
|
+
|
55
|
+
To contribute to the development of StripeInvoice please:
|
56
|
+
|
57
|
+
1. fork the repository
|
58
|
+
2. create a development branch
|
59
|
+
3. code away
|
60
|
+
4. send a pull request
|
61
|
+
|
62
|
+
## Developer
|
63
|
+
This plugin is under active development by [Christoph Engelhardt](http://www.it-engelhardt.de) and used at [LinksSpy.com](http://www.linksspy.com)
|
@@ -12,13 +12,11 @@ module StripeInvoice
|
|
12
12
|
gem 'stripe_invoice'
|
13
13
|
end
|
14
14
|
|
15
|
+
# mounts StripeInvoice in the applications routes.rb file
|
16
|
+
route "mount StripeInvoice::Engine, at: 'stripe_invoice'"
|
17
|
+
|
15
18
|
api_key = SecureRandom.uuid
|
16
19
|
|
17
|
-
create_initializer api_key
|
18
|
-
say "Your webhooks API key is: #{api_key}"
|
19
|
-
end
|
20
|
-
|
21
|
-
def create_initializer(api_key)
|
22
20
|
create_file 'config/initializers/stripe_invoice.rb' do
|
23
21
|
<<-RUBY
|
24
22
|
StripeInvoice.setup do |config|
|
@@ -27,6 +25,11 @@ StripeInvoice.setup do |config|
|
|
27
25
|
end
|
28
26
|
RUBY
|
29
27
|
end # create initializer file
|
30
|
-
|
28
|
+
say "Your webhooks API key is: #{api_key}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def copy_migrations
|
32
|
+
rake("stripe_invoice:install:migrations")
|
33
|
+
end
|
31
34
|
end
|
32
35
|
end
|