shapeshiftio 0.0.4 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 340b3ce6c6a7e51f5538aab4e6cf2fa5b03d6dc7
4
- data.tar.gz: 041d4743f77aad169da1142fd6faf081eb1c37a4
3
+ metadata.gz: 2ffa6a2d7a8a5315204cfa791179d2b78ffaa92a
4
+ data.tar.gz: 061e02398d4bb1df6df84072a88d9b4302fd93de
5
5
  SHA512:
6
- metadata.gz: 66191822a9ffc9e9d653d486a91611ee43ae9d42986ca082c8066655fcdbbfca8f493324329a5861f597d1021f00e53ab2f353e5a68fb6a2c5cb3687842c7146
7
- data.tar.gz: 9cb8e74b0982e851ad9d3ef48e9bfdf4139cf4044241439c8a376837b99b0ece1e294eac3c977a9abf921e76f679989600aee0ee6e7e3d9ab79fea24d3b261f3
6
+ metadata.gz: 945c97f8aba4a6c1f5aa6dd76ef701976fec7dd83d70dfbf68a52a4dca2965b8333de10d118db99544adee31aceded193b1528c0e78956af538414aee18630c2
7
+ data.tar.gz: ea11812cf7b0d27f4f78b0400b2f1d87675f43c6856bfb728f3d86bfb96e66a245435fff683950f624de8982a7af825de06ff49453a4e18bd7c584bcd84a409c
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Shapeshiftio
2
2
  A complete ruby wrapper for shapeshift.io API
3
+ [![Gem Version](https://badge.fury.io/rb/shapeshiftio.svg)](https://badge.fury.io/rb/shapeshiftio)<br>
3
4
 
4
5
 
5
6
  ## Installation
@@ -8,7 +9,7 @@ Add this line to your application's Gemfile:
8
9
 
9
10
  ```ruby
10
11
  gem 'shapeshiftio', git: 'https://github.com/rbm4/shapeshiftio'
11
- or simply
12
+ or
12
13
  gem 'shapeshiftio'
13
14
  ```
14
15
 
@@ -21,8 +22,8 @@ Or install it yourself as:
21
22
  $ gem install shapeshiftio
22
23
 
23
24
  ## Usage
24
- ..* All methods return a JSON object with the fields detailed at the [shapeshift's official website](https://info.shapeshift.io/api)
25
- ..* To call a method you only need the __required fields__, if you want to pass more parameters, just add a hash when callind a method (examples below)
25
+ * All methods return a JSON object with the fields detailed at the [shapeshift's official website](https://info.shapeshift.io/api)
26
+ * To call a method you only need the __required fields__, if you want to pass more parameters, just add a hash when callind a method (examples below)
26
27
 
27
28
  # GET requests:
28
29
 
@@ -18,7 +18,16 @@ private
18
18
 
19
19
  public
20
20
  def self.get(path_name, value = nil, p2 = nil)
21
- uri = URI("https://shapeshift.io/#{path_name}/#{value}/#{p2}")
21
+ route = ""
22
+ route = route + (path_name.to_s + "/")
23
+ if !(value.nil?)
24
+ route = route + (value.to_s + "/")
25
+ end
26
+
27
+ if !(p2.nil?)
28
+ route = route + (p2.to_s + "/")
29
+ end
30
+ uri = URI("https://shapeshift.io/#{route}")
22
31
  response = Net::HTTP.get(uri)
23
32
  check_response(response)
24
33
  end
@@ -1,3 +1,3 @@
1
1
  module Shapeshiftio
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["ricardo.malafaia1994@gmail.com"]
11
11
 
12
12
  spec.summary = %q{A complete functional Ruby wrapper for the shapeshift.io API.}
13
- spec.description = %q{A complete functional Ruby wrapper for the shapeshift.io API.}
13
+ spec.description = %q{Only use versions above 0.0.3!}
14
14
  spec.homepage = "https://github.com/rbm4/shapeshiftio"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shapeshiftio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Malafaia
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: A complete functional Ruby wrapper for the shapeshift.io API.
41
+ description: Only use versions above 0.0.3!
42
42
  email:
43
43
  - ricardo.malafaia1994@gmail.com
44
44
  executables: []