samurai 0.2.21 → 0.2.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,16 +21,38 @@ module Samurai::Rails
21
21
  PARTIALS = [ 'payment_form', 'errors', 'transaction' ]
22
22
 
23
23
  PARTIALS.each do |partial|
24
- define_method partial do |attrs|
25
- attrs ||= {}
26
- {:file=>send("#{partial}_file"), :locals=>attrs}
27
- end
28
- define_method "#{partial}_file" do
29
- Pathname.new(__FILE__).dirname.join('../../..', 'app', 'views', 'application', "_#{partial}.html.erb").to_s
30
- end
31
- define_method "#{partial}_html" do
32
- File.read send("#{partial}_file")
33
- end
24
+ # _Example:_
25
+ #
26
+ # def payment_method(attrs={})
27
+ # {:file=>send("payment_method_file"), :locals=>attrs}
28
+ # end
29
+ class_eval <<-__METHOD__
30
+ def #{partial}(attrs={})
31
+ {:file=>send("#{partial}_file"), :locals=>attrs}
32
+ end
33
+ __METHOD__
34
+
35
+ # _Example:_
36
+ #
37
+ # def payment_method_file
38
+ # Pathname.new(__FILE__).dirname.join('../../..', 'app', 'views', 'application', "_payment_method.html.erb").to_s
39
+ # end
40
+ class_eval <<-__METHOD__
41
+ def #{partial}_file
42
+ Pathname.new('#{__FILE__}').dirname.join('../../..', 'app', 'views', 'application', "_#{partial}.html.erb").to_s
43
+ end
44
+ __METHOD__
45
+
46
+ # _Example:_
47
+ #
48
+ # def payment_method_html
49
+ # File.read send("payment_method_file")
50
+ # end
51
+ class_eval <<-__METHOD__
52
+ def #{partial}_html
53
+ File.read send("#{partial}_file")
54
+ end
55
+ __METHOD__
34
56
  end
35
57
 
36
58
  end
@@ -1,3 +1,3 @@
1
1
  module Samurai
2
- VERSION = "0.2.21".freeze
2
+ VERSION = "0.2.22".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samurai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.21
4
+ version: 0.2.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,12 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-10-26 00:00:00.000000000 -05:00
14
- default_executable:
13
+ date: 2011-10-26 00:00:00.000000000Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: activeresource
18
- requirement: &2157240420 !ruby/object:Gem::Requirement
17
+ requirement: &70293528504060 !ruby/object:Gem::Requirement
19
18
  none: false
20
19
  requirements:
21
20
  - - ! '>='
@@ -23,10 +22,10 @@ dependencies:
23
22
  version: 2.2.2
24
23
  type: :runtime
25
24
  prerelease: false
26
- version_requirements: *2157240420
25
+ version_requirements: *70293528504060
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: bundler
29
- requirement: &2157239960 !ruby/object:Gem::Requirement
28
+ requirement: &70293528503540 !ruby/object:Gem::Requirement
30
29
  none: false
31
30
  requirements:
32
31
  - - ! '>='
@@ -34,10 +33,10 @@ dependencies:
34
33
  version: 1.0.0
35
34
  type: :development
36
35
  prerelease: false
37
- version_requirements: *2157239960
36
+ version_requirements: *70293528503540
38
37
  - !ruby/object:Gem::Dependency
39
38
  name: rspec
40
- requirement: &2157239500 !ruby/object:Gem::Requirement
39
+ requirement: &70293528503060 !ruby/object:Gem::Requirement
41
40
  none: false
42
41
  requirements:
43
42
  - - ! '>='
@@ -45,10 +44,10 @@ dependencies:
45
44
  version: 2.6.0
46
45
  type: :development
47
46
  prerelease: false
48
- version_requirements: *2157239500
47
+ version_requirements: *70293528503060
49
48
  - !ruby/object:Gem::Dependency
50
49
  name: fakeweb
51
- requirement: &2157239120 !ruby/object:Gem::Requirement
50
+ requirement: &70293528502500 !ruby/object:Gem::Requirement
52
51
  none: false
53
52
  requirements:
54
53
  - - ! '>='
@@ -56,10 +55,10 @@ dependencies:
56
55
  version: '0'
57
56
  type: :development
58
57
  prerelease: false
59
- version_requirements: *2157239120
58
+ version_requirements: *70293528502500
60
59
  - !ruby/object:Gem::Dependency
61
60
  name: ruby-debug19
62
- requirement: &2157238620 !ruby/object:Gem::Requirement
61
+ requirement: &70293528501880 !ruby/object:Gem::Requirement
63
62
  none: false
64
63
  requirements:
65
64
  - - ! '>='
@@ -67,7 +66,7 @@ dependencies:
67
66
  version: '0'
68
67
  type: :development
69
68
  prerelease: false
70
- version_requirements: *2157238620
69
+ version_requirements: *70293528501880
71
70
  description: If you are an online merchant and using samurai.feefighters.com, this
72
71
  gem will make your life easy. Integrate with the samurai.feefighters.com portal
73
72
  and process transaction.
@@ -112,7 +111,6 @@ files:
112
111
  - spec/support/response_logger.rb
113
112
  - spec/support/transaction_seed.rb
114
113
  - spec/support/transparent_redirect_helper.rb
115
- has_rdoc: true
116
114
  homepage: http://rubygems.org/gems/samurai
117
115
  licenses: []
118
116
  post_install_message:
@@ -133,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
131
  version: 1.3.5
134
132
  requirements: []
135
133
  rubyforge_project:
136
- rubygems_version: 1.6.2
134
+ rubygems_version: 1.8.10
137
135
  signing_key:
138
136
  specification_version: 3
139
137
  summary: Integration gem for samurai.feefighters.com