shopify_api 1.0.4 → 1.0.5

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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.4
1
+ 1.0.5
@@ -128,7 +128,7 @@ module ShopifyAPI
128
128
  end
129
129
  end
130
130
 
131
- self.class.prepare_url(self.url) if valid?
131
+ self.class.prepare_url(self.url)
132
132
  end
133
133
 
134
134
  def shop
@@ -136,6 +136,7 @@ module ShopifyAPI
136
136
  end
137
137
 
138
138
  def create_permission_url
139
+ return nil if url.blank? || api_key.blank?
139
140
  "http://#{url}/admin/api/auth?api_key=#{api_key}"
140
141
  end
141
142
 
@@ -160,6 +161,7 @@ module ShopifyAPI
160
161
  end
161
162
 
162
163
  def self.prepare_url(url)
164
+ return nil if url.blank?
163
165
  url.gsub!(/https?:\/\//, '') # remove http:// or https://
164
166
  url.concat(".myshopify.com") unless url.include?('.') # extend url to myshopify.com if no host is given
165
167
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shopify_api}
8
- s.version = "1.0.4"
8
+ s.version = "1.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tobias L\303\274tke", "Cody Fauser", "Dennis Theisen"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Tobias L\xC3\xBCtke"