github_api 0.5.0.rc1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -63,7 +63,7 @@ or use convenience method:
63
63
  github = Github.new basic_auth: 'login:password'
64
64
  ```
65
65
 
66
- You can interact with GitHub interface, for example repositories, by issueing following calls that correspond directly to the GitHub API hierarchy
66
+ You can interact with GitHub interface, for example repositories, by issuing following calls that correspond directly to the GitHub API hierarchy
67
67
 
68
68
  ```ruby
69
69
  github.repos.commits.all 'user-name', 'repo-name'
@@ -137,8 +137,8 @@ github = Github.new
137
137
  github.git_data.trees.get 'peter-murach', 'github', 'c18647b75d72f19c1e0cc8af031e5d833b7f12ea'
138
138
  # => gets a tree
139
139
 
140
- github.git_data.trees.get 'peter-murach', 'github', 'c18647b75d72f19c1e0cc8af031e5d833b7f12ea', recursive: true
141
- # => gets a whole tree recursively
140
+ github.git_data.trees.get 'peter-murach', 'github', 'c18647b75d72f19c1e0cc8af031e5d833b7f12ea',
141
+ recursive: true # => gets a whole tree recursively
142
142
  ```
143
143
 
144
144
  by passing a block you can iterate over the file tree
@@ -146,8 +146,7 @@ by passing a block you can iterate over the file tree
146
146
  ```ruby
147
147
  github.git_data.trees.get 'peter-murach', 'github', 'c18647b75d72f19c1e0cc8af031e5d833b7f12ea',
148
148
  recursive: true do |file|
149
-
150
- puts file.path
149
+ puts file.path
151
150
  end
152
151
  ```
153
152
 
@@ -218,7 +217,7 @@ Github.new(:basic_auth => 'login:password')
218
217
 
219
218
  All parameters can be overwirtten as per method call. By passing parameters hash...
220
219
 
221
- ## Stack
220
+ ## Stack(work in progress)
222
221
 
223
222
  By default the `github_api` gem will use the default middleware stack. However, a simple DSL is provided to create a custom stack, for instance:
224
223
 
@@ -7,7 +7,11 @@ module Github
7
7
  dependency 'multi_json'
8
8
 
9
9
  define_parser do |body|
10
- ::MultiJson.load body
10
+ if MultiJson.respond_to?(:load)
11
+ MultiJson.load body
12
+ else
13
+ MultiJson.decode body
14
+ end
11
15
  end
12
16
 
13
17
  def parse(body)
@@ -5,8 +5,8 @@ module Github
5
5
  MAJOR = 0
6
6
  MINOR = 5
7
7
  PATCH = 0
8
- BUILD = 'rc1'
8
+ BUILD = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.');
11
11
  end
12
- end
12
+ end # Github
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_api
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 0.5.0.rc1
4
+ prerelease:
5
+ version: 0.5.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Piotr Murach
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-04-28 00:00:00 +01:00
13
+ date: 2012-04-29 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -459,14 +459,15 @@ licenses: []
459
459
 
460
460
  post_install_message: "\n\
461
461
  --------------------------------------------------------------------------------\n\
462
- Thank you for installing github_api-0.5.0.rc1.\n\n\
462
+ Thank you for installing github_api-0.5.0.\n\n\
463
463
  *NOTE*: Version 0.5.0 introduces breaking changes to the way github api is queried.\n\
464
464
  The interface has been rewritten to be more consistent with REST verbs that\n\
465
465
  interact with GitHub hypermedia resources. Thus, to list resources 'list' or 'all'\n\
466
- verb is used, to retrieve individual resource 'get' or 'find' verbs are used.\n\
467
- Further CRUDE operations on all resources use preditable verbs as well.\n\n\
468
- Again sorry for inconvenience but I trust that this will help in easier access to\n\
469
- the GitHub API.\n\n\
466
+ verbs are used, to retrieve individual resource 'get' or 'find' verbs are used.\n\
467
+ Other CRUDE operations on all resources use preditable verbs as well, such as\n\
468
+ 'create', 'delete' etc...\n\n\
469
+ Again sorry for the inconvenience but I trust that this will help in easier access to\n\
470
+ the GitHub API and library .\n\n\
470
471
  For more information: http://rubydoc.info/github/peter-murach/github/master/frames\n\n\
471
472
  --------------------------------------------------------------------------------\n "
472
473
  rdoc_options: []
@@ -482,9 +483,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
482
483
  required_rubygems_version: !ruby/object:Gem::Requirement
483
484
  none: false
484
485
  requirements:
485
- - - ">"
486
+ - - ">="
486
487
  - !ruby/object:Gem::Version
487
- version: 1.3.1
488
+ version: "0"
488
489
  requirements: []
489
490
 
490
491
  rubyforge_project: