chargify_api_ares 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/chargify_api_ares.gemspec +1 -1
- data/lib/chargify_api_ares.rb +1 -5
- data/spec/base_spec.rb +10 -7
- metadata +1 -1
data/chargify_api_ares.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{chargify_api_ares}
|
3
|
-
s.version = "0.4.
|
3
|
+
s.version = "0.4.3"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Michael Klett", "Nathan Verni", "Rodrigo Franco", "Shay Frendt"]
|
data/lib/chargify_api_ares.rb
CHANGED
@@ -61,11 +61,7 @@ module Chargify
|
|
61
61
|
Base.password = 'X'
|
62
62
|
Base.timeout = timeout unless (timeout.blank?)
|
63
63
|
|
64
|
-
|
65
|
-
self.site = site || "https://#{subdomain}.chargify.com"
|
66
|
-
else
|
67
|
-
self.site = "https://#{subdomain}.chargify.com"
|
68
|
-
end
|
64
|
+
self.site ||= "https://#{subdomain}.chargify.com"
|
69
65
|
|
70
66
|
Base.site = site
|
71
67
|
Subscription::Component.site = site + "/subscriptions/:subscription_id"
|
data/spec/base_spec.rb
CHANGED
@@ -12,13 +12,16 @@ describe Chargify::Base do
|
|
12
12
|
@original_subdomain = Chargify.subdomain
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
# TODO: Because ActiveResource overloads the word "site"
|
16
|
+
# It is difficult to support setting either the site or subdomain
|
17
|
+
# after the class has already been configured and loaded
|
18
|
+
# it "honors changes made after the first configuration" do
|
19
|
+
# expect do
|
20
|
+
# Chargify.configure do |c|
|
21
|
+
# c.subdomain = "something-new"
|
22
|
+
# end
|
23
|
+
# end.to change { Chargify::Base.site.to_s }.to("https://something-new.chargify.com")
|
24
|
+
# end
|
22
25
|
|
23
26
|
it "honors the site over the subdomain if it is specified" do
|
24
27
|
expect do
|