<leitz>
Yeah, I can see the "put this stuff on your server" thing. Like Puppet and Chef.
<leitz>
I'm still at the "less than half a dozen main gems, and there dependencies" level, though.
alfiemax_ has quit [Remote host closed the connection]
<leitz>
In other news, I watched a good webinar on "Domain Driven Design", on Safaribooks.
<adam12>
leitz: IMHO, if you're developing a gem, use both. Either a near-empty Gemfile with just source and gemspec statements, or Gemfile with gemspec and then development dependencies. If you're developing an app, use a Gemfile.
<adam12>
leitz: Ship Gemfile.lock with both; it used to be faux-paus to not ship Gemfile.lock with gems but that's changed and it's easier for someone else to match dependencies in case of bug fixing.
akem has joined #ruby
<leitz>
adam12, I hadn't thought about the Gemfile.lock being useful for bug-fixing.
<adam12>
s/to not/to. Original guidelines said _dont_ provide Gemfile.lock in gem projects.
<leitz>
adam12, if you are installing the gems in my_project/vendor/bundle, do you exclude them from the git repo and just have folks do a "bundle install"?
<adam12>
leitz: Yes. Shipping vendor/bundle might be risky because of C extensions.
ur5us has joined #ruby
<havenwood>
There's now a community split on whether to commit a Gemfile.lock for a gem. ¯\_(ツ)_/¯ I think ultimately it doesn't matter.
<adam12>
Really?
<adam12>
I was always in the no-commit boat but I read someone talk about why to include it and it was compelling.
<havenwood>
adam12: Bundler changed their guidance to commit, but many still follow Wycatz's lead, which is usually a sound thing to do.
<havenwood>
I've seen new gem creators get burned by committing the Gemfile.lock, which defies the idea that it'll help new folk contributing to gems.
<leitz>
havenwood, you mean people get "yelled at", or whatever, for it?
<adam12>
I've only been burned by _not_ having a .lock file. Recent example is a contrib to Simplecov to fix Minitest integration.
<havenwood>
adam12: I've seen new folk update their gem, push it, try to develop and get super confused why they're on the old version of the gem in dev.
<havenwood>
(Did `bundle update` so self-reference is wrong.)
<adam12>
havenwood: Weird. I'll have to keep an eye on that.
<havenwood>
adam12: If you commit the lock, gotta `bundle update` or meh.
<adam12>
havenwood: How does having the lock committed affect this? Since there is a lock file regardless.
<havenwood>
adam12: I like adding a Gemfile, but think if you're having dev environs break you should either 1) pin more conservatively, or 2) ask upstream gem authors to semvar.
<havenwood>
adam12: For another new author, grabbing repo, Gemfile.lock still references old version.
<havenwood>
adam12: New contributor*
<havenwood>
adam12: I've said this badly. The Gemfile.lock must be updated if you commit it, that's all.
<havenwood>
If you don't update it, then you've made dev situation more confusing not less.
<havenwood>
adam12: I've not run into it myself.
<havenwood>
adam12: But I don't commit a Gemfile.lock so that makes sense, I guess. Haha.
<havenwood>
I don't use dev deps with gems that break with the versions I pin them to either.
<havenwood>
So a Gemfile.lock gives no benefit.
<havenwood>
The thing I like about commit gem Gemfile.locks is that it makes the rule super easy: always commit
<havenwood>
Utimately ¯\_(ツ)_/¯
<havenwood>
Guidance was one way, worked fine. Now half of folk do it the opposite way, also works fine.
* havenwood
changes gem deploy code to commit exactly half the time.
<havenwood>
I dunno, half seems a bit much.
<havenwood>
I'm *normally* the only contributor to my gems. Maybe they see. no Gemfile.lock and bail. :)
cyrus_mc_ has quit [Quit: Connection closed]
<adam12>
Interesting. I didn't notice that there was a version in the lock for the gemspec version.
<adam12>
I've still been on the bad side of no lock so I can see why the community is divided.
leitz has quit [Quit: Leaving]
ChmEarl has quit [Quit: Leaving]
thoraxe has joined #ruby
<thoraxe>
i am really struggling with addressable::template. I have a url that looks like https://host.com/parser/username/secret?base64_url=xxx and I cannot for the life of me figure out how to write a URI template for that. Everything i'm trying when extracted comes up nil, even when parsing the same template produces exactly the URI i just fed into the extractor
imode has quit [Quit: WeeChat 2.9]
imode has joined #ruby
<adam12>
thoraxe: Can you show what you might have tried so far? Give us a head start.
<adam12>
Does about the same as what you were doing.
<thoraxe>
also appears to work!
<thoraxe>
++ to you again
<thoraxe>
ty sir.
<adam12>
Cool. No problem.
<thoraxe>
have a great day/evening/whereveryouare
<adam12>
o/ Canada
konsolebox has quit [Read error: Connection reset by peer]
mossplix has quit [Remote host closed the connection]
konsolebox has joined #ruby
mossplix has joined #ruby
mossplix has quit [Ping timeout: 264 seconds]
bsdbandit-01 has joined #ruby
drincruz has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
cd has quit [Quit: cd]
konsolebox has quit [Read error: Connection reset by peer]
drincruz has joined #ruby
konsolebox has joined #ruby
zacts has quit [Quit: WeeChat 2.8]
minall has joined #ruby
<minall>
Hello ruby community!, I'm on my new archlinux installation, and I'm trying to install rvm, first, I have to import keys using gpg, which fails with message: 'gpg: keyserver receive failed: Server indicated a failure'... Is it a problem on my system?, if it is, I've searching everywhere, may be a DNS problem, tried a lot of commands and read a lot of explanations on blogs, but no luck. Can someone help me debug this?
alfiemax_ has quit [Remote host closed the connection]
aesthe has quit [Quit: Leaving]
roadie` has joined #ruby
alfiemax has joined #ruby
skape has joined #ruby
burningserenity has quit [Ping timeout: 260 seconds]
alfiemax_ has joined #ruby
rippa has joined #ruby
alfiemax has quit [Ping timeout: 246 seconds]
alfiemax_ has quit [Remote host closed the connection]
burningserenity has joined #ruby
dualfade has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
dualfade has joined #ruby
alfiemax has quit [Remote host closed the connection]
heidar has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
dnadev2 has joined #ruby
<dnadev2>
I'm trying to structure the best way to accomplish checking user permissions - my current thought seems a bit clunky and wondering if there's a better meta-way. I'm using rails4 but this is less of a rails question as I'm not trying to use a gem like pundit and more trying to learn ruby concepts. Here's what I have so far: https://dpaste.org/iiVT
TCZ has joined #ruby
zacts has joined #ruby
<adam12>
dnadev2: I think you should make a PORO that accepts an actor and a resource, then can be asked if someone can do something to it. CakeAuthorizer.new(current_user, cake).show?
<adam12>
dnadev2: If you want to call it from a method in ApplicationController that would be fine, but keep it super small and straight forward, since testing that part of the code is a lot more complex than just instantiating a simple object.
<dnadev2>
adam12, ok - then i would have an "SomethingAuthorizer" for every resource i need to check stored in something like a permissions dir? where in my example would be the best spot to do the CakeAuthorizer.new?
<adam12>
dnadev2: app/authorizers or lib/authorizers. In your CakeController, you could either before_action or be implicit inside each action. Inside the before_action you'd need to know the current action and I'm not sure if that's available.
<adam12>
dnadev2: you could always just make an `authorize` method that accepted both and returned boolean. then you could do `def show; authorize(current_user, @cake) or return redirect_to(root_path, error: "Not authorized")` or something.
SeepingN has joined #ruby
orbyt_ has joined #ruby
Bounga has quit [Ping timeout: 272 seconds]
Mrgoose845701915 has joined #ruby
postmodern has quit [Quit: Leaving]
cthulchu_ has joined #ruby
greengriminal has joined #ruby
burningserenity has quit [Ping timeout: 256 seconds]
tastemakerChuck has quit [Ping timeout: 246 seconds]
tastemakerChuck has joined #ruby
burningserenity has joined #ruby
donofrio has joined #ruby
burningserenity has quit [Ping timeout: 246 seconds]
TCZ has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
dnadev2 has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
burningserenity has joined #ruby
chalkmon1 has joined #ruby
Axy has joined #ruby
chalkmonster has quit [Ping timeout: 256 seconds]
fercell_ has quit [Quit: WeeChat 2.8]
alfiemax_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davispuh has joined #ruby
TCZ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
alfiemax has quit [Read error: Connection reset by peer]
vondruch has quit [Ping timeout: 256 seconds]
dnadev2 has joined #ruby
<dnadev2>
adam12, thanks for the ideas - i think i'll go that authorizers approach. tbd how / where i do the checks.
TCZ has quit [Quit: Leaving]
ujjain2 has joined #ruby
sagax has joined #ruby
entel has quit []
entel has joined #ruby
alfiemax_ has quit [Remote host closed the connection]