marv 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/.document +5 -0
  2. data/.gitmodules +3 -0
  3. data/.rspec +1 -0
  4. data/CHANGELOG.md +8 -0
  5. data/Gemfile +29 -0
  6. data/Gemfile.lock +140 -0
  7. data/LICENSE +20 -0
  8. data/README.md +49 -0
  9. data/Rakefile +54 -0
  10. data/VERSION +1 -0
  11. data/bin/marv +12 -0
  12. data/features/step_definitions/marv_steps.rb +38 -0
  13. data/features/support/env.rb +17 -0
  14. data/layouts/config/config.tt +19 -0
  15. data/layouts/default/functions/functions.php.erb +34 -0
  16. data/layouts/default/javascripts/admin.js +1 -0
  17. data/layouts/default/javascripts/theme.js +1 -0
  18. data/layouts/default/stylesheets/_header.scss.erb +18 -0
  19. data/layouts/default/stylesheets/_reset.scss +5 -0
  20. data/layouts/default/stylesheets/_typography.scss +5 -0
  21. data/layouts/default/stylesheets/style.css.scss.erb +32 -0
  22. data/layouts/default/templates/404.php.erb +10 -0
  23. data/layouts/default/templates/archive.php.erb +11 -0
  24. data/layouts/default/templates/attachment.php.erb +32 -0
  25. data/layouts/default/templates/comments.php +2 -0
  26. data/layouts/default/templates/footer.php +9 -0
  27. data/layouts/default/templates/header.php.erb +30 -0
  28. data/layouts/default/templates/index.php +4 -0
  29. data/layouts/default/templates/page.php +14 -0
  30. data/layouts/default/templates/partials/loop.php.erb +36 -0
  31. data/layouts/default/templates/search.php.erb +12 -0
  32. data/layouts/default/templates/sidebar.php +9 -0
  33. data/layouts/default/templates/single.php.erb +30 -0
  34. data/lib/guard/marv/assets.rb +31 -0
  35. data/lib/guard/marv/config.rb +34 -0
  36. data/lib/guard/marv/functions.rb +36 -0
  37. data/lib/guard/marv/templates.rb +28 -0
  38. data/lib/marv.rb +11 -0
  39. data/lib/marv/builder.rb +282 -0
  40. data/lib/marv/cli.rb +86 -0
  41. data/lib/marv/config.rb +61 -0
  42. data/lib/marv/engines.rb +12 -0
  43. data/lib/marv/error.rb +8 -0
  44. data/lib/marv/generator.rb +138 -0
  45. data/lib/marv/guard.rb +65 -0
  46. data/lib/marv/project.rb +162 -0
  47. data/lib/marv/version.rb +3 -0
  48. data/marv.gemspec +145 -0
  49. data/spec/lib/marv/config_spec.rb +79 -0
  50. data/spec/lib/marv/project_spec.rb +34 -0
  51. data/spec/spec_helper.rb +13 -0
  52. metadata +404 -0
