active-campaign-rails 0.2.2 → 0.2.3

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: 6860716d43937203ea659333cd7ec527df29294f
4
- data.tar.gz: 0de4fbd20d3da3a8164df71c820320369e8b4174
3
+ metadata.gz: 34b033ffd9950f588a5ea2cab234e95a45995ea4
4
+ data.tar.gz: 8dade8a2cc61b78c596ee7df2e87f9fdf7dbb13c
5
5
  SHA512:
6
- metadata.gz: bcd43cfdf6a397462d00cc77b4e961c14e0094efd0fb05b3b3ab758f1741851f0a69adcda40c02a978ca404d06c645e343ddcc3e260a97d94589789630b45013
7
- data.tar.gz: eb27c18dcde283860dc4b9814f363eb283e41711344ac34e240f37d5e01b15795ec59d2ac79ae056223d4f364d924d1ff3a5e8b5c628b939c90cf7054cbe4243
6
+ metadata.gz: 03d1965c3ab0119578837fca3f9a6efa8bc2bab497ad33cf291be671643b0c8882e8f9c882ffb81b9b55591a31c413be777c39b55205edae1a5c061a56c22ffb
7
+ data.tar.gz: cb4e27fd7124edf1bb023ce425b5e92f13b090af69b5bbff73fbcd6729c5e5be239b08ffc00bb6264c370f0b890c1041cb698c5e4de2ffdcb3d4e550164971c6
data/Rakefile CHANGED
@@ -1,2 +1,5 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
+ task :console do
4
+ exec "irb -r active-campaign-rails -I ./lib"
5
+ end
@@ -1,5 +1,6 @@
1
1
  require "active-campaign-rails/version"
2
2
  require "active-campaign-rails/client"
3
+ require 'rest-client'
3
4
 
4
5
  class ActiveCampaign
5
6
 
@@ -16,10 +17,10 @@ class ActiveCampaign
16
17
  end
17
18
 
18
19
  # Set default api_output to json if not set
19
- @api_output = 'json' if @api_output.blank?
20
+ @api_output = 'json' if @api_output == nil
20
21
 
21
22
  end
22
-
23
+
23
24
 
24
25
  def method_missing(api_action, *args, &block)
25
26
 
@@ -31,10 +32,10 @@ class ActiveCampaign
31
32
  when 'get'
32
33
 
33
34
  # Generate API parameter from given argument
34
- api_params = (args.present?) ? args.first.map{|k,v| "#{k}=#{v}"}.join('&') : nil
35
+ api_params = (args.any?) ? args.first.map{|k,v| "#{k}=#{v}"}.join('&') : nil
35
36
 
36
37
  # Join API url and API parameters
37
- api_url = (api_params.present?) ? "#{api_url}&#{api_params}" : api_url
38
+ api_url = api_params ? "#{api_url}&#{api_params}" : api_url
38
39
 
39
40
  # Make a call to API server with GET method
40
41
  response = RestClient.get(api_url)
@@ -1,3 +1,3 @@
1
1
  module ActiveCampaignRails
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-campaign-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eky Fauzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-09 00:00:00.000000000 Z
11
+ date: 2017-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client