-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make project easily integrate with Rails. #20
Comments
I agree with Rails integration is important since it is a Ruby gem. Here're considerations came upon in my mind. Gem specific setting should go to Diametric.config do |config|
config.uri = "datomic:mem://hello"
config.port = 9000
end If there's a port in config, a connection should be REST. If no port is specified, the connection should be peer. Probably, this is a Rails friendly way. Or, Rails template might be good like Datamapper does, https://github.com/datamapper/dm-rails . |
Hmm, do you oppose having a connection yaml? I honestly kind of like the For REST: development:
mode: rest
uri: "localhost:9000"
alias: development
database: sample For the peer: development:
mode: peer
uri: "datomic:mem://sample" Anyways, mongoid seems like a decent model that I've been building our Railtie off of. At present I have the REST client connecting on startup. My TODO list entails:
|
I'm not opposing your idea. Your idea is almost equivalent to Rails template. It is another idea I talked about.
My first idea is easy to implement, and many gems use this initialization setting. |
@yokolet Ahh OK. Yes, I will be borrowing heavily from other gems implementations of their own Railties. |
My TODO list as of today:
Questions:
Niceties for later:
|
I'd paste how to use railties branch, which is from Ryan, so that I don't need to looking for my email box.
|
I'll write about today's work. I could make Rails integration to go forward although rails app ended up in raising exception. My changes are in a new branch railtie. Here's how to create Rails app using Diametric.
It should work, but not :( The reason is Entity's all method doesn't work correctly. |
Looking good! Just want to say you could probably do all your I see you added a I wanted to ask if you were planning to squeeze in a |
I will note though, you shouldn't need to Step 5 could possibly be rewritten to use diametrics script/vendor-datomic-free. I'm not sure what the line to draw is on telling/showing people how to run Datomic. |
Today, I added rake diametric:config, which generates diametric.yml. Also, I confirmed most of basic Rails operations worked with Diametric. See https://github.com/relevance/diametric/wiki/Rails-Integration-(Experimental) , which explains how to create Rails app. However, Diametric::Entity should have update and destroy methods to work with Rails. Currently, sample Rails app raises exception for that. |
Hey, I merged railtie onto railsify. On Wednesday, November 21, 2012 at 4:32 PM, Yoko Harada wrote:
|
As in https://github.com/relevance/diametric/wiki/Rails-Integration-(Experimental), Rails scaffolding is now working for all index/ceate/show/edit/destroy methods. Current TODO would be
|
Since Rails scaffolding is working, I merged railsify branch in to master and pushed it out. |
I pushed the version 0.0.2 . Now, testing this feature got easy especially for peer connection, which has dependency to JAR archives. |
A few basic features I want to add:
config/diametric.yml
is present)diametric:install
should exist, so when i say:rails g diametric:install
I get a sampleconfig/diametric.yml
to populate with my own connection dataconnect(...some new interface...)
in my models to override the datomic instance in which my model connects to.Nice to have:
The text was updated successfully, but these errors were encountered: