marv 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 62e5f5d28517617ac5c41ebbd236678eb7fe00d7
4
+ data.tar.gz: 866c15bb2ec6a49f65075cf7234a8d0544e32898
5
+ SHA512:
6
+ metadata.gz: 769ac0c9e011cc988f2c7dcbee33011d5c4ac122c3da71f38915dbb90a574b747071022a7e0c538809bcb88e8bc3603c402f745a5a3407beac83e2cc5178d0b0
7
+ data.tar.gz: 99d8be3f3c25dbbe54386523086adb0c40d3da55482d8c2a22e7b9aec82f7f40cae95578393bc89586e7ab961928c43f62380c657765ed2b5f1f0756c5518f2e
@@ -1,3 +1,9 @@
1
+ ## v0.6.2
2
+ * Fix global link
3
+ * Fix server debug mode
4
+ * Fix server restart
5
+ * Optimize server running detection
6
+
1
7
  ## v0.6.1
2
8
  * Fix server running message when server not running
3
9
  * Use specific version of tilt gem
@@ -1,14 +1,14 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.7)
4
+ addressable (2.3.8)
5
5
  builder (3.2.2)
6
6
  celluloid (0.16.0)
7
7
  timers (~> 4.0.0)
8
- childprocess (0.5.5)
8
+ childprocess (0.5.6)
9
9
  ffi (~> 1.0, >= 1.0.11)
10
10
  coderay (1.1.0)
11
- coffee-script (2.3.0)
11
+ coffee-script (2.4.1)
12
12
  coffee-script-source
13
13
  execjs
14
14
  coffee-script-source (1.9.1)
@@ -19,7 +19,7 @@ GEM
19
19
  eventmachine (>= 0.12.9)
20
20
  http_parser.rb (~> 0.6.0)
21
21
  eventmachine (1.0.7)
22
- execjs (2.4.0)
22
+ execjs (2.5.2)
23
23
  faraday (0.9.1)
24
24
  multipart-post (>= 1.2, < 3)
25
25
  ffi (1.9.8)
@@ -43,7 +43,7 @@ GEM
43
43
  em-websocket (~> 0.5)
44
44
  guard (~> 2.8)
45
45
  multi_json (~> 1.8)
46
- hashie (3.4.0)
46
+ hashie (3.4.1)
47
47
  highline (1.7.1)
48
48
  hike (1.2.3)
49
49
  hitimes (1.2.2)
@@ -62,8 +62,8 @@ GEM
62
62
  less (2.6.0)
63
63
  commonjs (~> 0.2.7)
64
64
  libv8 (3.16.14.7)
65
- listen (2.9.0)
66
- celluloid (>= 0.15.2)
65
+ listen (2.10.0)
66
+ celluloid (~> 0.16.0)
67
67
  rb-fsevent (>= 0.9.3)
68
68
  rb-inotify (>= 0.9)
69
69
  lumberjack (1.0.9)
@@ -101,7 +101,7 @@ GEM
101
101
  multi_json (~> 1.0)
102
102
  rack (~> 1.0)
103
103
  tilt (~> 1.1, != 1.3.0)
104
- therubyracer (0.12.1)
104
+ therubyracer (0.12.2)
105
105
  libv8 (~> 3.16.14.0)
106
106
  ref
107
107
  thor (0.19.1)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.6.2
@@ -21,7 +21,7 @@ module Marv
21
21
  desc "link SERVER or DIRECTORY", "Create a symbolic link to the compilation directory"
22
22
  long_desc "This command will symlink the compiled version of the project to the specified server or WordPress install path."+
23
23
  "If you don't provide a directory or a server name, the symlink will be created in Marv global themes or plugins folder."
24
- def link(dir=nil)
24
+ def link(dir='global')
25
25
  project = Marv::Project::Project.new(self, '.', nil)
26
26
  actions = Marv::Project::Actions.new(project, nil)
27
27
  actions.link(dir)
@@ -38,7 +38,7 @@ module Marv
38
38
 
39
39
  # Link to server
40
40
  def link_to_server
41
- unless @link_dir.nil?
41
+ unless @link_dir == 'global'
42
42
  path = ::File.join(@global.servers_path, @link_dir, 'wp-content', @link_options[:folder])
43
43
 
44
44
  if ::File.directory?(path)
@@ -49,17 +49,25 @@ module Marv
49
49
 
50
50
  # Link to wordpress
51
51
  def link_to_folder
52
- unless @link_dir.nil?
52
+ unless @link_dir == 'global'
53
53
  if ::File.directory?(@link_dir)
54
54
  ::File.join(@link_dir, 'wp-content', @link_options[:folder], ::File.basename(@project.root))
55
55
  end
56
56
  end
57
57
  end
58
58
 
59
+ # Link global
60
+ def link_global
61
+ if @link_dir == 'global'
62
+ ::File.join(@global.global_path, @link_options[:folder], ::File.basename(@project.root))
63
+ end
64
+ end
65
+
59
66
  # Link target
60
67
  def link_target
61
68
  target = link_to_server unless link_to_server.nil?
62
69
  target = link_to_folder unless link_to_folder.nil?
70
+ target = link_global unless link_global.nil?
63
71
 
64
72
  if target.nil?
65
73
  @task.say "Destination server does not exist!", :red
@@ -40,7 +40,7 @@ module Marv
40
40
  ::Process.kill('KILL', pid)
41
41
  @task.say "Server #{@name} stopped", :yellow
42
42
  end
43
- rescue
43
+ rescue Errno::EPERM, Errno::ESRCH
44
44
  @task.say "Server #{@name} is not running", :yellow
45
45
  end
46
46
  end
@@ -48,6 +48,7 @@ module Marv
48
48
  # Initialize server restart
49
49
  def restart
50
50
  stop
51
+ sleep 3
51
52
  start
52
53
  end
53
54
 
@@ -71,8 +72,9 @@ module Marv
71
72
 
72
73
  # Run server
73
74
  def run_server
75
+ ::Dir.chdir @path
76
+
74
77
  unless @debug
75
- ::Dir.chdir @path
76
78
  @php = ChildProcess.build 'php', '-S', "#{@server.host}:#{@server.port}", 'router.php'
77
79
  @php.start
78
80
 
@@ -111,16 +113,15 @@ module Marv
111
113
 
112
114
  # Check if port is available
113
115
  def is_server_running?(server=@server)
114
- begin
115
- pid_file = ::File.join(server.path, 'php.pid')
116
- pid = ::File.read(pid_file).to_i
116
+ pid_file = ::File.join(server.path, 'php.pid')
117
+ pid = ::File.read(pid_file).to_i
117
118
 
119
+ begin
118
120
  ::Process.kill(0, pid)
119
- rescue
121
+ return true
122
+ rescue Errno::EPERM, Errno::ESRCH
120
123
  return false
121
124
  end
122
-
123
- return true
124
125
  end
125
126
 
126
127
  # Check if port is available
@@ -128,11 +129,10 @@ module Marv
128
129
  begin
129
130
  server = ::TCPServer.new(host, port)
130
131
  server.close()
131
- rescue
132
+ return true
133
+ rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, SocketError
132
134
  return false
133
135
  end
134
-
135
- return true
136
136
  end
137
137
 
138
138
  end
@@ -60,6 +60,8 @@ module Marv
60
60
  package = "/tmp/wordpress-#{@config[:wp_version]}.zip"
61
61
  # Download package file
62
62
  unless ::File.exists?(package)
63
+ @task.say "Downloading WordPress...", :cyan
64
+
63
65
  @task.get "https://wordpress.org/wordpress-#{@config[:wp_version]}.zip" do |content|
64
66
  @task.create_file package, content
65
67
  end
@@ -2,14 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: marv 0.6.2 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "marv"
8
- s.version = "0.6.1"
9
+ s.version = "0.6.2"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
11
13
  s.authors = ["Jonian Guveli", "Olibia Tsati"]
12
- s.date = "2015-03-26"
14
+ s.date = "2015-04-09"
13
15
  s.description = "A toolkit for bootstrapping and developing WordPress themes and plugins using Sass, LESS, and CoffeeScript."
14
16
  s.email = "info@hardpixel.eu"
15
17
  s.executables = ["marv"]
@@ -87,17 +89,15 @@ Gem::Specification.new do |s|
87
89
  "lib/marv/server/actions.rb",
88
90
  "lib/marv/server/create.rb",
89
91
  "lib/marv/server/server.rb",
90
- "marv.gemspec",
91
- "pkg/marv-0.4.0.gem"
92
+ "marv.gemspec"
92
93
  ]
93
94
  s.homepage = "http://hardpixel.github.io/marv"
94
95
  s.licenses = ["MIT"]
95
- s.require_paths = ["lib"]
96
- s.rubygems_version = "1.8.23"
96
+ s.rubygems_version = "2.2.2"
97
97
  s.summary = "A command-line tool for developing wordpress themes and plugins"
98
98
 
99
99
  if s.respond_to? :specification_version then
100
- s.specification_version = 3
100
+ s.specification_version = 4
101
101
 
102
102
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
103
103
  s.add_runtime_dependency(%q<guard>, ["~> 2.8.0"])
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
5
- prerelease:
4
+ version: 0.6.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jonian Guveli
@@ -10,246 +9,216 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2015-03-26 00:00:00.000000000 Z
12
+ date: 2015-04-09 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: guard
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ~>
18
+ - - "~>"
21
19
  - !ruby/object:Gem::Version
22
20
  version: 2.8.0
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ~>
25
+ - - "~>"
29
26
  - !ruby/object:Gem::Version
30
27
  version: 2.8.0
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: guard-livereload
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ~>
32
+ - - "~>"
37
33
  - !ruby/object:Gem::Version
38
34
  version: 2.4.0
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ~>
39
+ - - "~>"
45
40
  - !ruby/object:Gem::Version
46
41
  version: 2.4.0
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: thor
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ~>
46
+ - - "~>"
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0.19'
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ~>
53
+ - - "~>"
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0.19'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: sprockets
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ~>
60
+ - - "~>"
69
61
  - !ruby/object:Gem::Version
70
62
  version: '2.12'
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ~>
67
+ - - "~>"
77
68
  - !ruby/object:Gem::Version
78
69
  version: '2.12'
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: childprocess
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ~>
74
+ - - "~>"
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0.5'
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ~>
81
+ - - "~>"
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0.5'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: mysql2
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ~>
88
+ - - "~>"
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0.3'
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ~>
95
+ - - "~>"
109
96
  - !ruby/object:Gem::Version
110
97
  version: '0.3'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: uglifier
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
- - - ~>
102
+ - - "~>"
117
103
  - !ruby/object:Gem::Version
118
104
  version: '2.7'
119
105
  type: :runtime
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
- - - ~>
109
+ - - "~>"
125
110
  - !ruby/object:Gem::Version
126
111
  version: '2.7'
127
112
  - !ruby/object:Gem::Dependency
128
113
  name: sass
129
114
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
115
  requirements:
132
- - - ~>
116
+ - - "~>"
133
117
  - !ruby/object:Gem::Version
134
118
  version: '3.4'
135
119
  type: :runtime
136
120
  prerelease: false
137
121
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
122
  requirements:
140
- - - ~>
123
+ - - "~>"
141
124
  - !ruby/object:Gem::Version
142
125
  version: '3.4'
143
126
  - !ruby/object:Gem::Dependency
144
127
  name: less
145
128
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
129
  requirements:
148
- - - ~>
130
+ - - "~>"
149
131
  - !ruby/object:Gem::Version
150
132
  version: '2.6'
151
133
  type: :runtime
152
134
  prerelease: false
153
135
  version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
136
  requirements:
156
- - - ~>
137
+ - - "~>"
157
138
  - !ruby/object:Gem::Version
158
139
  version: '2.6'
159
140
  - !ruby/object:Gem::Dependency
160
141
  name: coffee-script
161
142
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
143
  requirements:
164
- - - ~>
144
+ - - "~>"
165
145
  - !ruby/object:Gem::Version
166
146
  version: '2.3'
167
147
  type: :runtime
168
148
  prerelease: false
169
149
  version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
150
  requirements:
172
- - - ~>
151
+ - - "~>"
173
152
  - !ruby/object:Gem::Version
174
153
  version: '2.3'
175
154
  - !ruby/object:Gem::Dependency
176
155
  name: therubyracer
177
156
  requirement: !ruby/object:Gem::Requirement
178
- none: false
179
157
  requirements:
180
- - - ~>
158
+ - - "~>"
181
159
  - !ruby/object:Gem::Version
182
160
  version: '0.12'
183
161
  type: :runtime
184
162
  prerelease: false
185
163
  version_requirements: !ruby/object:Gem::Requirement
186
- none: false
187
164
  requirements:
