-
Notifications
You must be signed in to change notification settings - Fork 183
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
If statement in .rambaspec #128
Comments
Hi, @Antowkos. In last release we implement parameter |
Hi, @Beniamiiin. Thanks for so fast answer. Could i use it in |
@Antowkos in what fields of |
@etolstoy In |
@etolstoy , @Beniamiiin . Correct me if i'm wrong. As i understand |
@Antowkos if i understood you correctly, you want to do something like?
|
@Beniamiiin Yes. Is it possible now? |
@Antowkos unfortunately no, but we implement this ability in next release. |
@Beniamiiin Cool! Thanks! 👍 |
[RESOLVED] Added ability use custom parameters in rambaspec #128
@Beniamiiin Hi again! I just tried to use this new feature and it doesn't work. I use syntax like this:
And got this error:
If i understand code of creation right then the error could be placed in creation of object |
@Beniamiiin @etolstoy Is anyone saw my comment? |
@Antowkos hi. Unfortunately we lost couple of code lines, when merged :) I already fixed this bug and we will release new version today. |
Cool, thanks! |
[RESOLVED] Added ability use custom parameters in rambaspec #128
seems like don't work, this is # Template information section
name: nk-vicr-p
summary: NavigationKit based VICR module
author: Maksim Bazarov
version: 1.0.0
license: MIT
# The declarations for code files
code_files:
- {name: Assembly.swift, path: Code/assembly.swift.liquid}
- {name: Module/View/View.swift, path: Code/view.swift.liquid}
{% if custom_parameters.type == 'table' %}
- {name: Module/View/DataSource.swift, path: Code/datasource.swift.liquid}
{% endif %}
And this is an error ruby/2.3.0/psych.rb:377:in `parse': (swift-templates/nk-vicr-p/nk-vicr-p.rambaspec): found character that cannot start any token while scanning for the next token at line 13 column 2 (Psych::SyntaxError)
lib/ruby/2.3.0/psych.rb:377:in `parse_stream'
lib/ruby/2.3.0/psych.rb:325:in `parse'
lib/ruby/2.3.0/psych.rb:252:in `load'
lib/ruby/2.3.0/psych.rb:471:in `block in load_file'
lib/ruby/2.3.0/psych.rb:471:in `open'
lib/ruby/2.3.0/psych.rb:471:in `load_file'
lib/ruby/gems/2.3.0/gems/generamba-1.2.1/lib/generamba/template/helpers/rambaspec_validator.rb:25:in `validate_spec'
lib/ruby/gems/2.3.0/gems/generamba-1.2.1/lib/generamba/template/installer/local_installer.rb:20:in `install_template'
lib/ruby/gems/2.3.0/gems/generamba-1.2.1/lib/generamba/template/processor/template_declaration.rb:32:in `install'
lib/ruby/gems/2.3.0/gems/generamba-1.2.1/lib/generamba/template/processor/template_processor.rb:42:in `block in install_templates'
lib/ruby/gems/2.3.0/gems/generamba-1.2.1/lib/generamba/template/processor/template_processor.rb:40:in `each'
lib/ruby/gems/2.3.0/gems/generamba-1.2.1/lib/generamba/template/processor/template_processor.rb:40:in `install_templates'
lib/ruby/gems/2.3.0/gems/generamba-1.2.1/lib/generamba/cli/template/template_install_command.rb:18:in `install'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
lib/ruby/gems/2.3.0/gems/generamba-1.2.1/bin/generamba:5:in `<top (required)>'
bin/generamba:23:in `load'
bin/generamba:23:in `<main>' |
@Beniamiiin @etolstoy I don't want to upset you, but there are also one more issue related to this feature. When i try to call BTW template is working fine if i just use it by copy-paste to templates folder. |
|
I use different classes for HTTP request, it parameters, path components and headers and it would be great if i could use only one template and just set some custom parameter like
create_path_components:true
and then path components class creates. Because not every request need to have path components or some parameters.The text was updated successfully, but these errors were encountered: