pec_calc_client 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3a5442cfe0d5844b3435aad18a8e75e790f9e9eb
4
+ data.tar.gz: 9a73808bf1aaf4ee026efa530f97893e3713bed6
5
+ SHA512:
6
+ metadata.gz: a284fbbe25724c9afd66948f3d1b40eb8e7477b5217d84266d8907682294ec6f65e351be8c81f48c5b70fa09e6e6703887fa47cffb9d46489a982e67a92fcc70
7
+ data.tar.gz: ed854dd3868407f512e46c0c3585cc8799350e42884e45edb808885b489f8544015d682493501a20a80679767e7f4acaf83dc5b97275a7c23c3479c215c36e9c
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pec_calc_client.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'rspec'
8
+ gem 'faker'
9
+ end
10
+
11
+ gem 'json'
data/Gemfile.lock ADDED
@@ -0,0 +1,38 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pec_calc_client (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.2.5)
10
+ faker (1.5.0)
11
+ i18n (~> 0.5)
12
+ i18n (0.7.0)
13
+ json (1.8.3)
14
+ rspec (3.3.0)
15
+ rspec-core (~> 3.3.0)
16
+ rspec-expectations (~> 3.3.0)
17
+ rspec-mocks (~> 3.3.0)
18
+ rspec-core (3.3.2)
19
+ rspec-support (~> 3.3.0)
20
+ rspec-expectations (3.3.1)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.3.0)
23
+ rspec-mocks (3.3.2)
24
+ diff-lcs (>= 1.2.0, < 2.0)
25
+ rspec-support (~> 3.3.0)
26
+ rspec-support (3.3.0)
27
+
28
+ PLATFORMS
29
+ ruby
30
+
31
+ DEPENDENCIES
32
+ faker
33
+ json
34
+ pec_calc_client!
35
+ rspec
36
+
37
+ BUNDLED WITH
38
+ 1.10.6
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # PecCalcClient
2
+
3
+ Gem for integration with API transport company PEC
4
+
5
+ API description PAGE
6
+ [API description](http://pecom.ru/business/developers/api_public/)
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'pec_calc_client'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install pec_calc_client
23
+
24
+ ## Usage
25
+
26
+ Get Delivery Regions:
27
+
28
+ ```ruby
29
+ require 'pec_calc_client'
30
+
31
+ PecCalcClient::Region.all
32
+ ```
33
+ Extract Delivery Cities by region:
34
+
35
+ ```ruby
36
+ require 'pec_calc_client'
37
+
38
+ PecCalcClient::Region.all.first.towns
39
+ ```
40
+
41
+ ## Contributing
42
+
43
+ 1. Fork it ( https://github.com/[my-github-username]/pec_calc_client/fork )
44
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
45
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
46
+ 4. Push to the branch (`git push origin my-new-feature`)
47
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pec/calc/client"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,8 @@
1
+ # require 'pec/calc/client/version'
2
+
3
+ Dir["#{ File.dirname(__FILE__) }/pec_calc_client/*.rb"].each {|file| require file }
4
+
5
+ module PecCalcClient
6
+ class ConnectionError < Exception; end
7
+ class BadResponse < Exception; end
8
+ end
@@ -0,0 +1,2 @@
1
+ require 'spec_helper'
2
+
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'pec_calc_client'
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pec_calc_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - MAXOPKA
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Gem for working with public API http://pecom.ru/business/developers/api_public/
14
+ email: d.n.krivenko@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - Gemfile
20
+ - Gemfile.lock
21
+ - README.md
22
+ - Rakefile
23
+ - bin/console
24
+ - bin/setup
25
+ - lib/pec_calc_client.rb
26
+ - spec/pec_calc_client_spec.rb
27
+ - spec/spec_helper.rb
28
+ homepage: https://rubygems.org/gems/pec_calc_client
29
+ licenses:
30
+ - MIT
31
+ metadata: {}
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubyforge_project:
48
+ rubygems_version: 2.4.6
49
+ signing_key:
50
+ specification_version: 4
51
+ summary: Gem for PEC transport Company API
52
+ test_files: []