[Bug 705417] New: ruby-bindings: lower-cased module not found by ycp
https://bugzilla.novell.com/show_bug.cgi?id=705417 https://bugzilla.novell.com/show_bug.cgi?id=705417#c0 Summary: ruby-bindings: lower-cased module not found by ycp Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: dmacvicar@novell.com ReportedBy: jsuchome@novell.com QAContact: jsrain@novell.com Found By: Development Blocker: --- When ruby module is named in lowercase, ("kerberos_client.rb"), it cannot be imported from YCP -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c1
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c2
--- Comment #2 from Klaus Kämpf
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c3
--- Comment #3 from Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c4
--- Comment #4 from Klaus Kämpf
Rename Foo.rb from ruby-bindings/examples/ruby, install it to /usr/share/YaST2/modules and try to import 'foo' from ycp client (just like ruby_from_ycp.ycp in the same dirctory).
I get a yast:0:in `const_get': wrong constant name foo (NameError) here, is that what you're getting too ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c5
--- Comment #5 from Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c6
--- Comment #6 from Klaus Kämpf
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c7
--- Comment #7 from Klaus Kämpf
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c8
--- Comment #8 from Klaus Kämpf
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c9
--- Comment #9 from Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c10
--- Comment #10 from Klaus Kämpf
Another option is to have Rails-like name-mangling
File foo.rb would provide (module) Foo, file foo_bar.rb provide Foo::Bar, etc.
Oops, wrong. foo_bar.rb would provide FooBar and foo/bar.rb provide Foo::Bar -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c11
--- Comment #11 from Klaus Kämpf
Example from YaST++ project:
file name is kerberos_client.rb
and it is written like:
module YLib module KerberosClient ... end end
How should it be imported from YCP?
That would be require "y_lib/kerberos_client" doing it Rails-style (IIRC) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c12
--- Comment #12 from Jiří Suchomel
That would be require "y_lib/kerberos_client" doing it Rails-style (IIRC)
But that's not ycp. Could we hide such transformation and do not touch either YCP nor ruby conventions? Currently, I do (locally) mkdir -p /usr/share/YaST2/modules/YLib ln -sf /usr/lib64/ruby/vendor_ruby/1.8/y_lib/kerberos_client.rb /usr/share/YaST2/modules/YLib/KerberosClient.rb Than I reach my goal to have this code in YCP: import "YLib/KerberosClient"; YLib::KerberosClient::read ($[]); But it would be better without that linking (or extra envelope ruby file) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c13
--- Comment #13 from Klaus Kämpf
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c14
--- Comment #14 from Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c16
Josef Reidinger
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c17
--- Comment #17 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c18
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c19
--- Comment #19 from Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c20
Josef Reidinger
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c21
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c22
Josef Reidinger
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c23
--- Comment #23 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=705417
https://bugzilla.novell.com/show_bug.cgi?id=705417#c24
--- Comment #24 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com