file_explorer 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89442d3bd09846efb41b023966abcf43658ec921
4
- data.tar.gz: 8043508c6bcecf9d8af84ce404c4df9f575d58e1
3
+ metadata.gz: ddd7dd570aca2952f7bee8f58ea157e75c2e4dc7
4
+ data.tar.gz: 40b46ff9f165ad6fdf4a6739988bb29f87f62785
5
5
  SHA512:
6
- metadata.gz: c60ebd9c64cc5fa1355cc43ccca119e31bfe70a7e8398c248e80d9655a2a76dbee9511e018ec97c716e5cef357a54be0dcff488ed64b6bf9fa84af61d90da40d
7
- data.tar.gz: 112362e727dac8eac4c0922ae12e7d07ca203f4ecd7e566c10b7585b7044aee9f507c4c030a5a9b93109e07235b6b65ff3154cc7da0fa4bdbc539acb4e1a85af
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
- Or install it yourself as:
28
- ```bash
29
- $ gem install file_explorer
30
- ```
31
-
32
- And in your routes:
33
- ```ruby
34
- mount FileExplorer::Engine => "/file_explorer"
35
- ```
36
-
37
- Visit: http://localhost:3000/file_explorer"
38
-
39
- <h3 style="display: inline-block;float:right;margin: 3px 10px;">
40
- Permissions is not functional, so be careful how you use this tool<br>
41
- This tool shows your file path and will open files of size 2.5mb or less
42
- </h3>
43
-
44
- <img src="https://github.com/ohiodn8/image-repo/blob/master/file_explorer_img.PNG" alt="File_Explorer-screenshot">
45
-
46
- ## Contributors
47
- <p><a href="https://github.com/ohiodn8">ohiodn8</a></p>
48
- <p><a href="https://github.com/adrientoub">adrientoub</a></p>
49
-
50
-
51
-
52
- ## Contributing
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
- `mkdir #{params[:index].fetch(:name)}`
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
 
@@ -1,3 +1,3 @@
1
1
  module FileExplorer
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file_explorer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - odion ohio