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

Add component generator #1400

Merged
merged 2 commits into from Sep 8, 2013

Conversation

Projects
None yet
6 participants
@tyabe
Contributor

tyabe commented Sep 7, 2013

Will be able to add the component after the project was created.

how to use:

$ padrino g project simple_project
$ cd simple_project
$ padrino g component
Usage:
  padrino-gen component [options]

Options:
  -r, [--root=ROOT]              # The root destination
                                 # Default: .
  -a, [--adapter=ADAPTER]        # SQL adapter for ORM (sqlite, mysql, mysql2, mysql-gem, postgres)
                                 # Default: sqlite
  -d, [--orm=ORM]                # The database engine component (activerecord, couchrest, datamapper, minirecord, mongoid, mongomapper, mongomatic, ohm, ripple, sequel, none)
  -t, [--test=TEST]              # The testing framework component (bacon, cucumber, minitest, riot, rspec, shoulda, testspec, none)
  -m, [--mock=MOCK]              # The mocking library component (mocha, rr, none)
  -s, [--script=SCRIPT]          # The javascript library component (dojo, extcore, jquery, mootools, prototype, rightjs, none)
  -e, [--renderer=RENDERER]      # The template engine component (erb, haml, liquid, slim, none)
  -c, [--stylesheet=STYLESHEET]  # The stylesheet engine component (compass, less, sass, scss, none)

Description:

        padrino-gen component add components into a Padrino project

Current Selected Components:
  orm         none
  test        none
  mock        none
  script      none
  renderer    slim
  stylesheet  none
@namusyaka

This comment has been minimized.

Show comment
Hide comment
@namusyaka

namusyaka Sep 8, 2013

Member

I like your idea!
@padrino/core-members, What do you think?

Member

namusyaka commented Sep 8, 2013

I like your idea!
@padrino/core-members, What do you think?

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Sep 8, 2013

Member

I like this idea. We've always needed a way for people to be able to add components after the project is generated. Seems like a reasonable approach.

Member

nesquena commented Sep 8, 2013

I like this idea. We've always needed a way for people to be able to add components after the project is generated. Seems like a reasonable approach.

@tyabe

This comment has been minimized.

Show comment
Hide comment
@tyabe

tyabe Sep 8, 2013

Contributor

Refactoring of Generators has been proposed in #677.
But I tried does not change the existing generator by adding new generator.

thanks.

Contributor

tyabe commented Sep 8, 2013

Refactoring of Generators has been proposed in #677.
But I tried does not change the existing generator by adding new generator.

thanks.

@namusyaka

This comment has been minimized.

Show comment
Hide comment
@namusyaka

namusyaka Sep 8, 2013

Member

Yeah, looks good locally. Thanks a lot, @tyabe!

Member

namusyaka commented Sep 8, 2013

Yeah, looks good locally. Thanks a lot, @tyabe!

namusyaka added a commit that referenced this pull request Sep 8, 2013

@namusyaka namusyaka merged commit a87c325 into padrino:master Sep 8, 2013

1 check passed

default The Travis CI build passed
Details
@funal125

This comment has been minimized.

Show comment
Hide comment
@funal125

funal125 Jan 16, 2014

Contributor

I am using padrino-0.12.0.rc2

I encounter an error with 'padrino g component -m mocha' after creating a project.

