cavalerie_web 1.1.1 → 1.1.2
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 +39 -8
- data/cavalerie_web.gemspec +1 -1
- data/lib/cavalerie_web/managers/sequence_manager.rb +4 -0
- data/lib/cavalerie_web.rb +9 -4
- 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: c05e52cb2748a5030ba9fc2c888d310379c33d51
|
4
|
+
data.tar.gz: 79920f7c6518a6a7ae0a2cd4ffd228a87fd8e546
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccd478af4347143d74bdf2ccc7047a00ffd5c95ca169c9d1f5ec9c1c58405e86c7879a3b6094ae074149e0938d298856e2bf8985f7dd7f3eb456bd684464fcf1
|
7
|
+
data.tar.gz: 6b230c9d11db0a694856f998071cc0e182cb6e213a3163ee5f9493320d4413e06ea492cb674dab99ef42da336d34a0411fb7a6500ba3bdb7ce3e8afa7a2502a0
|
data/README.md
CHANGED
@@ -6,9 +6,15 @@
|
|
6
6
|
|
7
7
|
[](https://codeclimate.com/github/lacavalerie/cavalerie_web_gem)
|
8
8
|
|
9
|
-
##
|
9
|
+
## Why this gem?
|
10
10
|
|
11
|
-
|
11
|
+
This gem allow you to setup a local Wordpress development environment on your machine.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### 1. Requirements
|
16
|
+
|
17
|
+
#### Ruby 2.0+
|
12
18
|
|
13
19
|
- For Mac OSX (with [Homebrew](http://brew.sh/), thanks to [this post](https://gorails.com/setup/osx/10.10-yosemite))
|
14
20
|
|
@@ -18,22 +24,47 @@ $ brew install rbenv ruby-build
|
|
18
24
|
# Add rbenv to bash so that it loads every time you open a terminal
|
19
25
|
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
|
20
26
|
source ~/.bash_profile
|
27
|
+
```
|
28
|
+
|
29
|
+
Then jump to "Finishing rbenv install for all systems"
|
30
|
+
|
31
|
+
- For Debian
|
32
|
+
|
33
|
+
```bash
|
34
|
+
$ sudo apt-get update && sudo apt-get install git-core
|
35
|
+
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
|
36
|
+
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
|
37
|
+
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
|
21
38
|
|
22
|
-
#
|
23
|
-
|
24
|
-
rbenv
|
39
|
+
# Restart you shell
|
40
|
+
|
41
|
+
# Ensuring rbenv in installed
|
42
|
+
$ type rbenv
|
43
|
+
|
44
|
+
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
|
45
|
+
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
|
46
|
+
|
47
|
+
$ apt-get install build-essential libssl-dev libcurl4-openssl-dev libreadline-dev -y
|
48
|
+
```
|
49
|
+
|
50
|
+
Then jump to "Finishing rbenv install for all systems":
|
51
|
+
|
52
|
+
```bash
|
53
|
+
# Install Ruby (this could take a while...)
|
54
|
+
$ rbenv install 2.1.0 -k
|
55
|
+
$ rbenv global 2.1.0
|
25
56
|
|
26
57
|
# Ensure the Ruby used is the rbenv's one
|
27
58
|
which ruby
|
28
59
|
```
|
29
60
|
|
30
|
-
|
61
|
+
#### MySQL Dev (see [this Stackoverflow ticket](http://stackoverflow.com/questions/3754662/errors-installing-mysql2-gem-via-the-bundler))
|
31
62
|
|
32
63
|
- Linux
|
33
64
|
|
34
65
|
```bash
|
35
66
|
# Ubuntu/Debian
|
36
|
-
$ sudo apt-get install
|
67
|
+
$ sudo apt-get install libmysqlclient-dev
|
37
68
|
|
38
69
|
# Fedora
|
39
70
|
$ sudo yum install mysql-devel
|
@@ -45,7 +76,7 @@ $ sudo yum install mysql-devel
|
|
45
76
|
$ brew install mysql
|
46
77
|
```
|
47
78
|
|
48
|
-
|
79
|
+
### 2. Gem installation
|
49
80
|
|
50
81
|
In your Terminal, run the following commands:
|
51
82
|
|
data/cavalerie_web.gemspec
CHANGED
@@ -3,12 +3,16 @@ module CavalerieWeb
|
|
3
3
|
class SequenceManager
|
4
4
|
|
5
5
|
def self.start_sequence sequence_name, max_retries=1
|
6
|
+
Dir.chdir $gem_path
|
7
|
+
|
6
8
|
klass = Object.const_get(format_to_sequence_class(sequence_name))
|
7
9
|
human_sequence_name = format_for_human sequence_name
|
8
10
|
retry_counter = 0
|
9
11
|
sequence_ended = false
|
10
12
|
|
11
13
|
while !sequence_ended
|
14
|
+
Dir.chdir $gem_path
|
15
|
+
|
12
16
|
begin
|
13
17
|
if retry_counter == 0
|
14
18
|
puts Message.notice "Starting sequence \"#{human_sequence_name}\""
|
data/lib/cavalerie_web.rb
CHANGED
@@ -18,6 +18,13 @@ module CavalerieWeb
|
|
18
18
|
require "cavalerie_web/cli/command"
|
19
19
|
end
|
20
20
|
|
21
|
+
def self.run_on_startup
|
22
|
+
$gem_path = Gem::Specification.find_by_name("cavalerie_web").gem_dir
|
23
|
+
$configs_path = $gem_path + "/lib/cavalerie_web/configs"
|
24
|
+
|
25
|
+
Dir.chdir $gem_path
|
26
|
+
end
|
27
|
+
|
21
28
|
# Initialization
|
22
29
|
def self.initialize_system
|
23
30
|
$sites_folder_path = ENV[Config.get_environment_variables[:sites][:name]]
|
@@ -27,10 +34,8 @@ module CavalerieWeb
|
|
27
34
|
$credentials_folder_path = $shared_folder_path + "/_credentials"
|
28
35
|
$samples_folder_path = $shared_folder_path + "/_samples"
|
29
36
|
$db_dumps_folder_path = $shared_folder_path + "/_db_dumps"
|
30
|
-
$gem_path = Gem::Specification.find_by_name("cavalerie_web").gem_dir
|
31
|
-
$configs_path = $gem_path + "/lib/cavalerie_web/configs"
|
32
|
-
|
33
|
-
Dir.chdir $gem_path
|
34
37
|
end
|
35
38
|
|
39
|
+
run_on_startup
|
40
|
+
|
36
41
|
end
|