amo_crm 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +28 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CHANGELOG.md +22 -0
  6. data/Gemfile +4 -0
  7. data/Guardfile +29 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +1 -0
  10. data/Rakefile +14 -0
  11. data/amo_crm.gemspec +41 -0
  12. data/dump_amocrm_account.rb +7 -0
  13. data/lib/amo_crm.rb +31 -0
  14. data/lib/amo_crm/client.rb +98 -0
  15. data/lib/amo_crm/client/error.rb +18 -0
  16. data/lib/amo_crm/client/errors.rb +16 -0
  17. data/lib/amo_crm/entities.rb +14 -0
  18. data/lib/amo_crm/entities/account.rb +7 -0
  19. data/lib/amo_crm/entities/attachment_document.rb +16 -0
  20. data/lib/amo_crm/entities/attribute.rb +71 -0
  21. data/lib/amo_crm/entities/attribute_metadata.rb +38 -0
  22. data/lib/amo_crm/entities/barcode.rb +19 -0
  23. data/lib/amo_crm/entities/base.rb +5 -0
  24. data/lib/amo_crm/entities/collection.rb +12 -0
  25. data/lib/amo_crm/entities/common.rb +15 -0
  26. data/lib/amo_crm/entities/common_object.rb +27 -0
  27. data/lib/amo_crm/entities/company.rb +30 -0
  28. data/lib/amo_crm/entities/company_concern.rb +20 -0
  29. data/lib/amo_crm/entities/consignment.rb +22 -0
  30. data/lib/amo_crm/entities/contact.rb +29 -0
  31. data/lib/amo_crm/entities/contract.rb +2 -0
  32. data/lib/amo_crm/entities/country.rb +10 -0
  33. data/lib/amo_crm/entities/custom_entity.rb +18 -0
  34. data/lib/amo_crm/entities/custom_entity_metadata.rb +36 -0
  35. data/lib/amo_crm/entities/custom_field.rb +6 -0
  36. data/lib/amo_crm/entities/custom_field_definition.rb +13 -0
  37. data/lib/amo_crm/entities/custom_field_value.rb +5 -0
  38. data/lib/amo_crm/entities/custom_fields.rb +24 -0
  39. data/lib/amo_crm/entities/custom_fields_definition.rb +4 -0
  40. data/lib/amo_crm/entities/customer_order.rb +51 -0
  41. data/lib/amo_crm/entities/customer_order_position.rb +22 -0
  42. data/lib/amo_crm/entities/embedded_entity_metadata.rb +18 -0
  43. data/lib/amo_crm/entities/error.rb +13 -0
  44. data/lib/amo_crm/entities/feature.rb +23 -0
  45. data/lib/amo_crm/entities/good.rb +34 -0
  46. data/lib/amo_crm/entities/good_folder.rb +10 -0
  47. data/lib/amo_crm/entities/good_ref.rb +12 -0
  48. data/lib/amo_crm/entities/image.rb +21 -0
  49. data/lib/amo_crm/entities/images.rb +10 -0
  50. data/lib/amo_crm/entities/lead.rb +28 -0
  51. data/lib/amo_crm/entities/my_company.rb +12 -0
  52. data/lib/amo_crm/entities/page.rb +5 -0
  53. data/lib/amo_crm/entities/price.rb +15 -0
  54. data/lib/amo_crm/entities/price_type.rb +13 -0
  55. data/lib/amo_crm/entities/sale_price.rb +18 -0
  56. data/lib/amo_crm/entities/sale_prices.rb +10 -0
  57. data/lib/amo_crm/entities/slot.rb +10 -0
  58. data/lib/amo_crm/entities/stock_to.rb +33 -0
  59. data/lib/amo_crm/entities/warehouse.rb +15 -0
  60. data/lib/amo_crm/entities/workflow.rb +11 -0
  61. data/lib/amo_crm/entities/workflow_state.rb +8 -0
  62. data/lib/amo_crm/entities/xml_fix.rb +14 -0
  63. data/lib/amo_crm/errors.rb +1 -0
  64. data/lib/amo_crm/resources.rb +18 -0
  65. data/lib/amo_crm/resources/account.rb +30 -0
  66. data/lib/amo_crm/resources/base.rb +149 -0
  67. data/lib/amo_crm/resources/companies.rb +27 -0
  68. data/lib/amo_crm/resources/contacts.rb +23 -0
  69. data/lib/amo_crm/resources/custom_entity_metadata.rb +18 -0
  70. data/lib/amo_crm/resources/custom_field.rb +28 -0
  71. data/lib/amo_crm/resources/embedded_entity_metadata.rb +20 -0
  72. data/lib/amo_crm/resources/embedded_entity_metadata_indexed.rb +7 -0
  73. data/lib/amo_crm/resources/indexed.rb +89 -0
  74. data/lib/amo_crm/resources/leads.rb +31 -0
  75. data/lib/amo_crm/resources/stock.rb +36 -0
  76. data/lib/amo_crm/resources/subresource.rb +21 -0
  77. data/lib/amo_crm/resources/where_filter.rb +26 -0
  78. data/lib/amo_crm/response.rb +7 -0
  79. data/lib/amo_crm/universe.rb +44 -0
  80. data/lib/amo_crm/version.rb +3 -0
  81. data/scripts/rest.sh +25 -0
  82. data/spec/fixtures/302.raw +15 -0
  83. data/spec/fixtures/400.raw +8 -0
  84. data/spec/fixtures/401.html +1 -0
  85. data/spec/fixtures/401_2.html +1 -0
  86. data/spec/fixtures/405.raw +9 -0
  87. data/spec/fixtures/500.raw +8 -0
  88. data/spec/fixtures/502.raw +8 -0
  89. data/spec/fixtures/Consignment_list_0.raw +14 -0
  90. data/spec/fixtures/Consignment_list_1000.raw +14 -0
  91. data/spec/fixtures/Country_list.raw +14 -0
  92. data/spec/fixtures/CustomEntityMetadata_list.raw +14 -0
  93. data/spec/fixtures/CustomEntity_list.raw +14 -0
  94. data/spec/fixtures/CustomEntity_list_bad_chars.raw +17 -0
  95. data/spec/fixtures/EmbeddedEntityMetadata_list.raw +15 -0
  96. data/spec/fixtures/Feature_list.raw +14 -0
  97. data/spec/fixtures/Feature_list_1000.raw +14 -0
  98. data/spec/fixtures/Good_WithManyAttributes.raw +13 -0
  99. data/spec/fixtures/Good_e932ebe1-2e22-11e4-9406-002590a28eca.raw +12 -0
  100. data/spec/fixtures/Good_eb77ad57-2e22-11e4-4030-002590a28eca.raw +12 -0
  101. data/spec/fixtures/Goods_list.raw +14 -0
  102. data/spec/fixtures/Metadata_list.raw +14 -0
  103. data/spec/fixtures/PriceType_list.raw +14 -0
  104. data/spec/fixtures/Stock.raw +11 -0
  105. data/spec/fixtures/Stock_showConsignments.raw +11 -0
  106. data/spec/fixtures/Uom_list.raw +14 -0
  107. data/spec/fixtures/Warehouse_list.raw +14 -0
  108. data/spec/fixtures/Workflow_list.raw +15 -0
  109. data/spec/fixtures/attribute_boolean.xml +6 -0
  110. data/spec/fixtures/attribute_dictionary.xml +5 -0
  111. data/spec/fixtures/attribute_double.xml +6 -0
  112. data/spec/fixtures/attribute_file.xml +12 -0
  113. data/spec/fixtures/attribute_long.xml +6 -0
  114. data/spec/fixtures/attribute_text.xml +5 -0
  115. data/spec/fixtures/attribute_time.xml +6 -0
  116. data/spec/fixtures/attribute_url.xml +6 -0
  117. data/spec/fixtures/bad_chars.xml +6 -0
  118. data/spec/fixtures/customer_order.xml +28 -0
  119. data/spec/fixtures/good_with_attributes.raw +12 -0
  120. data/spec/fixtures/good_with_image.xml +39 -0
  121. data/spec/fixtures/resource_forbidden.raw +9 -0
  122. data/spec/fixtures/wrong_password.raw +9 -0
  123. data/spec/fixtures/wrong_type.raw +70 -0
  124. data/spec/fixtures/wrong_user.raw +9 -0
  125. data/spec/lib/amocrm/client/errors_spec.rb +102 -0
  126. data/spec/lib/amocrm/entities/attribute_metadata_spec.rb +30 -0
  127. data/spec/lib/amocrm/entities/attribute_spec.rb +36 -0
  128. data/spec/lib/amocrm/entities/country_spec.rb +25 -0
  129. data/spec/lib/amocrm/entities/custom_entity_metadata_spec.rb +34 -0
  130. data/spec/lib/amocrm/entities/custom_entity_spec.rb +34 -0
  131. data/spec/lib/amocrm/entities/customer_order_position_spec.rb +35 -0
  132. data/spec/lib/amocrm/entities/customer_order_spec.rb +58 -0
  133. data/spec/lib/amocrm/entities/good_spec.rb +55 -0
  134. data/spec/lib/amocrm/resources/base_spec.rb +61 -0
  135. data/spec/lib/amocrm/resources/countries_spec.rb +22 -0
  136. data/spec/lib/amocrm/resources/custom_entity_metadata_spec.rb +13 -0
  137. data/spec/lib/amocrm/resources/embedded_entity_metadata_indexed_spec.rb +20 -0
  138. data/spec/lib/amocrm/resources/embedded_entity_metadata_spec.rb +11 -0
  139. data/spec/lib/amocrm/resources/good_folders_spec.rb +17 -0
  140. data/spec/lib/amocrm/resources/indexed_spec.rb +61 -0
  141. data/spec/lib/amocrm/resources/stock_spec.rb +63 -0
  142. data/spec/lib/amocrm/resources/subresource_spec.rb +13 -0
  143. data/spec/lib/amocrm/resources/warehouses_spec.rb +20 -0
  144. data/spec/lib/amocrm/resources/workflows_spec.rb +21 -0
  145. data/spec/lib/amocrm/resources_spec.rb +10 -0
  146. data/spec/lib/amocrm/universe_spec.rb +53 -0
  147. data/spec/lib/amocrm_spec.rb +8 -0
  148. data/spec/spec_helper.rb +106 -0
  149. data/spec/support/resource.rb +72 -0
  150. metadata +500 -0
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe AmoCRM::Resources do
4
+ it 'should be loaded' do
5
+ expect(AmoCRM::Resources).to be_a Module
6
+
7
+ expect(AmoCRM::Resources.resources).to include(AmoCRM::Resources::Features)
8
+ expect(AmoCRM::Resources.resources).to include(AmoCRM::Resources::EmbeddedEntityMetadata)
9
+ end
10
+ end
@@ -0,0 +1,53 @@
1
+ require 'spec_helper'
2
+
3
+ describe AmoCRM::Universe do
4
+ let!(:client) { AmoCRM::Client.new }
5
+
6
+ subject { described_class.new client: client }
7
+
8
+ it 'should have a features resoruce' do
9
+ expect(subject.features).to be_a AmoCRM::Resources::Indexed
10
+ end
11
+
12
+ it do
13
+ expect(subject.features.resource).to be_a AmoCRM::Resources::Features
14
+ end
15
+
16
+ it do
17
+ expect(subject.embedded_entity_metadata.resource).to be_a AmoCRM::Resources::EmbeddedEntityMetadata
18
+ end
19
+
20
+ it do
21
+ expect(subject.resources_list).to have_at_least(10).items
22
+ end
23
+
24
+ it do
25
+ expect(subject.resources_list).to include(:features)
26
+ end
27
+
28
+ describe '.build' do
29
+ let(:login) { 'alala' }
30
+ let(:password) { 'ulala' }
31
+
32
+ subject { described_class.build login: login, password: password }
33
+
34
+ it do
35
+ expect(subject).to be_a AmoCRM::Universe
36
+ end
37
+
38
+ it do
39
+ expect(subject.client).to be_a AmoCRM::Client
40
+ end
41
+
42
+ end
43
+
44
+ describe do
45
+ before do
46
+ stub_rest :CustomEntityMetadata, :list, 0, './spec/fixtures/resource_forbidden.raw'
47
+ end
48
+ it do
49
+ expect{subject.custom_entity_metadata.all}.to raise_error AmoCRM::Client::ResourceForbidden
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ describe AmoCRM do
4
+ it 'should be loaded' do
5
+ expect(AmoCRM::Entities::Base).to be_a Class
6
+ expect(AmoCRM::Entities::Company).to be_a Class
7
+ end
8
+ end
@@ -0,0 +1,106 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+
4
+ Bundler.setup
5
+ $:.unshift File.expand_path('../../lib', __FILE__)
6
+
7
+ require 'moysklad'
8
+ require 'faraday'
9
+ # https://github.com/vcr/vcr
10
+ require 'webmock/rspec'
11
+ require 'rspec/collection_matchers'
12
+ require 'pry'
13
+
14
+ AmoCRM.logger = Logger.new '/dev/null'
15
+ Dir["./spec/support/**/*.rb"].sort.each { |f| require f}
16
+
17
+ #Bundler.require :default
18
+ # This file was generated by the `rspec --init` command. Conventionally, all
19
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
20
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
21
+ # file to always be loaded, without a need to explicitly require it in any files.
22
+ #
23
+ # Given that it is always loaded, you are encouraged to keep this file as
24
+ # light-weight as possible. Requiring heavyweight dependencies from this file
25
+ # will add to the boot time of your test suite on EVERY test run, even for an
26
+ # individual file that may not need all of that loaded. Instead, consider making
27
+ # a separate helper file that requires the additional dependencies and performs
28
+ # the additional setup, and require it from the spec files that actually need it.
29
+ #
30
+ # The `.rspec` file also contains a few flags that are not defaults but that
31
+ # users commonly want.
32
+ #
33
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
34
+ RSpec.configure do |config|
35
+ # rspec-expectations config goes here. You can use an alternate
36
+ # assertion/expectation library such as wrong or the stdlib/minitest
37
+ # assertions if you prefer.
38
+ config.expect_with :rspec do |expectations|
39
+ # This option will default to `true` in RSpec 4. It makes the `description`
40
+ # and `failure_message` of custom matchers include text for helper methods
41
+ # defined using `chain`, e.g.:
42
+ # be_bigger_than(2).and_smaller_than(4).description
43
+ # # => "be bigger than 2 and smaller than 4"
44
+ # ...rather than:
45
+ # # => "be bigger than 2"
46
+ # expectations.include_chain_clauses_in_custom_matcher_descriptions = true
47
+ end
48
+
49
+ # rspec-mocks config goes here. You can use an alternate test double
50
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
51
+ config.mock_with :rspec do |mocks|
52
+ # Prevents you from mocking or stubbing a method that does not exist on
53
+ # a real object. This is generally recommended, and will default to
54
+ # `true` in RSpec 4.
55
+ mocks.verify_partial_doubles = true
56
+ end
57
+
58
+ # The settings below are suggested to provide a good initial experience
59
+ # with RSpec, but feel free to customize to your heart's content.
60
+ =begin
61
+ # These two settings work together to allow you to limit a spec run
62
+ # to individual examples or groups you care about by tagging them with
63
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
64
+ # get run.
65
+ config.filter_run :focus
66
+ config.run_all_when_everything_filtered = true
67
+
68
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
69
+ # For more details, see:
70
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
71
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
72
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
73
+ config.disable_monkey_patching!
74
+
75
+ # This setting enables warnings. It's recommended, but in some cases may
76
+ # be too noisy due to issues in dependencies.
77
+ config.warnings = true
78
+
79
+ # Many RSpec users commonly either run the entire suite or an individual
80
+ # file, and it's useful to allow more verbose output when running an
81
+ # individual spec file.
82
+ if config.files_to_run.one?
83
+ # Use the documentation formatter for detailed output,
84
+ # unless a formatter has already been configured
85
+ # (e.g. via a command-line flag).
86
+ config.default_formatter = 'doc'
87
+ end
88
+
89
+ # Print the 10 slowest examples and example groups at the
90
+ # end of the spec run, to help surface which specs are running
91
+ # particularly slow.
92
+ config.profile_examples = 10
93
+
94
+ # Run specs in random order to surface order dependencies. If you find an
95
+ # order dependency and want to debug it, you can fix the order by providing
96
+ # the seed, which is printed after each run.
97
+ # --seed 1234
98
+ config.order = :random
99
+
100
+ # Seed global randomization in this process using the `--seed` CLI option.
101
+ # Setting this allows you to use `--seed` to deterministically reproduce
102
+ # test failures related to randomization by passing the same `--seed` value
103
+ # as the one that triggered the failure.
104
+ Kernel.srand config.seed
105
+ =end
106
+ end
@@ -0,0 +1,72 @@
1
+ module RspecResourceSupport
2
+
3
+ def raw_consignment_0_list
4
+ File.new './spec/fixtures/Consignment_list_0.raw'
5
+ end
6
+
7
+ def raw_consignment_1000_list
8
+ File.new './spec/fixtures/Consignment_list_1000.raw'
9
+ end
10
+
11
+ def total_consignment_count
12
+ 1280
13
+ end
14
+
15
+ def feature_list_items_count
16
+ 863
17
+ end
18
+
19
+ def raw_feature_list
20
+ File.new './spec/fixtures/Feature_list.raw'
21
+ end
22
+
23
+ def feature_list_items_count
24
+ 863
25
+ end
26
+
27
+ def stub_rest type, action=:list, start=nil, file=nil
28
+ url = "https://online.moysklad.ru/exchange/rest/ms/xml/#{type}/#{action}"
29
+ url << "?start=#{start}" if start
30
+ stub_request(:get, url).to_return File.new( file || "./spec/fixtures/#{type}_#{action}.raw" )
31
+ end
32
+
33
+ def stub_stock_rest_with_consignments
34
+ url = 'https://online.moysklad.ru/exchange/rest/stock/xml?showConsignments=true'
35
+ stub_request(:get, url).to_return File.new "./spec/fixtures/Stock_showConsignments.raw"
36
+ end
37
+
38
+ def stub_stock_rest
39
+ url = 'https://online.moysklad.ru/exchange/rest/stock/xml'
40
+ stub_request(:get, url).to_return File.new "./spec/fixtures/Stock.raw"
41
+ end
42
+
43
+ def client
44
+ @client ||= AmoCRM::Client.new
45
+ end
46
+
47
+ def universe
48
+ @universe ||= AmoCRM::Universe.new client: client
49
+ end
50
+
51
+ def resource_list_url res=nil, start=nil
52
+ res ||= resource
53
+ url = AmoCRM::Client::URL + '/' + res.send(:list_path)
54
+ url+="?start=#{start}" if start
55
+
56
+ return url
57
+ end
58
+
59
+ def consignments_resource
60
+ @consignments_resource ||= AmoCRM::Resources::Consignments.new client: client
61
+ end
62
+
63
+ def stub_consignments_requests
64
+ stub_request(:get, resource_list_url(consignments_resource, 0)).to_return(raw_consignment_0_list)
65
+ stub_request(:get, resource_list_url(consignments_resource, 1000)).to_return(raw_consignment_1000_list)
66
+ end
67
+
68
+ end
69
+
70
+ RSpec.configure do |config|
71
+ config.include RspecResourceSupport
72
+ end
metadata ADDED
@@ -0,0 +1,500 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: amo_crm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.2
5
+ platform: ruby
6
+ authors:
7
+ - Danil Pismenny
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-09-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: virtus
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: hashie
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: faraday-cookie_jar
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: nokogiri-happymapper
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: activesupport
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.6'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.6'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
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'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec-collection_matchers
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: pry
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: pry-nav
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: webmock
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: guard
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: guard-rspec
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: guard-ctags-bundler
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: yard
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ description: "Правильный клиент для работы c REST XML API moyslad.ru, созданный по
252
+ принципам SOLID"
253
+ email:
254
+ - danil@brandymint.ru
255
+ executables: []
256
+ extensions: []
257
+ extra_rdoc_files: []
258
+ files:
259
+ - ".gitignore"
260
+ - ".rspec"
261
+ - ".travis.yml"
262
+ - CHANGELOG.md
263
+ - Gemfile
264
+ - Guardfile
265
+ - LICENSE.txt
266
+ - README.md
267
+ - Rakefile
268
+ - amo_crm.gemspec
269
+ - dump_amocrm_account.rb
270
+ - lib/amo_crm.rb
271
+ - lib/amo_crm/client.rb
272
+ - lib/amo_crm/client/error.rb
273
+ - lib/amo_crm/client/errors.rb
274
+ - lib/amo_crm/entities.rb
275
+ - lib/amo_crm/entities/account.rb
276
+ - lib/amo_crm/entities/attachment_document.rb
277
+ - lib/amo_crm/entities/attribute.rb
278
+ - lib/amo_crm/entities/attribute_metadata.rb
279
+ - lib/amo_crm/entities/barcode.rb
280
+ - lib/amo_crm/entities/base.rb
281
+ - lib/amo_crm/entities/collection.rb
282
+ - lib/amo_crm/entities/common.rb
283
+ - lib/amo_crm/entities/common_object.rb
284
+ - lib/amo_crm/entities/company.rb
285
+ - lib/amo_crm/entities/company_concern.rb
286
+ - lib/amo_crm/entities/consignment.rb
287
+ - lib/amo_crm/entities/contact.rb
288
+ - lib/amo_crm/entities/contract.rb
289
+ - lib/amo_crm/entities/country.rb
290
+ - lib/amo_crm/entities/custom_entity.rb
291
+ - lib/amo_crm/entities/custom_entity_metadata.rb
292
+ - lib/amo_crm/entities/custom_field.rb
293
+ - lib/amo_crm/entities/custom_field_definition.rb
294
+ - lib/amo_crm/entities/custom_field_value.rb
295
+ - lib/amo_crm/entities/custom_fields.rb
296
+ - lib/amo_crm/entities/custom_fields_definition.rb
297
+ - lib/amo_crm/entities/customer_order.rb
298
+ - lib/amo_crm/entities/customer_order_position.rb
299
+ - lib/amo_crm/entities/embedded_entity_metadata.rb
300
+ - lib/amo_crm/entities/error.rb
301
+ - lib/amo_crm/entities/feature.rb
302
+ - lib/amo_crm/entities/good.rb
303
+ - lib/amo_crm/entities/good_folder.rb
304
+ - lib/amo_crm/entities/good_ref.rb
305
+ - lib/amo_crm/entities/image.rb
306
+ - lib/amo_crm/entities/images.rb
307
+ - lib/amo_crm/entities/lead.rb
308
+ - lib/amo_crm/entities/my_company.rb
309
+ - lib/amo_crm/entities/page.rb
310
+ - lib/amo_crm/entities/price.rb
311
+ - lib/amo_crm/entities/price_type.rb
312
+ - lib/amo_crm/entities/sale_price.rb
313
+ - lib/amo_crm/entities/sale_prices.rb
314
+ - lib/amo_crm/entities/slot.rb
315
+ - lib/amo_crm/entities/stock_to.rb
316
+ - lib/amo_crm/entities/warehouse.rb
317
+ - lib/amo_crm/entities/workflow.rb
318
+ - lib/amo_crm/entities/workflow_state.rb
319
+ - lib/amo_crm/entities/xml_fix.rb
320
+ - lib/amo_crm/errors.rb
321
+ - lib/amo_crm/resources.rb
322
+ - lib/amo_crm/resources/account.rb
323
+ - lib/amo_crm/resources/base.rb
324
+ - lib/amo_crm/resources/companies.rb
325
+ - lib/amo_crm/resources/contacts.rb
326
+ - lib/amo_crm/resources/custom_entity_metadata.rb
327
+ - lib/amo_crm/resources/custom_field.rb
328
+ - lib/amo_crm/resources/embedded_entity_metadata.rb
329
+ - lib/amo_crm/resources/embedded_entity_metadata_indexed.rb
330
+ - lib/amo_crm/resources/indexed.rb
331
+ - lib/amo_crm/resources/leads.rb
332
+ - lib/amo_crm/resources/stock.rb
333
+ - lib/amo_crm/resources/subresource.rb
334
+ - lib/amo_crm/resources/where_filter.rb
335
+ - lib/amo_crm/response.rb
336
+ - lib/amo_crm/universe.rb
337
+ - lib/amo_crm/version.rb
338
+ - scripts/rest.sh
339
+ - spec/fixtures/302.raw
340
+ - spec/fixtures/400.raw
341
+ - spec/fixtures/401.html
342
+ - spec/fixtures/401_2.html
343
+ - spec/fixtures/405.raw
344
+ - spec/fixtures/500.raw
345
+ - spec/fixtures/502.raw
346
+ - spec/fixtures/Consignment_list_0.raw
347
+ - spec/fixtures/Consignment_list_1000.raw
348
+ - spec/fixtures/Country_list.raw
349
+ - spec/fixtures/CustomEntityMetadata_list.raw
350
+ - spec/fixtures/CustomEntity_list.raw
351
+ - spec/fixtures/CustomEntity_list_bad_chars.raw
352
+ - spec/fixtures/EmbeddedEntityMetadata_list.raw
353
+ - spec/fixtures/Feature_list.raw
354
+ - spec/fixtures/Feature_list_1000.raw
355
+ - spec/fixtures/Good_WithManyAttributes.raw
356
+ - spec/fixtures/Good_e932ebe1-2e22-11e4-9406-002590a28eca.raw
357
+ - spec/fixtures/Good_eb77ad57-2e22-11e4-4030-002590a28eca.raw
358
+ - spec/fixtures/Goods_list.raw
359
+ - spec/fixtures/Metadata_list.raw
360
+ - spec/fixtures/PriceType_list.raw
361
+ - spec/fixtures/Stock.raw
362
+ - spec/fixtures/Stock_showConsignments.raw
363
+ - spec/fixtures/Uom_list.raw
364
+ - spec/fixtures/Warehouse_list.raw
365
+ - spec/fixtures/Workflow_list.raw
366
+ - spec/fixtures/attribute_boolean.xml
367
+ - spec/fixtures/attribute_dictionary.xml
368
+ - spec/fixtures/attribute_double.xml
369
+ - spec/fixtures/attribute_file.xml
370
+ - spec/fixtures/attribute_long.xml
371
+ - spec/fixtures/attribute_text.xml
372
+ - spec/fixtures/attribute_time.xml
373
+ - spec/fixtures/attribute_url.xml
374
+ - spec/fixtures/bad_chars.xml
375
+ - spec/fixtures/customer_order.xml
376
+ - spec/fixtures/good_with_attributes.raw
377
+ - spec/fixtures/good_with_image.xml
378
+ - spec/fixtures/resource_forbidden.raw
379
+ - spec/fixtures/wrong_password.raw
380
+ - spec/fixtures/wrong_type.raw
381
+ - spec/fixtures/wrong_user.raw
382
+ - spec/lib/amocrm/client/errors_spec.rb
383
+ - spec/lib/amocrm/entities/attribute_metadata_spec.rb
384
+ - spec/lib/amocrm/entities/attribute_spec.rb
385
+ - spec/lib/amocrm/entities/country_spec.rb
386
+ - spec/lib/amocrm/entities/custom_entity_metadata_spec.rb
387
+ - spec/lib/amocrm/entities/custom_entity_spec.rb
388
+ - spec/lib/amocrm/entities/customer_order_position_spec.rb
389
+ - spec/lib/amocrm/entities/customer_order_spec.rb
390
+ - spec/lib/amocrm/entities/good_spec.rb
391
+ - spec/lib/amocrm/resources/base_spec.rb
392
+ - spec/lib/amocrm/resources/countries_spec.rb
393
+ - spec/lib/amocrm/resources/custom_entity_metadata_spec.rb
394
+ - spec/lib/amocrm/resources/embedded_entity_metadata_indexed_spec.rb
395
+ - spec/lib/amocrm/resources/embedded_entity_metadata_spec.rb
396
+ - spec/lib/amocrm/resources/good_folders_spec.rb
397
+ - spec/lib/amocrm/resources/indexed_spec.rb
398
+ - spec/lib/amocrm/resources/stock_spec.rb
399
+ - spec/lib/amocrm/resources/subresource_spec.rb
400
+ - spec/lib/amocrm/resources/warehouses_spec.rb
401
+ - spec/lib/amocrm/resources/workflows_spec.rb
402
+ - spec/lib/amocrm/resources_spec.rb
403
+ - spec/lib/amocrm/universe_spec.rb
404
+ - spec/lib/amocrm_spec.rb
405
+ - spec/spec_helper.rb
406
+ - spec/support/resource.rb
407
+ homepage: https://github.com/brandymint/amo_crm
408
+ licenses:
409
+ - MIT
410
+ metadata: {}
411
+ post_install_message:
412
+ rdoc_options: []
413
+ require_paths:
414
+ - lib
415
+ required_ruby_version: !ruby/object:Gem::Requirement
416
+ requirements:
417
+ - - ">="
418
+ - !ruby/object:Gem::Version
419
+ version: 2.0.0
420
+ required_rubygems_version: !ruby/object:Gem::Requirement
421
+ requirements:
422
+ - - ">="
423
+ - !ruby/object:Gem::Version
424
+ version: '0'
425
+ requirements: []
426
+ rubyforge_project:
427
+ rubygems_version: 2.4.5
428
+ signing_key:
429
+ specification_version: 4
430
+ summary: "Клиент для работы с API amocrm.ru"
431
+ test_files:
432
+ - spec/fixtures/302.raw
433
+ - spec/fixtures/400.raw
434
+ - spec/fixtures/401.html
435
+ - spec/fixtures/401_2.html
436
+ - spec/fixtures/405.raw
437
+ - spec/fixtures/500.raw
438
+ - spec/fixtures/502.raw
439
+ - spec/fixtures/Consignment_list_0.raw
440
+ - spec/fixtures/Consignment_list_1000.raw
441
+ - spec/fixtures/Country_list.raw
442
+ - spec/fixtures/CustomEntityMetadata_list.raw
443
+ - spec/fixtures/CustomEntity_list.raw
444
+ - spec/fixtures/CustomEntity_list_bad_chars.raw
445
+ - spec/fixtures/EmbeddedEntityMetadata_list.raw
446
+ - spec/fixtures/Feature_list.raw
447
+ - spec/fixtures/Feature_list_1000.raw
448
+ - spec/fixtures/Good_WithManyAttributes.raw
449
+ - spec/fixtures/Good_e932ebe1-2e22-11e4-9406-002590a28eca.raw
450
+ - spec/fixtures/Good_eb77ad57-2e22-11e4-4030-002590a28eca.raw
451
+ - spec/fixtures/Goods_list.raw
452
+ - spec/fixtures/Metadata_list.raw
453
+ - spec/fixtures/PriceType_list.raw
454
+ - spec/fixtures/Stock.raw
455
+ - spec/fixtures/Stock_showConsignments.raw
456
+ - spec/fixtures/Uom_list.raw
457
+ - spec/fixtures/Warehouse_list.raw
458
+ - spec/fixtures/Workflow_list.raw
459
+ - spec/fixtures/attribute_boolean.xml
460
+ - spec/fixtures/attribute_dictionary.xml
461
+ - spec/fixtures/attribute_double.xml
462
+ - spec/fixtures/attribute_file.xml
463
+ - spec/fixtures/attribute_long.xml
464
+ - spec/fixtures/attribute_text.xml
465
+ - spec/fixtures/attribute_time.xml
466
+ - spec/fixtures/attribute_url.xml
467
+ - spec/fixtures/bad_chars.xml
468
+ - spec/fixtures/customer_order.xml
469
+ - spec/fixtures/good_with_attributes.raw
470
+ - spec/fixtures/good_with_image.xml
471
+ - spec/fixtures/resource_forbidden.raw
472
+ - spec/fixtures/wrong_password.raw
473
+ - spec/fixtures/wrong_type.raw
474
+ - spec/fixtures/wrong_user.raw
475
+ - spec/lib/amocrm/client/errors_spec.rb
476
+ - spec/lib/amocrm/entities/attribute_metadata_spec.rb
477
+ - spec/lib/amocrm/entities/attribute_spec.rb
478
+ - spec/lib/amocrm/entities/country_spec.rb
479
+ - spec/lib/amocrm/entities/custom_entity_metadata_spec.rb
480
+ - spec/lib/amocrm/entities/custom_entity_spec.rb
481
+ - spec/lib/amocrm/entities/customer_order_position_spec.rb
482
+ - spec/lib/amocrm/entities/customer_order_spec.rb
483
+ - spec/lib/amocrm/entities/good_spec.rb
484
+ - spec/lib/amocrm/resources/base_spec.rb
485
+ - spec/lib/amocrm/resources/countries_spec.rb
486
+ - spec/lib/amocrm/resources/custom_entity_metadata_spec.rb
487
+ - spec/lib/amocrm/resources/embedded_entity_metadata_indexed_spec.rb
488
+ - spec/lib/amocrm/resources/embedded_entity_metadata_spec.rb
489
+ - spec/lib/amocrm/resources/good_folders_spec.rb
490
+ - spec/lib/amocrm/resources/indexed_spec.rb
491
+ - spec/lib/amocrm/resources/stock_spec.rb
492
+ - spec/lib/amocrm/resources/subresource_spec.rb
493
+ - spec/lib/amocrm/resources/warehouses_spec.rb
494
+ - spec/lib/amocrm/resources/workflows_spec.rb
495
+ - spec/lib/amocrm/resources_spec.rb
496
+ - spec/lib/amocrm/universe_spec.rb
497
+ - spec/lib/amocrm_spec.rb
498
+ - spec/spec_helper.rb
499
+ - spec/support/resource.rb
500
+ has_rdoc: