grape-apiary 0.1.0 → 0.1.1

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: af6793664c67c149446b22cc641327ae4befe6b3
4
- data.tar.gz: 8dc668050c54078a9c011b59a3d0ee41928ae3a5
3
+ metadata.gz: a7392f7859d48b22a26462122e44732faafd1394
4
+ data.tar.gz: 4ce08e233fe165f7d3d3099d65595f57031897e8
5
5
  SHA512:
6
- metadata.gz: 31e332776b5469706fc694d0310222c842b474b699fe065a56c51673e6e7ab5919480d666218984a595cfd43113a5616e52188a58b6908837035a97aced82f2b
7
- data.tar.gz: ff66609f82ed054e6e9e7eb26c7f301cb63296ffe3f41931f4efa050557af2109fbecdc9ff7a0cfe3f44207981ee8f7003ae3156260a0d5199b06c112f9d386e
6
+ metadata.gz: 96a8b45ddc939908fae953560905bb18964e57aed7d5bf32f30d889061f521c5d346c25343063aaba64c281f9e17bcaf43e69d26c75096d8cd14b2477e926d74
7
+ data.tar.gz: 179fb681a38be1b2b56f5710bccfecfcb98da13e00ea47dabc2fb125ed71f1a544598020c1775978f0f4229c53bb2835ec08b2083de270cb915df0361d5285b3
@@ -5,6 +5,5 @@ rvm:
5
5
  - 2.2.4
6
6
  - 2.1.8
7
7
  - jruby
