pin_up_receipts 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/pin_up_receipts.rb +1 -1
- data/lib/pin_up_receipts/base.rb +2 -2
- data/lib/pin_up_receipts/receipt.rb +6 -2
- data/pin_up_receipts.gemspec +3 -3
- data/spec/base_spec.rb +1 -1
- data/spec/receipt_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 078184ac14e2d1daadd06c0d01c0e79aec6180a2
|
4
|
+
data.tar.gz: be27abb67eb5369e45defc52cd5948ef58387820
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4321bfdeb39142e6c15656408b0d149ea6048dcad57bf27034b26e3a0d7f42d713691130cb717328f58b61cc089739126ca0051df2f53ccebe8c6a77892b0e57
|
7
|
+
data.tar.gz: b86b7e4708b849738b320d1b2c1b1ae9e9cad1423a40aba1c599213969f325e913e566dcd4677378707402e4b43d1b50300001063342c20acd0ce98691df38ae
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activesupport (4.0.
|
4
|
+
activesupport (4.0.2)
|
5
5
|
i18n (~> 0.6, >= 0.6.4)
|
6
6
|
minitest (~> 4.2)
|
7
7
|
multi_json (~> 1.3)
|
@@ -41,16 +41,16 @@ GEM
|
|
41
41
|
lumberjack (~> 1.0)
|
42
42
|
pry (>= 0.9.12)
|
43
43
|
thor (>= 0.18.1)
|
44
|
-
guard-rspec (4.0
|
44
|
+
guard-rspec (4.2.0)
|
45
45
|
guard (>= 2.1.1)
|
46
|
-
rspec (
|
46
|
+
rspec (>= 2.14, < 4.0)
|
47
47
|
hashie (2.0.5)
|
48
48
|
highline (1.6.20)
|
49
49
|
httparty (0.12.0)
|
50
50
|
json (~> 1.8)
|
51
51
|
multi_xml (>= 0.5.2)
|
52
52
|
httpauth (0.2.0)
|
53
|
-
i18n (0.6.
|
53
|
+
i18n (0.6.9)
|
54
54
|
jeweler (1.8.8)
|
55
55
|
builder
|
56
56
|
bundler (~> 1.0)
|
@@ -63,7 +63,7 @@ GEM
|
|
63
63
|
json (1.8.1)
|
64
64
|
jwt (0.1.8)
|
65
65
|
multi_json (>= 1.5)
|
66
|
-
listen (2.
|
66
|
+
listen (2.3.1)
|
67
67
|
celluloid (>= 0.15.2)
|
68
68
|
rb-fsevent (>= 0.9.3)
|
69
69
|
rb-inotify (>= 0.9)
|
@@ -82,7 +82,7 @@ GEM
|
|
82
82
|
multi_json (~> 1.0)
|
83
83
|
multi_xml (~> 0.5)
|
84
84
|
rack (~> 1.2)
|
85
|
-
pin_up (0.
|
85
|
+
pin_up (0.8.0)
|
86
86
|
httparty
|
87
87
|
pry (0.9.12.4)
|
88
88
|
coderay (~> 1.0)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# pin_up_receipts
|
2
2
|
|
3
3
|
Generate HTML receipts from your Pin charges.
|
4
4
|
|
@@ -53,7 +53,7 @@ If you would like you can use a custom receipt template to suit your branding or
|
|
53
53
|
|
54
54
|
* Flesh out receipts - handle failed transactions and refunds
|
55
55
|
|
56
|
-
|
56
|
+
## Contributing to pin_up_receipts
|
57
57
|
|
58
58
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
59
59
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
@@ -63,7 +63,7 @@ If you would like you can use a custom receipt template to suit your branding or
|
|
63
63
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
64
64
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
65
65
|
|
66
|
-
|
66
|
+
## Copyright
|
67
67
|
|
68
68
|
Copyright (c) 2013 Daniel Nitsikopoulos. See LICENSE.txt for
|
69
69
|
further details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.0
|
data/lib/pin_up_receipts.rb
CHANGED
data/lib/pin_up_receipts/base.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
module
|
2
|
+
module Pin
|
3
3
|
##
|
4
4
|
# This class lets you generate and save receipts from a Pin::Charge.
|
5
|
-
class Receipt <
|
5
|
+
class Receipt < Pin::Base
|
6
|
+
# include Pin
|
6
7
|
|
8
|
+
def self.root
|
9
|
+
File.expand_path '../../..', __FILE__
|
10
|
+
end
|
7
11
|
##
|
8
12
|
# Create a new PinUpReceipts::Receipt instance
|
9
13
|
# Args:
|
data/pin_up_receipts.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: pin_up_receipts 1.
|
5
|
+
# stub: pin_up_receipts 1.1.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "pin_up_receipts"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.1.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Daniel Nitsikopoulos"]
|
13
|
-
s.date = "2013-12-
|
13
|
+
s.date = "2013-12-08"
|
14
14
|
s.description = "A receipts addon for pin_up"
|
15
15
|
s.email = "dnitza@gmail.com"
|
16
16
|
s.extra_rdoc_files = [
|
data/spec/base_spec.rb
CHANGED
data/spec/receipt_spec.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
|
-
describe "Receipt", :vcr, class:
|
4
|
+
describe "Receipt", :vcr, class: Pin::Receipt do
|
5
5
|
before(:each) do
|
6
6
|
Pin::Base.new(ENV["PIN_SECRET"], :test)
|
7
7
|
@charge = Pin::Charges.find("ch_0kdOMXP7gG0_W_Vh8qAWdA")
|
8
8
|
@company_details = ["ABC Widgets", "123 Fake Street Melbourne","VIC 3000", "ABN: 12 345 678 910"]
|
9
|
-
@receipt =
|
9
|
+
@receipt = Pin::Receipt.new(@charge, @company_details)
|
10
10
|
end
|
11
11
|
|
12
12
|
it "should generate an HTML receipt given a charge" do
|
@@ -30,7 +30,7 @@ describe "Receipt", :vcr, class: PinUpReceipts::Receipt do
|
|
30
30
|
payment_options["tax"] = {"name" => "GST", "amount" => "$10.00"}
|
31
31
|
payment_options["discount"] = {"name" => "Member Discount", "amount" => "$10.00"}
|
32
32
|
|
33
|
-
@detailed_receipt =
|
33
|
+
@detailed_receipt = Pin::Receipt.new(@charge, @company_details, nil, payment_options)
|
34
34
|
expect @detailed_receipt.render().should include("GST")
|
35
35
|
end
|
36
36
|
|
data/spec/spec_helper.rb
CHANGED
@@ -11,7 +11,7 @@ require "net/https"
|
|
11
11
|
require "uri"
|
12
12
|
|
13
13
|
## Uncomment to load in a .yml with your pin key
|
14
|
-
ENV.update YAML.load(File.read(File.expand_path("../test_data.yml", __FILE__)))
|
14
|
+
# ENV.update YAML.load(File.read(File.expand_path("../test_data.yml", __FILE__)))
|
15
15
|
|
16
16
|
require 'pin_up'
|
17
17
|
require 'pin_up_receipts'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pin_up_receipts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Nitsikopoulos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pin_up
|