rails-fix-permissions 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/rails-fix-permissions +5 -0
- data/lib/rails-fix-permissions.rb +19 -0
- metadata +51 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4e3b6f5a6498c14db8fd69576c1fd60cd8bc9e57
|
4
|
+
data.tar.gz: d72504562cd47337ce87494110833ec59469a595
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9ed5ee4432fb6744fe4897f0f3b388e778e60ea70e504c22c400430a345992fdae53624a5a301dbc9e0ad7ae379baf83d523688004db6467597c6534b65d13ff
|
7
|
+
data.tar.gz: 9b52d6c06fd7b405c00c69afe14df6e815d04a12f64b0e93c62f163ee13c2c1245674f65cefe32c09aeaf45c3b5bd9aa4191214ebbe65e20df6c8eecb4c7ce91
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class RailsFixPermissions
|
2
|
+
def initialize
|
3
|
+
# Get the current dir and the name of the current folder.
|
4
|
+
current_dir = `pwd`
|
5
|
+
basename = `basename #{current_dir}`
|
6
|
+
app_path = '../' + basename.chomp("\n")
|
7
|
+
|
8
|
+
# Run shell scripts to set permissions.
|
9
|
+
directories = `chmod 755 $(find #{app_path} -type d)`
|
10
|
+
files = `chmod 644 $(find #{app_path} -type f)`
|
11
|
+
bundle = `chmod 755 #{app_path+'/bin/bundle'}`
|
12
|
+
rails = `chmod 755 #{app_path+'/bin/rails'}`
|
13
|
+
rake = `chmod 755 #{app_path+'/bin/rake'}`
|
14
|
+
spring = `chmod 755 #{app_path+'/bin/spring'}`
|
15
|
+
|
16
|
+
puts 'Done!'
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails-fix-permissions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Fernando Schuindt
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-18 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Sometimes you may mess your Rails application Unix permissions and get
|
14
|
+
some annoying errors with git. This gem runs a simple Shell script to fix that.
|
15
|
+
Granting 755 permissions to folders and 644 to files, also ensures that some special
|
16
|
+
files inside the 'bin/' folder will recive special 755 permissions (bundle, rails,
|
17
|
+
rake and spring) which is pretty much the Rails default. Works with all versions
|
18
|
+
of Ruby on Rails.
|
19
|
+
email: f.schuindtcs@gmail.com
|
20
|
+
executables:
|
21
|
+
- rails-fix-permissions
|
22
|
+
extensions: []
|
23
|
+
extra_rdoc_files: []
|
24
|
+
files:
|
25
|
+
- bin/rails-fix-permissions
|
26
|
+
- lib/rails-fix-permissions.rb
|
27
|
+
homepage: https://github.com/fschuindt/rails-fix-permissions
|
28
|
+
licenses:
|
29
|
+
- MIT
|
30
|
+
metadata: {}
|
31
|
+
post_install_message:
|
32
|
+
rdoc_options: []
|
33
|
+
require_paths:
|
34
|
+
- lib
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
requirements: []
|
46
|
+
rubyforge_project:
|
47
|
+
rubygems_version: 2.2.2
|
48
|
+
signing_key:
|
49
|
+
specification_version: 4
|
50
|
+
summary: Simple script to fix Rails applications permissions mess.
|
51
|
+
test_files: []
|