@@ -0,0 +1,79 @@
1
+
2
+ require 'marv/config'
3
+
4
+ describe Marv::Config do
5
+
6
+ def config_file
7
+ File.expand_path(File.join('~', '.watch', 'config.yml'))
8
+ end
9
+
10
+ before(:each) do
11
+ @buffer = StringIO.new
12
+ @config = Marv::Config.new
13
+ end
14
+
15
+ it "should provide empty config object by default" do
16
+ @config.config.should == {
17
+ :theme => {
18
+ :author => nil,
19
+ :author_url => nil
20
+ },
21
+ :links => []
22
+ }
23
+ end
24
+
25
+ it "should allow access to config variables through []" do
26
+ @config[:links].should == []
27
+ end
28
+
29
+ it "should allow config options to be changed through []" do
30
+ @config[:links] = ['/var/www/wordpress']
31
+ @config[:links].should == ['/var/www/wordpress']
32
+ end
33
+
34
+ it "should store config in ~/.watch/config.yml" do
35
+ @config.config_file.should == config_file
36
+ end
37
+
38
+ it "should write default configuration to yaml" do
39
+ @config.write(:io => @buffer)
40
+ @buffer.string.should == "---\n:theme:\n :author: !!null \n :author_url: !!null \n:links: []\n"
41
+ end
42
+
43
+ describe :write do
44
+ it "should dump any changes made to the config" do
45
+ @config[:theme][:author] = "Matt Button"
46
+ @config[:theme][:author_url] = "http://that-matt.com"
47
+
48
+ @config.write(:io => @buffer)
49
+ @buffer.string.should == "---\n:theme:\n :author: Matt Button\n :author_url: http://that-matt.com\n:links: []\n"
50
+ end
51
+ end
52
+
53
+ describe :read do
54
+ it "should call #write if the file does not exist" do
55
+ File.should_receive(:exists?).with(config_file).and_return(false)
56
+ Psych.should_not_receive(:load_file)
57
+
58
+ @config.should_receive(:write)
59
+ @config.read
60
+ end
61
+
62
+ it "should not call #write if the config file exists" do
63
+ File.should_receive(:exists?).with(config_file).and_return(true)
64
+ Psych.should_receive(:load_file).with(config_file)
65
+
66
+ @config.should_not_receive(:write)
67
+ @config.read
68
+ end
69
+
70
+ it "should load config from yaml file" do
71
+ File.stub!(:exists?).and_return(true)
72
+ Psych.stub!(:load_file).and_return({:theme => {:author => 'Drew'}, :links => []})
73
+
74
+ @config.read
75
+ @config[:links].should == []
76
+ @config[:theme].should == {:author => 'Drew'}
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,34 @@
1
+
2
+ require 'marv/project'
3
+
4
+ describe Marv::Project do
5
+ before(:each) do
6
+ @project = Marv::Project.new('/tmp/', nil, {:name => 'Hello'})
7
+ end
8
+
9
+ describe :config_file do
10
+ it "should create an expanded path to the config file" do
11
+ @project.config_file.should == '/tmp/config.json'
12
+ end
13
+ end
14
+
15
+ describe :assets_path do
16
+ it "should create an expanded path to the assets folder" do
17
+ @project.assets_path.should == '/tmp/assets'
18
+ end
19
+ end
20
+
21
+
22
+ describe :build_dir do
23
+ it "should create an expanded path to the marv build directory" do
24
+ @project.build_dir.should == '/tmp/.watch'
25
+ end
26
+ end
27
+
28
+ describe :theme_id do
29
+ it "should be the same as the project folder" do
30
+ @project.theme_id.should == 'tmp'
31
+ end
32
+ end
33
+
34
+ end
@@ -0,0 +1,13 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'marv'
5
+
6
+ p "HEY"
7
+ # Requires supporting files with custom matchers and macros, etc,
8
+ # in ./support/ and its subdirectories.
9
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
10
+
11
+ RSpec.configure do |config|
12
+
13
+ end
metadata ADDED
@@ -0,0 +1,404 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: marv
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Hardpixel
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-07-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: thor
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.18.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.18.1
30
+ - !ruby/object:Gem::Dependency
31
+ name: guard
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 2.2.1
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.2.1
46
+ - !ruby/object:Gem::Dependency
47
+ name: guard-livereload
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 2.0.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 2.0.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: sprockets
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 2.12.0
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 2.12.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: rubyzip
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: 1.0.0
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 1.0.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: json
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: 1.8.0
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: 1.8.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: sass
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: 3.3.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 3.3.0
126
+ - !ruby/object:Gem::Dependency
127
+ name: sprockets-sass
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: 1.2.0
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: 1.2.0
142
+ - !ruby/object:Gem::Dependency
143
+ name: compass
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: 1.0.0.alpha.21
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: 1.0.0.alpha.21
158
+ - !ruby/object:Gem::Dependency
159
+ name: rack
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: 1.5.2
166
+ type: :runtime
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: 1.5.2
174
+ - !ruby/object:Gem::Dependency
175
+ name: therubyracer
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: 0.12.0
182
+ type: :runtime
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: 0.12.0
190
+ - !ruby/object:Gem::Dependency
191
+ name: less
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: 2.6.0
198
+ type: :runtime
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: 2.6.0
206
+ - !ruby/object:Gem::Dependency
207
+ name: coffee-script
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: 2.3.0
214
+ type: :runtime
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: 2.3.0
222
+ - !ruby/object:Gem::Dependency
223
+ name: rb-fsevent
224
+ requirement: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: 0.9.3
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: 0.9.3
238
+ - !ruby/object:Gem::Dependency
239
+ name: yui-compressor
240
+ requirement: !ruby/object:Gem::Requirement
241
+ none: false
242
+ requirements:
243
+ - - ! '>='
244
+ - !ruby/object:Gem::Version
245
+ version: 0.12.0
246
+ type: :runtime
247
+ prerelease: false
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ! '>='
252
+ - !ruby/object:Gem::Version
253
+ version: 0.12.0
254
+ - !ruby/object:Gem::Dependency
255
+ name: rspec
256
+ requirement: !ruby/object:Gem::Requirement
257
+ none: false
258
+ requirements:
259
+ - - ! '>='
260
+ - !ruby/object:Gem::Version
261
+ version: '0'
262
+ type: :development
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
266
+ requirements:
267
+ - - ! '>='
268
+ - !ruby/object:Gem::Version
269
+ version: '0'
270
+ - !ruby/object:Gem::Dependency
271
+ name: cucumber
272
+ requirement: !ruby/object:Gem::Requirement
273
+ none: false
274
+ requirements:
275
+ - - ! '>='
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - ! '>='
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
286
+ - !ruby/object:Gem::Dependency
287
+ name: aruba
288
+ requirement: !ruby/object:Gem::Requirement
289
+ none: false
290
+ requirements:
291
+ - - ! '>='
292
+ - !ruby/object:Gem::Version
293
+ version: '0'
294
+ type: :development
295
+ prerelease: false
296
+ version_requirements: !ruby/object:Gem::Requirement
297
+ none: false
298
+ requirements:
299
+ - - ! '>='
300
+ - !ruby/object:Gem::Version
301
+ version: '0'
302
+ - !ruby/object:Gem::Dependency
303
+ name: jeweler
304
+ requirement: !ruby/object:Gem::Requirement
305
+ none: false
306
+ requirements:
307
+ - - ~>
308
+ - !ruby/object:Gem::Version
309
+ version: 1.6.4
310
+ type: :development
311
+ prerelease: false
312
+ version_requirements: !ruby/object:Gem::Requirement
313
+ none: false
314
+ requirements:
315
+ - - ~>
316
+ - !ruby/object:Gem::Version
317
+ version: 1.6.4
318
+ description: A toolkit for bootstrapping and developing WordPress themes using Sass,
319
+ LESS, and CoffeeScript.
320
+ email: info@hardpixel.eu
321
+ executables:
322
+ - marv
323
+ extensions: []
324
+ extra_rdoc_files:
325
+ - LICENSE
326
+ - README.md
327
+ files:
328
+ - .document
329
+ - .gitmodules
330
+ - .rspec
331
+ - CHANGELOG.md
332
+ - Gemfile
333
+ - Gemfile.lock
334
+ - LICENSE
335
+ - README.md
336
+ - Rakefile
337
+ - VERSION
338
+ - bin/marv
339
+ - features/step_definitions/marv_steps.rb
340
+ - features/support/env.rb
341
+ - layouts/config/config.tt
342
+ - layouts/default/functions/functions.php.erb
343
+ - layouts/default/javascripts/admin.js
344
+ - layouts/default/javascripts/theme.js
345
+ - layouts/default/stylesheets/_header.scss.erb
346
+ - layouts/default/stylesheets/_reset.scss
347
+ - layouts/default/stylesheets/_typography.scss
348
+ - layouts/default/stylesheets/style.css.scss.erb
349
+ - layouts/default/templates/404.php.erb
350
+ - layouts/default/templates/archive.php.erb
351
+ - layouts/default/templates/attachment.php.erb
352
+ - layouts/default/templates/comments.php
353
+ - layouts/default/templates/footer.php
354
+ - layouts/default/templates/header.php.erb
355
+ - layouts/default/templates/index.php
356
+ - layouts/default/templates/page.php
357
+ - layouts/default/templates/partials/loop.php.erb
358
+ - layouts/default/templates/search.php.erb
359
+ - layouts/default/templates/sidebar.php
360
+ - layouts/default/templates/single.php.erb
361
+ - lib/guard/marv/assets.rb
362
+ - lib/guard/marv/config.rb
363
+ - lib/guard/marv/functions.rb
364
+ - lib/guard/marv/templates.rb
365
+ - lib/marv.rb
366
+ - lib/marv/builder.rb
367
+ - lib/marv/cli.rb
368
+ - lib/marv/config.rb
369
+ - lib/marv/engines.rb
370
+ - lib/marv/error.rb
371
+ - lib/marv/generator.rb
372
+ - lib/marv/guard.rb
373
+ - lib/marv/project.rb
374
+ - lib/marv/version.rb
375
+ - marv.gemspec
376
+ - spec/lib/marv/config_spec.rb
377
+ - spec/lib/marv/project_spec.rb
378
+ - spec/spec_helper.rb
379
+ homepage: https://github.com/hardpixel/marv
380
+ licenses:
381
+ - MIT
382
+ post_install_message:
383
+ rdoc_options: []
384
+ require_paths:
385
+ - lib
386
+ required_ruby_version: !ruby/object:Gem::Requirement
387
+ none: false
388
+ requirements:
389
+ - - ! '>='
390
+ - !ruby/object:Gem::Version
391
+ version: '0'
392
+ required_rubygems_version: !ruby/object:Gem::Requirement
393
+ none: false
394
+ requirements:
395
+ - - ! '>='
396
+ - !ruby/object:Gem::Version
397
+ version: '0'
398
+ requirements: []
399
+ rubyforge_project:
400
+ rubygems_version: 1.8.23
401
+ signing_key:
402
+ specification_version: 3
403
+ summary: A tool for developing wordpress themes
404
+ test_files: []