oauth-plugin icon indicating copy to clipboard operation
oauth-plugin copied to clipboard

Name required in generator

Open celeduc opened this issue 14 years ago • 2 comments

Basically all of the examples give the syntax as "rails g oauth_provider", but this gives an error and never produces views:

rails g oauth_provider
      invoke  active_record
      create    app/models/client_application.rb
      create    app/models/oauth_token.rb
      create    app/models/request_token.rb
      create    app/models/access_token.rb
      create    app/models/oauth2_token.rb
      create    app/models/oauth2_verifier.rb
      create    app/models/oauth_nonce.rb
      create    db/migrate/20110210222633_create_oauth_tables.rb
      create  app/controllers/oauth_controller.rb
      create  app/controllers/oauth_clients_controller.rb
      invoke  test_unit
      create    test/oauth_controller_test_helper.rb
      create    test/functional/oauth_controller_test.rb
      create    test/functional/oauth_clients_controller_test.rb
      create    test/unit/client_application_test.rb
      create    test/unit/oauth_token_test.rb
      create    test/unit/oauth_nonce_test.rb
      invoke  erb
No value provided for required arguments 'name'
Loaded suite script/rails
Started

Finished in 0.000163 seconds.

0 tests, 0 assertions, 0 failures, 0 errors

As you can see, it dies right after "invoke erb". On the other hand, if you use "rails g oauth_provider provider" it will generate the rest without a complaint.

(running on Rails 3.0.3, Ruby 1.8.6)

celeduc avatar Feb 10 '11 22:02 celeduc

also the generator doesn't generate the proper controller name if you generate it with a name other than "oauth"

dpickett avatar May 12 '11 18:05 dpickett

I am not having the issue with provider but am having it with consumer.

$ rails g oauth_consumer
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support
...
      invoke  active_record
      create    app/models/consumer_token.rb
      create    db/migrate/20120722174541_create_oauth_consumer_tokens.rb
      create  config/initializers/oauth_consumers.rb
      create  app/controllers/oauth_consumers_controller.rb
      invoke  erb
No value provided for required arguments 'name'

Calling rails g oauth_consumer oauth works. Nothing in the generator file(s?) appears to depend on a name.

bnickel avatar Jul 23 '12 00:07 bnickel