orats 0.3.0 → 0.3.1
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 +1 -1
- data/lib/orats/shell.rb +6 -5
- data/lib/orats/version.rb +1 -1
- 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: a26044924f29339758058ce1fd44c070b101b3b1
|
4
|
+
data.tar.gz: d900ea0bea9f77b6ed79548f1454795ce11f1d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39b50b3fce6c70c9a660032088a79b61a76ffb8ebb9c05b217f310626063b44469029c9a9ebbde2d414590a49c70e1928800291f0c05e2a2b737b0c804fddb9a
|
7
|
+
data.tar.gz: 2ec9125e2e64d80cb301ecc0d97c75b2113b0811bf597ae6bc94206f4418ac4d026781d2f6741622ee9419381d949fb3d66d6216d742ca649e6111e264c9b7d9
|
data/README.md
CHANGED
@@ -84,7 +84,7 @@ running `orats <command name> help` from your terminal. You can also type `orats
|
|
84
84
|
|
85
85
|
- Delete the directory and optionally all data associated to it
|
86
86
|
- `orats nuke <APP_PATH>`
|
87
|
-
- Optionally takes `--skip-data [false]`
|
87
|
+
- Optionally takes: `--skip-data [false]`
|
88
88
|
|
89
89
|
#### Why is it asking me for my development postgres password?
|
90
90
|
|
data/lib/orats/shell.rb
CHANGED
@@ -66,7 +66,7 @@ module Orats
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
def
|
69
|
+
def can_cook?
|
70
70
|
log_message 'shell', 'Checking for the cookbook system dependencies'
|
71
71
|
|
72
72
|
has_knife = run('which knife', capture: true)
|
@@ -76,10 +76,11 @@ module Orats
|
|
76
76
|
'Are you sure you have chef setup correctly?',
|
77
77
|
'http://www.getchef.com/chef/install/`' if has_knife.empty?
|
78
78
|
|
79
|
-
|
80
79
|
dependency_error 'Cannot access berkshelf',
|
81
80
|
'Are you sure you have berkshelf installed correctly?',
|
82
81
|
'You can install it by running `gem install berkshelf`' if has_berks.empty?
|
82
|
+
|
83
|
+
!has_knife.empty? && !has_berks.empty?
|
83
84
|
end
|
84
85
|
|
85
86
|
def exit_if_cannot_rails
|
@@ -90,6 +91,8 @@ module Orats
|
|
90
91
|
dependency_error 'Cannot access rails',
|
91
92
|
'Are you sure you have rails setup correctly?',
|
92
93
|
'You can install it by running `gem install rails`' if has_rails.empty?
|
94
|
+
|
95
|
+
exit 1 if has_rails.empty?
|
93
96
|
end
|
94
97
|
|
95
98
|
def dependency_error(message, question, answer)
|
@@ -99,8 +102,6 @@ module Orats
|
|
99
102
|
say_status 'answer', answer, :cyan
|
100
103
|
puts '-'*80
|
101
104
|
puts
|
102
|
-
|
103
|
-
exit 1
|
104
105
|
end
|
105
106
|
|
106
107
|
def rails_template(command, flags = '', &block)
|
@@ -112,7 +113,7 @@ module Orats
|
|
112
113
|
end
|
113
114
|
|
114
115
|
def cook_app(app_path)
|
115
|
-
|
116
|
+
return unless can_cook?
|
116
117
|
|
117
118
|
@active_path = app_path
|
118
119
|
rails_template 'cook'
|
data/lib/orats/version.rb
CHANGED