spree_razorpay 0.1.4 → 0.2.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
  SHA256:
3
- metadata.gz: 051b900ff5b5e78473d8b8ee848d2e48552004bf622b813c2b981ab23a023b36
4
- data.tar.gz: df238fcfa7611495f6a2d274857974c0a2fbc027fc6ea20723b9bc3d88716c18
3
+ metadata.gz: 69dbd8390a502a8272b1ed6cacd66773ecd9a423366697b0406e55a17e6caf7c
4
+ data.tar.gz: 06eba04c987ffd5ab894e6f8a02ac1df0810e20e58dd6c58e9cb698c7516ed6c
5
5
  SHA512:
6
- metadata.gz: c58ab0facd91c0d9528357445e470de1ceba1e7ec111a39aba9eb5cffba6fe465d9208184ec5231512d1b2d898122b1d75998cec7866e712d7f1c32ed059e9cc
7
- data.tar.gz: 0621a50d2715e3fdb453fed107bc6e87209d25f5fa82ac8c2ea76a38184b23b85cb946d195013fdd6bc05d83441fb2349fa4625ed162fdbe30287bec191ed0ff
6
+ metadata.gz: 25fcafda998d7ea14ac6610aac2396867d013321b40cd1dc805f87dd8ea251b979d8686c8c57ab0076a79110069a4616c93f315941dd25a9125f2e844ed0262b
7
+ data.tar.gz: 4b1a6b8bf64d9d53d04b0a012f7cad1f0ab5d2ce3a4855c027753be49163b0bdbad36a3661653cb519f5f618bb5c61f86e891695606308e97ed709ab31483176
data/.gitignore CHANGED
@@ -6,3 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /spec/dummy/
10
+ .byebug_history
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.travis.yml CHANGED
@@ -2,4 +2,7 @@ sudo: false
2
2
  language: ruby
3
3
  rvm:
4
4
  - 2.5.0
5
- before_install: gem install bundler -v 1.16.1
5
+ before_install: gem install bundler -v 1.16.5
6
+ script:
7
+ - 'bundle exec rake test_app'
8
+ - 'bundle exec rspec spec'
data/Gemfile CHANGED
@@ -1,10 +1,23 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem 'razorpay'
4
- gem 'rspec'
5
- gem 'vcr'
6
- gem 'webmock'
7
- gem 'spree_core'
4
+ gem 'spree_core', '>= 3.1.0', '< 4.0'
5
+ gem 'byebug'
6
+
7
+ group :test do
8
+ gem 'sqlite3'
9
+ gem 'rspec-rails'
10
+ gem 'ffaker'
11
+ gem 'factory_bot_rails'
12
+ gem 'database_cleaner'
13
+ gem 'spree_extension'
14
+ gem 'spree_frontend'
15
+ gem 'rails-controller-testing'
16
+ unless ENV['WITHOUT_SPREE_AUTH_DEVISE'] == 'true'
17
+ gem 'spree_auth_devise'
18
+ end
19
+ gem 'coffee-rails'
20
+ end
8
21
 
9
22
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
10
23
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spree_razorpay (0.1.4)
4
+ spree_razorpay (0.2.0)
5
5
  razorpay
6
6
  spree_core
7
7
 
@@ -61,40 +61,73 @@ GEM
61
61
  addressable (2.5.2)
62
62
  public_suffix (>= 2.0.2, < 4.0)
63
63
  arel (9.0.0)
64
+ autoprefixer-rails (9.1.4)
65
+ execjs
64
66
  awesome_nested_set (3.1.4)
65
67
  activerecord (>= 4.0.0, < 5.3)
68
+ bcrypt (3.1.12)
69
+ bootstrap-sass (3.3.7)
70
+ autoprefixer-rails (>= 5.2.1)
71
+ sass (>= 3.3.4)
66
72
  builder (3.2.3)
73
+ byebug (10.0.2)
67
74
  camertron-eprun (1.1.1)
