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

Ruby client #2

Closed
Stelian opened this issue Jan 28, 2015 · 19 comments · Fixed by #4
Closed

Ruby client #2

Stelian opened this issue Jan 28, 2015 · 19 comments · Fixed by #4

Comments

@Stelian
Copy link
Contributor

Stelian commented Jan 28, 2015

As far as I've seen there is only a php and a python client but no ruby. Can we have a ruby client please?

@simicic
Copy link

simicic commented Jan 28, 2015

Will come! ;) Now, let's see who makes it first!

@rosstuck
Copy link
Contributor

popcorn

Stelian's got 6 hours of meetings today, so advantage is yours, @simicic!

@Stelian
Copy link
Contributor Author

Stelian commented Jan 28, 2015

@simicic you have a small heads up, but the war ain't over!

@simicic
Copy link

simicic commented Jan 28, 2015

haha, then the good news can be that I work as well, maybe someone else can come in!

@rosstuck
Copy link
Contributor

There's no rule that says we can't have multiple rafflers in the same language. That would even be fun.

There's also no rule that says a dog can't play basketball.
air bud

@janpaul
Copy link

janpaul commented Jan 28, 2015

File.readlines($1).sample

or

# with error handling ;-)
File.readlines($1).sample if $1

@rosstuck
Copy link
Contributor

whaaa

Seriously though, PR? :) And then no more GIFs for me today, I promise.

@janpaul
Copy link

janpaul commented Jan 28, 2015

I will leave that for @simicic . She probably wants to write a spec too ;-)

@simicic
Copy link

simicic commented Jan 28, 2015

haha, @janpaul believe it or not, that was my first thought, there should be some tests!! 😄 it seems you know me well...

@janpaul
Copy link

janpaul commented Jan 28, 2015

@simicic oh I absolutely believe it! I've known you a bit longer than today ;-)

@Stelian
Copy link
Contributor Author

Stelian commented Jan 28, 2015

/me points at #4

@janpaul
Copy link

janpaul commented Jan 28, 2015

@Stelian here you go ;-)

File.readlines($1).sample if $1 && File.exists?($1)

@simicic
Copy link

simicic commented Jan 28, 2015

oh no! where are the tests @Stelian ?? 😄

@Stelian
Copy link
Contributor Author

Stelian commented Jan 28, 2015

I just ... /me walks away

@janpaul
Copy link

janpaul commented Jan 28, 2015

@simicic another shorty for you then

describe Raffle do
  let(:raffle) { Raffle.new } 
  it 'should be something sensible' do
    allow(File).to receive(:readlines).and_return %w(foobar)
    expect(raffle.run).to eq 'foobar'
  end
end

@simicic
Copy link

simicic commented Jan 28, 2015

I am sorry @janpaul but this does not guarantee randomness, foobar could be my name ;)
you forgot one should have_received :sample ;)

@janpaul
Copy link

janpaul commented Jan 28, 2015

@simicic pffft

@rosstuck rosstuck reopened this Jan 28, 2015
@rosstuck
Copy link
Contributor

Reopening until we have a Ruby raffler with raffler with drama!

@ramondelafuente
Copy link
Contributor

I wonder if I should try... does Ruby have any functions that start with "array_" ?

lucasvanlierop pushed a commit that referenced this issue May 12, 2015
Merge domcode master into mine
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 a pull request may close this issue.

6 participants