unified_payment 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/unified_payment/version.rb +1 -1
- data/spec/dummy/Rakefile +32 -0
- data/spec/dummy/config/application.rb +22 -0
- data/spec/dummy/config/database.yml +17 -0
- data/{config → spec/dummy/config}/environment.rb +0 -0
- data/spec/models/unified_payment/transaction_spec.rb +2 -0
- data/spec/spec_helper.rb +1 -1
- metadata +12 -6
- data/config/boot.rb +0 -5
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.expand_path('../config/application', __FILE__)
|
2
|
+
|
3
|
+
UnifiedPayment::Application.load_tasks
|
4
|
+
|
5
|
+
task :test_unified_payment do
|
6
|
+
puts 'creating symlink for spec files...'
|
7
|
+
system 'ln -s ../../spec'
|
8
|
+
|
9
|
+
puts 'setting up db with migration(s)'
|
10
|
+
|
11
|
+
puts 'create db'
|
12
|
+
system 'bundle exec rake db:create RAILS_ENV=test'
|
13
|
+
|
14
|
+
puts 'copy migration(s)'
|
15
|
+
require File.expand_path('../../lib/generators/unified_payment/install_generator')
|
16
|
+
UnifiedPayment::InstallGenerator.new.create_migrations
|
17
|
+
|
18
|
+
puts 'running migrations...'
|
19
|
+
system 'bundle exec rake db:migrate RAILS_ENV=test'
|
20
|
+
|
21
|
+
puts 'running specs...'
|
22
|
+
system 'bundle exec rspec spec'
|
23
|
+
|
24
|
+
puts 'dropping the db created for test...'
|
25
|
+
system 'bundle exec rake db:drop'
|
26
|
+
|
27
|
+
puts 'unlinking spec files...'
|
28
|
+
system 'unlink spec'
|
29
|
+
|
30
|
+
puts 'removing db files...'
|
31
|
+
system 'rm -rf db'
|
32
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'rails/all'
|
3
|
+
|
4
|
+
Bundler.require(*Rails.groups)
|
5
|
+
require "unified_payment"
|
6
|
+
|
7
|
+
module UnifiedPayment
|
8
|
+
class Application < Rails::Application
|
9
|
+
# Settings in config/environments/* take precedence over those specified here.
|
10
|
+
# Application configuration should go into files in config/initializers
|
11
|
+
# -- all .rb files in that directory are automatically loaded.
|
12
|
+
|
13
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
14
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
15
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
16
|
+
|
17
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
18
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
19
|
+
# config.i18n.default_locale = :de
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
|
7
|
+
# Warning: The database defined as "test" will be erased and
|
8
|
+
# re-generated from your development database when you run "rake".
|
9
|
+
# Do not set this db to the same as development or production.
|
10
|
+
test:
|
11
|
+
adapter: mysql2
|
12
|
+
encoding: utf8
|
13
|
+
reconnect: false
|
14
|
+
database: unified_payment_test
|
15
|
+
pool: 5
|
16
|
+
username: root
|
17
|
+
password:
|
File without changes
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
2
|
ENV["RAILS_ENV"] ||= 'test'
|
3
|
-
require File.expand_path("
|
3
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
4
4
|
# require 'rspec/rails'
|
5
5
|
# require 'rspec/autorun'
|
6
6
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unified_payment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Manish Kangia
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2014-
|
19
|
+
date: 2014-03-04 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -46,8 +46,6 @@ files:
|
|
46
46
|
- app/controllers/unified_payment/transactions_controller.rb
|
47
47
|
- app/models/unified_payment/transaction.rb
|
48
48
|
- app/views/unified_payment/transactions/index.html.erb
|
49
|
-
- config/boot.rb
|
50
|
-
- config/environment.rb
|
51
49
|
- config/locales/en.yml
|
52
50
|
- config/routes.rb
|
53
51
|
- lib/generators/unified_payment/install_generator.rb
|
@@ -60,6 +58,10 @@ files:
|
|
60
58
|
- lib/unified_payment/version.rb
|
61
59
|
- lib/unified_payment.rb
|
62
60
|
- Rakefile
|
61
|
+
- spec/dummy/config/application.rb
|
62
|
+
- spec/dummy/config/database.yml
|
63
|
+
- spec/dummy/config/environment.rb
|
64
|
+
- spec/dummy/Rakefile
|
63
65
|
- spec/Libraries/client_spec.rb
|
64
66
|
- spec/models/unified_payment/transaction_spec.rb
|
65
67
|
- spec/spec_helper.rb
|
@@ -97,6 +99,10 @@ signing_key:
|
|
97
99
|
specification_version: 3
|
98
100
|
summary: Interface to handle payments via UnifiedPayment for rails app.
|
99
101
|
test_files:
|
102
|
+
- spec/dummy/config/application.rb
|
103
|
+
- spec/dummy/config/database.yml
|
104
|
+
- spec/dummy/config/environment.rb
|
105
|
+
- spec/dummy/Rakefile
|
100
106
|
- spec/Libraries/client_spec.rb
|
101
107
|
- spec/models/unified_payment/transaction_spec.rb
|
102
108
|
- spec/spec_helper.rb
|
data/config/boot.rb
DELETED