client_success 0.1.9 → 0.1.10

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: 1e241d7b5d3764ac0f0f56de081ab3e286c03169669cbb0ce7fc05bd371d7afa
4
- data.tar.gz: f327cd78f764a18ebf856ee8e6b0e3b7e675730be2e5b324d1cecb5d7d620995
3
+ metadata.gz: 66a6a6ce26645b40a1c400ab68f1dc17b66933844990506e99ba1e04206fb32c
4
+ data.tar.gz: c4a6e4c52781cc6fa82b7e523dfd96af714537e1784d0f491434029e7052fda5
5
5
  SHA512:
6
- metadata.gz: 4f386bcf95f20e0c1bf007d68bcf70f11184c3fd448ad81f36ec3c9141f63472c741ae97c180c8812c0529e3f6c13b439be6a6d05b6d1100bd393b747a3f2d25
7
- data.tar.gz: f87c26c132a1c339889836c311415416177e97587ff2916b85e93d285784412e34472994cc8f4409fb60ce02626c5cda8f0f7f62afe823bf7e01990243263751
6
+ metadata.gz: 58f3b63c8896c6483706537296a5c76c2804b29579ad60c664c78cfe629a7184814af0833fa711eb9a9c66cacc36b08a8bac5659806b708ee7df72aba3f61246
7
+ data.tar.gz: 3c377ccf936f9d085db1dfb845398d498427b58d27bebf21e9fb82ac56316bec6e70a17032468fa122921a2c9d978e32b45e70af0c41ad4c1c0fb0d965b7e7e9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- client_success (0.1.9)
4
+ client_success (0.1.10)
5
5
  activesupport (~> 5.2)
6
6
  dry-types (= 0.11.0)
7
7
  faraday
@@ -55,8 +55,6 @@ module ClientSuccess
55
55
  end
56
56
 
57
57
  def create(attributes:, connection:)
58
- attributes = connection.strip_emojis(attributes)
59
-
60
58
  body = Schema::Client::Create[attributes]
61
59
  .transform_keys { |k| k.to_s.camelize(:lower) }
62
60
  .to_json
@@ -77,8 +75,6 @@ module ClientSuccess
77
75
  # i.e. any fields not supplied will be set to null - so make sure you
78
76
  # supply everything :)
79
77
  def update(client_id:, attributes:, connection:)
80
- attributes = connection.strip_emojis(attributes)
81
-
82
78
  body = attributes
83
79
  .deep_transform_keys { |k| k.to_s.camelize(:lower) }
84
80
  .to_json
@@ -12,9 +12,6 @@ module ClientSuccess
12
12
  class ParsingError < Error; end
13
13
  class Failed < Error; end
14
14
 
15
- # from https://stackoverflow.com/questions/24672834/how-do-i-remove-emoji-from-string
16
- EMOJI_REGEX = /[\u{203C}\u{2049}\u{20E3}\u{2122}\u{2139}\u{2194}-\u{2199}\u{21A9}-\u{21AA}\u{231A}-\u{231B}\u{23E9}-\u{23EC}\u{23F0}\u{23F3}\u{24C2}\u{25AA}-\u{25AB}\u{25B6}\u{25C0}\u{25FB}-\u{25FE}\u{2600}-\u{2601}\u{260E}\u{2611}\u{2614}-\u{2615}\u{261D}\u{263A}\u{2648}-\u{2653}\u{2660}\u{2663}\u{2665}-\u{2666}\u{2668}\u{267B}\u{267F}\u{2693}\u{26A0}-\u{26A1}\u{26AA}-\u{26AB}\u{26BD}-\u{26BE}\u{26C4}-\u{26C5}\u{26CE}\u{26D4}\u{26EA}\u{26F2}-\u{26F3}\u{26F5}\u{26FA}\u{26FD}\u{2702}\u{2705}\u{2708}-\u{270C}\u{270F}\u{2712}\u{2714}\u{2716}\u{2728}\u{2733}-\u{2734}\u{2744}\u{2747}\u{274C}\u{274E}\u{2753}-\u{2755}\u{2757}\u{2764}\u{2795}-\u{2797}\u{27A1}\u{27B0}\u{2934}-\u{2935}\u{2B05}-\u{2B07}\u{2B1B}-\u{2B1C}\u{2B50}\u{2B55}\u{3030}\u{303D}\u{3297}\u{3299}\u{1F004}\u{1F0CF}\u{1F170}-\u{1F171}\u{1F17E}-\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E7}-\u{1F1EC}\u{1F1EE}-\u{1F1F0}\u{1F1F3}\u{1F1F5}\u{1F1F7}-\u{1F1FA}\u{1F201}-\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}-\u{1F251}\u{1F300}-\u{1F320}\u{1F330}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F380}-\u{1F393}\u{1F3A0}-\u{1F3C4}\u{1F3C6}-\u{1F3CA}\u{1F3E0}-\u{1F3F0}\u{1F400}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4F7}\u{1F4F9}-\u{1F4FC}\u{1F500}-\u{1F507}\u{1F509}-\u{1F53D}\u{1F550}-\u{1F567}\u{1F5FB}-\u{1F640}\u{1F645}-\u{1F64F}\u{1F680}-\u{1F68A}]/.freeze
17
-
18
15
  class << self
19
16
  def authorised(access_token)
20
17
  new.tap { |conn| conn.access_token = access_token }
@@ -64,10 +61,6 @@ module ClientSuccess
64
61
  raise NotImplementedError
65
62
  end
66
63
 
67
- def strip_emojis(attributes)
68
- attributes.transform_values { |v| v.respond_to?(:gsub) ? v.gsub(EMOJI_REGEX, "") : v }
69
- end
70
-
71
64
  private
72
65
 
73
66
  def headers
@@ -40,8 +40,6 @@ module ClientSuccess
40
40
  end
41
41
 
42
42
  def create(client_id:, attributes:, connection:)
43
- attributes = connection.strip_emojis(attributes)
44
-
45
43
  body = Schema::Contact::Create[attributes]
46
44
  .transform_keys { |k| k.to_s.camelize(:lower) }
47
45
  .to_json
@@ -56,9 +54,6 @@ module ClientSuccess
56
54
  end
57
55
 
58
56
  def update(id:, client_id:, attributes:, connection:)
59
- # for some reason this is breaking client success. Not sure why yet...
60
- # attributes = connection.strip_emojis(attributes)
61
-
62
57
  body = Schema::Contact::Update[attributes]
63
58
  .transform_keys { |k| k.to_s.camelize(:lower) }
64
59
  .to_json
@@ -1,3 +1,3 @@
1
1
  module ClientSuccess
2
- VERSION = "0.1.9".freeze
2
+ VERSION = "0.1.10".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client_success
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Practice Ignition
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2021-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler