Which folder to store design files in Rails App? - ruby-on-rails-3

I have a few other files related to my Rails website I am building like a few wireframes, mocks, and other design files. I want to store them in the Rails website directory so that all the things relating to that project are in the same folder. Where should I store these non-essential, non-related files inside a Rails app? Public/, Lib/, Vendor/? Please help me out. Thanks!

If you want them to be easily accessible, use public/. Otherwise, I would suggest just creating a new directory for these things, design/ perhaps.

Related

How To Upload Vue.js project in Live Server

I believe it is much the same as a vue.js 2.6 upload. I have my setup as follows, is this correct? Is the only file I need to amend the index.html file which in my case is in the techjobs folder? I have amended this file to suit the directory structure. Are there any other files.Please provide .htaccess file
I'm not sure about what are you asking, could you try to modify tour question, please?
Anyways, if what do you want is to know the way to compile and push to a production environment, there are several options like Firebase, Netlify, Github pages, etc.
You can use this documentation where you can follow step by step how to push to production.
https://cli.vuejs.org/guide/deployment.html#general-guidelines

Should I hide SASS files from browsing?

When developing our sites we commit our SASS files and css files to git and release that code to a DTAP environment. Those SASS (or SCSS) files are readable for everyone when you know the url. This way you can read the sass files from the browser.
Is there a security issue or something about this? Should we disable the browsing of these files?
Ik hope someone is able to help!
Thanks
A security problem would only exist if the SASS files contain sensitive information (usernames, passwords, API keys, file paths). Sometimes developers add sensitive comments to source files, so inform your team of the risk and don't consider it to be a critical priority.

Dropwizard serve external images directory

I have a dropwizard API app and I want one endpoint where I can run the call and also upload and image, these images have to be saved in a directory and then served through the same application context.
Is it possible with dropwizard? I can only find static assets bundles.
There is similar question already: Can DropWizard serve assets from outside the jar file?
The above module is mentioned in the third party modules list of dropwizard. There is also official modules list. These two lists are hard to find maybe because the main documentation doesn't reference them.
There is also dropwizard-file-assets which seems new. I don't know which module will work best for your case. Both are based on dropwizard's AssetServlet
If you don't like them you could use it as example how to implement your own. I suspect that the resource caching part may not be appropriate for your use case if someone replace the same resource name with new content: https://github.com/dirkraft/dropwizard-file-assets/blob/master/src/main/java/com/github/dirkraft/dropwizard/fileassets/FileAssetServlet.java#L129-L141
Edit: This is simple project that I've made using dropwizard-configurable-assets-bundle. Follow the instructions in the README.md. I think it is doing exactly what you want: put some files in a directory somewhere on the file system (outside the project source code) and serve them if they exist.

Changing Inside Assets Folder In Yii Framework

I came to notice that there is one folder called assets in the root folder.To know more about it,I went through this link.Now I want to know adding some css in these files is good or shall I add css to to the main.css file inside css folder.
The asset folder is automatically generated by Yii based upon your environment so best avoid putting your CSS, images etc inside here. It also best to not commit these folders and files into SVN as they are automatically generated and folder names will differ from your qa/staging/live site to your local site.
There are some good reasons to use Yii's assets.
it prevents naming conflicts in css and js files
it allows you to keep CSS and JS files under your document-root but outside of your web-root (for easier version control)
it allows to easily switch between sets of CSS & JS files, rather than having to deal with each file individually (suppose the system admin needs to revert back to a previous version).
it allows you to publish assets (images, JS & CS) to several websites hosted on the same server.
Please check here or there for more details.
Well, when i started my first Yii project, i also put my CSS and JS files in assets. It works but then i found that its not just the right way. Its better to make a separate directory for your CSS file(s). Also there are some auto generated files in assets, so to avoid mix-up with those and your i prefer to make it separate. Hope you got the point.

NSTask setLaunchPath Objective-C Cocca

This is a very simple question. I have a script in the same folder as the Cocoa app. I can't seem to set the path to it properly for setLaunchPath for NSTask. Help please.
I have a folder called Project. Inside of it, exist multiple folders but only two we care about: Classes (the source files for the Cocoa app are here) and Ruby (which is a ruby server folder). I am trying to call Ruby/script/server. I assumed it would be something like ./Ruby/script/server or Ruby/script/server but both are wrong.
Thanks.
EDIT: I guess what I'm actually asking is if there is a way to access the folder where the source files or the project is by using a special character or shortcut because by default it goes to the /tmp folder.
The current directory (in the unix sense) in an app is not guaranteed to be anything. The path to the app itself can be obtained by getting the main app bundle by
NSBundle*mainBundle=[NSBundle mainBundle];
and then getting its path
NSString*path=[mainBundle bundlePath];
However please don't do that; you won't be able to distribute your app without extra instructions of putting files here and there.
Instead, put your Ruby code inside yourApp.app/Contents/Resources/. This can be done by including the Ruby code in the XCode, and making sure it's set to be copied into the app. The files inside this Resources directory can be obtained as follows:
NSString*path=[mainBundle pathForResource:#"rubyServer" ofType:#"rb"];
To learn more about the bundle structure, read Bundle Programming Guide.