These are chat archives for rebelidealist/stripe-ruby-mock

6th
Jun 2015
kathyonu
@kathyonu
Jun 06 2015 03:13
pinging .. still looking for developer help ?
Gilbert
@gilbert
Jun 06 2015 03:14
@kathyonu Yup, we could always use help
kathyonu
@kathyonu
Jun 06 2015 03:17
i am about to send a response to Issue # 235. i would be happy to adjust the page itself, and work with you to upgrade the guides as needed, and anything else i can do or learn to do.
Gilbert
@gilbert
Jun 06 2015 03:19
sure
I wouldn't want to remove RSpec 2.x (many still use it), but I'll be happy to accept a pull request that adds example code for RSpec 3.x
kathyonu
@kathyonu
Jun 06 2015 03:21
Take a look at my note on #235 just sent. You will see how I acccount for keeping 2.x in the note ..
Gilbert
@gilbert
Jun 06 2015 03:22
oh, is rules compatible with RSpec 2.x too?
kathyonu
@kathyonu
Jun 06 2015 03:22
I also adusted the code a bit using the logger, and it ready for your cut and paste, and now .. I see it should be an addition for 3.x and beyond because 'keys' works in 2.x ??
too funny, we ask same question, backwards. i do not know if keys works in 2.x : I have never been able to get keys to work in RSpec. i do now know that rules works, in 3.x
kathyonu
@kathyonu
Jun 06 2015 03:39
i have a new fork and am ready to make the change, and send you the PR, but .. does keys work in 2.x ?? does keys have to be kept ?
Gilbert
@gilbert
Jun 06 2015 03:40
keys does work in 2.x
kathyonu
@kathyonu
Jun 06 2015 03:41
okay, so i will make the change, and give both examples
kathyonu
@kathyonu
Jun 06 2015 03:57
just sent you the PR.
kathyonu
@kathyonu
Jun 06 2015 04:34
added an instructions note to the code for rails_helper.rb file so developer knows
also restored your original live tests note, sorry bout that. feel free to keep either.
Gilbert
@gilbert
Jun 06 2015 04:52
@kathyonu RSpec 3 is not tied to Rails
kathyonu
@kathyonu
Jun 06 2015 04:54
what does that mean, in terms of what i have sent ?
Gilbert
@gilbert
Jun 06 2015 04:54
I think a good solution would be to duplicate the code example to right below it, and add comments for rspec 2.x and 3.x
you mentioned spec/rails_helper.rb, but that's not rspec nor stripe-ruby-mock specific
kathyonu
@kathyonu
Jun 06 2015 04:55
do i need to remove any line(s) ??
ah, oka
i shall remove it, okay ?
Gilbert
@gilbert
Jun 06 2015 04:56
# RSpec 3.x
RSpec.configure do |c|
  if config.filter_manager.inclusions.rules.include?(:live)
    StripeMock.toggle_live(true)
    puts "Running **live** tests against Stripe..."
  end
end

# RSpec 2.x
RSpec.configure do |c|
  if c.filter_manager.inclusions.keys.include?(:live)
    StripeMock.toggle_live(true)
    puts "Running **live** tests against Stripe..."
  end
end
like that
kathyonu
@kathyonu
Jun 06 2015 05:07
done PR changed and changes also made in rebelidealist/stripe-ruby-mock#235
kathyonu
@kathyonu
Jun 06 2015 05:15
one more adjustment coming in the PR just now
kathyonu
@kathyonu
Jun 06 2015 05:40
squashing ..
kathyonu
@kathyonu
Jun 06 2015 05:46
can you please advise, i am studying how to do so, and run into this : "Note: do not squash commits that you’ve already shared with others. You’re changing history and it will cause trouble for others."
that being said, apparently, I can squash the 4 commits together with this command : git rebase -i HEAD~4
Gilbert
@gilbert
Jun 06 2015 05:47
that's true if you're pushing to a main branch like master, but it's ok to change history for feature branches (pull request branches)
kathyonu
@kathyonu
Jun 06 2015 05:47
okay, thank you
Gilbert
@gilbert
Jun 06 2015 05:47
you'll have to force push to your feature branch
kathyonu
@kathyonu
Jun 06 2015 05:48
okay ... one problem is, i did the work in my master.
Gilbert
@gilbert
Jun 06 2015 05:49
well, you should do a feature branch next time, but it's fine this time since no one else is working off your master branch
kathyonu
@kathyonu
Jun 06 2015 05:50
yes, my error. can you do the PR ? do I need to do anything ?
git rebase -i HEAD~4 didn't cut it, won't work.
Alexander Mamonchik
@alexmamonchik
Jun 06 2015 05:59
you can try git reset --soft HEAD~4 and commit again
when you did reset you can do git checkout -b new-branch -m
and send pull request from feature branch
kathyonu
@kathyonu
Jun 06 2015 06:03
i ran the commit on the master and it works, then git status shows :
git status
On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 4 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working directory clean
Alexander Mamonchik
@alexmamonchik
Jun 06 2015 06:04
and force push to your master
kathyonu
@kathyonu
Jun 06 2015 06:05
thank you, done
Alexander Mamonchik
@alexmamonchik
Jun 06 2015 06:06
now you have 6 commits
kathyonu
@kathyonu
Jun 06 2015 06:07
i thought that would fix it.
not sure what to do at this point, except .. start it over on a new branch.
so, feel free to close out my current PR. i will send a new singular commit o a new branch.
kathyonu
@kathyonu
Jun 06 2015 06:16
i am striking out .. i now see the rails_helper is still in the code !!! on the recent new branch PR.
please close out my PR's, and I will do this fresh, in the morning.
Alexander Mamonchik
@alexmamonchik
Jun 06 2015 06:17
you can cancel your PR
kathyonu
@kathyonu
Jun 06 2015 06:17
i can ? holy cow !!! news to me !! i will look to see how so ..
i do not see how, please advise.
Alexander Mamonchik
@alexmamonchik
Jun 06 2015 06:19
kathyonu
@kathyonu
Jun 06 2015 06:20
thank you
that was easy, i will retry a new clean PR now
kathyonu
@kathyonu
Jun 06 2015 06:59
#239 looks good to me, look good to you ?
kathyonu
@kathyonu
Jun 06 2015 07:41
#239 merge looks good, thank you for your patiences. color me gone