crunch-api 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +19 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +12 -0
- data/crunch-api.gemspec +29 -0
- data/lib/crunch-api/default.rb +31 -0
- data/lib/crunch-api/supplier.rb +47 -0
- data/lib/crunch-api/version.rb +3 -0
- data/lib/crunch-api.rb +39 -0
- data/test/fixtures/vcr_cassettes/get_suppliers_success.yml +62 -0
- data/test/lib/crunch-api/default_test.rb +44 -0
- data/test/lib/crunch-api/supplier_test.rb +64 -0
- data/test/lib/crunch-api/version_test.rb +7 -0
- data/test/lib/crunch-api_test.rb +21 -0
- data/test/test_helper.rb +10 -0
- metadata +186 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Aaron Chambers
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Crunch::Api
|
2
|
+
|
3
|
+
A Ruby interface to the Crunch Accounting API
|
4
|
+
|
5
|
+
This is very early days. Will be fleshing it out further soon
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
gem 'crunch-api'
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install crunch-api
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require 'bundler/gem_tasks'
|
3
|
+
require 'rake/testtask'
|
4
|
+
|
5
|
+
Rake::TestTask.new do |t|
|
6
|
+
t.libs << 'lib/crunch-api'
|
7
|
+
t.test_files = FileList['test/lib/**/*_test.rb']
|
8
|
+
t.ruby_opts = ['-r./test/test_helper.rb']
|
9
|
+
t.verbose = true
|
10
|
+
end
|
11
|
+
|
12
|
+
task :default => :test
|
data/crunch-api.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'crunch-api/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "crunch-api"
|
8
|
+
spec.version = CrunchApi::VERSION
|
9
|
+
spec.authors = ["Aaron Chambers"]
|
10
|
+
spec.email = ["achambers@gmail.com"]
|
11
|
+
spec.description = %q{A Ruby interface to the Crunch Accounting API}
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency("oauth", "~> 0.4.7")
|
22
|
+
spec.add_dependency("nori", "~> 2.2.0")
|
23
|
+
spec.add_dependency("nokogiri", "~> 1.5.9")
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
26
|
+
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency "webmock"
|
28
|
+
spec.add_development_dependency "vcr", "~>2.4"
|
29
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module CrunchApi
|
2
|
+
module Default
|
3
|
+
ENDPOINT = 'https://crunch.co.uk' unless defined? CrunchApi::Default::ENDPOINT
|
4
|
+
|
5
|
+
class << self
|
6
|
+
def options
|
7
|
+
Hash[CrunchApi.keys.map { |key| [key, send(key)] }]
|
8
|
+
end
|
9
|
+
|
10
|
+
def consumer_key
|
11
|
+
ENV['CRUNCH_CONSUMER_KEY']
|
12
|
+
end
|
13
|
+
|
14
|
+
def consumer_secret
|
15
|
+
ENV['CRUNCH_CONSUMER_SECRET']
|
16
|
+
end
|
17
|
+
|
18
|
+
def oauth_token
|
19
|
+
ENV['CRUNCH_OAUTH_TOKEN']
|
20
|
+
end
|
21
|
+
|
22
|
+
def oauth_token_secret
|
23
|
+
ENV['CRUNCH_OAUTH_TOKEN_SECRET']
|
24
|
+
end
|
25
|
+
|
26
|
+
def endpoint
|
27
|
+
ENDPOINT
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'oauth'
|
2
|
+
require 'nori'
|
3
|
+
|
4
|
+
module CrunchApi
|
5
|
+
class Supplier
|
6
|
+
|
7
|
+
attr_reader :id, :uri, :name, :contact_name, :email, :website, :telephone, :fax, :default_expense_type
|
8
|
+
|
9
|
+
def initialize(xml)
|
10
|
+
@id = xml[:@supplierId]
|
11
|
+
@uri = xml[:@resourceUrl]
|
12
|
+
@default_expense_type = xml[:@defaultExpenseType]
|
13
|
+
@unknown_supplier_flag = xml[:@unknownSupplier] == "true"
|
14
|
+
@name = xml[:name]
|
15
|
+
@contact_name = xml[:contact_name]
|
16
|
+
@email = xml[:email]
|
17
|
+
@website = xml[:website]
|
18
|
+
@telephone = xml[:telephone]
|
19
|
+
@fax = xml[:fax]
|
20
|
+
end
|
21
|
+
|
22
|
+
def unknown_supplier?
|
23
|
+
@unknown_supplier_flag
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.all
|
27
|
+
consumer = OAuth::Consumer.new(CrunchApi.options[:consumer_key], CrunchApi.options[:consumer_secret], {})
|
28
|
+
token = OAuth::AccessToken.new(consumer, CrunchApi.options[:oauth_token], CrunchApi.options[:oauth_token_secret])
|
29
|
+
|
30
|
+
uri = "#{CrunchApi.options[:endpoint]}#{path}"
|
31
|
+
|
32
|
+
response = token.get(uri)
|
33
|
+
|
34
|
+
parse_xml(response.body).collect{|xml| new(xml)}
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def self.path
|
40
|
+
"/crunch-core/seam/resource/rest/api/suppliers"
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.parse_xml(xml)
|
44
|
+
Nori.new(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym }).parse(xml)[:crunch_message][:suppliers][:supplier]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/lib/crunch-api.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative 'crunch-api/version'
|
2
|
+
require_relative 'crunch-api/default'
|
3
|
+
require_relative 'crunch-api/supplier'
|
4
|
+
|
5
|
+
module CrunchApi
|
6
|
+
class << self
|
7
|
+
attr_writer :consumer_key, :consumer_secret, :oauth_token, :oauth_token_secret, :endpoint
|
8
|
+
|
9
|
+
def keys
|
10
|
+
@keys ||= [
|
11
|
+
:consumer_key,
|
12
|
+
:consumer_secret,
|
13
|
+
:oauth_token,
|
14
|
+
:oauth_token_secret,
|
15
|
+
:endpoint
|
16
|
+
]
|
17
|
+
end
|
18
|
+
|
19
|
+
def configure
|
20
|
+
yield self
|
21
|
+
self
|
22
|
+
end
|
23
|
+
|
24
|
+
def options
|
25
|
+
Hash[CrunchApi.keys.map { |key| [key, instance_variable_get(:"@#{key}")] }]
|
26
|
+
end
|
27
|
+
|
28
|
+
def reset!
|
29
|
+
CrunchApi.keys.each do |key|
|
30
|
+
instance_variable_set(:"@#{key}", CrunchApi::Default.options[key])
|
31
|
+
end
|
32
|
+
self
|
33
|
+
end
|
34
|
+
|
35
|
+
alias setup reset!
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
CrunchApi.setup
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://demo.crunch.co.uk/crunch-core/seam/resource/rest/api/suppliers
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- OAuth gem v0.4.7
|
14
|
+
Authorization:
|
15
|
+
- OAuth oauth_consumer_key="aaron_chambers", oauth_nonce="xxx",
|
16
|
+
oauth_signature="xxx", oauth_signature_method="HMAC-SHA1",
|
17
|
+
oauth_timestamp="1368726069", oauth_token="xxx",
|
18
|
+
oauth_version="1.0"
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Date:
|
25
|
+
- Thu, 16 May 2013 17:41:09 GMT
|
26
|
+
Server:
|
27
|
+
- Apache
|
28
|
+
Set-Cookie:
|
29
|
+
- JSESSIONID=GRWG+Y110i1DMoYi+4lJaSyC.undefined; Path=/crunch-core; Secure
|
30
|
+
Cache-Control:
|
31
|
+
- no-cache
|
32
|
+
Content-Length:
|
33
|
+
- '1819'
|
34
|
+
Access-Control-Allow-Origin:
|
35
|
+
- ! '*'
|
36
|
+
Access-Control-Allow-Headers:
|
37
|
+
- Origin, Content-Type, Accept, X-Requested-With, oauth_consumer_key, oauth_token,
|
38
|
+
oauth_signature_method, oauth_signature, oauth_timestamp, oauth_nonce, oauth_version,
|
39
|
+
Authorization
|
40
|
+
Connection:
|
41
|
+
- close
|
42
|
+
Content-Type:
|
43
|
+
- application/*+xml
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><crunchMessage
|
47
|
+
xmlns="http://api.crunch.co.uk/rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
48
|
+
outcome="success" xsi:schemaLocation="http://api.crunch.co.uk/rest"><suppliers
|
49
|
+
count="6" firstResult="0"><supplier supplierId="709" defaultExpenseType="EQUIPMENT_COST"
|
50
|
+
resourceUrl="/crunch-core/seam/resource/rest/api/suppliers/709"><name>Apple
|
51
|
+
Inc</name><contactName></contactName><email>test@apple.com</email><website></website><telephone></telephone><fax></fax></supplier><supplier
|
52
|
+
supplierId="711" defaultExpenseType="INTERNET" resourceUrl="/crunch-core/seam/resource/rest/api/suppliers/711"><name>BT</name><contactName>Sam
|
53
|
+
Smith</contactName><email>sam@bt.com</email><website>bt.com</website><telephone>0712345678</telephone><fax>0212345678</fax></supplier><supplier
|
54
|
+
supplierId="708" resourceUrl="/crunch-core/seam/resource/rest/api/suppliers/708"><name>Currys</name><contactName></contactName><email></email><website></website><telephone></telephone><fax></fax></supplier><supplier
|
55
|
+
supplierId="618" defaultExpenseType="ACCOUNTANCY" resourceUrl="/crunch-core/seam/resource/rest/api/suppliers/618"><name>E-Crunch
|
56
|
+
Ltd</name><email>support@crunch.co.uk</email><website>www.crunch.co.uk</website><telephone>0844
|
57
|
+
500 8000</telephone></supplier><supplier supplierId="646" resourceUrl="/crunch-core/seam/resource/rest/api/suppliers/646"><name>Harvey
|
58
|
+
Norman</name><contactName></contactName><email></email><website></website><telephone></telephone><fax></fax></supplier><supplier
|
59
|
+
supplierId="710" defaultExpenseType="PRINTING_POSTAGE_STATIONERY" resourceUrl="/crunch-core/seam/resource/rest/api/suppliers/710"><name>Ryman</name><contactName></contactName><email></email><website></website><telephone></telephone><fax></fax></supplier></suppliers></crunchMessage>
|
60
|
+
http_version:
|
61
|
+
recorded_at: Thu, 16 May 2013 17:41:09 GMT
|
62
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require_relative '../../test_helper'
|
2
|
+
|
3
|
+
describe CrunchApi::Default do
|
4
|
+
|
5
|
+
before do
|
6
|
+
@consumer_key = ENV['CRUNCH_CONSUMER_KEY']
|
7
|
+
ENV['CRUNCH_CONSUMER_KEY'] = "foo"
|
8
|
+
|
9
|
+
@consumer_secret = ENV['CRUNCH_CONSUMER_SECRET']
|
10
|
+
ENV['CRUNCH_CONSUMER_SECRET'] = "bar"
|
11
|
+
|
12
|
+
@oauth_token = ENV['CRUNCH_OAUTH_TOKEN']
|
13
|
+
ENV['CRUNCH_OAUTH_TOKEN'] = "woo"
|
14
|
+
|
15
|
+
@oauth_token_secret = ENV['CRUNCH_OAUTH_TOKEN_SECRET']
|
16
|
+
ENV['CRUNCH_OAUTH_TOKEN_SECRET'] = "war"
|
17
|
+
end
|
18
|
+
|
19
|
+
after do
|
20
|
+
ENV['CRUNCH_CONSUMER_KEY'] = @consumer_key
|
21
|
+
ENV['CRUNCH_CONSUMER_SECRET'] = @consumer_secret
|
22
|
+
ENV['CRUNCH_OAUTH_TOKEN'] = @oauth_token
|
23
|
+
ENV['CRUNCH_OAUTH_TOKEN_SECRET'] = @oauth_token_secret
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "environment variables" do
|
27
|
+
it "returns the consumer key" do
|
28
|
+
CrunchApi::Default.consumer_key.must_equal "foo"
|
29
|
+
end
|
30
|
+
|
31
|
+
it "returns the consumer secret" do
|
32
|
+
CrunchApi::Default.consumer_secret.must_equal "bar"
|
33
|
+
end
|
34
|
+
|
35
|
+
it "returns the oauth token" do
|
36
|
+
CrunchApi::Default.oauth_token.must_equal "woo"
|
37
|
+
end
|
38
|
+
|
39
|
+
it "returns the oauth token secret" do
|
40
|
+
CrunchApi::Default.oauth_token_secret.must_equal "war"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require_relative '../../test_helper'
|
2
|
+
|
3
|
+
describe CrunchApi::Supplier do
|
4
|
+
describe "Initialization" do
|
5
|
+
[:name, :contact_name, :email, :website, :telephone, :fax].each do |attribute|
|
6
|
+
it "should set the attribute for #{attribute}" do
|
7
|
+
supplier = CrunchApi::Supplier.new(attribute.to_sym => "foo")
|
8
|
+
|
9
|
+
supplier.send(attribute).must_equal "foo"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should set the attribute for id" do
|
14
|
+
supplier = CrunchApi::Supplier.new(:@supplierId => "foo")
|
15
|
+
|
16
|
+
supplier.id.must_equal "foo"
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should set the attribute for uri" do
|
20
|
+
supplier = CrunchApi::Supplier.new(:@resourceUrl => "foo")
|
21
|
+
|
22
|
+
supplier.uri.must_equal "foo"
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should set the attribute for default expense type" do
|
26
|
+
supplier = CrunchApi::Supplier.new(:@defaultExpenseType => "foo")
|
27
|
+
|
28
|
+
supplier.default_expense_type.must_equal "foo"
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should set the attribute for unknown supplier" do
|
32
|
+
supplier = CrunchApi::Supplier.new(:@unknownSupplier => "true")
|
33
|
+
|
34
|
+
supplier.unknown_supplier?.must_equal true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "GET /suppliers" do
|
39
|
+
before do
|
40
|
+
CrunchApi.configure do |config|
|
41
|
+
config.endpoint = "https://demo.crunch.co.uk"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should call the correct resource" do
|
46
|
+
VCR.use_cassette('get_suppliers_success') do
|
47
|
+
CrunchApi::Supplier.all
|
48
|
+
|
49
|
+
assert_requested(:get, 'https://demo.crunch.co.uk/crunch-core/seam/resource/rest/api/suppliers')
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should return an array of suppliers" do
|
54
|
+
VCR.use_cassette('get_suppliers_success') do
|
55
|
+
suppliers = CrunchApi::Supplier.all
|
56
|
+
|
57
|
+
suppliers.size.must_equal 6
|
58
|
+
suppliers.must_be_kind_of Array
|
59
|
+
suppliers.first.must_be_kind_of CrunchApi::Supplier
|
60
|
+
suppliers.first.name.must_equal "Apple Inc"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative '../test_helper'
|
2
|
+
|
3
|
+
describe CrunchApi do
|
4
|
+
|
5
|
+
describe "configuration" do
|
6
|
+
after do
|
7
|
+
CrunchApi.reset!
|
8
|
+
end
|
9
|
+
|
10
|
+
[:consumer_key, :consumer_secret, :oauth_token, :oauth_token_secret, :endpoint].each do |key|
|
11
|
+
it "must set the attribute for #{key}" do
|
12
|
+
CrunchApi.configure do |config|
|
13
|
+
config.send("#{key}=", "foo")
|
14
|
+
end
|
15
|
+
|
16
|
+
CrunchApi.instance_variable_get(:"@#{key}").must_equal "foo"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'minitest/pride'
|
3
|
+
require 'webmock/minitest'
|
4
|
+
require 'vcr'
|
5
|
+
require File.expand_path('../../lib/crunch-api', __FILE__)
|
6
|
+
|
7
|
+
VCR.configure do |config|
|
8
|
+
config.cassette_library_dir = 'test/fixtures/vcr_cassettes'
|
9
|
+
config.hook_into :webmock
|
10
|
+
end
|
metadata
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: crunch-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Aaron Chambers
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-05-16 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: oauth
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.4.7
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.4.7
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: nori
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.2.0
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.2.0
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: nokogiri
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.5.9
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.5.9
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: bundler
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.3'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.3'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rake
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: webmock
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: vcr
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.4'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '2.4'
|
126
|
+
description: A Ruby interface to the Crunch Accounting API
|
127
|
+
email:
|
128
|
+
- achambers@gmail.com
|
129
|
+
executables: []
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- .gitignore
|
134
|
+
- Gemfile
|
135
|
+
- LICENSE.txt
|
136
|
+
- README.md
|
137
|
+
- Rakefile
|
138
|
+
- crunch-api.gemspec
|
139
|
+
- lib/crunch-api.rb
|
140
|
+
- lib/crunch-api/default.rb
|
141
|
+
- lib/crunch-api/supplier.rb
|
142
|
+
- lib/crunch-api/version.rb
|
143
|
+
- test/fixtures/vcr_cassettes/get_suppliers_success.yml
|
144
|
+
- test/lib/crunch-api/default_test.rb
|
145
|
+
- test/lib/crunch-api/supplier_test.rb
|
146
|
+
- test/lib/crunch-api/version_test.rb
|
147
|
+
- test/lib/crunch-api_test.rb
|
148
|
+
- test/test_helper.rb
|
149
|
+
homepage: ''
|
150
|
+
licenses:
|
151
|
+
- MIT
|
152
|
+
post_install_message:
|
153
|
+
rdoc_options: []
|
154
|
+
require_paths:
|
155
|
+
- lib
|
156
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
none: false
|
158
|
+
requirements:
|
159
|
+
- - ! '>='
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0'
|
162
|
+
segments:
|
163
|
+
- 0
|
164
|
+
hash: -2400216506421897793
|
165
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
167
|
+
requirements:
|
168
|
+
- - ! '>='
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
171
|
+
segments:
|
172
|
+
- 0
|
173
|
+
hash: -2400216506421897793
|
174
|
+
requirements: []
|
175
|
+
rubyforge_project:
|
176
|
+
rubygems_version: 1.8.24
|
177
|
+
signing_key:
|
178
|
+
specification_version: 3
|
179
|
+
summary: A Ruby interface to the Crunch Accounting API
|
180
|
+
test_files:
|
181
|
+
- test/fixtures/vcr_cassettes/get_suppliers_success.yml
|
182
|
+
- test/lib/crunch-api/default_test.rb
|
183
|
+
- test/lib/crunch-api/supplier_test.rb
|
184
|
+
- test/lib/crunch-api/version_test.rb
|
185
|
+
- test/lib/crunch-api_test.rb
|
186
|
+
- test/test_helper.rb
|