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

Fixes/ruby 2 2 syntax error #14

Closed
wants to merge 8 commits into from

Conversation

etagwerker
Copy link
Contributor

Hey @jnraine,

This is an attempt to fix #13. Unfortunately it seems that it will generate a spec failure:

$ bundle exec rspec spec

DeprecationTracker
  #add
    groups messages by bucket
    ignores messages when bucket null
    transforms messages before adding them
  #compare
    ignores buckets that have no messages
    raises an error when recorded messages are different for a given bucket
  #save
    saves to disk
    combines recorded and stored messages
    overwrites stored messages with recorded messages with the same bucket
    sorts by bucket
    sorts messages
  DeprecationTracker::KernelWarnTracker
    captures Kernel#warn (FAILED - 1)
    captures Kernel.warn (FAILED - 2)

TenYearsRails
  has a version number

Failures:

  1) DeprecationTracker DeprecationTracker::KernelWarnTracker captures Kernel#warn
     Failure/Error: expect(warn_messages).to eq(["oh", "no"])

       expected: ["oh", "no"]
            got: []

       (compared using ==)
     # ./spec/deprecation_tracker_spec.rb:206:in `block (3 levels) in <top (required)>'

  2) DeprecationTracker DeprecationTracker::KernelWarnTracker captures Kernel.warn
     Failure/Error: expect(warn_messages).to eq(["oh", "no"])

       expected: ["oh", "no"]
            got: []

       (compared using ==)
     # ./spec/deprecation_tracker_spec.rb:218:in `block (3 levels) in <top (required)>'

Finished in 0.04994 seconds (files took 0.24047 seconds to load)
13 examples, 2 failures

Failed examples:

rspec ./spec/deprecation_tracker_spec.rb:197 # DeprecationTracker DeprecationTracker::KernelWarnTracker captures Kernel#warn
rspec ./spec/deprecation_tracker_spec.rb:209 # DeprecationTracker DeprecationTracker::KernelWarnTracker captures Kernel.warn

I'm not sure what's the best way to fix that issue. It's probably related to dropping activesupport as a dependency. Any thoughts about that?

Thanks!

@etagwerker
Copy link
Contributor Author

@jnraine thanks for your help! I just pushed the changes we worked on. Let me know if there is anything else that could be improved. 👍

@etagwerker
Copy link
Contributor Author

@jnraine just a gently reminder about this PR, do you think this is good to go? 😄

@etagwerker
Copy link
Contributor Author

@jnraine I had missed a couple of problems (like using named parameters) -- I just pushed a couple more changes to fix problems running this gem with older ruby versions.

@mctaylorpants
Copy link
Contributor

Closing; see #17 (comment) for more context.

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.

SyntaxError with Ruby 2.2.10
2 participants