ractive_campaign 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee344bdbd4025f17b5d53a9afbdd28358fc29ac2325b8ff3251add3ce096c816
4
- data.tar.gz: 9774f6a2973cf153fcf68456eecec137e1d88001d4d0c0412f44cf7b69913df8
3
+ metadata.gz: 138c40a5a3a11cfdaca62219657f9757cade906aadda7ec72d34c742370c0963
4
+ data.tar.gz: 1dc92c8d3b8653899c9133485d094536266d6e8e452473229ec04ca464d50f65
5
5
  SHA512:
6
- metadata.gz: '0907098764aaa108e6663ca26db45fa45a61b55ec992da65275399a5825adf7d571efbae76adbe96d623a93c73839e7488000465f2977114351d428eb33d39df'
7
- data.tar.gz: b2fabe0ef19b4b116ef9eda3bcccc54c9d6cdc3cb4f4e70c72133f1d0584517ae097554e5d97489ff2b98327a3f5ffdecbf8490b5dd3e86380c7488ab70cfe60
6
+ metadata.gz: 44e8d36dda391fa212172e35f1b5059477e61f517906a23289accc539b516234593633526624d9904429ce15581a3f807e08d7c18f315ad15e965889cffbd009
7
+ data.tar.gz: c1dffb39c97ad93b7d72004f0e625e4e09387d2b916c9d0792dde586deb8a57ebbda4e5e22b59949db9f30ff10fc1ea301b6580e9e801fb2a19254f674c47ec8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.0] - 2021-11-10
3
+ ## [0.1.4] - 2021-11-19
4
+ ### Changed
5
+
6
+ - loading endpoint result into the correct model class
7
+ - README section on `install and require`
8
+
9
+ ## [0.1.3] - 2021-11-18
10
+ ### Added
11
+
12
+ - account contact
13
+ - campaign
14
+ - contact automatin
15
+ - etc
16
+
17
+ ### Changed
18
+
19
+ - attrs config
20
+ - README config info
21
+
22
+ ## [0.1.2] - 2021-11-17
23
+ ### Added
24
+
25
+ - list
26
+ - etc
27
+
28
+ ## [0.1.0] - 2021-11-13
29
+ ### Added
30
+
31
+ - contact
32
+ - tags
33
+ - etc
34
+
35
+ ## [0.0.1] - 2021-11-10
4
36
 
5
37
  - Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ractive_campaign (0.1.3)
4
+ ractive_campaign (0.1.4)
5
5
  activemodel (~> 6.1.4)
6
6
  dry-configurable (~> 0.12.1)
7
7
  faraday (~> 1.8.0)
data/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  # RactiveCampaign
4
4
 
5
- Simple wrapper for ActiveCampaign API v3
5
+ Ruby API wrapper for ActiveCampaign API v3
6
6
 
7
7
  ## Installation
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem "ractive_campaign", require: "active_campaign"
12
+ gem "ractive_campaign"
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -10,16 +10,16 @@ module ActiveCampaign
10
10
  HTTP_METHODS.each do |method|
11
11
  class_eval <<-RUBY, __FILE__, __LINE__ + 1
12
12
  def #{method}(path, params={})
13
- root = params.delete(:_root)
14
-
15
13
  send(:'#{method}_raw', path, params) do |parsed_data, response|
16
14
  return {} unless [200, 201].include?(parsed_data[:status_code])
17
15
  return {} unless parsed_data[:data].present?
18
16
 
19
- data = if root
20
- parsed_data[:data][root.to_sym]
17
+ data = if parsed_data[:data].keys.include?(root_element.to_sym)
18
+ parsed_data[:data][root_element.to_sym]
19
+ elsif parsed_data[:data].keys.include?(root_elements.to_sym)
20
+ parsed_data[:data][root_elements.to_sym]
21
21
  else
22
- parsed_data[:data].first.last
22
+ parsed_data[:data]
23
23
  end
24
24
 
25
25
  if data.is_a?(Array)
@@ -24,7 +24,7 @@ module ActiveCampaign
24
24
  end
25
25
 
26
26
  def find(id)
27
- get "#{endpoint}/#{id}", { _root: root_element }
27
+ get "#{endpoint}/#{id}"
28
28
  end
29
29
 
30
30
  def save(**args)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveCampaign
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_campaign"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ractive_campaign
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wedson Lima
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-18 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.0
69
- description: Active Campaign - API v3
69
+ description: Ruby API wrapper for ActiveCampaign API v3
70
70
  email:
71
71
  - wedson.sousa.lima@gmail.com
72
72
  executables: []
@@ -114,10 +114,14 @@ files:
114
114
  - lib/active_campaign/models/user.rb
115
115
  - lib/active_campaign/parser.rb
116
116
  - lib/active_campaign/version.rb
117
+ - lib/ractive_campaign.rb
117
118
  homepage: https://github.com/wedsonlima/ractive_campaign
118
119
  licenses:
119
120
  - MIT
120
- metadata: {}
121
+ metadata:
122
+ homepage_uri: https://github.com/wedsonlima/ractive_campaign
123
+ source_code_uri: https://github.com/wedsonlima/ractive_campaign
124
+ changelog_uri: https://github.com/wedsonlima/ractive_campaign/blob/main/CHANGELOG.md
121
125
  post_install_message:
122
126
  rdoc_options: []
123
127
  require_paths:
@@ -136,5 +140,5 @@ requirements: []
136
140
  rubygems_version: 3.0.3.1
137
141
  signing_key:
138
142
  specification_version: 4
139
- summary: Active Campaign - API v3
143
+ summary: Ruby API wrapper for ActiveCampaign API v3
140
144
  test_files: []