68
- cancancan (2.2.0)
75
+ cancancan (2.3.0)
76
+ canonical-rails (0.2.4)
77
+ rails (>= 4.1, < 5.3)
69
78
  carmen (1.0.2)
70
79
  activesupport (>= 3.0.0)
71
80
  cldr-plurals-runtime-rb (1.0.1)
72
81
  climate_control (0.2.0)
82
+ coffee-rails (4.2.2)
83
+ coffee-script (>= 2.2.0)
84
+ railties (>= 4.0.0)
85
+ coffee-script (2.4.1)
86
+ coffee-script-source
87
+ execjs
88
+ coffee-script-source (1.12.2)
73
89
  concurrent-ruby (1.0.5)
74
- crack (0.4.3)
75
- safe_yaml (~> 1.0.0)
76
90
  crass (1.0.4)
77
91
  css_parser (1.6.0)
78
92
  addressable
79
- deface (1.3.0)
80
- nokogiri (~> 1.6)
93
+ database_cleaner (1.7.0)
94
+ deface (1.3.1)
95
+ nokogiri (>= 1.6)
81
96
  polyglot
82
97
  rails (>= 4.1)
83
98
  rainbow (>= 2.1.0)
99
+ devise (4.4.3)
100
+ bcrypt (~> 3.0)
101
+ orm_adapter (~> 0.1)
102
+ railties (>= 4.1.0, < 6.0)
103
+ responders
104
+ warden (~> 1.2.3)
105
+ devise-encryptable (0.2.0)
106
+ devise (>= 2.1.0)
84
107
  diff-lcs (1.3)
85
108
  erubi (1.7.1)
109
+ execjs (2.7.0)
110
+ factory_bot (4.11.1)
111
+ activesupport (>= 3.0.0)
112
+ factory_bot_rails (4.11.1)
113
+ factory_bot (~> 4.11.1)
114
+ railties (>= 3.0.0)
86
115
  ffaker (2.10.0)
116
+ ffi (1.9.25)
87
117
  friendly_id (5.2.4)
88
118
  activerecord (>= 4.0.0)
89
119
  globalid (0.4.1)
90
120
  activesupport (>= 4.2.0)
91
- hashdiff (0.3.7)
92
121
  highline (1.6.21)
93
122
  htmlentities (4.3.4)
94
123
  httparty (0.16.2)
95
124
  multi_xml (>= 0.5.2)
96
125
  i18n (1.0.1)
97
126
  concurrent-ruby (~> 1.0)
127
+ jquery-rails (4.3.3)
128
+ rails-dom-testing (>= 1, < 3)
129
+ railties (>= 4.2.0)
130
+ thor (>= 0.14, < 2.0)
98
131
  kaminari (1.0.1)
99
132
  activesupport (>= 4.1.0)
100
133
  kaminari-actionview (= 1.0.1)
@@ -112,7 +145,7 @@ GEM
112
145
  nokogiri (>= 1.5.9)
113
146
  mail (2.7.0)
114
147
  mini_mime (>= 0.1.1)
115
- marcel (0.3.2)
148
+ marcel (0.3.3)
116
149
  mimemagic (~> 0.3.2)
117
150
  method_source (0.9.0)
118
151
  mime-types (3.2.2)
@@ -131,6 +164,7 @@ GEM
131
164
  nio4r (2.3.1)
132
165
  nokogiri (1.8.4)
133
166
  mini_portile2 (~> 2.3.0)
167
+ orm_adapter (0.5.0)
134
168
  paperclip (6.0.0)
135
169
  activemodel (>= 4.2.0)
136
170
  activesupport (>= 4.2.0)
@@ -139,8 +173,6 @@ GEM
139
173
  terrapin (~> 0.6.0)
140
174
  paranoia (2.4.1)
141
175
  activerecord (>= 4.0, < 5.3)
142
- polyamorous (1.3.3)
143
- activerecord (>= 3.0)
144
176
  polyglot (0.3.5)
145
177
  premailer (1.11.1)
146
178
  addressable
