Bläddra i källkod

adding gemfile for ActiveResource 5.0

Peter McCracken 9 år sedan
förälder
incheckning
3012cd42d2
3 ändrade filer med 13 tillägg och 2 borttagningar
  1. 11 0
      Gemfile_ar50
  2. 1 1
      test/base_test.rb
  3. 1 1
      test/recurring_application_charge_test.rb

+ 11 - 0
Gemfile_ar50

@@ -0,0 +1,11 @@
+source "https://rubygems.org"
+
+gemspec
+
+gem 'activeresource', git: 'git://github.com/rails/activeresource', ref: 'c3cd2b535b7c5cdc12cc6a3c1e11be6c74ffa179'
+
+gem 'minitest', "~> 5.1"
+gem 'activesupport', github: 'rails/rails'
+gem 'activemodel', github: 'rails/rails'
+gem 'arel', github: 'rails/arel'
+gem 'rails-observers', github: 'rails/rails-observers'

+ 1 - 1
test/base_test.rb

@@ -88,7 +88,7 @@ class BaseTest < Test::Unit::TestCase
     end
   end
 
-  if ActiveResource::VERSION::MAJOR >= 4 && ActiveResource::VERSION::PRE == "threadsafe"
+  if ActiveResource::VERSION::MAJOR > 5 || (ActiveResource::VERSION::MAJOR >= 4 && ActiveResource::VERSION::PRE == "threadsafe")
     test "#headers set in the main thread affect spawned threads" do
       ShopifyAPI::Base.headers['X-Custom'] = "the value"
       Thread.new do

+ 1 - 1
test/recurring_application_charge_test.rb

@@ -137,7 +137,7 @@ class RecurringApplicationChargeTest < Test::Unit::TestCase
     fake "recurring_application_charges", body: '{"errors":"Not Found"}', status: 404
 
     all_application_charges = ShopifyAPI::RecurringApplicationCharge.all
-    if ActiveResource::VERSION::MAJOR >= 4 && ActiveResource::VERSION::MINOR >= 2
+    if ActiveResource::VERSION::MAJOR >= 5 || (ActiveResource::VERSION::MAJOR == 4 && ActiveResource::VERSION::MINOR >= 2)
       assert_equal [], all_application_charges
     else
       assert_equal nil, all_application_charges