stripe-rails 1.5.3 → 1.5.4

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
  SHA256:
3
- metadata.gz: 51f0207403afbfce8ee8b69a3f83b939cec5c1bdffbfc73e487cb3a07f6c4e10
4
- data.tar.gz: 02415c95fd7dbd5cb6ef51b8536160e15f8f73e3b67edb89978dc6c326e91e70
3
+ metadata.gz: cf79dbe2445d3605d945e23257dcc2fedbcb6e6fefeedba40e4f14515b9dadef
4
+ data.tar.gz: '09c1dfe4b60fa48d6d39ca6a1872b12917153f3d3b98b3da2db68761178bbf0d'
5
5
  SHA512:
6
- metadata.gz: fb22773c38887ff388f6a7e8ec92bb1ab586a9c8686e7e98f2d55d2c7214db49fb51dc9353ed34da2e9eb7e2b1d93c18c136ebf86650a9e033b18fa2c8b54363
7
- data.tar.gz: 479bfa26243c4bbb04625603d7055c6baee96758e54ec8f6a5f208ba50fadab8fea9181076070d931b3591532384ee9cbd5a1c02d66ae6a995faaa1b7bb632c3
6
+ metadata.gz: 6e455a1f349faf11d283b711c7b358f8db3998c632af6b1fe498003d48cfbe64b3bf5e91c64e15ce659d9db3cece8ddff600a0fab32b9f7de82b61b81cab6adb
7
+ data.tar.gz: 8f3946e974cb426cb814909fda58692703f43458ac9e890eae0a182da4c773e8a6fd2d756cb17a669608b5eb72bc2896424492ff147cae01ccb70020fd5d9ecf
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.5.1
4
- - 2.4.4
5
- - 2.3.7
3
+ - 2.5.3
4
+ - 2.4.5
5
+ - 2.3.8
6
6
  addons:
7
7
  chrome: stable
8
8
  env:
@@ -1,3 +1,8 @@
1
+ ## 1.5.4 (2018-11-14)
2
+
3
+ * Removes test exception from event dispatch
4
+ * Travis is now testing the gem on Ruby 2.5.3, 2.4.5, 2.3.8
5
+
1
6
  ## 1.5.3 (2018-10-25)
2
7
 
3
8
  * Add usage_type, aggregate_usage, and billing_scheme - thanks @garrettqmartin8
data/README.md CHANGED
@@ -19,7 +19,8 @@ This gem can help your rails application integrate with Stripe in the following
19
19
  [Installation](#installation)
20
20
  - [Setup your API keys](#setup-your-api-keys)
21
21
  - [Manually set your API version (optional)](#manually-set-your-api-version-optional)
22
- - [Setup your payment configuration](#setup-your-payment-configuration)
22
+
23
+ [Setup your payment configuration](#setup-your-payment-configuration)
23
24
  - [Configuring your plans and coupons](#configuring-your-plans-and-coupons)
24
25
 
25
26
  [Webhooks](#webhooks)
@@ -37,6 +38,8 @@ This gem can help your rails application integrate with Stripe in the following
37
38
 
38
39
  [Code of Conduct](#code-of-conduct)
39
40
 
41
+ [Priority Support](#priority-support)
42
+
40
43
  ## Installation
41
44
 
42
45
  Add this line to your application's Gemfile:
@@ -136,7 +139,7 @@ If you need to test a new API version in development, you can override the versi
136
139
  config.stripe.api_version = '2015-10-16'
137
140
  ```
138
141
 
139
- ### Setup your payment configuration
142
+ ## Setup your payment configuration
140
143
 
141
144
  If you're using subscriptions, then you'll need to set up your application's payment plans
142
145
  and discounts. `Stripe::Rails` lets you automate the management of these definitions from
@@ -509,7 +512,12 @@ The default fixtures come from [the `stripe-ruby-mock` gem](https://github.com/r
509
512
 
510
513
 
511
514
  ## Code of Conduct
515
+
512
516
  Please note that this project is released with a Contributor Code of
513
517
  Conduct. By participating in this project you agree to abide by its
514
518
  terms, which can be found in the `CODE_OF_CONDUCT.md` file in this
515
519
  repository.
520
+
521
+ ## Priority Support
522
+
523
+ Paid support is also available from the maintainer of this gem. If you need help setting up, designing your Stripe integration or have custom software development needs please feel free to email [sengming@sanemen.com](mailto:sengming@sanemen.com?subject=stripe-rails-support).
data/Rakefile CHANGED
@@ -1,9 +1,13 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
3
 
4
- desc "run minitests"
5
- task :spec do
6
- sh "bundle exec ruby -Itest test/all.rb"
4
+ require 'rake/testtask'
5
+
6
+ Rake::TestTask.new(:spec) do |t|
7
+ t.libs << 'test'
8
+ t.pattern = 'test/**/*_spec.rb'
9
+ t.warning = false
10
+ t.verbose = false
7
11
  end
8
12
 
9
- task :default => :spec
13
+ task default: :spec
@@ -14,10 +14,7 @@ module Stripe
14
14
  sig_header = request.headers['HTTP_STRIPE_SIGNATURE']
15
15
  endpoint_secret = ::Rails.application.config.stripe.signing_secret
16
16
 
17
- # this is a webhook test
18
- if id == 'evt_00000000000000'
19
- event = Stripe::Event.construct_from(JSON.parse(body))
20
- elsif Object.const_defined?('Stripe::Webhook') && sig_header && endpoint_secret
17
+ if Object.const_defined?('Stripe::Webhook') && sig_header && endpoint_secret
21
18
  event = ::Stripe::Webhook.construct_event(body, sig_header, endpoint_secret)
22
19
  else
23
20
  event = Stripe::Event.retrieve(id)
@@ -5,6 +5,6 @@ Rails.application.routes.draw do
5
5
  end
6
6
 
7
7
  Stripe::Engine.routes.draw do
8
- resource :ping, :only => :show
9
- resources :events, :only => [:create]
10
- end
8
+ resource :ping, only: :show
9
+ resources :events, only: :create
10
+ end
@@ -1,5 +1,5 @@
1
1
  module Stripe
2
2
  module Rails
3
- VERSION = '1.5.3'
3
+ VERSION = '1.5.4'
4
4
  end
5
5
  end
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
5
5
  gem.email = ["sengming@sanemen.com"]
6
6
  gem.description = "A gem to integrate stripe into your rails app"
7
7
  gem.summary = "A gem to integrate stripe into your rails app"
8
- gem.homepage = "https://github.com/Everapps/stripe-rails"
8
+ gem.homepage = "https://github.com/tansengming/stripe-rails"
9
9
  gem.license = 'MIT'
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
@@ -53,12 +53,6 @@ describe Stripe::Callbacks do
53
53
  ->{ subject }.must_raise RuntimeError
54
54
  end
55
55
  end
56
-
57
- describe 'when run from a Stripe webhook test' do
58
- before { event['id'] = 'evt_00000000000000' }
59
-
60
- it { subject } # must_not raise error
61
- end
62
56
  end
63
57
 
64
58
  describe 'defined without a bang and raising an exception' do
@@ -17,6 +17,11 @@ describe Stripe::EventsController do
17
17
  data: {object: 'customer'},
18
18
  }
19
19
  }
20
+
21
+ before do
22
+ stub_request(:get, "https://api.stripe.com/v1/events/evt_00000000000000").
23
+ to_return(status: 200, body: Stripe::Event.construct_from(params).to_json, headers: {})
24
+ end
20
25
  subject { post '/stripe/events', params.to_json }
21
26
 
22
27
  it { subject.must_be :ok? }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Lowell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-10-25 00:00:00.000000000 Z
13
+ date: 2018-11-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -101,7 +101,6 @@ files:
101
101
  - lib/stripe/rails/testing.rb
102
102
  - lib/stripe/rails/version.rb
103
103
  - stripe-rails.gemspec
104
- - test/all.rb
105
104
  - test/callbacks_spec.rb
106
105
  - test/coupon_builder_spec.rb
107
106
  - test/dummy/README.rdoc
@@ -161,7 +160,7 @@ files:
161
160
  - test/support/fixture_loader.rb
162
161
  - test/support/null_system_test_case.rb
163
162
  - test/testing_spec.rb
164
- homepage: https://github.com/Everapps/stripe-rails
163
+ homepage: https://github.com/tansengming/stripe-rails
165
164
  licenses:
166
165
  - MIT
167
166
  metadata: {}
@@ -186,7 +185,6 @@ signing_key:
186
185
  specification_version: 4
187
186
  summary: A gem to integrate stripe into your rails app
188
187
  test_files:
189
- - test/all.rb
190
188
  - test/callbacks_spec.rb
191
189
  - test/coupon_builder_spec.rb
192
190
  - test/dummy/README.rdoc
@@ -1 +0,0 @@
1
- Dir['**/*_spec.rb'].each {|f| load f}