file_explorer 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +52 -57
- data/app/controllers/file_explorer/index_controller.rb +5 -1
- data/lib/file_explorer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ddd7dd570aca2952f7bee8f58ea157e75c2e4dc7
|
|
4
|
+
data.tar.gz: 40b46ff9f165ad6fdf4a6739988bb29f87f62785
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a394175287a53ac058b561e70d7fe2c49bbfff1181644b8ea705da34f9db2a2795d9c44a16e308d22dca7a6cbb2eee42baf6d361cb41aa4660d90d7f7ca9879
|
|
7
|
+
data.tar.gz: 6843ce5a6021120298b0d4c00ea3b6453e402049d690835818fbe2cd66ca2f1cbf01e803cffefcb31dca636f1d22dbb71530a3076446f6342419cea2d79e9001
|
data/README.md
CHANGED
|
@@ -1,57 +1,52 @@
|
|
|
1
|
-
# FileExplorer
|
|
2
|
-
Short description and motivation.
|
|
3
|
-
|
|
4
|
-
This is a file explorer (as its name suggests). With this gem enabled in your app, you should be able to browse your server directory on the browser.
|
|
5
|
-
This gem acts as a gui to your server, and you're able to view the directories and files; you have the ability to delete files and folders; (a toggle switch hides the delete feature).
|
|
6
|
-
|
|
7
|
-
The application was originally a Rails app by
|
|
8
|
-
<a href="https://github.com/adrientoub">adrientoub</a>. I found the app, and was excited about it,
|
|
9
|
-
and with his permission, I went ahead to gemify the app and redesign some features. Check out the original work here =>
|
|
10
|
-
<a href="https://github.com/adrientoub/file-explorer">file-explorer</a>.
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
How to use my plugin.
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
Add this line to your application's Gemfile:
|
|
17
|
-
|
|
18
|
-
```ruby
|
|
19
|
-
gem 'file_explorer'
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
And then execute:
|
|
23
|
-
```bash
|
|
24
|
-
$ bundle
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Contribution directions go here.
|
|
54
|
-
|
|
55
|
-
## License
|
|
56
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
57
|
-
|
|
1
|
+
# FileExplorer
|
|
2
|
+
Short description and motivation.
|
|
3
|
+
|
|
4
|
+
This is a file explorer (as its name suggests). With this gem enabled in your app, you should be able to browse your server directory on the browser.
|
|
5
|
+
This gem acts as a gui to your server, and you're able to view the directories and files; you have the ability to delete files and folders; (a toggle switch hides the delete feature).
|
|
6
|
+
|
|
7
|
+
The application was originally a Rails app by
|
|
8
|
+
<a href="https://github.com/adrientoub">adrientoub</a>. I found the app, and was excited about it,
|
|
9
|
+
and with his permission, I went ahead to gemify the app and redesign some features. Check out the original work here =>
|
|
10
|
+
<a href="https://github.com/adrientoub/file-explorer">file-explorer</a>.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
How to use my plugin.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
Add this line to your application's Gemfile:
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
gem 'file_explorer'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
And then execute:
|
|
23
|
+
```bash
|
|
24
|
+
$ bundle install
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
And in your routes:
|
|
28
|
+
```ruby
|
|
29
|
+
mount FileExplorer::Engine => "/file_explorer"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Visit: http://localhost:3000/file_explorer"
|
|
33
|
+
|
|
34
|
+
<h3 style="display: inline-block;float:right;margin: 3px 10px;">
|
|
35
|
+
Permissions is not functional, so be careful how you use this tool<br>
|
|
36
|
+
This tool shows your file path and will open files of size 2.5mb or less
|
|
37
|
+
</h3>
|
|
38
|
+
|
|
39
|
+
<img src="https://github.com/ohiodn8/image-repo/blob/master/file_explorer_img.PNG" alt="File_Explorer-screenshot">
|
|
40
|
+
|
|
41
|
+
## Contributors
|
|
42
|
+
<p><a href="https://github.com/ohiodn8">ohiodn8</a></p>
|
|
43
|
+
<p><a href="https://github.com/adrientoub">adrientoub</a></p>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Contributing
|
|
48
|
+
Contribution directions go here.
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
52
|
+
|
|
@@ -41,7 +41,11 @@ module FileExplorer
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def folder_create
|
|
44
|
-
|
|
44
|
+
if Gem.win_platform?
|
|
45
|
+
`mkdir #{params[:index].fetch(:name)}`
|
|
46
|
+
else
|
|
47
|
+
`sudo mkdir #{params[:index].fetch(:name)}`
|
|
48
|
+
end
|
|
45
49
|
redirect_to request.referrer, notice: "#{params[:index].fetch(:name)} FOLDER CREATED!"
|
|
46
50
|
end
|
|
47
51
|
|