Skip to content

Commit

Permalink
Merge branch 'master' into jsonapi_links_support
Browse files Browse the repository at this point in the history
* master: (170 commits)
  Comment private accessor warnings
  Distinguish options ivar from local; Extract latent Adapter::CachedSerializer
  Fix or skip appveyor failure on cache expiration
  Fixing the travis build svg to amster
  updating version to new release
  Remove duplicate test helper
  outside controller use tutorial
  rubocop-fixes
  Remove unnecessary parentheses accidentally reintroduced in rails-api#1017.
  Remove legacy method accidentally reintroduced in rails-api#1017.
  Update README with nested included association example.
  Split `serializable_hash` into two methods.
  Refactor `add_links` in JSONAPI adapter.
  Fix Markdown to adapters documentation
  Extended format for JSONAPI `include` option.
  Updating wording on cache expiry in README
  Fix typo in fieldset exception
  Fixed indentation in readme under 'using without render'
  Documentation for serializing resources without render
  Get rid of unnecessary instance variables, and implied dependencies.
  ...

Conflicts:
	lib/active_model/serializer/adapter/json_api.rb
  • Loading branch information
andrewle committed Sep 17, 2015
2 parents ed5d507 + ee40e9f commit e550675
Show file tree
Hide file tree
Showing 104 changed files with 4,160 additions and 1,392 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.config
.yardoc
Gemfile.lock
Gemfile.local
InstalledFiles
_yardoc
coverage
Expand All @@ -19,3 +20,4 @@ test/version_tmp
tmp
*.swp
.ruby-version
.ruby-gemset
82 changes: 82 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
inherit_from: .rubocop_todo.yml

AllCops:
Exclude:
- config/initializers/forbidden_yaml.rb
- !ruby/regexp /(vendor|bundle|bin|db|tmp)\/.*/
RunRailsCops: true
DisplayCopNames: true
DisplayStyleGuide: true

Style/IndentationConsistency:
Exclude:
- lib/active_model/serializer/adapter/flatten_json.rb
- lib/active_model/serializer/adapter/fragment_cache.rb
- lib/active_model/serializer/adapter/json.rb
- lib/active_model/serializer/adapter/json/fragment_cache.rb
- lib/active_model/serializer/adapter/json_api.rb
- lib/active_model/serializer/adapter/json_api/fragment_cache.rb
- lib/active_model/serializer/adapter/json_api/pagination_links.rb
- lib/active_model/serializer/adapter/null.rb

Style/IndentationWidth:
Exclude:
- lib/active_model/serializer/adapter/flatten_json.rb
- lib/active_model/serializer/adapter/fragment_cache.rb
- lib/active_model/serializer/adapter/json.rb
- lib/active_model/serializer/adapter/json/fragment_cache.rb
- lib/active_model/serializer/adapter/json_api.rb
- lib/active_model/serializer/adapter/json_api/fragment_cache.rb
- lib/active_model/serializer/adapter/json_api/pagination_links.rb
- lib/active_model/serializer/adapter/null.rb

Style/AccessModifierIndentation:
Exclude:
- lib/active_model/serializer/adapter/flatten_json.rb
- lib/active_model/serializer/adapter/fragment_cache.rb
- lib/active_model/serializer/adapter/json.rb
- lib/active_model/serializer/adapter/json/fragment_cache.rb
- lib/active_model/serializer/adapter/json_api.rb
- lib/active_model/serializer/adapter/json_api/fragment_cache.rb
- lib/active_model/serializer/adapter/json_api/pagination_links.rb
- lib/active_model/serializer/adapter/null.rb

Lint/NestedMethodDefinition:
Enabled: false
Exclude:
- test/action_controller/serialization_test.rb

Style/StringLiterals:
EnforcedStyle: single_quotes

Metrics/AbcSize:
Max: 35 # TODO: Lower to 15

Metrics/ClassLength:
Max: 261 # TODO: Lower to 100
Exclude:
- test/**/*.rb

Metrics/CyclomaticComplexity:
Max: 7 # TODO: Lower to 6

Metrics/LineLength:
Max: 251 # TODO: Lower to 80

Metrics/MethodLength:
Max: 106 # TODO: Lower to 10

Metrics/PerceivedComplexity:
Max: 9 # TODO: Lower to 7

Style/AlignParameters:
EnforcedStyle: with_fixed_indentation

Style/ClassAndModuleChildren:
EnforcedStyle: compact

Style/Documentation:
Enabled: false

Style/MultilineOperationIndentation:
EnforcedStyle: indented
Loading

0 comments on commit e550675

Please sign in to comment.