Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle Update on 2017-04-07 #113

Closed
wants to merge 2 commits into from
Closed

Conversation

deppbot
Copy link
Contributor

@deppbot deppbot commented Apr 7, 2017

Updated RubyGems:

--

Brought to you by deppbot - Automated Security and Dependency Updates
2 Pull Requests sent and 1 minute, and 21 seconds saved so far.

Feedback or Bug Reports? Please let us know via Email or GitHub Issues.

@colorbox
Copy link
Member

colorbox commented Apr 7, 2017

rubocop激おこ

app/controllers/order_items_controller.rb:4:40: C: Style/PercentLiteralDelimiters: %i-literals should be delimited by [ and ].
  before_action :set_order_item, only: %i(edit update destroy receive)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@colorbox
Copy link
Member

colorbox commented Apr 7, 2017

rubocopのバージョン上がったせいのようですね

@colorbox
Copy link
Member

colorbox commented Apr 7, 2017

0.48.1で加わったこれが原因みたい。
rubocop/rubocop#4039
ruby style guideに準拠させたとのこと

@colorbox
Copy link
Member

colorbox commented Apr 16, 2017

@colorbox
Copy link
Member

うーん、流石にこの書き方に文句言われるのはきっついな

Offenses:

app/models/order.rb:18:3: W: Lint/AmbiguousBlockAssociation: Parenthesize the param `-> {
    where('date >= ?', Time.current) \
      .limit(SHOW_COUNT) \
      .order(date: :asc) \
      .reject(&:closed?)
  } to make sure that the block will be associated with the ->` method call.
  scope :available, -> { ...
  ^^^^^^^^^^^^^^^^^^^^^^

@colorbox
Copy link
Member

こう書くと文句は言われないけど、不要な丸括弧を追加している感じで非常に嫌。

  scope :available, (-> {
    where('date >= ?', Time.current) \
      .limit(SHOW_COUNT) \
      .order(date: :asc) \
      .reject(&:closed?)
  }

@colorbox
Copy link
Member

rubocop/rubocop#4237

@colorbox
Copy link
Member

バグとして報告されているけど、rubocopの最新版に取り込まれていないのか。
このPRはcloseして、次のBundleUpdateを待つほうが良さそう。

@colorbox
Copy link
Member

一旦closeして次のbundle updateを待ちます。

@colorbox colorbox closed this Apr 21, 2017
@colorbox colorbox deleted the bundle-update-2017-04-07-211105 branch April 21, 2017 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants