tastyrb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/LICENSE +21 -7
  2. data/README.md +15 -1
  3. metadata +46 -69
data/LICENSE CHANGED
@@ -1,10 +1,24 @@
1
- Copyright © 2011, Dan Drinkard
1
+ Copyright (c) 2011, Dan Drinkard
2
2
  All rights reserved.
3
3
 
4
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of TastyRB nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
5
14
 
6
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
- * Neither the name of Sunlight Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
-
10
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL THE SUNLIGHT FOUNDATION BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md CHANGED
@@ -3,4 +3,18 @@ Tastyrb
3
3
 
4
4
  A thin wrapper for self-describing tastypie APIs
5
5
 
6
- Docs will go here.
6
+ Parameters:
7
+
8
+ - `api_key`: Key to be passed to the server in GET array
9
+ - `api_key_param`: String name of the GET param to send the key as
10
+ - `base_uri`: The self-describing root of the api. When you change this, Tastyrb will redefine the methods it responds to.
11
+ - `jsonp_callback`: Not very useful, but there if you just want to return a raw jsonp string back to the browser
12
+ - `word_separator`: The character to use to convert paths to method calls. ex: '\_' would convert '/posts/latest/comments/' into posts\_latest\_comments()
13
+
14
+
15
+ Usage:
16
+
17
+ api = Tastyrb::Client.new(base_uri='http://readthedocs.org/api/v1/')
18
+ #=> #<Tastyrb::Client:0x007fa73a114c78 @resources=[:build, :file, :project, :user, :version], @api_key=nil, @api_key_param="api_key", @jsonp_callback=nil, @word_separator="_", @base_uri="http://readthedocs.org/api/v1/">
19
+ api.file(:limit => 1)
20
+ #=> [<#Tastyrb::Response absolute_url="/docs/django-instant-model/en/latest/index.html" ...>]
metadata CHANGED
@@ -1,105 +1,82 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tastyrb
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 0
9
- version: 0.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Dan Drinkard
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-07-18 00:00:00 -04:00
12
+ date: 2011-07-18 00:00:00.000000000 -04:00
18
13
  default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: hashie
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 2
30
- - 0
17
+ requirement: &70239673552700 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
31
22
  version: 0.2.0
32
23
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: httparty
36
24
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- - 5
44
- - 2
25
+ version_requirements: *70239673552700
26
+ - !ruby/object:Gem::Dependency
27
+ name: httparty
28
+ requirement: &70239673552140 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
45
33
  version: 0.5.2
46
34
  type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: json
50
35
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 1
57
- - 1
58
- - 3
36
+ version_requirements: *70239673552140
37
+ - !ruby/object:Gem::Dependency
38
+ name: json
39
+ requirement: &70239673551620 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
59
44
  version: 1.1.3
60
45
  type: :runtime
61
- version_requirements: *id003
46
+ prerelease: false
47
+ version_requirements: *70239673551620
62
48
  description: Generic client for self-describing APIs built with django-tastypie.
63
49
  email: dan.drinkard@gmail.com
64
50
  executables: []
65
-
66
51
  extensions: []
67
-
68
52
  extra_rdoc_files: []
69
-
70
- files:
53
+ files:
71
54
  - lib/tastyrb.rb
72
55
  - README.md
73
56
  - LICENSE
74
57
  has_rdoc: true
75
58
  homepage: http://github.com/dandrinkard/tastyrb/
76
59
  licenses: []
77
-
78
60
  post_install_message:
79
61
  rdoc_options: []
80
-
81
- require_paths:
62
+ require_paths:
82
63
  - lib
83
- required_ruby_version: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
- version: "0"
90
- required_rubygems_version: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- segments:
95
- - 0
96
- version: "0"
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
97
76
  requirements: []
98
-
99
77
  rubyforge_project:
100
- rubygems_version: 1.3.6
78
+ rubygems_version: 1.6.2
101
79
  signing_key:
102
80
  specification_version: 3
103
81
  summary: Generic client for self-describing APIs built with django-tastypie.
104
82
  test_files: []
105
-