<Iambchop>
marz_d`ghostman: ^ @db in the module definition is not the same as @db in the method definitions; [Foo.instance_variable_get(:@foo), qux.instance_variable_get(:@foo)] => ["42", nil]; note the different "self" in each location
Xenosine has quit [Quit: Leaving]
venmx has joined #ruby
millerti has joined #ruby
SeepingN has joined #ruby
<marz_d`ghostman>
Iambchop: Even though @db will only be dealt with by the module methods?
<marz_d`ghostman>
Iambchop: If so, can you recommend a good pattern on how to tackle this one.
<marz_d`ghostman>
Please disregard my first question, I see that @db will not be reachable from the instance that included the module. :)
polishdub has joined #ruby
blackswan has quit [Quit: Leaving.]
agent_white has joined #ruby
fredmorcos has joined #ruby
krawchyk has joined #ruby
Inline has joined #ruby
nowhere_man has quit [Ping timeout: 268 seconds]
keden has quit [Ping timeout: 272 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
rippa has joined #ruby
keden has joined #ruby
ElFerna has joined #ruby
conta has quit [Ping timeout: 268 seconds]
cd has quit [Quit: cd]
hutch has joined #ruby
prestorium has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
neuraload has quit [Quit: This computer has gone to sleep]
BH23 has quit [Ping timeout: 240 seconds]
_Joes_ has quit [Ping timeout: 245 seconds]
krawchyk has quit [Quit: krawchyk]
Burgestrand has quit [Quit: Closing time!]
krawchyk has joined #ruby
conta has joined #ruby
dbz has joined #ruby
krawchyk has quit [Client Quit]
GodFather has quit [Ping timeout: 250 seconds]
maufart__ has quit [Remote host closed the connection]
paranoicsan is now known as paranoicsan[Away
paranoicsan[Away has quit [Quit: paranoicsan[Away]
TomyWork has joined #ruby
Fr4n has quit [Ping timeout: 272 seconds]
ElFerna has joined #ruby
marz_d`ghostman has quit [Quit: Page closed]
<TomyWork>
hi, I'm trying to use redis-rb to listen to a pubsub channel. my program crashes with an exception whenever there's a connection loss. I notice there's a with_reconnect method in there, but I can't figure out whether it solves my issue because I don't know if I'm using it correctly
<TomyWork>
redis = Redis.new(host: redis_host); redis.with_reconnect do redis.subscribe(channel) do ...
<TomyWork>
should I just catch the exception and reconnect or is there a way for the library to do this for me?
paranoicsan has joined #ruby
ElFerna has quit [Client Quit]
ElFerna has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nchambers has joined #ruby
conta has quit [Quit: conta]
Fr4n has joined #ruby
nchambers has quit [Ping timeout: 245 seconds]
fredmorcos has quit [Remote host closed the connection]
clemens3 has quit [Ping timeout: 250 seconds]
blackswan has joined #ruby
krawchyk has joined #ruby
graphene has quit [Remote host closed the connection]
clemens3 has joined #ruby
graphene has joined #ruby
weaksauce has quit [Ping timeout: 272 seconds]
maryo has joined #ruby
darkhanb has joined #ruby
reber has quit [Remote host closed the connection]
Pascal is now known as r3m
ged has quit [Read error: Connection reset by peer]
fran__ has joined #ruby
Fr4n has quit [Ping timeout: 246 seconds]
ged has joined #ruby
lunarkitty7 has quit [Ping timeout: 268 seconds]
raulp has joined #ruby
cthulchu has joined #ruby
dbz has quit [Remote host closed the connection]
syndikate has quit [Ping timeout: 252 seconds]
syndikate has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
Guest61854 has quit [Ping timeout: 246 seconds]
Guest61854 has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
Guest61854 has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
paranoicsan has quit [Quit: paranoicsan]
ur5us has quit [Ping timeout: 250 seconds]
lunarkitty7 has joined #ruby
<cthulchu>
hey folks, I have a stupid question
<cthulchu>
I want to be able to require a file where I have a method described
keden has quit [Quit: WeeChat 2.3]
<cthulchu>
but I want to call this method without a need to reference it's class
<cthulchu>
I guess....
<cthulchu>
for that I'd have to define it as a global?
<cthulchu>
in that file
<cthulchu>
crap
<cthulchu>
I just don't want to use the class...
<cthulchu>
it's gonna be awkward and unneded
prestorium has quit [Ping timeout: 250 seconds]
TomyWork has quit [Ping timeout: 246 seconds]
ogres has joined #ruby
<cthulchu>
oh! I know!
<cthulchu>
Module Methods!
<cthulchu>
right folks?
<cthulchu>
still have to reference the method name thoufh
eckhardt has joined #ruby
<cthulchu>
well I think I can do the same
<cthulchu>
in classes: create class (static) methods instead of instance ones
<cthulchu>
yeah, there are a few awkward methods to make static methods, I find def self.putz the most elegant
blackswan has quit [Ping timeout: 250 seconds]
HailTheRobots has quit [Read error: Connection reset by peer]
maryo has quit [Ping timeout: 246 seconds]
HailTheRobots has joined #ruby
Puffball has joined #ruby
HailTheRobots has quit [Read error: Connection reset by peer]
weaksauce has joined #ruby
maryo has joined #ruby
blackswan has joined #ruby
maryo has quit [Ping timeout: 250 seconds]
hutch has quit [Ping timeout: 250 seconds]
hutch has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
sauvin has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
Aqo has joined #ruby
andrewray has joined #ruby
<andrewray>
I'm trying to put a nested gem in my project (subfolder with a gemspec), and i'm trying to run specs from the root of the project
<andrewray>
when i run the specs in the gem folder from root, rspec starts, but it complains when I try to provide a config option that comes from another rspec plugin gem
<andrewray>
and i'm not sure why it's not loading the rspec plugin when I run rspec from the root
hutch has quit [Ping timeout: 250 seconds]
<andrewray>
it's loading the .rspec file from the root, and executing the root's gemfile
mostlybadfly has quit [Quit: Connection closed for inactivity]
hutch has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
Hobbyboy has joined #ruby
Hobbyboy|BNC has quit [Read error: Connection reset by peer]
CrazyEddy has quit [Remote host closed the connection]
carbone5 has joined #ruby
conta has joined #ruby
desperek has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
Guest61854 has quit [Ping timeout: 250 seconds]
Guest61854 has joined #ruby
dviola has joined #ruby
Guest61854 has quit [Ping timeout: 250 seconds]
reber has joined #ruby
blackswan has quit [Ping timeout: 245 seconds]
carbone5 has quit [Ping timeout: 240 seconds]
andrewray has quit [Ping timeout: 256 seconds]
cow[moo] has joined #ruby
thither has joined #ruby
awkwords has joined #ruby
eckhardt has joined #ruby
ur5us has joined #ruby
andrewray has joined #ruby
venmx has joined #ruby
thither has quit [Ping timeout: 268 seconds]
SeepingN has joined #ruby
Guest61854 has joined #ruby
<andrewray>
test
<havenwood>
andrewray: #!> ArgumentError: wrong number of arguments (given 0, expected 2..3)
<cthulchu>
I have a weird case. would appreciate help
<havenwood>
cthulchu: What is it?
<cthulchu>
LParser.log_processor(log: comment, platform: @platofrm) at this point I'm sure the @platform is set and has value. I'm printing it
<cthulchu>
but inside log_processor, It becomes ""
<havenwood>
cthulchu: @platofrm?
donofrio has quit [Remote host closed the connection]
<rubydoc>
# => [1, :RUBY_EVENT_LINE, [:putself], [:putobject, :ryadv], [:opt_send_without_block, {:mid=>:puts, :fla ...check link for more (https://carc.in/#/r/5s9w)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<havenwood>
ryandv: no prob, you're welcome!
<andrewray>
I have a root level gems/ folder which contains gem source codes, including gemname.gemspec files
<andrewray>
when I try to run specs inside those folders, from the root level of the project (with rspec) - rspec executes, but an rspec dependency defined in the *root* level gemfile does not load
serard has joined #ruby
<andrewray>
and the rspec config fails to fully execute, blocking the test run. Does executing a spec (with bundle exec rspec gems/project/spec/my_spec.rb) from outside that folder, do something with gem context?
<andrewray>
the root level Gemfile is getting executed, including the `gem 'rspec-dependnecy'` line
<andrewray>
does having the child folder Gemfile do something different?
<havenwood>
andrewray: Typically a Gemfile in a gem will have a `gemspec` line, so a `bundle` will install deps from the gemspec. But the gemspec will not install deps from a Gemfile.
<cthulchu>
what's AST?
<havenwood>
andrewray: To resolve and install deps from the Gemfile, either `gem install -g /path/to/Gemfile` or use Bundler.
<havenwood>
cthulchu: Abstract Syntax Tree
<cthulchu>
wow
<cthulchu>
is it a data structure?
<cthulchu>
ah
<cthulchu>
I know what it is. Just forgot the name
<havenwood>
cthulchu: Languages often have an intermediary representation (IR) that can be something like an abstract syntax tree (AST) or a register transfer language (RTL) or a sea of nodes (OMGWTFBBQ).
<cthulchu>
ahahahahah
<havenwood>
cthulchu: TruffleRuby uses a sea of nodes. There's actually a fork of Ruby that Makarov is working on that changes the YARV AST to instead be RTL.
<andrewray>
havenwood: if my top level project has a Gemfile (but no gemspec) - can I execute code in a subfolder that has subfolder/Gemfile and subfolder/project.gemspec ?
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
ryandv has quit [Ping timeout: 240 seconds]
<havenwood>
andrewray: You can have Gemfile deps to local gems if you use the `path:` keyword for the `gem` directive. Like: gem 'rails', path: '/path/to/gemspec/dir'
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
andrewray: Normally a gem's Gemfile is limited to developer niceties for folk working on the gem.
<havenwood>
The gem's actual deps should be in the gemspec.
<andrewray>
havenwood: that's what i'm doing in my root Gemfile, i'm calling gem 'myproject', path: './myproject' and that part seems to be working
<havenwood>
andrewray: same issue with the full path instead of relative path?
<andrewray>
havenwood: i'm using the full path for the path. my root level Gemfile has 'rspec' and 'rspec-retry', and when it gets into the spec itself in the nested folder, it tries to do Rspec.configure |c| c.retry_key = true
<andrewray>
and fails because the retry_key provided by rspec-retry doesn't seem to be getting loaded
nopolitica has joined #ruby
nopolitica has quit [Client Quit]
Guest61854 has quit [Ping timeout: 250 seconds]
venmx has quit [Ping timeout: 250 seconds]
<andrewray>
hmmm, when it executes the child folder's project.gemspec file, it doesn't have Rspec in there, at least I can't run rspec.configure