padrino g component -m mocha
WARN: Unresolved specs during Gem::Specification.reset:
      rack (>= 1.0.0, ~> 1.4)
      rack-protection (>= 1.5.0, ~> 1.4)
      activesupport (>= 3.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
    applying  mocha (mock)...
       apply  mocks/mocha
      insert  Gemfile
      insert  test/test_config.rb
/home/felix/.rbenv/versions/2.1.0/gemsets/global/gems/thor-0.17.0/lib/thor/actions/inject_into_file.rb:99:in `binread': No such file or directory @ rb_sysopen - /home/felix/project/fastqc/test/test_config.rb (Errno::ENOENT)
Contributor

funal125 commented Jan 16, 2014

I am using padrino-0.12.0.rc2

I encounter an error with 'padrino g component -m mocha' after creating a project.

padrino g component -m mocha
WARN: Unresolved specs during Gem::Specification.reset:
      rack (>= 1.0.0, ~> 1.4)
      rack-protection (>= 1.5.0, ~> 1.4)
      activesupport (>= 3.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
    applying  mocha (mock)...
       apply  mocks/mocha
      insert  Gemfile
      insert  test/test_config.rb
/home/felix/.rbenv/versions/2.1.0/gemsets/global/gems/thor-0.17.0/lib/thor/actions/inject_into_file.rb:99:in `binread': No such file or directory @ rb_sysopen - /home/felix/project/fastqc/test/test_config.rb (Errno::ENOENT)
@skade

This comment has been minimized.

Show comment
Hide comment
@skade

skade Jan 16, 2014

Member

Hi Felix,

This is most likely a problem with your ruby version switcher and bundle auto detection.

Try using

bundle exec padrino g -m mocha

Regards,
Florian

On 16 Jan 2014, at 04:45, Felix Chang notifications@github.com wrote:

I am using padrino-0.12.0.rc2

I encounter an error with 'padrino g component -m mocha' after creating a project.

padrino g component -m mocha
WARN: Unresolved specs during Gem::Specification.reset:
rack (>= 1.0.0, ~> 1.4)
rack-protection (>= 1.5.0, ~> 1.4)
activesupport (>= 3.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
applying mocha (mock)...
apply mocks/mocha
insert Gemfile
insert test/test_config.rb
/home/felix/.rbenv/versions/2.1.0/gemsets/global/gems/thor-0.17.0/lib/thor/actions/inject_into_file.rb:99:in `binread': No such file or directory @ rb_sysopen - /home/felix/project/fastqc/test/test_config.rb (Errno::ENOENT)


Reply to this email directly or view it on GitHub.

Member

skade commented Jan 16, 2014

Hi Felix,

This is most likely a problem with your ruby version switcher and bundle auto detection.

Try using

bundle exec padrino g -m mocha

Regards,
Florian

On 16 Jan 2014, at 04:45, Felix Chang notifications@github.com wrote:

I am using padrino-0.12.0.rc2

I encounter an error with 'padrino g component -m mocha' after creating a project.

padrino g component -m mocha
WARN: Unresolved specs during Gem::Specification.reset:
rack (>= 1.0.0, ~> 1.4)
rack-protection (>= 1.5.0, ~> 1.4)
activesupport (>= 3.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
applying mocha (mock)...
apply mocks/mocha
insert Gemfile
insert test/test_config.rb
/home/felix/.rbenv/versions/2.1.0/gemsets/global/gems/thor-0.17.0/lib/thor/actions/inject_into_file.rb:99:in `binread': No such file or directory @ rb_sysopen - /home/felix/project/fastqc/test/test_config.rb (Errno::ENOENT)


Reply to this email directly or view it on GitHub.

@kakubei

This comment has been minimized.

Show comment
Hide comment
@kakubei

kakubei Feb 14, 2014

I'm getting the same error with the actual 0.12 release and would like to know how to fix this error without having to run bundle exec. I get it for a padrino console:

padrino c
WARN: Unresolved specs during Gem::Specification.reset:
  rack (>= 1.0.0, ~> 1.4)
  rack-protection (>= 1.5.0, ~> 1.4)
  activesupport (>= 3.1)

kakubei commented Feb 14, 2014

I'm getting the same error with the actual 0.12 release and would like to know how to fix this error without having to run bundle exec. I get it for a padrino console:

padrino c
WARN: Unresolved specs during Gem::Specification.reset:
  rack (>= 1.0.0, ~> 1.4)
  rack-protection (>= 1.5.0, ~> 1.4)
  activesupport (>= 3.1)

@tyabe tyabe deleted the tyabe:add_component_generator branch Feb 14, 2014

@skade

This comment has been minimized.

Show comment
Hide comment
@skade

skade Feb 14, 2014

Member

@kakubei This is not a Padrino problem, but a general environment. You should ask with the maintainers of rvm, chruby, rbenv or whatever you are using for proper solutions.

It is a general Ruby message.

Member

skade commented Feb 14, 2014

@kakubei This is not a Padrino problem, but a general environment. You should ask with the maintainers of rvm, chruby, rbenv or whatever you are using for proper solutions.

It is a general Ruby message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment