Giter Club home page Giter Club logo

generamba's People

Contributors

6od9i avatar alexgarbarev avatar beniamiiin avatar brain89 avatar cognitivedisson avatar devildimon avatar etolstoy avatar gregoryvit avatar ismetanin avatar ivaravko avatar maximbazarov avatar mogol avatar ramtararam avatar rodionovd avatar serge-nanaev avatar serkrapiv avatar skywinder avatar vladislav-m 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

generamba's Issues

Can we introduce something similar to view partials in rails (for duplicated parts of views)

Im templates there are a lot of duplicated code, for example:

//
//  {{ module_info.name }}{{ module_info.file_name }}
//  {{ module_info.project_name }}
//
//  Created by {{ developer.name }} on {{ date }}.
//  Copyright {{ year }} {{ developer.company }}. All rights reserved.
//

Some tests files also need the same imports:

import Quick  // https://github.com/Quick/Quick/blob/master/Documentation/QuickExamplesAndGroups.md
import Nimble // https://github.com/Quick/Nimble

It would be great, if we could use some partials to generate duplicated parts of templates.

Implement installation of templates with local filepath

The user should be able install templates from the local folders. It will look like generamba template install 'MyTemplate' --local ~/Templates/MyTemplate.

After this command Generamba should look for the .gemspec file in the corresponding folder, validate it, modify the Rambafile and move this template to the project folder.

Remove the Settingslogic dependency

Generamba uses Settingslogic gem for interpreting the Rambafile. It's very inconvenient, non-intuitive looks like a code smell and bad design decision. We can simply replace it with the built-in YAML parser, just as we do with .rambaspec files.

Clarify generamba parameters usage

Hello,

I need some more clarifications and examples on generamba gen usage with additional parameters. For example, it's unclear if I provide custom --module-path generamba will or will not create subfolder / subgroup with MODULE_NAME.

Add -filepath and -grouppath options for `generamba gen` command

Currently the user isn't able to use a specific file or group path when generating new modules. The only workaround is to temporary modify a Rambafile.

We should provide a more convinient way - by using special options:

generamba gen MyModule rviper_controller -f GenerambaSandbox -g GenerambaSandbox/OtherGroup

I think of the following list:

  • -f for specifying a file path
  • -g for specifying a group path
  • -p for specifying the same path for filesystem and Xcode groups

Unexpected behavior when use --module_path

When i use this option I expect that generamba will create MyModuleName folder in Module/Path/ but it put module content in Module/Path/ instead

For example:

generamba gen SomeModule some_template  --module_path UserStories/Main/

Expected result is: UserStories/Main/SomeModule contains my module files appropriate template
Actual result is: UserStories/Main/ contains my module files

Add Rambafile validation

If Rambafile has invalid content, generamba gen produces a non-informative output. We should validate its content before the actual code generation and produce informative error messages.

Git 1.2.9.1

Guys, here in gemspec dependency is 'git', '1.2.9.1'

But I already have git version 2.5.4. Isn't it enough for Generamba?
screen shot 2015-12-24 at 10 16 08

Add support for multiple targets during generamba setup

When you run 'generamba setup' you are asked to select target for your modules (same thing for tests):

Select the appropriate target for adding your MODULES (type the index):

But, since now we have support for multiple targets via editing Rambafile, it would be nice to be able to do it during setup.

Move the hardcoded keys to the constants

There are a lot of hardcoded keys in the code - Rambafile keys, directories etc. All of them should be placed in the corresponding constants file, e.g. constants.rb.

Incorrect behavior when generate module which already exists

When regenerate module with name already exists

  1. No any warnings about deletion my files (it possible I already have some code here)
  2. Incorrect deletion from project, some files paths corrupted in compiled sources
    SS

steps:

generamba gen RootNavigation  bl_viper_default_gt

and again

generamba gen RootNavigation  bl_viper_default_gt

Add the if statements to the Rambafile.liquid

Currently when you provide an empty value to some of the generamba setup questions it reslults into an key with empty value in the generated Rambafile. We can use liquid support of conditional statements to fix it.

Change some of the questions of `generamba setup`

Generamba should ask the user, if he wants to use the same file path, as group path. Only if he chooses no, we should ask him for all of these paths.

Besides it, the naming is unclear - file_path and group_path are not obvious.

Additional template parameters

It might be -paramName paramvalue or something like this, also would be great if it supports arrays

for example I have two templates which different only few lines, one of them contain method instantiation from SB and second one initialization from XIB and I can set -initMethod SB or -initMethod XIB appropriate but applied to one template

Implement automatic template creation

Generamba should be more user-friendly - so it should help with creating new templates too. I see it in the following way: generamba template create starts the series of questions - the template name, the author name, etc, and then it generates a .gemspec file and a default file structure.

Don't set target in swift projects

Steps:

  1. Create new swift project
  2. Set up generamba and templates
  3. Generamba gen

ER: Files created and included in project's target
AR: Files created and included in project but didn't include in target

Default template set can not be used

My ruby is version ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14].

I've installed the gem with gem install generamba. Then as described here I did generamba setup and after answering several questions, I've got the Rambafile.

When I tried generamba template install I've got this error message:

/Users/xxx/.rvm/gems/ruby-2.2.2/gems/generamba-0.7.1/lib/generamba/template/processor/template_processor.rb:21:in `install_templates': undefined method `map' for nil:NilClass (NoMethodError)
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/generamba-0.7.1/lib/generamba/cli/template/template_install_command.rb:14:in `install'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/generamba-0.7.1/bin/generamba:5:in `<top (required)>'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/bin/generamba:23:in `load'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/bin/generamba:23:in `<main>'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'

Actually the error means that there are no templates, and in Rambafile, there are:

### Templates
templates:
#- {name: local_template_name, local: 'absolute/file/path'}
#- {name: remote_template_name, git: 'https://github.com/igrekde/remote_template'}
#- {name: catalog_template_name}

Its ok, but shouldn't it say that there are no templates to install instead of throwing an error?

P.S. None of the provided templates can be used as is.

Generamba as file converter

Add new command to Generamba
convert input_file [--output output_file] [--parser parser] [parser_arguments]

It will convert one file types into another with one command.

This can be used to convert Objective-C files into Swift, CoreData model to classes with Mogenerator and Project Brief into application.

Parser can be any Ruby, Bash script or console application.

Can't find template by local fullpath

Rambafile:

....
templates:
- {name: bl_viper_uivc, path: /Volumes/DataStore/Projects/GenerambaTemplates/bl_viper_uivc}

error:

Cannot find bl_viper_uivc.rambaspec in the template catalog. Try another name. (StandardError)

Errors if default path is empty

if Rambafile contains:

# The file path for new modules
project_file_path: 

# The Xcode group path to new modules
project_group_path: 

then we have this error

rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/generamba-0.7.1/lib/generamba/code_generation/code_module.rb:33:in `initialize': no implicit conversion of nil into String (TypeError)
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/generamba-0.7.1/lib/generamba/code_generation/code_module.rb:33:in `new'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/generamba-0.7.1/lib/generamba/code_generation/code_module.rb:33:in `initialize'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/generamba-0.7.1/lib/generamba/cli/gen_command.rb:40:in `new'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/generamba-0.7.1/lib/generamba/cli/gen_command.rb:40:in `gen'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/generamba-0.7.1/bin/generamba:5:in `<top (required)>'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/bin/generamba:23:in `load'
    from /Users/maksimbazarov/.rbenv/versions/2.2.3/bin/generamba:23:in `<main>'

May be it is ok, and should be, but would be great have error message instead

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.