cavalerie_web 1.1.1 → 1.1.2

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: 006e330de31bc964a14fd719465f7a817c12d938
4
- data.tar.gz: a2cbb42b0378457ffd3a2333d2ce721c38e3a731
3
+ metadata.gz: c05e52cb2748a5030ba9fc2c888d310379c33d51
4
+ data.tar.gz: 79920f7c6518a6a7ae0a2cd4ffd228a87fd8e546
5
5
  SHA512:
6
- metadata.gz: f8ead899bad7de691fab3b8805a22f42d4351d53ce50bebdd018cc781b95d475c6ec56d228344674150fdd5889486041ccc36d577f732d12ed5445511fe7e92e
7
- data.tar.gz: 98c514ba8a4ae990494475506449f47e91a6c675d3aa5fdb6ad8fcc11dc9f3ac04048af322009f576779b56f76efd0848492065313bcf6e0447d4b3c2bcd5740
6
+ metadata.gz: ccd478af4347143d74bdf2ccc7047a00ffd5c95ca169c9d1f5ec9c1c58405e86c7879a3b6094ae074149e0938d298856e2bf8985f7dd7f3eb456bd684464fcf1
7
+ data.tar.gz: 6b230c9d11db0a694856f998071cc0e182cb6e213a3163ee5f9493320d4413e06ea492cb674dab99ef42da336d34a0411fb7a6500ba3bdb7ce3e8afa7a2502a0
data/README.md CHANGED
@@ -6,9 +6,15 @@
6
6
 
7
7
  [![Test Coverage](https://codeclimate.com/github/lacavalerie/cavalerie_web_gem/badges/coverage.svg)](https://codeclimate.com/github/lacavalerie/cavalerie_web_gem)
8
8
 
9
- ## Requirements
9
+ ## Why this gem?
10
10
 
11
- ### Ruby 2.0+
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
- # Install Ruby
23
- rbenv install 2.2.1
24
- rbenv global 2.2.1
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
- ### MySQL Dev (see [this Stackoverflow ticket](http://stackoverflow.com/questions/3754662/errors-installing-mysql2-gem-via-the-bundler))
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 mysql-devel
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
- ## Installation
79
+ ### 2. Gem installation
49
80
 
50
81
  In your Terminal, run the following commands:
51
82
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "cavalerie_web"
7
- spec.version = "1.1.1"
7
+ spec.version = "1.1.2"
8
8
  spec.authors = ["Arnaud Lenglet"]
9
9
  spec.email = ["arlenglet@gmail.com"]
10
10
 
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cavalerie_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Lenglet