grape-swagger-entity 0.2.0 → 0.2.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: 25f852e7a159a5e8c626e7fcfdd63c7b9e566674
4
- data.tar.gz: f060d4e451f67a8a69f53ee9a013f969f0990259
3
+ metadata.gz: '029fa174a6e8b862a95e41092e5eb3f88620d55c'
4
+ data.tar.gz: e319381ef0cb0e125d838ec535ba7f76961c10b8
5
5
  SHA512:
6
- metadata.gz: 04652f20c5c6e885a787735d491260cab5343e2fb422907eea80da9463a866135a4435caf6a4c1b0f36365a150337dd7fdc6051de9439748b4bbeb0b0e28bf36
7
- data.tar.gz: cd2f8375cbb8bb4d3200f22c8382384b8207e89ccca1324a207f9595f8f8b4bff7db7628f542e86e22ffe239f5aa50a4eb0439a002801db3ad62fdda9d7b397a
6
+ metadata.gz: c9be3808f26f6024559d88b9ba1824ec4be407a8d79ae1dc78117ceb565b6a5fddf8fd45683977be26a2fe65a490f80d58610c63a3f88f4d31c135b18630a2f4
7
+ data.tar.gz: a9bfcc5f55b02133f4f6ffa3bc17c57285ddb957ee839d68fc1f9c42e030be9e8f38cb5c597d2d7dca9916d865b17992cfabd23e06df5d0c11fbc6ae12198c2b
data/.rubocop.yml CHANGED
@@ -16,5 +16,8 @@ Metrics/MethodLength:
16
16
  Exclude:
17
17
  - spec/**/*
18
18
 
19
+ Style/FileName:
20
+ Enabled: false
21
+
19
22
  Style/IndentHash:
20
23
  EnforcedStyle: consistent
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2017-02-26 22:17:25 +0200 using RuboCop version 0.47.1.
3
+ # on 2017-07-03 22:59:40 +0300 using RuboCop version 0.49.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -8,16 +8,21 @@
8
8
 
9
9
  # Offense count: 2
10
10
  Metrics/AbcSize:
11
- Max: 35
11
+ Max: 40
12
+
13
+ # Offense count: 1
14
+ # Configuration parameters: CountComments, ExcludedMethods.
15
+ Metrics/BlockLength:
16
+ Max: 27
12
17
 
13
18
  # Offense count: 1
14
19
  # Configuration parameters: CountComments.
15
20
  Metrics/ClassLength:
16
- Max: 126
21
+ Max: 124
17
22
 
18
23
  # Offense count: 1
19
24
  Metrics/CyclomaticComplexity:
20
- Max: 14
25
+ Max: 15
21
26
 
22
27
  # Offense count: 14
23
28
  # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
@@ -28,22 +33,16 @@ Metrics/LineLength:
28
33
  # Offense count: 3
29
34
  # Configuration parameters: CountComments.
30
35
  Metrics/MethodLength:
31
- Max: 27
36
+ Max: 30
32
37
 
33
38
  # Offense count: 2
34
39
  Metrics/PerceivedComplexity:
35
- Max: 15
40
+ Max: 16
36
41
 
37
42
  # Offense count: 2
38
43
  Style/Documentation:
39
44
  Exclude:
40
45
  - 'spec/**/*'
46
+ - 'test/**/*'
41
47
  - 'lib/grape-swagger/entity.rb'
42
48
  - 'lib/grape-swagger/entity/parser.rb'
43
-
44
- # Offense count: 1
45
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
46
- # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
47
- Style/FileName:
48
- Exclude:
49
- - 'lib/grape-swagger-entity.rb'
data/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@
8
8
 
9
9
  * Your contribution here.
10
10
 
11
+ ### 0.2.1 (Jule 5, 2017)
12
+
13
+ #### Features
14
+
15
+ * [#26](https://github.com/ruby-grape/grape-swagger-entity/pull/26): Add support for read only field - [@FChaack](https://github.com/FChaack).
16
+
11
17
  ### 0.2.0 (March 2, 2017)
12
18
 
13
19
  #### Features
data/Gemfile CHANGED
@@ -13,7 +13,7 @@ group :development, :test do
13
13
  gem 'rake'
14
14
  gem 'rdoc'
15
15
  gem 'rspec', '~> 3.0'
16
- gem 'rubocop', '~> 0.46'
16
+ gem 'rubocop', '~> 0.48'
17
17
  end
18
18
 
19
19
  group :test do
data/Rakefile CHANGED
@@ -15,4 +15,4 @@ RSpec::Core::RakeTask.new(:spec)
15
15
  require 'rubocop/rake_task'
16
16
  RuboCop::RakeTask.new(:rubocop)
17
17
 
18
- task default: [:spec, :rubocop]
18
+ task default: %i[spec rubocop]
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'grape-swagger/entity/version'
@@ -52,7 +52,10 @@ module GrapeSwagger
52
52
  end
53
53
  end
54
54
 
55
- memo[entity_name][:description] = documentation[:desc] if documentation && documentation[:desc]
55
+ if documentation
56
+ memo[entity_name][:read_only] = documentation[:read_only].to_s == 'true' if documentation[:read_only]
57
+ memo[entity_name][:description] = documentation[:desc] if documentation[:desc]
58
+ end
56
59
  end
57
60
  end
58
61
 
@@ -1,5 +1,5 @@
1
1
  module GrapeSwagger
2
2
  module Entity
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger-entity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Zaitsev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-02 00:00:00.000000000 Z
11
+ date: 2017-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape-swagger
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  requirements: []
85
85
  rubyforge_project:
86
- rubygems_version: 2.5.1
86
+ rubygems_version: 2.5.2
87
87
  signing_key:
88
88
  specification_version: 4
89
89
  summary: Grape swagger adapter to support grape-entity object parsing