@@ -150,6 +182,8 @@ GEM
150
182
  actionmailer (>= 3, < 6)
151
183
  premailer (~> 1.7, >= 1.7.9)
152
184
  public_suffix (3.0.3)
185
+ rabl (0.13.1)
186
+ activesupport (>= 2.3.14)
153
187
  rack (2.0.5)
154
188
  rack-test (1.1.0)
155
189
  rack (>= 1.0, < 3)
@@ -166,6 +200,10 @@ GEM
166
200
  bundler (>= 1.3.0)
167
201
  railties (= 5.2.0)
168
202
  sprockets-rails (>= 2.0.0)
203
+ rails-controller-testing (1.0.2)
204
+ actionpack (~> 5.x, >= 5.0.1)
205
+ actionview (~> 5.x, >= 5.0.1)
206
+ activesupport (~> 5.x)
169
207
  rails-dom-testing (2.0.3)
170
208
  activesupport (>= 4.2.0)
171
209
  nokogiri (>= 1.6)
@@ -179,21 +217,19 @@ GEM
179
217
  thor (>= 0.18.1, < 2.0)
180
218
  rainbow (3.0.0)
181
219
  rake (10.5.0)
182
- ransack (1.8.8)
183
- actionpack (>= 3.0)
184
- activerecord (>= 3.0)
185
- activesupport (>= 3.0)
220
+ ransack (2.0.1)
221
+ actionpack (>= 5.0)
222
+ activerecord (>= 5.0)
223
+ activesupport (>= 5.0)
186
224
  i18n
187
- polyamorous (~> 1.3.2)
188
225
  razorpay (2.3.0)
189
226
  httparty (~> 0.14)
227
+ rb-fsevent (0.10.3)
228
+ rb-inotify (0.9.10)
229
+ ffi (>= 0.5.0, < 2)
190
230
  responders (2.4.0)
191
231
  actionpack (>= 4.2.0, < 5.3)
192
232
  railties (>= 4.2.0, < 5.3)
193
- rspec (3.8.0)
194
- rspec-core (~> 3.8.0)
195
- rspec-expectations (~> 3.8.0)
196
- rspec-mocks (~> 3.8.0)
197
233
  rspec-core (3.8.0)
198
234
  rspec-support (~> 3.8.0)
199
235
  rspec-expectations (3.8.1)
@@ -202,9 +238,30 @@ GEM
202
238
  rspec-mocks (3.8.0)
203
239
  diff-lcs (>= 1.2.0, < 2.0)
204
240
  rspec-support (~> 3.8.0)
241
+ rspec-rails (3.8.0)
242
+ actionpack (>= 3.0)
243
+ activesupport (>= 3.0)
244
+ railties (>= 3.0)
245
+ rspec-core (~> 3.8.0)
246
+ rspec-expectations (~> 3.8.0)
247
+ rspec-mocks (~> 3.8.0)
248
+ rspec-support (~> 3.8.0)
205
249
  rspec-support (3.8.0)
206
- safe_yaml (1.0.4)
207
- spree_core (3.6.3)
250
+ sass (3.6.0)
251
+ sass-listen (~> 4.0.0)
252
+ sass-listen (4.0.0)
253
+ rb-fsevent (~> 0.9, >= 0.9.4)
254
+ rb-inotify (~> 0.9, >= 0.9.7)
255
+ spree_api (3.6.4)
256
+ rabl (~> 0.13.1)
257
+ spree_core (= 3.6.4)
258
+ versioncake (~> 3.4.0)
259
+ spree_auth_devise (3.4.1)
260
+ devise (~> 4.4.0)
261
+ devise-encryptable (= 0.2.0)
262
+ spree_core (>= 3.1.0, < 4.0)
263
+ spree_extension
264
+ spree_core (3.6.4)
208
265
  activemerchant (~> 1.67)
209
266
  acts-as-taggable-on (~> 6.0)
210
267
  acts_as_list (~> 0.8)
@@ -221,13 +278,21 @@ GEM
221
278
  paperclip (~> 6.0.0)
