sk-api 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,21 +1,21 @@
1
1
  = SalesKing Api
2
2
 
3
3
  This plugin is used internally by SalesKing to deliver the API and
4
- can be used externally as an API client.
4
+ can be used externally as an API client. The code is used in production at
5
+ https://www.SalesKing, http://texprovider.de and http://planio.de
5
6
 
6
- The SalesKing API client uses ActiveResource, ,with some little build in
7
- fixes due to json parsing. For now it only supports JSON, XML comes later.
7
+ The SalesKing API client uses ActiveResource, with some fixes due to json parsing.
8
+ For now it only supports JSON, XML comes later.
8
9
 
9
10
  To be able to use the API you must have an SalesKing account and API access.
10
11
  Than you can start writing your own middelware-stack.
11
12
 
12
- == Upcomming
13
+ == Install
13
14
 
14
- The code is used in production, but still there is a lot to come, so if you
15
- try to use it please tell us, so we can give you API access and support.
15
+ if you try to use it please tell us, so we can provide you a login on our dev system
16
+ and support.
16
17
 
17
- With the rails 3.0 release we are going to pack this code as gem for
18
- easier delivery & bundling
18
+ gem install sk-api
19
19
 
20
20
  == Example
21
21
 
@@ -23,13 +23,15 @@ easier delivery & bundling
23
23
  client.first_name = "Meister"
24
24
  client.save
25
25
 
26
- For more take a look into the specs.
26
+ For more information on how to use take a look into the specs.
27
27
 
28
28
  == Salesking API Resources
29
29
 
30
- Right now there are only two resources available:
30
+ Right now the following resources are available:
31
31
 
32
32
  * clients
33
+ * invoices
34
+ * products
33
35
  * credit_notes
34
36
 
35
37
  == Tests
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
@@ -1,3 +1,10 @@
1
+ #temp patch as_json on decimals introduced by rails. which collpases with ruby-yail
2
+ class BigDecimal
3
+ def as_json
4
+ self.to_f
5
+ end
6
+ end
7
+
1
8
  module ActiveResource
2
9
  # Overridden methods to suit SalesKing.
3
10
  # Some changes might be kicked when AR 3.0 is out
data/lib/sk_api.rb CHANGED
@@ -13,9 +13,6 @@ else
13
13
  Rufus::Json.backend = :json
14
14
  end
15
15
 
16
- #vendored
17
- require File.dirname(__FILE__) + '/../vendor/jsonschema-1.0.0/lib/jsonschema'
18
-
19
16
  # utilities
20
17
  require File.dirname(__FILE__) + '/utils/field_map'
21
18
  require File.dirname(__FILE__) + '/utils/serializer'
data/sk-api.gemspec ADDED
@@ -0,0 +1,80 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{sk-api}
8
+ s.version = "1.0.6"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Georg Leciejewski"]
12
+ s.date = %q{2010-04-16}
13
+ s.description = %q{Interact with SalesKing}
14
+ s.email = %q{gl@salesking.eu}
15
+ s.extra_rdoc_files = [
16
+ "README.rdoc"
17
+ ]
18
+ s.files = [
19
+ ".gitignore",
20
+ "MIT-LICENSE",
21
+ "Manifest",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "init.rb",
26
+ "lib/activeresource_patches/README",
27
+ "lib/activeresource_patches/base.rb",
28
+ "lib/activeresource_patches/validations.rb",
29
+ "lib/resources/address.rb",
30
+ "lib/resources/base.rb",
31
+ "lib/resources/client.rb",
32
+ "lib/resources/credit_note.rb",
33
+ "lib/resources/invoice.rb",
34
+ "lib/resources/line_item.rb",
35
+ "lib/resources/product.rb",
36
+ "lib/sk_api.rb",
37
+ "lib/utils/field_map.rb",
38
+ "lib/utils/serializer.rb",
39
+ "sk-api.gemspec",
40
+ "spec/resources/client_spec.rb",
41
+ "spec/resources/credit_note_spec.rb",
42
+ "spec/resources/invoice_spec.rb",
43
+ "spec/resources/product_spec.rb",
44
+ "spec/spec_helper.rb",
45
+ "spec/utils/field_map_spec.rb",
46
+ "tasks/sk_api_tasks.rake",
47
+ "vendor/jsonschema-1.0.0/README.rdoc",
48
+ "vendor/jsonschema-1.0.0/Rakefile",
49
+ "vendor/jsonschema-1.0.0/lib/jsonschema.rb",
50
+ "vendor/jsonschema-1.0.0/ruby-jsonschema.gemspec",
51
+ "vendor/jsonschema-1.0.0/test/jsonschema_test.rb"
52
+ ]
53
+ s.homepage = %q{http://github.com/salesking/sk-api}
54
+ s.rdoc_options = ["--charset=UTF-8"]
55
+ s.require_paths = ["lib"]
56
+ s.rubygems_version = %q{1.3.6}
57
+ s.summary = %q{Interact with SalesKing}
58
+ s.test_files = [
59
+ "spec/resources/client_spec.rb",
60
+ "spec/resources/credit_note_spec.rb",
61
+ "spec/resources/invoice_spec.rb",
62
+ "spec/resources/product_spec.rb",
63
+ "spec/spec_helper.rb",
64
+ "spec/utils/field_map_spec.rb"
65
+ ]
66
+
67
+ if s.respond_to? :specification_version then
68
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
69
+ s.specification_version = 3
70
+
71
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
72
+ s.add_development_dependency(%q<rspec>, [">= 0"])
73
+ else
74
+ s.add_dependency(%q<rspec>, [">= 0"])
75
+ end
76
+ else
77
+ s.add_dependency(%q<rspec>, [">= 0"])
78
+ end
79
+ end
80
+
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'spec'
3
3
  require "#{File.dirname(__FILE__)}/../lib/sk_api"
4
+ require File.dirname(__FILE__) + '/../vendor/jsonschema-1.0.0/lib/jsonschema'
4
5
 
5
6
 
6
7
  def delete_test_data(doc, client)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 5
9
- version: 1.0.5
8
+ - 6
9
+ version: 1.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Georg Leciejewski
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-08 00:00:00 +01:00
17
+ date: 2010-04-16 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -58,6 +58,7 @@ files:
58
58
  - lib/sk_api.rb
59
59
  - lib/utils/field_map.rb
60
60
  - lib/utils/serializer.rb
61
+ - sk-api.gemspec
61
62
  - spec/resources/client_spec.rb
62
63
  - spec/resources/credit_note_spec.rb
63
64
  - spec/resources/invoice_spec.rb