traquitana 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +20 -10
- data/config/proc.sh +36 -22
- data/lib/traquitana/version.rb +1 -1
- data/spec/config/app/assets/javascripts/application.js.scss +0 -0
- data/spec/selector_spec.rb +1 -1
- metadata +10 -8
data/README.md
CHANGED
@@ -43,24 +43,34 @@ Or install it yourself as:
|
|
43
43
|
- - public/images/**/*
|
44
44
|
- public/images/uploads/**/*
|
45
45
|
|
46
|
-
|
47
|
-
|
46
|
+
On this example, all below public/images will be send BUT ignoring what is on
|
47
|
+
public/images/uploads. This is a way to make sure you'll not overwrite some
|
48
|
+
production files with your development versions.
|
49
|
+
|
50
|
+
- PLEASE PLEASE PLEASE configure this file. You can create an app on your
|
51
|
+
localhost and make some tests on it 'till you think is safe deal with real
|
52
|
+
apps on production servers.
|
48
53
|
|
49
|
-
- PLEASE PLEASE PLEASE configure this file. You can create an app on your localhost and
|
50
|
-
make some tests on it 'till you think is safe deal with real apps on production servers.
|
51
54
|
- Run traq (just type traq).
|
52
55
|
- It will search for changed files
|
53
56
|
- Will create a list with the file names found
|
54
57
|
- Will zíp the files.
|
55
58
|
- Will send the list to the server, together with some control files.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
59
|
+
- What the control files are for: they are shell scripts that will zip the
|
60
|
+
old files (based on what new files are going), unzip the new files, run
|
61
|
+
migrations if needed, run bundle install if the Gemfile contents changed
|
62
|
+
and restart the web server. There are two files: one generic to make all
|
63
|
+
sort of things BUT not restarting the web server. The webserver script will
|
64
|
+
be send based on what webserver you need.
|
65
|
+
|
66
|
+
- Now everything should be updated. On the next time you want to update your
|
67
|
+
project, just run traq again.
|
60
68
|
|
61
|
-
* The list and the zip file created with the old files will be used on future
|
69
|
+
* The list and the zip file created with the old files will be used on future
|
70
|
+
versions as a rollback feature.
|
62
71
|
|
63
|
-
Use for your risk. I think it's all ok but I don't give you guarantee if it
|
72
|
+
Use for your risk. I think it's all ok but I don't give you guarantee if it
|
73
|
+
break something.
|
64
74
|
|
65
75
|
## Contributing
|
66
76
|
|
data/config/proc.sh
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
function msg() {
|
2
|
+
local str="$1"
|
3
|
+
local verbose="$2"
|
4
|
+
local newline="$3"
|
5
|
+
if [ "$verbose" != "true" ]; then
|
6
|
+
return 1
|
7
|
+
fi
|
8
|
+
if [ "$newline" == "true" ]; then
|
9
|
+
echo "$str"
|
10
|
+
else
|
11
|
+
echo -n "$str"
|
12
|
+
fi
|
13
|
+
}
|
14
|
+
|
1
15
|
# force the production enviroment
|
2
16
|
export RAILS_ENV=production
|
3
17
|
|
@@ -8,46 +22,46 @@ cd $1/..
|
|
8
22
|
verbose="$3"
|
9
23
|
|
10
24
|
# make a copy of the old contents
|
11
|
-
|
12
|
-
echo -n "Making a safety copy of the old contents on traq/$2 ... "
|
13
|
-
fi
|
25
|
+
msg "Making a safety copy of the old contents on traq/$2 ... " "$verbose" "false"
|
14
26
|
zip -q traq/$2.safe.zip `cat traq/$2.list` &> /dev/null
|
15
|
-
|
16
|
-
|
17
|
-
|
27
|
+
msg "done." "$verbose" "true"
|
28
|
+
|
29
|
+
# check the current Gemfile checksum
|
30
|
+
old_gemfile_md5=$(md5sum Gemfile 2> /dev/null | cut -f1 -d' ')
|
18
31
|
|
19
32
|
# install the new files
|
20
|
-
|
33
|
+
msg "Unzipping $2.zip ... " "true" "false"
|
21
34
|
unzip -o traq/$2.zip &> /dev/null
|
22
|
-
|
35
|
+
msg "done." "true" "true"
|
36
|
+
|
37
|
+
# check the new Gemfile checksum
|
38
|
+
new_gemfile_md5=$(md5sum Gemfile 2> /dev/null | cut -f1 -d' ')
|
39
|
+
|
40
|
+
# if the current Gemfile is different, run bundle install
|
41
|
+
if [ "$old_gemfile_md5" != "$new_gemfile_md5" ]; then
|
42
|
+
msg "Running bundle install ..." "$verbose" "true"
|
43
|
+
bundle install
|
44
|
+
fi
|
23
45
|
|
24
46
|
# run migrations if needed
|
25
47
|
migrations=$(grep "^db/migrate" traq/$2.list)
|
26
48
|
if [ -n "$migrations" ]; then
|
27
|
-
|
49
|
+
msg "Running migrations ... " "true" "true"
|
28
50
|
bundle exec rake db:migrate 2> /dev/null
|
29
|
-
|
51
|
+
msg "Migrations done." "true" "true"
|
30
52
|
fi
|
31
53
|
|
32
54
|
# precompile assets if needed
|
33
55
|
if [ -d app/assets ]; then
|
34
|
-
|
35
|
-
echo -n "Compiling assets ... "
|
36
|
-
fi
|
56
|
+
msg "Compiling assets ... " "$verbose" "false"
|
37
57
|
bundle exec rake assets:precompile 2> /dev/null
|
38
|
-
|
39
|
-
echo "done."
|
40
|
-
fi
|
58
|
+
msg "done." "$verbose" "true"
|
41
59
|
fi
|
42
60
|
|
43
61
|
# change file permissions on public dir
|
44
|
-
|
45
|
-
echo -n "Changing file permissions on public to 0755 ... "
|
46
|
-
fi
|
62
|
+
msg "Changing file permissions on public to 0755 ... " "$verbose" "false"
|
47
63
|
chmod -R 0755 public/*
|
48
|
-
|
49
|
-
echo "done."
|
50
|
-
fi
|
64
|
+
msg "done." "$verbose" "true"
|
51
65
|
|
52
66
|
# restart server
|
53
67
|
if [ -x ./traq/server.sh -a -f ./traq/server.sh ]; then
|
data/lib/traquitana/version.rb
CHANGED
File without changes
|
data/spec/selector_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traquitana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-23 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubyzip
|
16
|
-
requirement: &
|
16
|
+
requirement: &81789340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *81789340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: net-ssh
|
27
|
-
requirement: &
|
27
|
+
requirement: &81789010 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *81789010
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: net-scp
|
38
|
-
requirement: &
|
38
|
+
requirement: &81788670 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *81788670
|
47
47
|
description: Simple tool for deploy Rails apps
|
48
48
|
email:
|
49
49
|
- eustaquiorangel@gmail.com
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- spec/cleaner_spec.rb
|
79
79
|
- spec/config/Gemfile
|
80
80
|
- spec/config/Rakefile
|
81
|
+
- spec/config/app/assets/javascripts/application.js.scss
|
81
82
|
- spec/config/app/controllers/people_controller.rb
|
82
83
|
- spec/config/app/models/people.rb
|
83
84
|
- spec/config/app/views/people/index.html.erb
|
@@ -143,6 +144,7 @@ test_files:
|
|
143
144
|
- spec/cleaner_spec.rb
|
144
145
|
- spec/config/Gemfile
|
145
146
|
- spec/config/Rakefile
|
147
|
+
- spec/config/app/assets/javascripts/application.js.scss
|
146
148
|
- spec/config/app/controllers/people_controller.rb
|
147
149
|
- spec/config/app/models/people.rb
|
148
150
|
- spec/config/app/views/people/index.html.erb
|