222
279
  paranoia (~> 2.4.1)
223
280
  premailer-rails
224
- rails (= 5.2.0)
225
- ransack (~> 1.8.0)
281
+ rails (~> 5.2.0)
282
+ ransack (~> 2.0.1)
226
283
  responders
227
284
  sprockets-rails
228
285
  state_machines-activerecord (~> 0.5)
229
286
  stringex
230
287
  twitter_cldr (~> 4.3)
288
+ spree_extension (0.0.5)
289
+ activerecord (>= 4.2)
290
+ spree_frontend (3.6.4)
291
+ bootstrap-sass (>= 3.3.5.1, < 3.4)
292
+ canonical-rails (~> 0.2.3)
293
+ jquery-rails (~> 4.3)
294
+ spree_api (= 3.6.4)
295
+ spree_core (= 3.6.4)
231
296
  sprockets (3.7.2)
232
297
  concurrent-ruby (~> 1.0)
233
298
  rack (> 1, < 3)
@@ -235,6 +300,7 @@ GEM
235
300
  actionpack (>= 4.0)
236
301
  activesupport (>= 4.0)
237
302
  sprockets (>= 3.0.0)
303
+ sqlite3 (1.3.13)
238
304
  state_machines (0.5.0)
239
305
  state_machines-activemodel (0.5.1)
240
306
  activemodel (>= 4.1, < 6.0)
@@ -253,11 +319,13 @@ GEM
253
319
  tzinfo
254
320
  tzinfo (1.2.5)
255
321
  thread_safe (~> 0.1)
256
- vcr (4.0.0)
257
- webmock (3.4.2)
258
- addressable (>= 2.3.6)
259
- crack (>= 0.3.2)
260
- hashdiff
322
+ versioncake (3.4.0)
323
+ actionpack (>= 3.2)
324
+ activesupport (>= 3.2)
325
+ railties (>= 3.2)
326
+ tzinfo
327
+ warden (1.2.7)
328
+ rack (>= 1.0)
261
329
  websocket-driver (0.7.0)
262
330
  websocket-extensions (>= 0.1.0)
263
331
  websocket-extensions (0.1.3)
@@ -267,14 +335,22 @@ PLATFORMS
267
335
 
268
336
  DEPENDENCIES
269
337
  bundler (~> 1.16)
338
+ byebug
339
+ coffee-rails
340
+ database_cleaner
341
+ factory_bot_rails
342
+ ffaker
270
343
  minitest (~> 5.0)
344
+ rails-controller-testing
271
345
  rake (~> 10.0)
272
346
  razorpay
273
- rspec
274
- spree_core
347
+ rspec-rails
348
+ spree_auth_devise
349
+ spree_core (>= 3.1.0, < 4.0)
350
+ spree_extension
351
+ spree_frontend
275
352
  spree_razorpay!
276
- vcr
277
- webmock
353
+ sqlite3
278
354
 
279
355
  BUNDLED WITH
280
356
  1.16.5
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # SpreeRazorpay
2
2
 
3
+ [![Build Status](https://travis-ci.org/neerajkumar/spree-razorpay.svg?branch=master)](https://travis-ci.org/neerajkumar/spree-razorpay)
4
+
3
5
  Razorpay payment gateway integration for Spree
4
6
 
5
7
  ## Installation
@@ -15,9 +15,9 @@ module Spree
15
15
  @error = false
16
16
  @redirect_path = order_path(@order)
17
17
  else
18
- @order.update_attributes(payment_state: "failed")
18
+ @order.update_attributes(payment_state: 'failed')
19
19
  @error = true
20
- @message = "There was an error processing your payment"
20
+ @message = 'There was an error processing your payment'
21
21
  @redirect_path = checkout_state_path(@order.state)
22
22
  end
23
23
  end
@@ -12,7 +12,7 @@ Spree::Order.class_eval do
12
12
  payment.update(response_code: razorpay_pmnt_obj.status)
13
13
  razorpay_pmnt_obj.status
14
14
  else
15
- raise StandardError, "Unable to capture payment"
15
+ raise StandardError, 'Unable to capture payment'
16
16
  end
17
17
  end
18
18
 
@@ -1,4 +1,4 @@
1
- class CreateSpreeRazorpayCheckouts < ActiveRecord::Migration
1
+ class CreateSpreeRazorpayCheckouts < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :spree_razorpay_checkouts do |t|
4
4
  t.string :order_id
@@ -0,0 +1,10 @@
1
+ FactoryBot.define do
2
+ # Define your Spree extensions Factories within this file to enable applications, and other extensions to use and override them.
3
+ #
4
+ # Example adding this to your spec_helper will load these Factories for use:
5
+ # require 'spree_razorpay/factories'
6
+
7
+ Dir[Dir.pwd + '/spec/factories/**/*'].each do |factory|
8
+ require File.expand_path(factory)
9
+ end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module SpreeRazorpay
2
- VERSION = '0.1.4'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -1,41 +1,41 @@
1
1
 
2
- lib = File.expand_path("../lib", __FILE__)
2
+ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "spree_razorpay/version"
4
+ require 'spree_razorpay/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.platform = Gem::Platform::RUBY
8
- spec.name = "spree_razorpay"
8
+ spec.name = 'spree_razorpay'
9
9
  spec.version = SpreeRazorpay::VERSION
10
- spec.authors = ["Neeraj Kumar"]
11
- spec.email = ["neeraj.kumar@gmail.com"]
10
+ spec.authors = ['Neeraj Kumar']
11
+ spec.email = ['neeraj.kumar@gmail.com']
12
12
 
13
13
  spec.summary = %q{Razorpay integration into spree application.}
14
14
  spec.description = spec.summary
15
- spec.homepage = "https://github.com/neerajkumar/spree-razorpay"
16
- spec.license = "MIT"
15
+ spec.homepage = 'https://github.com/neerajkumar/spree-razorpay'
16
+ spec.license = 'MIT'
17
17
 
18
18
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
19
19
  # to allow pushing to a single host or delete this section to allow pushing to any host.
20
20
  if spec.respond_to?(:metadata)
21
- spec.metadata["allowed_push_host"] = 'https://rubygems.org'
21
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
22
22
  else
23
- raise "RubyGems 2.0 or newer is required to protect against " \
24
- "public gem pushes."
23
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
24
+ 'public gem pushes.'
25
25
  end
26
26
 
27
27
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
28
28
  f.match(%r{^(test|spec|features)/})
29
29
  end
30
- spec.bindir = "exe"
30
+ spec.bindir = 'exe'
31
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
- spec.require_paths = ["lib"]
32
+ spec.require_paths = ['lib']
33
33
  spec.requirements << 'none'
34
34
 
35
35
  spec.add_dependency 'spree_core'
36
36
  spec.add_dependency 'razorpay'
37
37
 
38
- spec.add_development_dependency "bundler", "~> 1.16"
39
- spec.add_development_dependency "rake", "~> 10.0"
40
- spec.add_development_dependency "minitest", "~> 5.0"
38
+ spec.add_development_dependency 'bundler', '~> 1.16'
39
+ spec.add_development_dependency 'rake', '~> 10.0'
40
+ spec.add_development_dependency 'minitest', '~> 5.0'
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_razorpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj Kumar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-25 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -88,6 +88,7 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
+ - ".rspec"
91
92
  - ".travis.yml"
92
93
  - CODE_OF_CONDUCT.md
93
94
  - Gemfile
@@ -111,6 +112,7 @@ files:
111
112
  - lib/generators/spree_razorpay/install/install_generator.rb
112
113
  - lib/spree_razorpay.rb
113
114
  - lib/spree_razorpay/engine.rb
115
+ - lib/spree_razorpay/factories.rb
114
116
  - lib/spree_razorpay/version.rb
115
117
  - spree_razorpay.gemspec
116
118
  homepage: https://github.com/neerajkumar/spree-razorpay