Giter Club home page Giter Club logo

padrino-framework's People

Contributors

achiurizo avatar activestylus avatar adam12 avatar aemadrid avatar agios avatar basex avatar burgestrand avatar crowdhailer avatar daddye avatar danishkhan avatar icco avatar jkowens avatar joshbuddy avatar lastcanal avatar lusis avatar namusyaka avatar nesquena avatar nu7hatch avatar olleolleolle avatar ortuna avatar pftg avatar postmodern avatar quintasan avatar scudelletti avatar skade avatar tyabe avatar udzura avatar ujifgc avatar waydotnet avatar wikimatze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

padrino-framework's Issues

Datamapper and Bundle Lock

when using bundle lock and datamapper as orm, the application fails to start due to an unitialized constant DataMapper::Timestamps::Model (NameError)

/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in const_missing': uninitialized constant DataMapper::Timestamps::Model (NameError) from /Library/Ruby/Gems/1.8/gems/dm-timestamps-0.10.2/lib/dm-timestamps.rb:58 from /Volumes/Storage/workspace/personal/propers/properdivision/.bundle/environment.rb:206:inrequire'
from /Volumes/Storage/workspace/personal/propers/properdivision/.bundle/environment.rb:206:in require' from /Volumes/Storage/workspace/personal/propers/properdivision/.bundle/environment.rb:201:ineach'
from /Volumes/Storage/workspace/personal/propers/properdivision/.bundle/environment.rb:201:in require' from /Volumes/Storage/workspace/personal/propers/properdivision/.bundle/environment.rb:200:ineach'
from /Volumes/Storage/workspace/personal/propers/properdivision/.bundle/environment.rb:200:in require' from ./config/boot.rb:18 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/bin/../lib/padrino-core/cli/base.rb:22:instart'
from /Library/Ruby/Gems/1.8/gems/thor-0.13.3/lib/thor/task.rb:33:in send' from /Library/Ruby/Gems/1.8/gems/thor-0.13.3/lib/thor/task.rb:33:inrun'
from /Library/Ruby/Gems/1.8/gems/thor-0.13.3/lib/thor/invocation.rb:109:in invoke' from /Library/Ruby/Gems/1.8/gems/thor-0.13.3/lib/thor/invocation.rb:116:incall'
from /Library/Ruby/Gems/1.8/gems/thor-0.13.3/lib/thor/invocation.rb:116:in invoke' from /Library/Ruby/Gems/1.8/gems/thor-0.13.3/lib/thor.rb:137:instart'
from /Library/Ruby/Gems/1.8/gems/thor-0.13.3/lib/thor/base.rb:378:in start' from /Library/Ruby/Gems/1.8/gems/thor-0.13.3/lib/thor.rb:124:instart'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/bin/padrino:7
from /usr/bin/padrino:19:in `load'
from /usr/bin/padrino:19

this error can be reproduced by creating a project using datamapper as the orm, and bundle lock the application.

Extract routing into separate plugin again

In the latest versions of Padrino, the routing system is now merged into padrino-core. One user sent me a message expressing a concern that in sinatra_more, users could add routing to an existing Sinatra application. However, in Padrino, the cool routing system is not a separate plugin and therefore cannot be used in a plain Sinatra application.

In my opinion, the routing system (minus the controller stuff) should be extracted into a seperate padrino-routing gem again allowing it to be used in a plain jane Sinatra application. I like the idea that the major components of Padrino can all be used standalone and cherry-picked. I created a wiki page to that effect:

http://wiki.github.com/padrino/padrino-framework/standalone-usage-in-sinatra

Let me know what you think about this idea. I think it benefits us to keep the functionality modular. Perhaps the controller stuff should only be in core but the routing system itself (named aliases, with, parent, etc) can be applied to any sinatra-based app?

Could be as simple to use in an existing sinatra app as:

# app.rb
require 'sinatra/base'
require 'padrino-routing'

class Application < Sinatra::Base
  register Padrino::Routing
end

and this would afford the app the superior routing functionality.

Renderers

What do you think about remove:

  • erb_template
  • haml_template

And "private" the render_template (so can be used only from partial method)

?

I ask this because now we have too much way for do the same thing:

  • erb
  • erubius
  • haml
  • sass
  • builder
  • erb_template
  • haml_template
  • render_template

Personally I love the single/two way for do a thing and for me the better choice is:

render :haml, :'path/to/my/view'

That is more explicit and concise.

What do you think about?

check_box_group, radio_button_group helpers

Helpers for check_box_group, radio_button_group which create a set of checkboxes or radio buttons for a form. Pass in a set of options (similar to select helper now) and it returns a set of the checkboxes or radio buttons. add tests as well.

f.radio_button_group :attr, :caption => "...", :options => "same as select options"
f.check_box_group   :attr, :caption => "...", :options => "same as select options"

Sinatra Fork

What about include in core our Sinatra instead of apply extensions?

These are my reason:

  • Less extension, more fast, more robust code
  • Sinatra repo is not super super active so is simple for use follow their changes
  • Some people think that because we use Sinatra Padrino is the same as +sinatra_more+ or +monk+ or others.

Allow padrino rake to list tasks

We need a way to allow padrino rake to list available tasks. I tried padrino rake -T but this didn't work. Would work like:

padrino rake -T # or padrino rake list

and then prints out available rake tasks.

more prod ems

anchor tag on url_for ain't there
url_for(:page,:name => 'portfolio', :anchor => "site")

Support additional generator options

  • Add support for configuring generators model, controller, migrations, mailer
  • Which component choices to use, where to generate the files, skipping

Port over certain great rails tasks (into padrino bin or thor)

  • rake db:create, db:create:all, db:test:prepare, gems, log:clear, middleware, etc
  • perhaps more support for migration controls (for ORMs) such as migrate:down, migrate:up, etc
  • creating and migrating databases using padrino binary (or rake and using any of the orms)
  • (maybe ties into generator if needed)

Support for logging to file in development

If somebody uses Passenger for development, we should allow them to have the log written to a file instead of the console via a configuration option. Right now logger appears to force development to go to the stdout, no?

Reloading tests make the test app files change too often

Whenever we run tests the reload tests change the number on the sample apps and this makes them get recommitted nearly every single time we commit a new revision. Can you have these tests change the number back at the end or somehow prevent this from happening?

Destroying Migrations

If I create a migration increase correctly the number. But when I destroy we don't need to handle version number.

create  db/migrate/001_create_accounts.rb
remove  db/migrate/002_create_accounts.rb

Reloader should not reload all .rb files in the project

I have tests for my app in test/. If I update a test file and then refresh the app in my browser, it seems that the test file is getting included in Padrino's auto-reloader, which of course causes the app to choke and sputter because the test files weren't meant to be loaded that way. In padrino-core/reloader.rb, is Padrino::Reloader::Stat#rotation loading every .rb file in my project? If so, it would probably be a good idea to exclude test/ or spec/ -- or even better, just reload files in the project root, app/ and lib/ (and possibly config/ too).

mount_uploader issue w/ Bundle Lock

when using the admin functionality in the app with the admin_uploader, everything works fine until bundle lock.

/Library/Ruby/Gems/1.8/gems/dm-core-0.10.2/lib/dm-core/model/relationship.rb:381:in method_missing': undefined methodmount_uploader' for Upload:Class (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/dm-core-0.10.2/lib/dm-core/model/property.rb:239:in method_missing' from /Volumes/Storage/workspace/personal/propers/properdivision/app/models/upload.rb:8 from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:76:inrequire'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:76:in require_dependencies' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:74:ineach'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:74:in require_dependencies' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/application.rb:16:ininherited'
from /Volumes/Storage/workspace/personal/propers/properdivision/app/app.rb:1
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:76:in require' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:76:inrequire_dependency'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:74:in each' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:74:inrequire_dependency'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/mounter.rb:58:in app_object' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/mounter.rb:19:ininitialize'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/mounter.rb:124:in new' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/mounter.rb:124:inmount'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/mounter.rb:115:in mount_core' from /Volumes/Storage/workspace/personal/propers/properdivision/config/apps.rb:20 from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:76:inrequire'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:76:in require_dependencies' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:74:ineach'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:74:in require_dependencies' from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/loader.rb:13:inload!'
from ./config/boot.rb:21

Add default js scripts into padrino-gen

Right now when you run generator with no internet, the js cant be fetched and the generator fails. Simply vendor versions of each script with padrino instead of going to the internet.

Unified Logger

Now we have a good class for log all (or not :D).

We need to unify all application/db/core log through a single class/method.

Console, handle DB settings.

Now console handle models, but how load their settings?
I mean db host/password/user for console environment?

Implement the padrino-cache gem

padrino-cache gem needs to be worked on. supports fragment and page caching through file store or memcache. supports cache_key from models and the like.

[VOTE] Padrino Admin - Ajax or Static ?

Hey guys Im working (80% just done) for a static padrino-admin based on web-app-theme

What do you prefer? Current ExtJS version or a web-app-theme

ExtJS Version:

Pro:

  • Beautiful and very very user friendly and super fast for end user
  • Few few few html/erb/haml code to manage!
  • A lot of features (sortable grids, inline editing, popups, ajax uploads etc...)

Cons:

  • Need license for commercial use
  • It's hard customize the look & feel and personalize
  • Some people totally hate javascripts

Static Version

Pro:

  • A lot of people love them
  • It's simple to customize (with templates)
  • Every one know html/css
  • No license

Cons:

  • No ExtJS extra features like (sortable, dragging, windows etc...)
  • Less user friendly

dem problems

Gemspec is wrong (sass and test/unit)

abstract form builder needs to be loaded before standard form builder

[POLL] Padrino Admin

Today we finished porting to new static version of padrino-admin.

Here some screenshots: http://twitpic.com/14xjah http://twitpic.com/14xja3 http://twitpic.com/14xj9l http://twitpic.com/14xj9c http://twitpic.com/14xj8n

So my questions:

  • We need to redesign style and layout instead of web-app-theme template ?
  • We need to add some jquery functions? If yes what you want?
  • We need a builtin uploader (with carrierwave) like extjs version?

What do you want in padrino-admin ?

Send us your idea or your template!

Thanks!

Grouping routes with filters

Padrino needs a simple to use before/after filter mechanism that supports running methods before and after a particular set of routes rather than global configuration. Sinatra does not have a mechanism to support this.

Our grouping system could work like this: http://gist.github.com/309381

SimpleApp.controllers :posts do
  # These are public actions, no authentication required
  get :index do; ... end;
  get :show, :with => :id do; ... end;

  # These actions require being authenticated
  group :authenticated do
    before { ensure_user_logged_in! }

    post :create do; ... end
    delete :destroy, :with => :id do; ... end

    after { log_user_modifications! }
  end
end

Route groupings would be separate from controller definitions (but can be embedded within them to further group routes) and would not affect the route url.

Add url routing with auto mapping

Another thing what about

Blog.controllers :frontend, :comments do
    ...
end

Blog.controllers :backend, :comments do
    ...
end

A namespace that accept args.

In this way for those that need a backend (like us with padrino admin) didn't duplicate routes.

Another good enhancement is auto mapping:

namespace :frontend, :comments do
  get(:index){}
end
# mapped url is: /frontend/comments

Fix Slash

Found a way for fix slash when we use rack.map

Submit Tag

Im checking sample app and I notice that after changes in helpers I din't see anymore submit tag.

Padrino incompatible with sinatra_warden

Padrino appears to be incompatible with sinatra_warden plugin. This plugin defines routes such as in http://github.com/jsmestad/sinatra_warden/blob/master/lib/sinatra_warden/sinatra.rb#L49

app.post '/unauthenticated/?' do
  # ...
end

app.get '/login/?' do
  # ...
end

and the stacktrace is:

/Library/Ruby/Gems/1.8/gems/usher-0.6.7/lib/usher/util/parser.rb:99:in `parse': undefined method `[]' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/usher-0.6.7/lib/usher/util/parser.rb:30:in `generate_route'
from /Library/Ruby/Gems/1.8/gems/usher-0.6.7/lib/usher.rb:348:in `get_route'
from /Library/Ruby/Gems/1.8/gems/usher-0.6.7/lib/usher.rb:208:in `add_route'
from /Library/Ruby/Gems/1.8/gems/padrino-core-0.8.5/lib/padrino-core/application.rb:383:in `route'
from /Library/Ruby/Gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:761:in `post'

The basic problem is that the Usher routing system does not support trailing question marks apparently in their routes. Padrino replaces the existing Sinatra routing and this appears to be a difference in what is an acceptable path definition.

Thoughts? We could just be OK with the fact this plugin doesn't work and all routes ending in a question mark will raise an obscure usher error. It is unfortunate though.

Utilize existing orm extensions for better support

Use existing orm extensions by requiring them during padrino-gen to create a uniform and consistent set of steps to configure the database.

Basically, the generator needs to be modified to utilize the features from these extensions and require the appropriate rake tasks to make them work. Change database setup file to reflect new database setup following the orm extension instructions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.