marv 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,15 +3,15 @@ source "http://rubygems.org"
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
  gem 'thor', '>= 0.19.1'
6
- gem 'guard-livereload', '>= 2.3.0'
7
- gem 'sprockets', '>= 2.12.0'
8
- gem 'childprocess', '>= 0.3.5'
9
- gem 'mysql2', '>= 0.3.15'
10
- gem 'uglifier', '>= 2.5.0'
11
- gem 'sass', '>= 3.3.0'
6
+ gem 'guard-livereload', '>= 2.3.1'
7
+ gem 'sprockets', '>= 2.12.3'
8
+ gem 'childprocess', '>= 0.5.5'
9
+ gem 'mysql2', '>= 0.3.16'
10
+ gem 'uglifier', '>= 2.5.3'
11
+ gem 'sass', '>= 3.4.7'
12
12
  gem 'less', '>= 2.6.0'
13
13
  gem 'coffee-script', '>= 2.3.0'
14
- gem 'therubyracer', '>= 0.12.0'
14
+ gem 'therubyracer', '>= 0.12.1'
15
15
  gem 'rubyzip', '>= 1.1.6'
16
16
 
17
17
  # Add dependencies to develop your gem here.
data/Gemfile.lock CHANGED
@@ -5,7 +5,7 @@ GEM
5
5
  builder (3.2.2)
6
6
  celluloid (0.16.0)
7
7
  timers (~> 4.0.0)
8
- childprocess (0.5.3)
8
+ childprocess (0.5.5)
9
9
  ffi (~> 1.0, >= 1.0.11)
10
10
  coderay (1.1.0)
11
11
  coffee-script (2.3.0)
@@ -22,7 +22,7 @@ GEM
22
22
  execjs (2.2.1)
23
23
  faraday (0.9.0)
24
24
  multipart-post (>= 1.2, < 3)
25
- ffi (1.9.3)
25
+ ffi (1.9.6)
26
26
  formatador (0.2.5)
27
27
  git (1.2.8)
28
28
  github_api (0.12.1)
@@ -33,13 +33,13 @@ GEM
33
33
  multi_json (>= 1.7.5, < 2.0)
34
34
  nokogiri (~> 1.6.3)
35
35
  oauth2
36
- guard (2.6.1)
36
+ guard (2.8.2)
37
37
  formatador (>= 0.2.4)
38
38
  listen (~> 2.7)
39
39
  lumberjack (~> 1.0)
40
40
  pry (>= 0.9.12)
41
41
  thor (>= 0.18.1)
42
- guard-livereload (2.3.0)
42
+ guard-livereload (2.3.1)
43
43
  em-websocket (~> 0.5)
44
44
  guard (~> 2.0)
45
45
  multi_json (~> 1.8)
@@ -62,7 +62,7 @@ GEM
62
62
  less (2.6.0)
63
63
  commonjs (~> 0.2.7)
64
64
  libv8 (3.16.14.7)
65
- listen (2.7.9)
65
+ listen (2.7.11)
66
66
  celluloid (>= 0.15.2)
67
67
  rb-fsevent (>= 0.9.3)
68
68
  rb-inotify (>= 0.9)
@@ -94,9 +94,9 @@ GEM
94
94
  json (~> 1.4)
95
95
  ref (1.0.5)
96
96
  rubyzip (1.1.6)
97
- sass (3.4.5)
97
+ sass (3.4.7)
98
98
  slop (3.6.0)
99
- sprockets (2.12.2)
99
+ sprockets (2.12.3)
100
100
  hike (~> 1.2)
101
101
  multi_json (~> 1.0)
102
102
  rack (~> 1.0)
@@ -118,16 +118,16 @@ PLATFORMS
118
118
 
119
119
  DEPENDENCIES
120
120
  bundler (~> 1.0)
121
- childprocess (>= 0.3.5)
121
+ childprocess (>= 0.5.5)
122
122
  coffee-script (>= 2.3.0)
123
- guard-livereload (>= 2.3.0)
123
+ guard-livereload (>= 2.3.1)
124
124
  jeweler (~> 2.0.1)
125
125
  less (>= 2.6.0)
126
- mysql2 (>= 0.3.15)
126
+ mysql2 (>= 0.3.16)
127
127
  rdoc (~> 3.12)
128
128
  rubyzip (>= 1.1.6)
129
- sass (>= 3.3.0)
130
- sprockets (>= 2.12.0)
131
- therubyracer (>= 0.12.0)
129
+ sass (>= 3.4.7)
130
+ sprockets (>= 2.12.3)
131
+ therubyracer (>= 0.12.1)
132
132
  thor (>= 0.19.1)
133
- uglifier (>= 2.5.0)
133
+ uglifier (>= 2.5.3)
File without changes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
@@ -31,9 +31,21 @@ module Marv
31
31
  # Start a Marv server
32
32
  desc "start SERVER", "Start the specified Marv server"
33
33
  def start(dir)
34
- server = Marv::Server::Server.new(self, dir)
35
- action = Marv::Server::Actions.new(server)
36
- action.start
34
+ servers_path = Marv::Global.new(self).servers_path
35
+
36
+ if ::File.directory?(::File.join(servers_path, dir))
37
+ server = Marv::Server::Server.new(self, dir)
38
+ action = Marv::Server::Actions.new(server)
39
+ action.start
40
+ end
41
+
42
+ # Create server if it does not exist
43
+ unless ::File.directory?(::File.join(servers_path, dir))
44
+ say "Server #{dir} does not exist.", :yellow
45
+ if yes?("Would you like to create the server?")
46
+ create(dir)
47
+ end
48
+ end
37
49
  end
38
50
 
39
51
  # Start a Marv server
@@ -104,7 +104,7 @@ module Marv
104
104
 
105
105
  # Copy build files to temporary directory
106
106
  @task.shell.mute do
107
- @task.directory @project.build_path, ::File.join(@project.package_path, @package_name)
107
+ @task.directory @project.build_path, ::File.join(@project.package_path, @package_name), :force => true
108
108
  end
109
109
  end
110
110
 
@@ -36,7 +36,7 @@ module Marv
36
36
  @task.copy_file filename, ::File.join(@project.build_path, ::File.basename(filename)), :force => true
37
37
  else
38
38
  # Copy the other files in images directory
39
- @task.copy_file filename, ::File.join(@project.build_path, 'images'), :force => true
39
+ @task.copy_file filename, ::File.join(@project.build_path, 'images', ::File.basename(filename)), :force => true
40
40
  end
41
41
  end
42
42
  end
@@ -88,7 +88,7 @@ module Marv
88
88
  source = folder.gsub(@project.source_path, '')
89
89
  target = ::File.join(@project.build_path, source)
90
90
 
91
- @task.directory folder, target
91
+ @task.directory folder, target, :force => true
92
92
  end
93
93
  end
94
94
  end
@@ -23,19 +23,14 @@ module Marv
23
23
  def build_project
24
24
  clean_directory
25
25
 
26
- @assets.build_assets
27
- @assets.clean_images
28
- @assets.copy_images
29
-
30
- @templates.clean_templates
26
+ @functions.copy_folders
31
27
  @templates.copy_templates
32
28
 
33
- @functions.clean_functions
34
29
  @functions.copy_functions
35
- @functions.clean_includes
36
30
  @functions.copy_includes
37
- @functions.clean_folders
38
- @functions.copy_folders
31
+
32
+ @assets.copy_images
33
+ @assets.build_assets
39
34
  end
40
35
 
41
36
  # Build project to a directory
@@ -1,10 +1,10 @@
1
1
  require 'guard'
2
- require 'guard/guard'
2
+ require 'guard/plugin'
3
3
 
4
4
  module Guard
5
- class Assets < ::Guard::Guard
5
+ class Assets < ::Guard::Plugin
6
6
 
7
- def initialize(watchers=[], options={})
7
+ def initialize(options={})
8
8
  super
9
9
  end
10
10
 
@@ -1,10 +1,10 @@
1
1
  require 'guard'
2
- require 'guard/guard'
2
+ require 'guard/plugin'
3
3
 
4
4
  module Guard
5
- class Config < ::Guard::Guard
5
+ class Config < ::Guard::Plugin
6
6
 
7
- def initialize(watchers=[], options={})
7
+ def initialize(options={})
8
8
  @builder = Marv::Project::Guard.builder
9
9
  super
10
10
  end
@@ -1,10 +1,10 @@
1
1
  require 'guard'
2
- require 'guard/guard'
2
+ require 'guard/plugin'
3
3
 
4
4
  module Guard
