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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3e9d871cc707d03a5cb1b489c4eeafc7971da08
4
- data.tar.gz: 679b2b7eeb777ed9b13130733cda7eadf06b2e1b
3
+ metadata.gz: 4b501227f53401794b2d1b5fdaace20068f9ac1f
4
+ data.tar.gz: 35a3872e4b1a5880147210c84a9e6e5b801fbfca
5
5
  SHA512:
6
- metadata.gz: 6f3b1af5ad8111cff63cec457e99f51323b40283f3faf1a6a035c8d131732c0ce6fbf907a764e77e12b517a735d4d3856f4c8a7e66c3ee8daed24883baed058e
7
- data.tar.gz: 71770ef27b187063a9eb0dbcde28b0d0767f9339a1c9fb979913ecfc83160fd9961251e25bd0e26b009f0cf134bbb667b19ca49b105657df24e8315dee941675
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
- Using Ghost Manager is dead simple. Using the "ghost" command, select from the menu and continue with on-screen instructions.
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
- 1. Install Ghost
37
- 2. Update Ghost Install
38
- 3. Generate Theme
39
- What do you want to do?
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
- It's important to note that you must have git and npm installed for this gem to function properly.
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
@@ -3,7 +3,6 @@
3
3
  require 'string'
4
4
  require 'ghost/manager'
5
5
  require 'highline/import'
6
- require 'slop'
7
6
 
8
7
  COMMANDS = {
9
8
  'init' => Proc.new{
@@ -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
@@ -1,6 +1,5 @@
1
1
  require "ghost/manager/version"
2
2
  require "ghost/manager/installer"
3
- require "ghost/manager/file_monitor"
4
3
  require "ghost/manager/ghost_file"
5
4
  require "ghost/manager/theme_generator"
6
5
 
@@ -9,10 +9,11 @@ module Ghost
9
9
  attr_accessor :path, :content
10
10
 
11
11
  def self.create dir
12
- @ghost_directory = dir
13
- @template = File.read "#{Dir.pwd}/lib/ghost/templates/ghostfile.json.erb"
14
- erb = ERB.new(@template).result binding
15
- File.write File.join(Dir.pwd, "ghostfile.json"), erb
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
 
@@ -1,5 +1,5 @@
1
1
  module Ghost
2
2
  module Manager
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
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.1
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
@@ -1,3 +0,0 @@
1
- {
2
- "ghost-installation": "<%= @ghost_directory %>"
3
- }