codebase_api 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79d075117269e78c4fe0434b0a8f9791630e7efd
4
- data.tar.gz: fc9b20a4da9dac391e74b3787372a307e3c3e78d
3
+ metadata.gz: d7208f3f18df2644b3898b69d9a8861c00e9af32
4
+ data.tar.gz: e56577955414b9dfa0946e28960a671f98570eb6
5
5
  SHA512:
6
- metadata.gz: 10bd0313a8d5f573d759efcec2e1ff00156dd2789f83bd214d92fc92a5e3992c2ec84866ab684876cf2bb969fc1f663df902f8e361ab178e7c3c0f15322a8c78
7
- data.tar.gz: 558ae71bae29cdacfbbeaf8dfab65e24a656d1c33420688dad2cd665e795b03c4901fac27c4189fefc961894c7dccac5bad032cab25c9ace75baa2de26823276
6
+ metadata.gz: c199c26478fc4fd804b9c9f973a17ef3b1eacfb2cbc2c36d5b49055f91261dec6b1b66972de37ea3b7e3f6abf0cc2bc588fab57a493057635e421b8007a3aade
7
+ data.tar.gz: 7d13cd7bca41cacb529b57957f57c31c1c6cc2beb8e019ae22c502d7c78d26e0f35834b94e44d4860c17dac58260708a3b05ee910ad8f56a0162b3f704b3d624
data/README.md CHANGED
@@ -16,6 +16,22 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install codebase_api
18
18
 
19
+
20
+ ## Changelog
21
+
22
+ ### 0.1.2
23
+
24
+ - Fixed JSON parsing error when viewing files
25
+
26
+ ### 0.1.1
27
+
28
+ - Fixed issue when using the gem with non Rails apps
29
+ - Output false when 404
30
+
31
+ ### 0.1.0
32
+
33
+ - Public release
34
+
19
35
  ## Usage
20
36
 
21
37
  The Codebase API requires authentication using your account name & username along with your API Key.
@@ -10,12 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["dean@deanperry.net"]
11
11
  gem.description = %q{Ruby gem for accessing the Codebase API}
12
12
  gem.summary = %q{Codebase API Ruby Gem}
13
- gem.homepage = ""
14
13
 
15
14
  gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
15
  gem.require_paths = ["lib"]
19
-
20
- gem.add_runtime_dependency "colorize"
21
16
  end
@@ -44,7 +44,16 @@ module CodebaseApi
44
44
  elsif http_result.body == 'false'
45
45
  @output = false
46
46
  else
47
- !http_result.body.empty? ? @output = JSON.parse(http_result.body) : @output
47
+ if !http_result.body.empty?
48
+ # render the output if it's a blob
49
+ if /\/blob\//.match(uri.request_uri).nil?
50
+ @output = JSON.parse(http_result.body)
51
+ else
52
+ @output = http_result.body
53
+ end
54
+ else
55
+ @output
56
+ end
48
57
  end
49
58
  @success = case http_result
50
59
  when Net::HTTPSuccess
@@ -1,3 +1,3 @@
1
1
  module CodebaseApi
2
- VERSION = "0.1.1"
3
- end
2
+ VERSION = "0.1.2"
3
+ end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebase_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Perry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-13 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: colorize
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
11
+ date: 2015-07-08 00:00:00.000000000 Z
12
+ dependencies: []
27
13
  description: Ruby gem for accessing the Codebase API
28
14
  email:
29
15
  - dean@deanperry.net
@@ -53,7 +39,7 @@ files:
53
39
  - lib/codebase_api/user.rb
54
40
  - lib/codebase_api/version.rb
55
41
  - lib/codebase_api/wiki.rb
56
- homepage: ''
42
+ homepage:
57
43
  licenses: []
58
44
  metadata: {}
59
45
  post_install_message: