Skip to content
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

Can't add file with type . Only 'source' and 'resource' are acceptable #116

Closed
sburavtsov opened this issue Jun 6, 2016 · 12 comments
Closed
Assignees
Labels

Comments

@sburavtsov
Copy link

generamba gen LoginModule rviper_controller
/Users/sburavtsov/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/git-1.2.9.1/lib/git/lib.rb:979: warning: Insecure world writable dir /Applications/Cocos in PATH, mode 040777

+--------------------+--------------------------------+
|             Summary for gen LoginModule             |
+--------------------+--------------------------------+
| company            | PeopleSay                      |
| project_name       | PeopleSay                      |
| xcodeproj_path     | PeopleSay.xcodeproj            |
| prefix             | PS                             |
| project_target     | PeopleSay                      |
| project_file_path  | PeopleSay/Classes/Modules      |
| project_group_path | PeopleSay/Classes/Modules      |
| test_target        | PeopleSayTests                 |
| test_file_path     | PeopleSayTests/Classes/Modules |
| test_group_path    | PeopleSayTests/Classes/Modules |
| podfile_path       | Podfile                        |
| templates          | rviper_controller              |
|                    | mvvm_controller                |
|                    | swifty_viper                   |
+--------------------+--------------------------------+

LoginModule module already exists. Replace? (yes/no) yes
Creating code files...
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Can't add file with type . Only 'source' and 'resource' are acceptable
Creating test files...
Can't add file with type . Only 'source' and 'resource' are acceptable
Module successfully created!
Name: LoginModule
Module file path: PeopleSay/Classes/Modules/LoginModule
Module group path: PeopleSay/Classes/Modules/LoginModule
Test file path: PeopleSayTests/Classes/Modules/LoginModule
Test group path: PeopleSayTests/Classes/Modules/LoginModule
@Beniamiiin
Copy link
Contributor

@sburavtsov thanks for reporting! Can you show please your rambaspec?

@sburavtsov
Copy link
Author

### Headers settings
company: PeopleSay

### Xcode project settings
project_name: PeopleSay
xcodeproj_path: PeopleSay.xcodeproj
prefix: PS

### Code generation settings section
# The main project target name
project_target: PeopleSay

# The file path for new modules
project_file_path: PeopleSay/Classes/Modules

# The Xcode group path to new modules
project_group_path: PeopleSay/Classes/Modules

### Tests generation settings section
# The tests target name
test_target: PeopleSayTests

# The file path for new tests
test_file_path: PeopleSayTests/Classes/Modules

# The Xcode group path to new tests
test_group_path: PeopleSayTests/Classes/Modules

### Dependencies settings section
podfile_path: Podfile

### Templates
templates:
- {name: rviper_controller}
- {name: mvvm_controller}
- {name: swifty_viper}

@sburavtsov
Copy link
Author

But it is Rambafile, I have some *.rambaspec in templates, but I assume it is not you wanted to see

@Beniamiiin
Copy link
Contributor

Beniamiiin commented Jun 6, 2016

Oops, i don't saw, that you use default template. So that I don't need rambaspec because it I have.

@Beniamiiin
Copy link
Contributor

@sburavtsov you don't modified rviper_controller template in Templates directory?

@sburavtsov
Copy link
Author

No. I can send you whole project as it was generated by xcode, pod install and generamba. This issue can be easily reproduced (at least on my machine). Just tell me where I can send it.

@sburavtsov
Copy link
Author

PeopleSay.zip
Attached it right here.

@Beniamiiin
Copy link
Contributor

Beniamiiin commented Jun 6, 2016

Um...

generamba gen LoginModule rviper_controller

+--------------------+--------------------------------+
|             Summary for gen LoginModule             |
+--------------------+--------------------------------+
| company            | PeopleSay                      |
| project_name       | PeopleSay                      |
| xcodeproj_path     | PeopleSay.xcodeproj            |
| prefix             | PS                             |
| project_target     | PeopleSay                      |
| project_file_path  | PeopleSay/Classes/Modules      |
| project_group_path | PeopleSay/Classes/Modules      |
| test_target        | PeopleSayTests                 |
| test_file_path     | PeopleSayTests/Classes/Modules |
| test_group_path    | PeopleSayTests/Classes/Modules |
| podfile_path       | Podfile                        |
| templates          | rviper_controller              |
|                    | mvvm_controller                |
|                    | swifty_viper                   |
+--------------------+--------------------------------+

LoginModule module already exists. Replace? (yes/no) yes
Creating code files...
Creating test files...
Module successfully created!
Name: LoginModule
Module file path: PeopleSay/Classes/Modules/LoginModule
Module group path: PeopleSay/Classes/Modules/LoginModule
Test file path: PeopleSayTests/Classes/Modules/LoginModule
Test group path: PeopleSayTests/Classes/Modules/LoginModule

@sburavtsov
Copy link
Author

May be it depends on ruby version? I have

ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
Sergeys-iMac:PeopleSay sburavtsov$ 

installed with rbenv

@Beniamiiin
Copy link
Contributor

Which of version generamba installed on your computer?

@sburavtsov
Copy link
Author

I've installed it today with gem install generamba

gem list generamba

*** LOCAL GEMS ***

generamba (0.7.8)
Sergeys-iMac:PeopleSay sburavtsov$ 

@Beniamiiin
Copy link
Contributor

Thnx for you help, i was able to reproduce this bug, appear i don't update generamba. Now I'll see what the problem is.

@Beniamiiin Beniamiiin added the bug label Jun 6, 2016
@Beniamiiin Beniamiiin self-assigned this Jun 6, 2016
etolstoy added a commit that referenced this issue Jun 8, 2016
Added check for empty file_type [Fixed #116]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants