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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 322eca2af60469882fbbe12be0bfc0d9f428d99f
4
- data.tar.gz: 5ea1f48c705c2e99f29e004bf61397d8f78caf58
3
+ metadata.gz: 078184ac14e2d1daadd06c0d01c0e79aec6180a2
4
+ data.tar.gz: be27abb67eb5369e45defc52cd5948ef58387820
5
5
  SHA512:
6
- metadata.gz: 6b3a3b1179f9d74464a5a13b72e0019e1c17c17346fb499761e9950487e25402423d506aabdf704d84b1e0ba222349135efbf4b9a022e5b361b22fcaad96119e
7
- data.tar.gz: 95ac75331e54836119e61e9769a4a61081fc771365bb167d971a5ca2eca2f9decaa978db146406858b77a2216a65ff7ae04d05ba10a4a85b7696197a2386e6c1
6
+ metadata.gz: 4321bfdeb39142e6c15656408b0d149ea6048dcad57bf27034b26e3a0d7f42d713691130cb717328f58b61cc089739126ca0051df2f53ccebe8c6a77892b0e57
7
+ data.tar.gz: b86b7e4708b849738b320d1b2c1b1ae9e9cad1423a40aba1c599213969f325e913e566dcd4677378707402e4b43d1b50300001063342c20acd0ce98691df38ae
@@ -1,7 +1,7 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activesupport (4.0.1)
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.4)
44
+ guard-rspec (4.2.0)
45
45
  guard (>= 2.1.1)
46
- rspec (~> 2.14)
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.5)
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.2.0)
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.7.5)
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
- = pin_up_receipts
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
- == Contributing to pin_up_receipts
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
- == Copyright
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.0.0
1
+ 1.1.0
@@ -2,7 +2,7 @@ require 'httparty'
2
2
  require 'json'
3
3
  require 'erb'
4
4
 
5
- require 'pin_up_receipts/base'
5
+ # require 'pin_up_receipts/base'
6
6
  require 'pin_up_receipts/receipt'
7
7
 
8
8
  require 'pin_up_receipts/errors'
@@ -1,7 +1,7 @@
1
- module PinUpReceipts
1
+ module Pin
2
2
  ##
3
3
  # This class sets up a few things like the base URL and provides a few utility methods to be shared between classes.
4
- class Base
4
+ class ReceiptBase
5
5
  include HTTParty
6
6
  include Pin
7
7
 
@@ -1,9 +1,13 @@
1
1
  # encoding: utf-8
2
- module PinUpReceipts
2
+ module Pin
3
3
  ##
4
4
  # This class lets you generate and save receipts from a Pin::Charge.
5
- class Receipt < PinUpReceipts::Base
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:
@@ -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.0.0 ruby lib
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.0.0"
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-06"
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 = [
@@ -6,7 +6,7 @@ describe "Base", :vcr, class: Pin::Base do
6
6
  end
7
7
 
8
8
  it "should set the root view path correctly" do
9
- PinUpReceipts::Base.root.should eq File.expand_path '../..', __FILE__
9
+ Pin::Receipt.root.should eq File.expand_path '../..', __FILE__
10
10
  end
11
11
 
12
12
  end
@@ -1,12 +1,12 @@
1
1
  # encoding: utf-8
2
2
  require 'spec_helper'
3
3
 
4
- describe "Receipt", :vcr, class: PinUpReceipts::Receipt do
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 = PinUpReceipts::Receipt.new(@charge, @company_details)
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 = PinUpReceipts::Receipt.new(@charge, @company_details, nil, payment_options)
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
 
@@ -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.0.0
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-06 00:00:00.000000000 Z
11
+ date: 2013-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pin_up