infopark-crm-helpers 1.3.0 → 1.3.1

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
  SHA1:
3
- metadata.gz: 8ba796ea303bb2e169c28a4cd97e59c31097af9a
4
- data.tar.gz: 6c8f36fa129809d0c2da371f213761f23cd0c57e
3
+ metadata.gz: 934ac297c549bec365b7f17ffd38622a89ec205e
4
+ data.tar.gz: '018e3c6f454eadcab58d2870757e55c931f913be'
5
5
  SHA512:
6
- metadata.gz: 8feac9ad864182321d2daacedbc69e17a043e84f3aaccf3ffd18d9b5e46c4e12cf50201845b4ed81dfcea0d39a6a8ba64ad0d93d4a4a737a160dd99c2cb29b40
7
- data.tar.gz: dfd67fb39726440b0d0e22d1d93c44e0b16454ca5d90be2a9e33156f2b6904eb3cd640774399b83cc462f6a1163724914ec0ef0f36b2745a539fefe7abb9567d
6
+ metadata.gz: b58dcced8c1b6d715504f3fc4691310308a6d031d2e5de7443319e5b5f546a180b5dc7da4824debcbb33c476f1c77f32bbcd36066bcfff8b1bac56b92a2c4d07
7
+ data.tar.gz: 59bf963f41a8bc6249f7256ddc2b06b1be4cc2f8d50e4994ace6e797e743d6f8c6bbd581c821aec5b881d9ca07491e758ccf36e056d70842245bb7f821e32d43
data/.gitignore CHANGED
@@ -1,5 +1,4 @@
1
1
  /.bundle/
2
- /.crm.yml
3
2
  /.yardoc
4
3
  /Gemfile.lock
5
4
  /_yardoc/
@@ -7,4 +6,5 @@
7
6
  /doc/
8
7
  /pkg/
9
8
  /spec/reports/
9
+ /spec/config/crm.yml
10
10
  /tmp/
data/.rubocop.yml ADDED
@@ -0,0 +1,10 @@
1
+ Metrics/BlockLength:
2
+ Exclude:
3
+ - spec/**/*_spec.rb
4
+
5
+ Naming/FileName:
6
+ Exclude:
7
+ - lib/infopark-crm-helpers.rb
8
+
9
+ Style/Documentation:
10
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.3
4
- - 2.2.6
3
+ - 2.3.8
4
+ - 2.2.10
5
5
  - 2.1.10
6
6
 
7
7
  before_install: gem install bundler -v 1.11.2
@@ -17,6 +17,8 @@ env:
17
17
  - secure: "dRGHULKMHj8/9Y7L1JMc+RwjD6c+djCBvQsewVGII+a5loiRQFV72zb5Td0JBPzGI2K1t3EXc2F8X8D+1QR+jpb0SFFSAUHzb2mvWU+FPixHfTxAPpktfiT+qAHFPkeaQMY86ktosE50+J555ke8YbtRKIBsqDbvZU+vnr3N6Ui4JhomCPMyCmnuFFATHoGBdhcrvWc1vY1Z7gK/qd0nhgyDb+sfOnbLinz7qR4oEI2nbGA6z5AzwfbD4JkXqagPirQy2tUJGAY71QVpDevg3qjfV2Hb9Ow1ESW9M0DsZZjFXXx6VJ4z9xikaqdauUMcJSCNMXtSK6OIUiy7Ln+WQKjDuGLxOLpG5oUxV7FrKEp63cQX9+6BDEPRuilwumZMBP0goE0kMFZmjai1bm3sMCddm08i05w9NraswxRHElBlPQxAXCDtiEQR2PKkI0G9j1/OheTvxn73GK0owPA6aOpOn52Jp+nwt8llZzPCLMvax4CmECESRvIJ7MN+ye1yre4IopXnbdZhHo/eoeGO0WTZL/t3qrmjGPyTljTkwGgp3LI+NxIoZG6UjOo2WJb6A3D8eZRbmMphZns1j7zcSUrCRNmpS6UmPsG1jExz+65LMSbScMs5xvCEtyW1X7qznf1NKLsfJxQUF3LlLSUrp/LoSTaDsrcR0E9qU9xt7/c="
18
18
 
19
19
  matrix:
20
+ - 'RAILS_VERSION=5.2.0'
21
+ - 'RAILS_VERSION=5.1.0'
20
22
  - 'RAILS_VERSION=5.0.0'
21
23
  - 'RAILS_VERSION=4.2.0'