5
- class Functions < ::Guard::Guard
5
+ class Functions < ::Guard::Plugin
6
6
 
7
- def initialize(watchers=[], options={})
7
+ def initialize(options={})
8
8
  super
9
9
  end
10
10
 
@@ -33,6 +33,7 @@ module Guard
33
33
  builder.clean_functions
34
34
  builder.clean_includes
35
35
  builder.clean_folders
36
+ Marv::Project::Guard.builder.assets.build_assets
36
37
  end
37
38
 
38
39
  builder.copy_functions
@@ -1,10 +1,10 @@
1
1
  require 'guard'
2
- require 'guard/guard'
2
+ require 'guard/plugin'
3
3
 
4
4
  module Guard
5
- class Templates < ::Guard::Guard
5
+ class Templates < ::Guard::Plugin
6
6
 
7
- def initialize(watchers=[], options={})
7
+ def initialize(options={})
8
8
  super
9
9
  end
10
10
 
@@ -1,5 +1,5 @@
1
1
  require 'guard'
2
- require 'guard/guard'
2
+ require 'guard/plugin'
3
3
 
4
4
  # Marv pry console actions
5
5
  require 'marv/project/guard/assets'
@@ -51,18 +51,16 @@ module Marv
51
51
  guard 'config'#{@options_hash} do
52
52
  watch("#{config_file}")
53
53
  end
54
- guard 'assets' do
55
- watch(%r{#{assets_path}/javascripts/*})
56
- watch(%r{#{assets_path}/stylesheets/*})
57
- watch(%r{#{assets_path}/images/*})
54
+ guard 'functions' do
55
+ watch(%r{#{source_path}/*})
58
56
  end
59
57
  guard 'templates' do
60
58
  watch(%r{#{source_path}/templates/*})
61
- watch(%r{#{source_path}/partials/*})
62
59
  end
63
- guard 'functions' do
64
- watch(%r{#{source_path}/functions/*})
65
- watch(%r{#{source_path}/includes/*})
60
+ guard 'assets' do
61
+ watch(%r{#{assets_path}/javascripts/*})
62
+ watch(%r{#{assets_path}/stylesheets/*})
63
+ watch(%r{#{assets_path}/images/*})
66
64
  end
67
65
  }
68
66
 
@@ -1,4 +1,3 @@
1
- require 'net/http'
2
1
  require 'childprocess'
3
2
 
4
3
  module Marv
@@ -15,12 +14,6 @@ module Marv
15
14
 
16
15
  # Initialize server start
17
16
  def start
18
- # Setup server
19
- server = TCPServer.new('127.0.0.1', 0)
20
- port = server.addr[1]
21
- server.close()
22
-
23
- # Run PHP server
24
17
  ::Dir.chdir @path
25
18
  @php = ChildProcess.build 'php', '-S', "#{@server.host}:#{@server.port}", 'router.php'
26
19
  @php.start
data/marv.gemspec CHANGED
@@ -5,16 +5,16 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "marv"
8
- s.version = "0.4.0"
8
+ s.version = "0.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jonian Guveli", "Olibia Tsati"]
12
- s.date = "2014-09-30"
12
+ s.date = "2014-11-10"
13
13
  s.description = "A toolkit for bootstrapping and developing WordPress themes and plugins using Sass, LESS, and CoffeeScript."
14
14
  s.email = "info@hardpixel.eu"
15
15
  s.executables = ["marv"]
16
16
  s.extra_rdoc_files = [
17
- "LICENSE",
17
+ "LICENSE.txt",
18
18
  "README.md"
19
19
  ]
20
20
  s.files = [
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  "CHANGELOG.md",
23
23
  "Gemfile",
24
24
  "Gemfile.lock",
25
- "LICENSE",
25
+ "LICENSE.txt",
26
26
  "README.md",
27
27
  "Rakefile",
28
28
  "VERSION",
@@ -100,30 +100,30 @@ Gem::Specification.new do |s|
100
100
 
101
101
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
102
102
  s.add_runtime_dependency(%q<thor>, [">= 0.19.1"])
103
- s.add_runtime_dependency(%q<guard-livereload>, [">= 2.3.0"])
104
- s.add_runtime_dependency(%q<sprockets>, [">= 2.12.0"])
105
- s.add_runtime_dependency(%q<childprocess>, [">= 0.3.5"])
106
- s.add_runtime_dependency(%q<mysql2>, [">= 0.3.15"])
107
- s.add_runtime_dependency(%q<uglifier>, [">= 2.5.0"])
108
- s.add_runtime_dependency(%q<sass>, [">= 3.3.0"])
103
+ s.add_runtime_dependency(%q<guard-livereload>, [">= 2.3.1"])
104
+ s.add_runtime_dependency(%q<sprockets>, [">= 2.12.3"])
105
+ s.add_runtime_dependency(%q<childprocess>, [">= 0.5.5"])
106
+ s.add_runtime_dependency(%q<mysql2>, [">= 0.3.16"])
107
+ s.add_runtime_dependency(%q<uglifier>, [">= 2.5.3"])
108
+ s.add_runtime_dependency(%q<sass>, [">= 3.4.7"])
109
109
  s.add_runtime_dependency(%q<less>, [">= 2.6.0"])
110
110
  s.add_runtime_dependency(%q<coffee-script>, [">= 2.3.0"])
111
- s.add_runtime_dependency(%q<therubyracer>, [">= 0.12.0"])
111
+ s.add_runtime_dependency(%q<therubyracer>, [">= 0.12.1"])
112
112
  s.add_runtime_dependency(%q<rubyzip>, [">= 1.1.6"])
113
113
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
114
114
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
115
115
  s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
116
116
  else
117
117
  s.add_dependency(%q<thor>, [">= 0.19.1"])
118
- s.add_dependency(%q<guard-livereload>, [">= 2.3.0"])
119
- s.add_dependency(%q<sprockets>, [">= 2.12.0"])
120
- s.add_dependency(%q<childprocess>, [">= 0.3.5"])
121
- s.add_dependency(%q<mysql2>, [">= 0.3.15"])
122
- s.add_dependency(%q<uglifier>, [">= 2.5.0"])
123
- s.add_dependency(%q<sass>, [">= 3.3.0"])
118
+ s.add_dependency(%q<guard-livereload>, [">= 2.3.1"])
119
+ s.add_dependency(%q<sprockets>, [">= 2.12.3"])
120
+ s.add_dependency(%q<childprocess>, [">= 0.5.5"])
121
+ s.add_dependency(%q<mysql2>, [">= 0.3.16"])
122
+ s.add_dependency(%q<uglifier>, [">= 2.5.3"])
123
+ s.add_dependency(%q<sass>, [">= 3.4.7"])
124
124
  s.add_dependency(%q<less>, [">= 2.6.0"])
125
125
  s.add_dependency(%q<coffee-script>, [">= 2.3.0"])
126
- s.add_dependency(%q<therubyracer>, [">= 0.12.0"])
126
+ s.add_dependency(%q<therubyracer>, [">= 0.12.1"])
127
127
  s.add_dependency(%q<rubyzip>, [">= 1.1.6"])
128
128
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
129
129
  s.add_dependency(%q<bundler>, ["~> 1.0"])
@@ -131,15 +131,15 @@ Gem::Specification.new do |s|
131
131
  end
132
132
  else
133
133
  s.add_dependency(%q<thor>, [">= 0.19.1"])
134
- s.add_dependency(%q<guard-livereload>, [">= 2.3.0"])
135
- s.add_dependency(%q<sprockets>, [">= 2.12.0"])
136
- s.add_dependency(%q<childprocess>, [">= 0.3.5"])
137
- s.add_dependency(%q<mysql2>, [">= 0.3.15"])
138
- s.add_dependency(%q<uglifier>, [">= 2.5.0"])
139
- s.add_dependency(%q<sass>, [">= 3.3.0"])
134
+ s.add_dependency(%q<guard-livereload>, [">= 2.3.1"])
135
+ s.add_dependency(%q<sprockets>, [">= 2.12.3"])
136
+ s.add_dependency(%q<childprocess>, [">= 0.5.5"])
137
+ s.add_dependency(%q<mysql2>, [">= 0.3.16"])
138
+ s.add_dependency(%q<uglifier>, [">= 2.5.3"])
139
+ s.add_dependency(%q<sass>, [">= 3.4.7"])
140
140
  s.add_dependency(%q<less>, [">= 2.6.0"])
141
141
  s.add_dependency(%q<coffee-script>, [">= 2.3.0"])
142
- s.add_dependency(%q<therubyracer>, [">= 0.12.0"])
142
+ s.add_dependency(%q<therubyracer>, [">= 0.12.1"])
143
143
  s.add_dependency(%q<rubyzip>, [">= 1.1.6"])
144
144
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
145
145
  s.add_dependency(%q<bundler>, ["~> 1.0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-09-30 00:00:00.000000000 Z
13
+ date: 2014-11-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - ! '>='
37
37
  - !ruby/object:Gem::Version
38
- version: 2.3.0
38
+ version: 2.3.1
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ! '>='
45
45
  - !ruby/object:Gem::Version
46
- version: 2.3.0
46
+ version: 2.3.1
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sprockets
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  requirements:
52
52
  - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
- version: 2.12.0
54
+ version: 2.12.3
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  requirements:
60
60
  - - ! '>='
61
61
  - !ruby/object:Gem::Version
62
- version: 2.12.0
62
+ version: 2.12.3
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: childprocess
65
65
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  requirements:
68
68
  - - ! '>='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.3.5
70
+ version: 0.5.5
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ! '>='
77
77
  - !ruby/object:Gem::Version
78
- version: 0.3.5
78
+ version: 0.5.5
79
79
  - !ruby/object:Gem::Dependency
80
80
  name: mysql2
81
81
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +83,7 @@ dependencies:
83
83
  requirements:
84
84
  - - ! '>='
85
85
  - !ruby/object:Gem::Version
86
- version: 0.3.15
86
+ version: 0.3.16
87
87
  type: :runtime
88
88
  prerelease: false
89
89
  version_requirements: !ruby/object:Gem::Requirement
@@ -91,7 +91,7 @@ dependencies:
91
91
  requirements:
92
92
  - - ! '>='
93
93
  - !ruby/object:Gem::Version
94
- version: 0.3.15
94
+ version: 0.3.16
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: uglifier
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -99,7 +99,7 @@ dependencies:
99
99
  requirements:
100
100
  - - ! '>='
101
101
  - !ruby/object:Gem::Version
102
- version: 2.5.0
102
+ version: 2.5.3
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
@@ -107,7 +107,7 @@ dependencies:
107
107
  requirements:
108
108
  - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
- version: 2.5.0
110
+ version: 2.5.3
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: sass
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -115,7 +115,7 @@ dependencies:
115
115
  requirements:
116
116
  - - ! '>='
117
117
  - !ruby/object:Gem::Version
118
- version: 3.3.0
118
+ version: 3.4.7
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ dependencies:
123
123
  requirements:
124
124
  - - ! '>='
125
125
  - !ruby/object:Gem::Version
126
- version: 3.3.0
126
+ version: 3.4.7
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: less
129
129
  requirement: !ruby/object:Gem::Requirement
@@ -163,7 +163,7 @@ dependencies:
163
163
  requirements:
164
164
  - - ! '>='
165
165
  - !ruby/object:Gem::Version
166
- version: 0.12.0
166
+ version: 0.12.1
167
167
  type: :runtime
168
168
  prerelease: false
169
169
  version_requirements: !ruby/object:Gem::Requirement
@@ -171,7 +171,7 @@ dependencies:
171
171
  requirements:
172
172
  - - ! '>='
173
173
  - !ruby/object:Gem::Version
174
- version: 0.12.0
174
+ version: 0.12.1
175
175
  - !ruby/object:Gem::Dependency
176
176
  name: rubyzip
177
177
  requirement: !ruby/object:Gem::Requirement
@@ -243,14 +243,14 @@ executables:
243
243
  - marv
244
244
  extensions: []
245
245
  extra_rdoc_files:
246
- - LICENSE
246
+ - LICENSE.txt
247
247
  - README.md
248
248
  files:
249
249
  - .document
250
250
  - CHANGELOG.md
251
251
  - Gemfile
252
252
  - Gemfile.lock
253
- - LICENSE
253
+ - LICENSE.txt
254
254
  - README.md
255
255
  - Rakefile
256
256
  - VERSION
@@ -331,7 +331,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
331
331
  version: '0'
332
332
  segments:
333
333
  - 0
334
- hash: 1860274097938123520
334
+ hash: -2094091167065699108
335
335
  required_rubygems_version: !ruby/object:Gem::Requirement
336
336
  none: false
337
337
  requirements: