Browse Source

Add .travis.yml for multi-testing and notifications to flowdock and fix URL encoding difference in ActiveSupport 3.0

Maarten van Grootel 11 years ago
parent
commit
9acdbc6e3e
7 changed files with 71 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 32 0
      .travis.yml
  3. 9 0
      Gemfile_ar30
  4. 9 0
      Gemfile_ar31
  5. 9 0
      Gemfile_ar32
  6. 10 0
      lib/active_resource/to_query.rb
  7. 1 0
      lib/shopify_api.rb

+ 1 - 0
.gitignore

@@ -4,3 +4,4 @@ coverage
 rdoc
 doc
 pkg
+.ruby-version

+ 32 - 0
.travis.yml

@@ -0,0 +1,32 @@
+language: ruby
+
+rvm:
+  - 2.0.0
+  - 1.9.3
+
+gemfile:
+  - Gemfile
+  - Gemfile_ar30
+  - Gemfile_ar31
+  - Gemfile_ar32
+
+install: bundle install
+
+before_script: echo $OLD_RAKE
+
+matrix:
+  include:
+    - rvm: 1.9.2
+      gemfile: Gemfile_ar30
+      env: OLD_RAKE=1
+    - rvm: 1.9.2
+      gemfile: Gemfile_ar31
+      env: OLD_RAKE=1
+    - rvm: 1.9.2
+      gemfile: Gemfile_ar32
+      env: OLD_RAKE=1
+
+
+notifications:
+  flowdock: 
+    secure: "RCgSxzMScnqK6bOwkv9sWSdieLBeJla8NcDtM/QmuFW8soTgV6qCTAPAGd4lpjg4vGTaM3DsdHU5GMDbgdWN5dE2Rf09ayFqiZg8OloPMQ63KIwLJyVcw3cVJO5i7smjIpsSjPjBkvAXHIOFcKdsnuYGS4YD8hjl+QrZ3ghi440="

+ 9 - 0
Gemfile_ar30

@@ -0,0 +1,9 @@
+source "https://rubygems.org"
+
+gemspec
+
+gem "activeresource", "~> 3.0.0"
+
+if ENV['OLD_RAKE'] == '1'
+  gem "rake", "~> 0.9.2"
+end

+ 9 - 0
Gemfile_ar31

@@ -0,0 +1,9 @@
+source "https://rubygems.org"
+
+gemspec
+
+gem "activeresource", "~> 3.1.0"
+
+if ENV['OLD_RAKE'] == '1'
+  gem "rake", "~> 0.9.2"
+end

+ 9 - 0
Gemfile_ar32

@@ -0,0 +1,9 @@
+source "https://rubygems.org"
+
+gemspec
+
+gem "activeresource", "~> 3.2.0"
+
+if ENV['OLD_RAKE'] == '1'
+  gem "rake", "~> 0.9.2"
+end

+ 10 - 0
lib/active_resource/to_query.rb

@@ -0,0 +1,10 @@
+# ActiveSupport 3.0 doesn't URL-encode paths with arrays as params properly.
+# Backported from ActiveSupport > 3.0
+if ActiveSupport::VERSION::MAJOR == 3 && ActiveSupport::VERSION::MINOR == 0
+  class Object
+    def to_query(key)
+      require 'cgi' unless defined?(CGI) && defined?(CGI::escape)
+      "#{CGI.escape(key.to_param)}=#{CGI.escape(to_param.to_s)}"
+    end
+  end
+end

+ 1 - 0
lib/shopify_api.rb

@@ -11,6 +11,7 @@ require 'shopify_api/json_format'
 require 'active_resource/json_errors'
 require 'active_resource/disable_prefix_check'
 require 'active_resource/base_ext'
+require 'active_resource/to_query'
 
 module ShopifyAPI
   include Limits