solon 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source :rubygems
2
+
3
+ gem 'active_support'
4
+ gem 'i18n'
5
+ gem 'rspec'
data/Gemfile.lock ADDED
@@ -0,0 +1,24 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ active_support (3.0.0)
5
+ activesupport (= 3.0.0)
6
+ activesupport (3.0.0)
7
+ diff-lcs (1.1.3)
8
+ i18n (0.6.0)
9
+ rspec (2.8.0)
10
+ rspec-core (~> 2.8.0)
11
+ rspec-expectations (~> 2.8.0)
12
+ rspec-mocks (~> 2.8.0)
13
+ rspec-core (2.8.0)
14
+ rspec-expectations (2.8.0)
15
+ diff-lcs (~> 1.1.2)
16
+ rspec-mocks (2.8.0)
17
+
18
+ PLATFORMS
19
+ ruby
20
+
21
+ DEPENDENCIES
22
+ active_support
23
+ i18n
24
+ rspec
data/README.textile CHANGED
@@ -145,6 +145,12 @@ Valid and invalid callbacks not only check that the callback is approved (callba
145
145
 
146
146
  The checking of whether a callback is valid is left to the app developer.
147
147
 
148
+ h2. Testing
149
+
150
+ 1. Set vendor name in spec helper.
151
+ 2. run bundle
152
+ 3. bundle exec rspec
153
+
148
154
 
149
155
 
150
156
 
@@ -21,16 +21,31 @@ module Solon
21
21
 
22
22
  def method_missing(id, *args)
23
23
  id = id.to_s
24
- @values ||= {}
25
-
26
- case id[-1]
27
- when 61: # :blah=
28
- @values[id[0..-2].to_sym] = args[0]
29
- when 63: # :blah?
30
- @values.has_key?(id[0..-2].to_sym)
31
- else # :blah
32
- @values[id.to_sym]
24
+ @values ||= {}
25
+
26
+ # This is incompatible with ruby 1.9
27
+
28
+ if RUBY_VERSION =~ /1.9/
29
+ case id.last
30
+ when '=' # :blah=
31
+ @values[id[0..-2].to_sym] = args[0]
32
+ when '?' # :blah?
33
+ @values.has_key?(id[0..-2].to_sym)
34
+ else # :blah
35
+ @values[id.to_sym]
36
+ end
37
+ else
38
+ case id[-1]
39
+ when 61 # :blah=
40
+ @values[id[0..-2].to_sym] = args[0]
41
+ when 63 # :blah?
42
+ @values.has_key?(id[0..-2].to_sym)
43
+ else # :blah
44
+ @values[id.to_sym]
45
+ end
33
46
  end
47
+
48
+
34
49
  end
35
50
 
36
51
  def []=(key, value)
data/solon.gemspec CHANGED
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "solon"
7
- s.version = "0.1.0"
7
+ s.version = "0.2.0"
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Alastair Brunton"]
10
10
  s.email = ["info@simplyexcited.co.uk"]
@@ -1,10 +1,10 @@
1
- require 'spec/spec_helper'
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
2
 
3
3
  describe SolonGateway do
4
4
 
5
5
  before(:each) do
6
6
  @p = SolonGateway.new(:simulator)
7
- @p.debug = false
7
+ @p.debug = true
8
8
  end
9
9
 
10
10
  describe "sending a payment request" do
@@ -25,6 +25,7 @@ describe SolonGateway do
25
25
  :notification_url => "http://test.example.com",
26
26
  :customer_data => {:billing => customer_data, :delivery =>customer_data} ,
27
27
  })
28
+ puts @response.inspect
28
29
  end
29
30
 
30
31
  it "should return a SagepayResponse" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alastair Brunton
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-02 00:00:00 +02:00
18
+ date: 2012-02-09 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -29,6 +29,9 @@ extensions: []
29
29
  extra_rdoc_files: []
30
30
 
31
31
  files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - Gemfile.lock
32
35
  - LICENSE.txt
33
36
  - README.textile
34
37
  - lib/solon.rb