22
24
  - 'RAILS_VERSION=4.1.0'
@@ -24,5 +26,9 @@ env:
24
26
 
25
27
  matrix:
26
28
  exclude:
27
- - rvm: 2.1.10
28
- env: 'RAILS_VERSION=5.0.0'
29
+ - rvm: 2.1.10
30
+ env: 'RAILS_VERSION=5.0.0'
31
+ - rvm: 2.1.10
32
+ env: 'RAILS_VERSION=5.1.0'
33
+ - rvm: 2.1.10
34
+ env: 'RAILS_VERSION=5.2.0'
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in infopark-crm-helpers.gemspec
data/README.md CHANGED
@@ -32,12 +32,13 @@ No direct configuration of `infopark-crm-helpers` is required. Refer to [infopar
32
32
 
33
33
  ### Run specs
34
34
 
35
- Add your CRM credentials to `.crm.yml` in the root folder of this project.
35
+ Add your CRM credentials to `/spec/config/crm.yml`.
36
36
 
37
37
  ```yaml
38
- tenant: your-tenant-here
39
- login: john.smith@example.org
40
- api_key: 1234567890abcdefghijklmnopqrstuvwxyz
38
+ test:
39
+ tenant: your-tenant-here
40
+ login: john.smith@example.org
41
+ api_key: 1234567890abcdefghijklmnopqrstuvwxyz
41
42
  ```
42
43
 
43
44
  Then invoke:
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'crm/helpers'
data/changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 1.3.1
2
+
3
+ - Replace `fakeweb` with `webmock`.
4
+ - Add `rubocop`.
5
+
1
6
  ### 1.3.0
2
7
 
3
8
  - Add `Crm::Helpers::Persistence.create!`.
@@ -1,5 +1,6 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'crm/helpers/version'
5
6
 
@@ -10,29 +11,35 @@ rails = case rails_version
10
11
  end
11
12
 
12
13
  Gem::Specification.new do |spec|
13
- spec.name = 'infopark-crm-helpers'
14
- spec.version = Crm::Helpers::VERSION
15
- spec.authors = ['Huy Dinh']
16
- spec.email = ['mail@huydinh.eu']
17
-
18
- spec.summary = 'Helpers for the Infopark WebCRM SDK for Ruby.'
19
- spec.description = 'infopark-crm-helpers provides helper mixins and validators to use with the Infopark WebCRM.'
20
- spec.description += ' It is based on the Infopark WebCRM SDK for Ruby.'
21
- spec.homepage = 'https://github.com/Skudo/infopark-crm-helpers'
22
- spec.license = 'MIT'
23
-
24
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
- spec.bindir = 'exe'
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
14
+ spec.name = 'infopark-crm-helpers'
15
+ spec.version = Crm::Helpers::VERSION
16
+ spec.authors = ['Huy Dinh']
17
+ spec.email = ['mail@huydinh.eu']
18
+
19
+ spec.summary = 'Helpers for the Infopark WebCRM SDK for Ruby.'
20
+ spec.description = 'infopark-crm-helpers provides helper mixins and ' \
21
+ 'validators to use with the Infopark WebCRM.' \
22
+ 'It is based on the Infopark WebCRM SDK for Ruby.'
23
+ spec.homepage = 'https://github.com/Skudo/infopark-crm-helpers'
24
+ spec.license = 'MIT'
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = 'exe'
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
31
  spec.require_paths = ['lib']
28
32
 
29
- spec.add_dependency 'activesupport', rails
33
+ spec.required_ruby_version = ['>= 2.1', '< 2.4']
34
+
30
35
  spec.add_dependency 'activemodel', rails
36
+ spec.add_dependency 'activesupport', rails
31
37
  spec.add_dependency 'infopark_webcrm_sdk'
32
38
 
33
39
  spec.add_development_dependency 'bundler', '~> 1.11'
34
- spec.add_development_dependency 'fakeweb'
35
40
  spec.add_development_dependency 'pry'
36
- spec.add_development_dependency 'rake', '~> 10.0'
41
+ spec.add_development_dependency 'rake'
37
42
  spec.add_development_dependency 'rspec', '~> 3.0'
43
+ spec.add_development_dependency 'rubocop'
44
+ spec.add_development_dependency 'webmock'
38
45
  end
data/lib/crm/helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helper
3
5
  def self.included(base)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Attributes
@@ -26,23 +28,30 @@ module Crm
26
28
  end
27
29
 
28
30
  def mandatory_crm_attributes
29
- crm_attributes.select { |_, definition| definition[:mandatory] }.keys.sort.map(&:to_sym)
31
+ crm_attributes.select do |_, definition|
32
+ definition[:mandatory]
33
+ end.keys.sort.map(&:to_sym)
30
34
  end
31
35
 
32
36
  def crm_attributes
33
37
  return @crm_attributes if @crm_attributes.present?
34
- raise "#{name}.represents_crm_type(type) needs to be called to fetch its CRM attributes." if crm_type.blank?
38
+
39
+ if crm_type.blank?
40
+ raise "#{name}.represents_crm_type(type) needs to be called " \
41
+ 'to fetch its CRM attributes.'
42
+ end
35
43
 
36
44
  collect_crm_attributes_data(crm_type)
37
45
  end
38
46
 
39
47
  def crm_attr_reader(*attributes)
40
- @crm_attr_readers ||= []
48
+ @crm_attr_readers ||= Set.new
41
49
 
42
50
  attributes.each do |attribute|
43
- @crm_attr_readers << attribute unless attribute.in?(@crm_attr_readers)
51
+ @crm_attr_readers << attribute
44
52
  next if instance_methods.include?(attribute.to_sym)
45
- raise "Attribute '#{attribute}' does not exist for a CRM #{crm_type}." if crm_attributes[attribute].blank?
53
+
54
+ check_attribute(attribute)
46
55
 
47
56
  define_method attribute do
48
57
  crm_attributes[attribute]
@@ -55,13 +64,14 @@ module Crm
55
64
  end
56
65
 
57
66
  def crm_attr_writer(*attributes)
58
- @crm_attr_writers ||= []
67
+ @crm_attr_writers ||= Set.new
59
68
 
60
69
  attributes.each do |attribute|
61
70
  method_name = "#{attribute}=".to_sym
62
- @crm_attr_writers << method_name unless method_name.in?(@crm_attr_writers)
71
+ @crm_attr_writers << method_name
63
72
  next if instance_methods.include?(method_name)
64
- raise "Attribute '#{attribute}' does not exist for a CRM #{crm_type}." if crm_attributes[attribute].blank?
73
+
74
+ check_attribute(attribute)
65
75
 
66
76
  define_method method_name do |value|
67
77
  crm_attributes[attribute] = value
@@ -80,6 +90,12 @@ module Crm
80
90
 
81
91
  protected
82
92
 
93
+ def check_attribute(attribute)
94
+ return if crm_attributes[attribute].present?
95
+
96
+ raise "Attribute '#{attribute}' does not exist for a CRM #{crm_type}."
97
+ end
98
+
83
99
  def collect_crm_attributes_data(crm_type)
84
100
  type = crm_type_definition(crm_type)
85
101
  @crm_attributes = type.standard_attribute_definitions
@@ -96,11 +112,14 @@ module Crm
96
112
  end
97
113
 
98
114
  def assign_attributes(new_attributes)
99
- deprecation_message = '[DEPRECATION] '
100
- deprecation_message << '`Crm::Helpers::Attributes#assign_attributes` is deprecated. '
101
- deprecation_message << 'Please use `Crm::Helpers::Attributes#assign_crm_attributes` instead. '
102
- deprecation_message << '`Crm::Helpers::Attributes#assign_attributes` will be removed in version 2.0.0.'
103
- STDERR.puts(deprecation_message)
115
+ deprecation_message = [
116
+ '[DEPRECATION]',
117
+ '`Crm::Helpers::Attributes#assign_attributes` is deprecated. Please ',
118
+ 'use `Crm::Helpers::Attributes#assign_crm_attributes` instead.',
119
+ '`Crm::Helpers::Attributes#assign_attributes` will be removed in',
120
+ 'version 2.0.0.'
121
+ ].join(' ')
122
+ warn(deprecation_message)
104
123
  assign_crm_attributes(new_attributes)
105
124
  end
106
125
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Finders
@@ -10,13 +12,11 @@ module Crm
10
12
  ids = args.flatten
11
13
 
12
14
  case ids.size
13
- when 0
14
- raise ArgumentError.new('Requires one or more IDs as argument.')
15
+ when 0 then raise ArgumentError, 'Requires one or more IDs as argument.'
15
16
  when 1
16
17
  crm_object = find_one(ids.first)
17
18
  wants_array ? [crm_object].compact : crm_object
18
- else
19
- find_many(ids)
19
+ else find_many(ids)
20
20
  end
21
21
  end
22
22
 
@@ -24,7 +24,8 @@ module Crm
24
24
  limit = options[:limit] || 50
25
25
  sort_order = options[:sort_order] || 'desc'
26
26
 
27
- crm_class.query(query).limit(limit).sort_order(sort_order).to_a.map do |crm_object|
27
+ result = crm_class.query(query).limit(limit).sort_order(sort_order).to_a
28
+ result.map do |crm_object|
28
29
  new(crm_object.attributes)
29
30
  end
30
31
  end
@@ -33,7 +34,7 @@ module Crm
33
34
 
34
35
  def find_one(id)
35
36
  crm_object = crm_class.find(id)
36
- return nil if crm_object.blank?
37
+ return nil if crm_object.blank?
37
38
 
38
39
  new(crm_object.attributes)
39
40
  end
@@ -43,7 +44,11 @@ module Crm
43
44
  crm_object.is_a?(crm_class)
44
45
  end
45
46
  unknown_ids = ids - crm_objects.map(&:id)
46
- raise Errors::ResourceNotFound.new('Items could not be found.', unknown_ids) if unknown_ids.present?
47
+ if unknown_ids.present?
48
+ raise Errors::ResourceNotFound.new(
49
+ 'Items could not be found.', unknown_ids
50
+ )
51
+ end
47
52
 
48
53
  crm_objects.map { |crm_object| new(crm_object.attributes) }
49
54
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Persistence
@@ -15,7 +17,10 @@ module Crm
15
17
 
16
18
  def create!(attributes = {})
17
19
  instance = create(attributes)
18
- raise Crm::Errors::InvalidValues.new('', instance.errors) if instance.invalid?
20
+ if instance.invalid?
21
+ raise Crm::Errors::InvalidValues.new('', instance.errors)
22
+ end
23
+
19
24
  instance
20
25
  end
21
26
  end
@@ -37,7 +42,7 @@ module Crm
37
42
 
38
43
  def update!(attributes = {})
39
44
  assign_crm_attributes(attributes)
40
- raise Crm::Errors::InvalidValues.new('', self.errors) if invalid?
45
+ raise Crm::Errors::InvalidValues.new('', errors) if invalid?
41
46
 
42
47
  persist
43
48
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -7,7 +9,10 @@ module Crm
7
9
  return if value.is_a?(Time)
8
10
  return if value.is_a?(DateTime)
9
11
 
10
- record.errors.add(attribute, I18n.t('activerecord.errors.messages.invalid_datetime'))
12
+ record.errors.add(
13
+ attribute,
14
+ I18n.t('activerecord.errors.messages.invalid_datetime')
15
+ )
11
16
  end
12
17
  end
13
18
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -1,10 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
4
6
  class CrmEnumValidator < CrmEachValidator
5
7
  def validate_each(record, attribute, _)
6
8
  definition = crm_attribute_definition(record, attribute)
7
- record.validates_inclusion_of attribute, in: definition['valid_values']
9
+ record.validates_inclusion_of attribute,
10
+ in: definition['valid_values']
8
11
  end
9
12
  end
10
13
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -5,7 +7,10 @@ module Crm
5
7
  def validate_each(record, attribute, value)
6
8
  return if value.is_a?(Array)
7
9
 
8
- record.errors.add(attribute, I18n.t('activerecord.errors.messages.not_a_list'))
10
+ record.errors.add(
11
+ attribute,
12
+ I18n.t('activerecord.errors.messages.not_a_list')
13
+ )
9
14
  end
10
15
  end
11
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -11,7 +13,10 @@ module Crm
11
13
  invalid_values = values.reject { |value| value.in?(valid_values) }
12
14
  return if invalid_values.blank?
13
15
 
14
- message = I18n.t('activerecord.errors.messages.cannot_contain_values', values: invalid_values.join(', '))
16
+ message = I18n.t(
17
+ 'activerecord.errors.messages.cannot_contain_values',
18
+ values: invalid_values.join(', ')
19
+ )
15
20
  record.errors.add(attribute, message)
16
21
  end
17
22
 
@@ -19,7 +24,10 @@ module Crm
19
24
 
20
25
  def a_multienum?(record, attribute, values)
21
26
  unless values.is_a?(Array)
22
- record.errors.add(attribute, I18n.t('activerecord.errors.messages.not_a_list'))
27
+ record.errors.add(
28
+ attribute,
29
+ I18n.t('activerecord.errors.messages.not_a_list')
30
+ )
23
31
  return false
24
32
  end
25
33
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -6,7 +8,8 @@ module Crm
6
8
  definition = crm_attribute_definition(record, attribute)
7
9
  return if definition['max_length'].blank?
8
10
 
9
- record.validates_length_of attribute, maximum: definition['max_length']
11
+ record.validates_length_of attribute,
12
+ maximum: definition['max_length']
10
13
  end
11
14
  end
12
15
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -6,7 +8,8 @@ module Crm
6
8
  definition = crm_attribute_definition(record, attribute)
7
9
  return if definition['max_length'].blank?
8
10
 
9
- record.validates_length_of attribute, maximum: definition['max_length']
11
+ record.validates_length_of attribute,
12
+ maximum: definition['max_length']
10
13
  end
11
14
  end
12
15
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -10,14 +12,23 @@ module Crm
10
12
 
11
13
  reader = attribute.to_sym
12
14
  next unless record.respond_to?(reader)
15
+
13
16
  value = record.send(reader)
14
17
  next if value.blank?
15
18
 
16
19
  attribute_type = definition['attribute_type']
17
- validator = "::Crm::Helpers::Validators::Crm#{attribute_type.camelcase}Validator".constantize
18
- record.validates_with validator, attributes: [attribute]
20
+ record.validates_with validator(attribute_type),
21
+ attributes: [attribute]
19
22
  end
20
23
  end
24
+
25
+ private
26
+
27
+ def validator(attribute_type)
28
+ validator_name = '::Crm::Helpers::Validators' \
29
+ "::Crm#{attribute_type.camelcase}Validator"
30
+ validator_name.constantize
31
+ end
21
32
  end
22
33
  end
23
34
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
5
  module Validators
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Crm
2
4
  module Helpers
3
- VERSION = '1.3.0'.freeze
5
+ VERSION = '1.3.1'
4
6
  end
5
7
  end
data/lib/crm/helpers.rb CHANGED
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'set'
4
+
1
5
  require 'active_model'
2
6
  require 'active_support/all'
3
7
  require 'infopark_webcrm_sdk'
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'crm/helpers'
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'infopark-crm-helpers'
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark-crm-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huy Dinh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-27 00:00:00.000000000 Z
11
+ date: 2019-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activesupport
14
+ name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: activemodel
28
+ name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.11'
69
69
  - !ruby/object:Gem::Dependency
70
- name: fakeweb
70
+ name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: pry
84
+ name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,35 +95,49 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rake
98
+ name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '10.0'
103
+ version: '3.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '10.0'
110
+ version: '3.0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rspec
112
+ name: rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '3.0'
117
+ version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '3.0'
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: webmock
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  description: infopark-crm-helpers provides helper mixins and validators to use with
126
- the Infopark WebCRM. It is based on the Infopark WebCRM SDK for Ruby.
140
+ the Infopark WebCRM.It is based on the Infopark WebCRM SDK for Ruby.
127
141
  email:
128
142
  - mail@huydinh.eu
129
143
  executables: []
@@ -131,9 +145,9 @@ extensions: []
131
145
  extra_rdoc_files: []
132
146
  files:
133
147
  - ".codeclimate.yml"
134
- - ".crm.example.yml"
135
148
  - ".gitignore"
136
149
  - ".rspec"
150
+ - ".rubocop.yml"
137
151
  - ".travis.yml"
138
152
  - Gemfile
139
153
  - LICENSE.txt
@@ -174,7 +188,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
188
  requirements:
175
189
  - - ">="
176
190
  - !ruby/object:Gem::Version
177
- version: '0'
191
+ version: '2.1'
192
+ - - "<"
193
+ - !ruby/object:Gem::Version
194
+ version: '2.4'
178
195
  required_rubygems_version: !ruby/object:Gem::Requirement
179
196
  requirements:
180
197
  - - ">="
@@ -182,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
199
  version: '0'
183
200
  requirements: []
184
201
  rubyforge_project:
185
- rubygems_version: 2.5.2
202
+ rubygems_version: 2.5.2.3
186
203
  signing_key:
187
204
  specification_version: 4
188
205
  summary: Helpers for the Infopark WebCRM SDK for Ruby.
data/.crm.example.yml DELETED
@@ -1,3 +0,0 @@
1
- tenant: your-tenant-here
2
- login: john.smith@example.org
3
- api_key: 1234567890abcdefghijklmnopqrstuvwxyz