ghost-manager 1.0.1 → 1.0.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 +59 -9
- data/bin/ghost +0 -1
- data/ghost-manager.gemspec +0 -4
- data/lib/ghost/manager.rb +0 -1
- data/lib/ghost/manager/ghost_file.rb +5 -4
- data/lib/ghost/manager/version.rb +1 -1
- metadata +1 -83
- data/lib/ghost/manager/file_monitor.rb +0 -77
- data/lib/ghost/templates/ghostfile.json.erb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b501227f53401794b2d1b5fdaace20068f9ac1f
|
4
|
+
data.tar.gz: 35a3872e4b1a5880147210c84a9e6e5b801fbfca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95acc8b3f361156f2999d7e39ee71e69f8d968d0d8b5bd0117339d41a715a0b409e5d112e1e219842cdf6b1c09384366be671e551cc2cdb2e7312ca67e4699ca
|
7
|
+
data.tar.gz: 327476cc6d328b6cd20957a66f7a46f752b0ebf43ebbf4816b5a75f807e9e80764b2372f8e6226fad2c7b5c87c0a2d57e3f9eaea065204f51af7cc98095f970f
|
data/README.md
CHANGED
@@ -25,21 +25,71 @@ An easy-to-use menu interface which can be accessed by simply entering:
|
|
25
25
|
```
|
26
26
|
$ ghost
|
27
27
|
|
28
|
+
Welcome to Ghost Manager, created by Create the Bridge
|
28
29
|
|
29
|
-
|
30
|
+
1. Initialize a new Ghost project
|
31
|
+
2. Create Ghost install
|
32
|
+
3. Update Ghost
|
33
|
+
4. Create Ghost theme
|
34
|
+
5. Run Ghost server
|
35
|
+
6. Launch dev suite
|
36
|
+
What do you want to do?
|
30
37
|
|
31
|
-
Console:
|
32
38
|
```
|
33
|
-
$joshuat ghost
|
34
|
-
Welcome to Ghost Manager, created by Create the Bridge
|
35
39
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
+
Regular command interface with command line arguments:
|
41
|
+
|
42
|
+
_Ghost Manager will ask for install directory and theme name if not provided._
|
43
|
+
|
44
|
+
**Command**: ghost init
|
45
|
+
|
46
|
+
**Description**: Initializes a new ghost project in the current directory, while giving you the option to install ghost elsewhere.
|
47
|
+
|
48
|
+
**Params**:
|
49
|
+
+ (optional) Directory
|
50
|
+
+ (optional) Theme name
|
51
|
+
|
52
|
+
```
|
53
|
+
$ ghost init ~/Applications/Ghost magneto
|
54
|
+
```
|
55
|
+
|
56
|
+
**Command**: ghost install
|
57
|
+
|
58
|
+
**Description**: Installs ghost to the given directory
|
59
|
+
|
60
|
+
**Params**:
|
61
|
+
+ (optional) Directory
|
62
|
+
|
63
|
+
```
|
64
|
+
$ ghost install ~/Applications/Ghost
|
40
65
|
```
|
41
66
|
|
42
|
-
|
67
|
+
**Command**: ghost theme
|
68
|
+
|
69
|
+
**Description**: Creates a new theme in the current directory, requires a ghostfile
|
70
|
+
|
71
|
+
**Params**:
|
72
|
+
+ (optional) Theme name
|
73
|
+
|
74
|
+
```
|
75
|
+
$ ghost theme magneto
|
76
|
+
```
|
77
|
+
|
78
|
+
**Command**: ghost dev
|
79
|
+
|
80
|
+
**Description**: After ghost has been installed and a theme created, this will launch the ghost server and an instance of Atom to start developing your them. Requires a ghostfile
|
81
|
+
|
82
|
+
```
|
83
|
+
$ ghost dev
|
84
|
+
```
|
85
|
+
|
86
|
+
**Command**: ghost server
|
87
|
+
|
88
|
+
**Description**: After Ghost has been installed, this will launch the ghost server. Requires a ghostfile
|
89
|
+
|
90
|
+
```
|
91
|
+
$ ghost server
|
92
|
+
```
|
43
93
|
|
44
94
|
## Contributing
|
45
95
|
|
data/bin/ghost
CHANGED
data/ghost-manager.gemspec
CHANGED
@@ -24,9 +24,5 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "rake", '~> 10.0'
|
25
25
|
|
26
26
|
spec.add_runtime_dependency "highline", "~> 1.7.3", ">= 1.7.3"
|
27
|
-
spec.add_runtime_dependency "slop", "~> 4.2.0", ">= 4.2.0"
|
28
|
-
spec.add_runtime_dependency "fssm", "~> 0.2.10", ">= 0.2.10"
|
29
|
-
spec.add_runtime_dependency "erubis", "~> 2.7.0", ">= 2.7.0"
|
30
27
|
spec.add_runtime_dependency "json", "~> 1.8.3", ">= 1.8.3"
|
31
|
-
spec.add_runtime_dependency "rsync", "~> 1.0.9", ">= 1.0.9"
|
32
28
|
end
|
data/lib/ghost/manager.rb
CHANGED
@@ -9,10 +9,11 @@ module Ghost
|
|
9
9
|
attr_accessor :path, :content
|
10
10
|
|
11
11
|
def self.create dir
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
content = {
|
13
|
+
"ghost-installation" => dir
|
14
|
+
}
|
15
|
+
json = JSON.pretty_generate content
|
16
|
+
File.write File.join(Dir.pwd, "ghostfile.json"), json
|
16
17
|
self.new
|
17
18
|
end
|
18
19
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghost-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Tyree
|
@@ -58,66 +58,6 @@ dependencies:
|
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 1.7.3
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: slop
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: 4.2.0
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: 4.2.0
|
71
|
-
type: :runtime
|
72
|
-
prerelease: false
|
73
|
-
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - "~>"
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 4.2.0
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 4.2.0
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: fssm
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: 0.2.10
|
88
|
-
- - ">="
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: 0.2.10
|
91
|
-
type: :runtime
|
92
|
-
prerelease: false
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: 0.2.10
|
98
|
-
- - ">="
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: 0.2.10
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: erubis
|
103
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
-
requirements:
|
105
|
-
- - "~>"
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: 2.7.0
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 2.7.0
|
111
|
-
type: :runtime
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 2.7.0
|
118
|
-
- - ">="
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: 2.7.0
|
121
61
|
- !ruby/object:Gem::Dependency
|
122
62
|
name: json
|
123
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,26 +78,6 @@ dependencies:
|
|
138
78
|
- - ">="
|
139
79
|
- !ruby/object:Gem::Version
|
140
80
|
version: 1.8.3
|
141
|
-
- !ruby/object:Gem::Dependency
|
142
|
-
name: rsync
|
143
|
-
requirement: !ruby/object:Gem::Requirement
|
144
|
-
requirements:
|
145
|
-
- - "~>"
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
version: 1.0.9
|
148
|
-
- - ">="
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: 1.0.9
|
151
|
-
type: :runtime
|
152
|
-
prerelease: false
|
153
|
-
version_requirements: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - "~>"
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: 1.0.9
|
158
|
-
- - ">="
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: 1.0.9
|
161
81
|
description: Ghost manager is a ruby command line utility to manager Ghost installation
|
162
82
|
and theme development
|
163
83
|
email:
|
@@ -179,12 +99,10 @@ files:
|
|
179
99
|
- bin/setup
|
180
100
|
- ghost-manager.gemspec
|
181
101
|
- lib/ghost/manager.rb
|
182
|
-
- lib/ghost/manager/file_monitor.rb
|
183
102
|
- lib/ghost/manager/ghost_file.rb
|
184
103
|
- lib/ghost/manager/installer.rb
|
185
104
|
- lib/ghost/manager/theme_generator.rb
|
186
105
|
- lib/ghost/manager/version.rb
|
187
|
-
- lib/ghost/templates/ghostfile.json.erb
|
188
106
|
- lib/string.rb
|
189
107
|
homepage: https://github.com/CreateTheBridge/ghost-manager
|
190
108
|
licenses:
|
@@ -1,77 +0,0 @@
|
|
1
|
-
require 'fssm'
|
2
|
-
require 'rsync'
|
3
|
-
require 'highline/import'
|
4
|
-
require 'ghost/manager/ghost_file'
|
5
|
-
|
6
|
-
module Ghost
|
7
|
-
module Manager
|
8
|
-
|
9
|
-
class FileMonitor
|
10
|
-
|
11
|
-
def self.start
|
12
|
-
instance = self.new
|
13
|
-
instance.start_monitoring
|
14
|
-
instance
|
15
|
-
end
|
16
|
-
|
17
|
-
def initialize
|
18
|
-
@ghost_file = Ghost::Manager::GhostFile.new
|
19
|
-
|
20
|
-
unless @ghost_file.exists?
|
21
|
-
say "<%= color('Unable to find ghostfile', :red, :bold) %>"
|
22
|
-
raise Exception.new "Missing ghostfile"
|
23
|
-
end
|
24
|
-
|
25
|
-
sync_files
|
26
|
-
end
|
27
|
-
|
28
|
-
def monitor
|
29
|
-
theme_dir = File.join Dir.pwd, @ghost_file.ghost_theme
|
30
|
-
FSSM.monitor theme_dir, "**/*", directories: true do
|
31
|
-
update do |b, r, t|
|
32
|
-
sync_files
|
33
|
-
end
|
34
|
-
|
35
|
-
create do |b, r, t|
|
36
|
-
sync_files
|
37
|
-
end
|
38
|
-
|
39
|
-
delete do |b, r, t|
|
40
|
-
sync_files
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def start_monitoring
|
46
|
-
theme_dir = File.join Dir.pwd, @ghost_file.ghost_theme
|
47
|
-
|
48
|
-
Thread.new {
|
49
|
-
FSSM.monitor theme_dir do
|
50
|
-
update{ sync_files }
|
51
|
-
delete{ sync_files }
|
52
|
-
create{ sync_files }
|
53
|
-
end
|
54
|
-
}
|
55
|
-
end
|
56
|
-
|
57
|
-
def sync_files
|
58
|
-
say "<%= color('Theme changed, syncing files...', :light_blue, :bold) %>"
|
59
|
-
|
60
|
-
theme_dir = File.join Dir.pwd, @ghost_file.ghost_theme
|
61
|
-
ghost_theme_dir = File.join @ghost_file.ghost_path, "content", "themes", @ghost_file.ghost_theme
|
62
|
-
|
63
|
-
Rsync.run theme_dir, ghost_theme_dir do |result|
|
64
|
-
if result.success?
|
65
|
-
result.changes.each do |change|
|
66
|
-
say " <%= color('#{change.filename}', :yellow) %> <%= color('#{change.summary}', :green) %>"
|
67
|
-
end
|
68
|
-
else
|
69
|
-
say "<%= color('Failed to sync changes: #{result.error}', :red, :bold) %>"
|
70
|
-
end
|
71
|
-
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|