188
- - - ~>
165
+ - - "~>"
189
166
  - !ruby/object:Gem::Version
190
167
  version: '0.12'
191
168
  - !ruby/object:Gem::Dependency
192
169
  name: rubyzip
193
170
  requirement: !ruby/object:Gem::Requirement
194
- none: false
195
171
  requirements:
196
- - - ~>
172
+ - - "~>"
197
173
  - !ruby/object:Gem::Version
198
174
  version: '1.1'
199
175
  type: :runtime
200
176
  prerelease: false
201
177
  version_requirements: !ruby/object:Gem::Requirement
202
- none: false
203
178
  requirements:
204
- - - ~>
179
+ - - "~>"
205
180
  - !ruby/object:Gem::Version
206
181
  version: '1.1'
207
182
  - !ruby/object:Gem::Dependency
208
183
  name: rdoc
209
184
  requirement: !ruby/object:Gem::Requirement
210
- none: false
211
185
  requirements:
212
- - - ~>
186
+ - - "~>"
213
187
  - !ruby/object:Gem::Version
214
188
  version: '3.12'
215
189
  type: :development
216
190
  prerelease: false
217
191
  version_requirements: !ruby/object:Gem::Requirement
218
- none: false
219
192
  requirements:
220
- - - ~>
193
+ - - "~>"
221
194
  - !ruby/object:Gem::Version
222
195
  version: '3.12'
223
196
  - !ruby/object:Gem::Dependency
224
197
  name: bundler
225
198
  requirement: !ruby/object:Gem::Requirement
226
- none: false
227
199
  requirements:
228
- - - ~>
200
+ - - "~>"
229
201
  - !ruby/object:Gem::Version
230
202
  version: '1.0'
231
203
  type: :development
232
204
  prerelease: false
233
205
  version_requirements: !ruby/object:Gem::Requirement
234
- none: false
235
206
  requirements:
236
- - - ~>
207
+ - - "~>"
237
208
  - !ruby/object:Gem::Version
238
209
  version: '1.0'
239
210
  - !ruby/object:Gem::Dependency
240
211
  name: jeweler
241
212
  requirement: !ruby/object:Gem::Requirement
242
- none: false
243
213
  requirements:
244
- - - ~>
214
+ - - "~>"
245
215
  - !ruby/object:Gem::Version
246
216
  version: '2.0'
247
217
  type: :development
248
218
  prerelease: false
249
219
  version_requirements: !ruby/object:Gem::Requirement
250
- none: false
251
220
  requirements:
252
- - - ~>
221
+ - - "~>"
253
222
  - !ruby/object:Gem::Version
254
223
  version: '2.0'
255
224
  description: A toolkit for bootstrapping and developing WordPress themes and plugins
@@ -262,7 +231,7 @@ extra_rdoc_files:
262
231
  - LICENSE.txt
263
232
  - README.md
264
233
  files:
265
- - .document
234
+ - ".document"
266
235
  - CHANGELOG.md
267
236
  - Gemfile
268
237
  - Gemfile.lock
@@ -332,30 +301,29 @@ files:
332
301
  - lib/marv/server/create.rb
333
302
  - lib/marv/server/server.rb
334
303
  - marv.gemspec
335
- - pkg/marv-0.4.0.gem
336
304
  homepage: http://hardpixel.github.io/marv
337
305
  licenses:
338
306
  - MIT
307
+ metadata: {}
339
308
  post_install_message:
340
309
  rdoc_options: []
341
310
  require_paths:
342
311
  - lib
343
312
  required_ruby_version: !ruby/object:Gem::Requirement
344
- none: false
345
313
  requirements:
346
- - - ! '>='
314
+ - - ">="
347
315
  - !ruby/object:Gem::Version
348
316
  version: '0'
349
317
  required_rubygems_version: !ruby/object:Gem::Requirement
350
- none: false
351
318
  requirements:
352
- - - ! '>='
319
+ - - ">="
353
320
  - !ruby/object:Gem::Version
354
321
  version: '0'
355
322
  requirements: []
356
323
  rubyforge_project:
357
- rubygems_version: 1.8.23
324
+ rubygems_version: 2.2.2
358
325
  signing_key:
359
- specification_version: 3
326
+ specification_version: 4
360
327
  summary: A command-line tool for developing wordpress themes and plugins
361
328
  test_files: []
329
+ has_rdoc:
Binary file