8
- addons:
9
- code_climate:
10
- repo_token: acf391ea515caa468e74c55532dddebed1e1d32b235bee0845e04700e8c634aa
8
+ env:
9
+ - CODECLIMATE_REPO_TOKEN=7522ea83858a08d70747c1f5fb0593502ca0e43c18b6a124dbeb72a0b0e78262
@@ -2,6 +2,10 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ ## 0.1.1 (2016-01-25)
6
+ #### Fixes
7
+ - [PR #8](https://github.com/technekes/grape-apiary/pull/8) - Handle mixed keys (symbol/string) in params [@jallen3d](https://github.com/johnallen3d).
8
+
5
9
  ## 0.1.0 (2016-01-25)
6
10
  #### Features
7
11
  - [PR #5](https://github.com/technekes/grape-apiary/pull/5) - Rake task persists docs to disk from [@bigfleet](https://github.com/bigfleet).
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # GrapeApiary
2
2
 
3
- [![Code Climate](https://codeclimate.com/github/technekes/grape-apiary.png)](https://codeclimate.com/github/connexio-labs/grape-apiary)
4
- [![Build Status](https://travis-ci.org/technekes/grape-apiary.png?branch=master)](https://travis-ci.org/connexio-labs/grape-apiary)
5
- [![Coverage Status](https://coveralls.io/repos/technekes/grape-apiary/badge.png)](https://coveralls.io/r/connexio-labs/grape-apiary)
3
+ [![Code Climate](https://codeclimate.com/github/technekes/grape-apiary/badges/gpa.svg)](https://codeclimate.com/github/technekes/grape-apiary)
4
+ [![Build Status](https://travis-ci.org/technekes/grape-apiary.svg?branch=master)](https://travis-ci.org/technekes/grape-apiary)
5
+ [![Test Coverage](https://codeclimate.com/github/technekes/grape-apiary/badges/coverage.svg)](https://codeclimate.com/github/technekes/grape-apiary/coverage)
6
6
  [![Dependency Status](https://gemnasium.com/technekes/grape-apiary.png)](https://gemnasium.com/connexio-labs/grape-apiary)
7
7
  [![Gem Version](https://badge.fury.io/rb/grape-apiary.png)](http://badge.fury.io/rb/grape-apiary)
8
8
 
@@ -28,11 +28,11 @@ Gem::Specification.new do |spec|
28
28
  spec.add_runtime_dependency 'grape', '~> 0.14'
29
29
  spec.add_runtime_dependency 'activesupport'
30
30
 
31
- spec.add_development_dependency 'coveralls', '~> 0.7'
31
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
32
32
  spec.add_development_dependency 'rspec', '~> 2.14'
33
33
  spec.add_development_dependency 'bundler', '~> 1.5'
34
34
  spec.add_development_dependency 'rake', '~> 10.0'
35
- spec.add_development_dependency 'rubocop', '~> 0.36'
35
+ spec.add_development_dependency 'rubocop', '>= 0.37', '< 1.0'
36
36
  spec.add_development_dependency 'pry', '~> 0.9'
37
37
  spec.add_development_dependency 'guard', '~> 2.4'
38
38
  spec.add_development_dependency 'guard-rspec', '~> 4.2'
@@ -15,7 +15,7 @@ module GrapeApiary
15
15
  end
16
16
 
17
17
  def write
18
- fail 'Not yet supported'
18
+ raise 'Not yet supported'
19
19
  end
20
20
 
21
21
  def routes
@@ -35,10 +35,10 @@ module GrapeApiary
35
35
  end
36
36
 
37
37
  def example_id_type=(value)
38
- fail UnsupportedIDType unless supported_id_types.include?(value)
38
+ raise UnsupportedIDType unless supported_id_types.include?(value)
39
39
 
40
40
  if value.to_sym == :bson && !Object.const_defined?('BSON')
41
- fail BSONNotDefinied
41
+ raise BSONNotDefinied
42
42
  end
43
43
 
44
44
  @example_id_type = value
@@ -5,8 +5,10 @@ module GrapeApiary
5
5
  delegate :route_namespace, :route_path, :route_method, to: '__getobj__'
6
6
 
7
7
  def route_params
8
- @route_params ||= __getobj__.route_params.sort.map do |param|
9
- Parameter.new(self, *param)
8
+ @route_params ||= begin
9
+ __getobj__.route_params.stringify_keys.sort.map do |param|
10
+ Parameter.new(self, *param)
11
+ end
10
12
  end
11
13
  end
12
14
 
@@ -2,7 +2,7 @@ namespace :ga do
2
2
  desc 'Produce documentation'
3
3
  task docs: :environment do
4
4
  api = ENV['API'] || ARGV[1]
5
- fail 'You must provide the name of an API to document' if api.nil?
5
+ raise 'You must provide the name of an API to document' if api.nil?
6
6
  begin
7
7
  api_class = Object.const_get(api)
8
8
  api_docs = GrapeApiary::Blueprint.new(api_class).generate
@@ -1,5 +1,5 @@
1
1
  # Needed until support for v2.3+ https://goo.gl/DyKn74
2
2
  # frozen_string_literal: true
3
3
  module GrapeApiary
4
- VERSION = '0.1.0'.freeze
4
+ VERSION = '0.1.1'.freeze
5
5
  end
@@ -8,8 +8,8 @@ require 'rubygems'
8
8
  require 'bundler'
9
9
  Bundler.setup :default, :test
10
10
 
11
- require 'coveralls'
12
- Coveralls.wear!
11
+ require 'codeclimate-test-reporter'
12
+ CodeClimate::TestReporter.start
13
13
 
14
14
  require 'rspec'
15
15
  require 'pry'
@@ -10,12 +10,12 @@ class SampleApi < Grape::API
10
10
 
11
11
  desc 'create a widget'
12
12
  params do
13
- requires :name,
14
- type: 'string',
13
+ requires 'name',
14
+ type: String,
15
15
  desc: 'the widgets name',
16
16
  documentation: { example: 'super widget' }
17
17
  optional :description,
18
- type: 'string',
18
+ type: String,
19
19
  desc: 'the widgets name',
20
20
  documentation: { example: 'the best widget ever made' }
21
21
  end
@@ -24,8 +24,8 @@ class SampleApi < Grape::API
24
24
 
25
25
  desc 'update a widget'
26
26
  params do
27
- optional :name, type: 'string', desc: 'the widgets name'
28
- optional :description, type: 'string', desc: 'the widgets name'
27
+ optional :name, type: String, desc: 'the widgets name'
28
+ optional :description, type: String, desc: 'the widgets name'
29
29
  end
30
30
  put ':id' do
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-apiary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: coveralls
42
+ name: codeclimate-test-reporter
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.7'
47
+ version: '0.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.7'
54
+ version: '0.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +98,22 @@ dependencies:
98
98
  name: rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0.37'
104
+ - - "<"
102
105
  - !ruby/object:Gem::Version
103
- version: '0.36'
106
+ version: '1.0'
104
107
  type: :development
105
108
  prerelease: false
106
109
  version_requirements: !ruby/object:Gem::Requirement
107
110
  requirements:
108
- - - "~>"
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: '0.37'
114
+ - - "<"
109
115
  - !ruby/object:Gem::Version
110
- version: '0.36'
116
+ version: '1.0'
111
117
  - !ruby/object:Gem::Dependency
112
118
  name: pry
113
119
  requirement: !ruby/object:Gem::Requirement
@@ -226,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
232
  version: '0'
227
233
  requirements: []
228
234
  rubyforge_project:
229
- rubygems_version: 2.5.1
235
+ rubygems_version: 2.6.3
230
236
  signing_key:
231
237
  specification_version: 4
232
238
  summary: Allows for generating an Apiary Blueprint for you Grape API