marv 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.2.5 ==
2
+ - Remove compass, sprockets-sass and yui-compressor
3
+ - Better error reporting in pry
4
+ - Add uglifier
5
+ - Remove unused functions
6
+
1
7
  == 0.2.4 ==
2
8
  - Update compass version
3
9
 
data/Gemfile CHANGED
@@ -1,23 +1,18 @@
1
1
  source 'http://rubygems.org'
2
2
  # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem 'activesupport', '>= 2.3.5'
5
3
 
6
- gem 'thor', '>= 0.18.1'
4
+ gem 'thor', '>= 0.19.1'
7
5
  gem 'guard', '>= 2.2.1'
8
- gem 'guard-livereload', '>= 2.0.0'
6
+ gem 'guard-livereload', '>= 2.3.0'
9
7
  gem 'sprockets', '>= 2.12.0'
10
- gem 'rubyzip', '>= 1.0.0'
11
- gem 'json', '>= 1.8.0'
12
- gem 'sass', '>= 3.3.0'
13
- gem 'sprockets-sass', '>= 1.2.0'
14
- gem 'compass', '>= 1.0.0.alpha.20'
8
+ gem 'rubyzip', '>= 1.1.6'
15
9
  gem 'rack', '>= 1.5.2'
16
- gem 'therubyracer', '>= 0.12.0'
10
+ gem 'sass', '>= 3.3.0'
17
11
  gem 'less', '>= 2.6.0'
18
12
  gem 'coffee-script', '>= 2.3.0'
19
- gem 'rb-fsevent', '>= 0.9.3'
20
- gem 'yui-compressor', '>= 0.12.0'
13
+ gem 'therubyracer', '>= 0.12.0'
14
+ gem 'rb-fsevent', '>= 0.9.4'
15
+ gem 'uglifier', '>= 2.5.0'
21
16
 
22
17
  # Add dependencies to develop your gem here.
23
18
  # Include everything needed to run rake, tests, features, etc.
data/Gemfile.lock CHANGED
@@ -6,33 +6,17 @@ GEM
6
6
  cucumber (>= 1.1.1)
7
7
  ffi (>= 1.0.11)
8
8
  rspec (>= 2.7.0)
9
- builder (3.0.0)
9
+ builder (3.0.4)
10
10
  celluloid (0.15.2)
11
11
  timers (~> 1.1.0)
12
- celluloid-io (0.15.0)
13
- celluloid (>= 0.15.0)
14
- nio4r (>= 0.5.0)
15
12
  childprocess (0.3.5)
16
13
  ffi (~> 1.0, >= 1.0.6)
17
- chunky_png (1.3.1)
18
14
  coderay (1.1.0)
19
15
  coffee-script (2.3.0)
20
16
  coffee-script-source
21
17
  execjs
22
18
  coffee-script-source (1.7.1)
23
19
  commonjs (0.2.7)
24
- compass (1.0.0.alpha.21)
25
- chunky_png (~> 1.2)
26
- compass-core (~> 1.0.0.alpha.21)
27
- compass-import-once (~> 1.0.4)
28
- rb-fsevent (>= 0.9.3)
29
- rb-inotify (>= 0.9)
30
- sass (>= 3.3.0, < 3.5)
31
- compass-core (1.0.0.alpha.21)
32
- multi_json (~> 1.0)
33
- sass (>= 3.3.0, < 3.5)
34
- compass-import-once (1.0.4)
35
- sass (>= 3.2, < 3.5)
36
20
  cucumber (1.2.1)
37
21
  builder (>= 2.1.2)
38
22
  diff-lcs (>= 1.1.3)
@@ -44,12 +28,12 @@ GEM
44
28
  http_parser.rb (~> 0.6.0)
45
29
  eventmachine (1.0.3)
46
30
  execjs (2.2.1)
47
- ffi (1.1.5)
48
- formatador (0.2.4)
31
+ ffi (1.9.3)
32
+ formatador (0.2.5)
49
33
  gherkin (2.11.1)
50
34
  json (>= 1.4.6)
51
35
  git (1.2.5)
52
- guard (2.6.0)
36
+ guard (2.6.1)
53
37
  formatador (>= 0.2.4)
54
38
  listen (~> 2.7)
55
39
  lumberjack (~> 1.0)
@@ -69,23 +53,21 @@ GEM
69
53
  less (2.6.0)
70
54
  commonjs (~> 0.2.7)
71
55
  libv8 (3.16.14.3)
72
- listen (2.7.1)
56
+ listen (2.7.9)
73
57
  celluloid (>= 0.15.2)
74
- celluloid-io (>= 0.15.0)
75
58
  rb-fsevent (>= 0.9.3)
76
59
  rb-inotify (>= 0.9)
77
- lumberjack (1.0.5)
60
+ lumberjack (1.0.9)
78
61
  method_source (0.8.2)
79
- multi_json (1.9.2)
80
- nio4r (1.0.0)
81
- pry (0.9.12.6)
82
- coderay (~> 1.0)
83
- method_source (~> 0.8)
62
+ multi_json (1.10.1)
63
+ pry (0.10.0)
64
+ coderay (~> 1.1.0)
65
+ method_source (~> 0.8.1)
84
66
  slop (~> 3.4)
85
67
  rack (1.5.2)
86
68
  rake (0.9.2.2)
87
69
  rb-fsevent (0.9.4)
88
- rb-inotify (0.9.3)
70
+ rb-inotify (0.9.5)
89
71
  ffi (>= 0.5.0)
90
72
  ref (1.0.5)
91
73
  rspec (2.11.0)
@@ -97,23 +79,22 @@ GEM
97
79
  diff-lcs (~> 1.1.3)
98
80
  rspec-mocks (2.11.2)
99
81
  rubyzip (1.1.6)
100
- sass (3.3.11)
101
- slop (3.5.0)
102
- sprockets (2.12.0)
82
+ sass (3.3.14)
83
+ slop (3.6.0)
84
+ sprockets (2.12.1)
103
85
  hike (~> 1.2)
104
86
  multi_json (~> 1.0)
105
87
  rack (~> 1.0)
106
88
  tilt (~> 1.1, != 1.3.0)
107
- sprockets-sass (1.2.0)
108
- sprockets (~> 2.0)
109
- tilt (~> 1.1)
110
89
  therubyracer (0.12.1)
111
90
  libv8 (~> 3.16.14.0)
112
91
  ref
113
92
  thor (0.19.1)
114
93
  tilt (1.4.1)
115
94
  timers (1.1.0)
116
- yui-compressor (0.12.0)
95
+ uglifier (2.5.3)
96
+ execjs (>= 0.3.0)
97
+ json (>= 1.8.0)
117
98
 
118
99
  PLATFORMS
119
100
  ruby
@@ -121,20 +102,17 @@ PLATFORMS
121
102
  DEPENDENCIES
122
103
  aruba
123
104
  coffee-script (>= 2.3.0)
124
- compass (>= 1.0.0.alpha.20)
125
105
  cucumber
126
106
  guard (>= 2.2.1)
127
- guard-livereload (>= 2.0.0)
107
+ guard-livereload (>= 2.3.0)
128
108
  jeweler
129
- json (>= 1.8.0)
130
109
  less (>= 2.6.0)
131
110
  rack (>= 1.5.2)
132
- rb-fsevent (>= 0.9.3)
111
+ rb-fsevent (>= 0.9.4)
133
112
  rspec
134
- rubyzip (>= 1.0.0)
113
+ rubyzip (>= 1.1.6)
135
114
  sass (>= 3.3.0)
136
115
  sprockets (>= 2.12.0)
137
- sprockets-sass (>= 1.2.0)
138
116
  therubyracer (>= 0.12.0)
139
- thor (>= 0.18.1)
140
- yui-compressor (>= 0.12.0)
117
+ thor (>= 0.19.1)
118
+ uglifier (>= 2.5.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -1,19 +1,13 @@
1
1
  # WordPress theme information is stored in source/assets/stylesheets/_header.scss
2
2
 
3
3
  # JavaScript compression
4
- # config[:compress_js] = false
4
+ config[:compress_js] = false
5
5
 
6
- # Enable livereload
7
- # config[:livereload] = false
8
-
9
- # Compass configuration can also go here.
10
- # See http://compass-style.org/help/tutorials/configuration-reference/ for some of the options
11
- # Note: Most options (especially path-related options) will have no effect on Marv
6
+ # Stylesheets compression
7
+ config[:compress_css] = false
12
8
 
13
- # Compass.configuration do |compass|
14
- # compass.line_comments = true
15
- # compass.output_style = :expanded # use :compressed for minified version
16
- # end
9
+ # Enable livereload
10
+ config[:livereload] = false
17
11
 
18
12
  # You can also include additional Compass frameworks by requiring them:
19
13
  # require 'boubon'
data/lib/marv.rb CHANGED
@@ -7,5 +7,4 @@ module Marv
7
7
  autoload :Project, 'marv/project'
8
8
  autoload :Builder, 'marv/builder'
9
9
  autoload :Generator, 'marv/generator'
10
- autoload :Config, 'marv/config'
11
10
  end
data/lib/marv/builder.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'sprockets'
2
- require 'sprockets-sass'
3
2
  require 'sass'
4
3
  require 'less'
5
4
  require 'zip'
@@ -9,7 +8,7 @@ module Marv
9
8
  class Builder
10
9
  def initialize(project)
11
10
  @project = project
12
- @task = project.task
11
+ @task = project.task
13
12
  @templates_path = @project.templates_path
14
13
  @assets_path = @project.assets_path
15
14
  @functions_path = @project.functions_path
@@ -160,29 +159,18 @@ module Marv
160
159
  [['style.css'], ['admin.css'], ['javascripts', 'theme.js'], ['javascripts', 'admin.js']].each do |asset|
161
160
  destination = File.join(@project.build_path, asset)
162
161
 
163
- sprocket = @sprockets.find_asset(asset.last)
164
-
165
162
  # Catch any sprockets errors and continue the process
166
163
  begin
167
164
  @task.shell.mute do
165
+ sprocket = @sprockets.find_asset(asset.last)
166
+
168
167
  FileUtils.mkdir_p(File.dirname(destination)) unless File.directory?(File.dirname(destination))
169
168
  sprocket.write_to(destination) unless sprocket.nil?
170
-
171
- if @project.config[:compress_js] && destination.end_with?('.js')
172
- require "yui/compressor"
173
-
174
- # Grab the initial sprockets output
175
- sprockets_output = File.open(destination, 'r').read
176
-
177
- # Re-write the file, minified
178
- File.open(destination, 'w') do |file|
179
- file.write(YUI::JavaScriptCompressor.new.compress(sprockets_output))
180
- end
181
- end
182
169
  end
183
170
  rescue Exception => e
184
171
  @task.say "Error while building #{asset.last}:"
185
172
  @task.say e.message, Thor::Shell::Color::RED
173
+
186
174
  File.open(destination, 'w') do |file|
187
175
  file.puts(e.message)
188
176
  end
@@ -233,6 +221,14 @@ module Marv
233
221
  @sprockets.append_path File.join(@assets_path, dir)
234
222
  end
235
223
 
224
+ if @project.config[:compress_js]
225
+ @sprockets.js_compressor = :uglify
226
+ end
227
+
228
+ if @project.config[:compress_css]
229
+ @sprockets.css_compressor = :scss
230
+ end
231
+
236
232
  # Add assets/styleshets to load path for Less Engine
237
233
  Tilt::LessTemplateWithPaths.load_path = File.join(@assets_path, 'stylesheets')
238
234
 
data/lib/marv/cli.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'thor'
2
- require 'yaml'
3
2
  require 'guard/marv/assets'
4
3
  require 'guard/marv/config'
5
4
  require 'guard/marv/templates'
@@ -15,7 +14,7 @@ module Marv
15
14
 
16
15
  desc "create DIRECTORY", "Creates a Marv project"
17
16
  long_desc "Creates a new project. Use the layout option to choose a scaffold"
18
- option :layout, :type => :string, :default => 'default', :desc => "Name of alternate layout"
17
+ method_option :layout, :type => :string, :default => 'default', :desc => "Name of alternate layout"
19
18
  def create(dir)
20
19
  theme = {}
21
20
  theme[:name] = dir
@@ -73,6 +72,7 @@ module Marv
73
72
  end
74
73
 
75
74
  protected
75
+
76
76
  def do_link(project, path)
77
77
  begin
78
78
  project.link(path)
@@ -105,6 +105,7 @@ module Marv
105
105
  copy_templates
106
106
  copy_functions
107
107
  copy_includes
108
+
108
109
  return self
109
110
  end
110
111
 
data/lib/marv/project.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'pathname'
2
- require 'compass'
3
2
 
4
3
  module Marv
5
4
  class Project
@@ -92,13 +91,8 @@ module Marv
92
91
  if File.exists?(self.config_file)
93
92
  config.merge!(load_ruby_config(self.config_file))
94
93
  else
95
- # Old format of config file
96
- if File.exists?(File.join(self.root, 'config.json'))
97
- config.merge!(convert_old_config)
98
- else
99
- raise Error, "Could not find the config file, are you sure you're in a
100
- marv project directory?"
101
- end
94
+ raise Error, "Could not find the config file, are you sure you're in a
95
+ marv project directory?"
102
96
  end
103
97
 
104
98
  @config = config
@@ -114,36 +108,6 @@ module Marv
114
108
 
115
109
  private
116
110
 
117
- def convert_old_config
118
- require 'json'
119
-
120
- # Let the user know what is going to happen
121
- @task.say("It looks like you are using the old JSON-format config. Marv will now try converting your config to the new Ruby format.")
122
- @task.ask(" Press any key to continue...")
123
-
124
- begin
125
- old_file_name = File.join(self.root, 'config.json')
126
- # Parse the old config format, convert keys to symbols
127
- @config = JSON.parse(File.open(old_file_name).read).inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
128
-
129
- @task.create_file(@config_file) do
130
- # Find the config.tt template, and parse it using ERB
131
- config_template_path = @task.find_in_source_paths(File.join(['config', 'config.tt']))
132
- parse_erb(File.expand_path(config_template_path))
133
- end
134
- rescue Exception => e
135
- @task.say "Error while building new config file:", Thor::Shell::Color::RED
136
- @task.say e.message, Thor::Shell::Color::RED
137
- @task.say "You'll need to either fix the error and try again, or manually convert your config.json file to Ruby format (config.rb)"
138
- exit
139
- end
140
-
141
- @task.say "Success! Double-check that all your config values were moved over, and you can now delete config.json.", Thor::Shell::Color::GREEN
142
-
143
- # We now have a Ruby config file, so we can continue loading as normal
144
- return load_ruby_config(self.config_file)
145
- end
146
-
147
111
  def load_ruby_config(file)
148
112
  config = {}
149
113
 
data/lib/marv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Marv
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
data/marv.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "marv"
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
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-07-31"
12
+ s.date = "2014-08-05"
13
13
  s.description = "A toolkit for bootstrapping and developing WordPress themes using Sass, LESS, and CoffeeScript."
14
14
  s.email = "info@hardpixel.eu"
15
15
  s.executables = ["marv"]
@@ -73,15 +73,14 @@ Gem::Specification.new do |s|
73
73
  "lib/marv.rb",
74
74
  "lib/marv/builder.rb",
75
75
  "lib/marv/cli.rb",
76
- "lib/marv/config.rb",
77
76
  "lib/marv/engines.rb",
78
77
  "lib/marv/error.rb",
79
78
  "lib/marv/generator.rb",
80
79
  "lib/marv/guard.rb",
81
80
  "lib/marv/project.rb",
82
81
  "lib/marv/version.rb",
82
+ "marv-0.2.5.gem",
83
83
  "marv.gemspec",
84
- "spec/lib/marv/config_spec.rb",
85
84
  "spec/lib/marv/project_spec.rb",
86
85
  "spec/spec_helper.rb"
87
86
  ]
@@ -95,62 +94,53 @@ Gem::Specification.new do |s|
95
94
  s.specification_version = 3
96
95
 
97
96
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
98
- s.add_runtime_dependency(%q<thor>, [">= 0.18.1"])
97
+ s.add_runtime_dependency(%q<thor>, [">= 0.19.1"])
99
98
  s.add_runtime_dependency(%q<guard>, [">= 2.2.1"])
100
- s.add_runtime_dependency(%q<guard-livereload>, [">= 2.0.0"])
99
+ s.add_runtime_dependency(%q<guard-livereload>, [">= 2.3.0"])
101
100
  s.add_runtime_dependency(%q<sprockets>, [">= 2.12.0"])
102
- s.add_runtime_dependency(%q<rubyzip>, [">= 1.0.0"])
103
- s.add_runtime_dependency(%q<json>, [">= 1.8.0"])
104
- s.add_runtime_dependency(%q<sass>, [">= 3.3.0"])
105
- s.add_runtime_dependency(%q<sprockets-sass>, [">= 1.2.0"])
106
- s.add_runtime_dependency(%q<compass>, [">= 1.0.0.alpha.20"])
101
+ s.add_runtime_dependency(%q<rubyzip>, [">= 1.1.6"])
107
102
  s.add_runtime_dependency(%q<rack>, [">= 1.5.2"])
108
- s.add_runtime_dependency(%q<therubyracer>, [">= 0.12.0"])
103
+ s.add_runtime_dependency(%q<sass>, [">= 3.3.0"])
109
104
  s.add_runtime_dependency(%q<less>, [">= 2.6.0"])
110
105
  s.add_runtime_dependency(%q<coffee-script>, [">= 2.3.0"])
111
- s.add_runtime_dependency(%q<rb-fsevent>, [">= 0.9.3"])
112
- s.add_runtime_dependency(%q<yui-compressor>, [">= 0.12.0"])
106
+ s.add_runtime_dependency(%q<therubyracer>, [">= 0.12.0"])
107
+ s.add_runtime_dependency(%q<rb-fsevent>, [">= 0.9.4"])
108
+ s.add_runtime_dependency(%q<uglifier>, [">= 2.5.0"])
113
109
  s.add_development_dependency(%q<rspec>, [">= 0"])
114
110
  s.add_development_dependency(%q<cucumber>, [">= 0"])
115
111
  s.add_development_dependency(%q<aruba>, [">= 0"])
116
112
  s.add_development_dependency(%q<jeweler>, [">= 0"])
117
113
  else
118
- s.add_dependency(%q<thor>, [">= 0.18.1"])
114
+ s.add_dependency(%q<thor>, [">= 0.19.1"])
119
115
  s.add_dependency(%q<guard>, [">= 2.2.1"])
120
- s.add_dependency(%q<guard-livereload>, [">= 2.0.0"])
116
+ s.add_dependency(%q<guard-livereload>, [">= 2.3.0"])
121
117
  s.add_dependency(%q<sprockets>, [">= 2.12.0"])
122
- s.add_dependency(%q<rubyzip>, [">= 1.0.0"])
123
- s.add_dependency(%q<json>, [">= 1.8.0"])
124
- s.add_dependency(%q<sass>, [">= 3.3.0"])
125
- s.add_dependency(%q<sprockets-sass>, [">= 1.2.0"])
126
- s.add_dependency(%q<compass>, [">= 1.0.0.alpha.20"])
118
+ s.add_dependency(%q<rubyzip>, [">= 1.1.6"])
127
119
  s.add_dependency(%q<rack>, [">= 1.5.2"])
128
- s.add_dependency(%q<therubyracer>, [">= 0.12.0"])
120
+ s.add_dependency(%q<sass>, [">= 3.3.0"])
129
121
  s.add_dependency(%q<less>, [">= 2.6.0"])
130
122
  s.add_dependency(%q<coffee-script>, [">= 2.3.0"])
131
- s.add_dependency(%q<rb-fsevent>, [">= 0.9.3"])
132
- s.add_dependency(%q<yui-compressor>, [">= 0.12.0"])
123
+ s.add_dependency(%q<therubyracer>, [">= 0.12.0"])
124
+ s.add_dependency(%q<rb-fsevent>, [">= 0.9.4"])
125
+ s.add_dependency(%q<uglifier>, [">= 2.5.0"])
133
126
  s.add_dependency(%q<rspec>, [">= 0"])
134
127
  s.add_dependency(%q<cucumber>, [">= 0"])
135
128
  s.add_dependency(%q<aruba>, [">= 0"])
136
129
  s.add_dependency(%q<jeweler>, [">= 0"])
137
130
  end
138
131
  else
139
- s.add_dependency(%q<thor>, [">= 0.18.1"])
132
+ s.add_dependency(%q<thor>, [">= 0.19.1"])
140
133
  s.add_dependency(%q<guard>, [">= 2.2.1"])
141
- s.add_dependency(%q<guard-livereload>, [">= 2.0.0"])
134
+ s.add_dependency(%q<guard-livereload>, [">= 2.3.0"])
142
135
  s.add_dependency(%q<sprockets>, [">= 2.12.0"])
143
- s.add_dependency(%q<rubyzip>, [">= 1.0.0"])
144
- s.add_dependency(%q<json>, [">= 1.8.0"])
145
- s.add_dependency(%q<sass>, [">= 3.3.0"])
146
- s.add_dependency(%q<sprockets-sass>, [">= 1.2.0"])
147
- s.add_dependency(%q<compass>, [">= 1.0.0.alpha.20"])
136
+ s.add_dependency(%q<rubyzip>, [">= 1.1.6"])
148
137
  s.add_dependency(%q<rack>, [">= 1.5.2"])
149
- s.add_dependency(%q<therubyracer>, [">= 0.12.0"])
138
+ s.add_dependency(%q<sass>, [">= 3.3.0"])
150
139
  s.add_dependency(%q<less>, [">= 2.6.0"])
151
140
  s.add_dependency(%q<coffee-script>, [">= 2.3.0"])
152
- s.add_dependency(%q<rb-fsevent>, [">= 0.9.3"])
153
- s.add_dependency(%q<yui-compressor>, [">= 0.12.0"])
141
+ s.add_dependency(%q<therubyracer>, [">= 0.12.0"])
142
+ s.add_dependency(%q<rb-fsevent>, [">= 0.9.4"])
143
+ s.add_dependency(%q<uglifier>, [">= 2.5.0"])
154
144
  s.add_dependency(%q<rspec>, [">= 0"])
155
145
  s.add_dependency(%q<cucumber>, [">= 0"])
156
146
  s.add_dependency(%q<aruba>, [">= 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.2.4
4
+ version: 0.2.5
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-07-31 00:00:00.000000000 Z
13
+ date: 2014-08-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.18.1
22
+ version: 0.19.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ! '>='
29
29
  - !ruby/object:Gem::Version
30
- version: 0.18.1
30
+ version: 0.19.1
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: guard
33
33
  requirement: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  requirements:
52
52
  - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
- version: 2.0.0
54
+ version: 2.3.0
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.0.0
62
+ version: 2.3.0
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: sprockets
65
65
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +83,7 @@ dependencies:
83
83
  requirements:
84
84
  - - ! '>='
85
85
  - !ruby/object:Gem::Version
86
- version: 1.0.0
86
+ version: 1.1.6
87
87
  type: :runtime
88
88
  prerelease: false
89
89
  version_requirements: !ruby/object:Gem::Requirement
@@ -91,15 +91,15 @@ dependencies:
91
91
  requirements:
92
92
  - - ! '>='
93
93
  - !ruby/object:Gem::Version
94
- version: 1.0.0
94
+ version: 1.1.6
95
95
  - !ruby/object:Gem::Dependency
96
- name: json
96
+ name: rack
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  none: false
99
99
  requirements:
100
100
  - - ! '>='
101
101
  - !ruby/object:Gem::Version
102
- version: 1.8.0
102
+ version: 1.5.2
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: 1.8.0
110
+ version: 1.5.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: sass
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -125,29 +125,13 @@ dependencies:
125
125
  - !ruby/object:Gem::Version
126
126
  version: 3.3.0
127
127
  - !ruby/object:Gem::Dependency
128
- name: sprockets-sass
129
- requirement: !ruby/object:Gem::Requirement
130
- none: false
131
- requirements:
132
- - - ! '>='
133
- - !ruby/object:Gem::Version
134
- version: 1.2.0
135
- type: :runtime
136
- prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
142
- version: 1.2.0
143
- - !ruby/object:Gem::Dependency
144
- name: compass
128
+ name: less
145
129
  requirement: !ruby/object:Gem::Requirement
146
130
  none: false
147
131
  requirements:
148
132
  - - ! '>='
149
133
  - !ruby/object:Gem::Version
150
- version: 1.0.0.alpha.20
134
+ version: 2.6.0
151
135
  type: :runtime
152
136
  prerelease: false
153
137
  version_requirements: !ruby/object:Gem::Requirement
@@ -155,15 +139,15 @@ dependencies:
155
139
  requirements:
156
140
  - - ! '>='
157
141
  - !ruby/object:Gem::Version
158
- version: 1.0.0.alpha.20
142
+ version: 2.6.0
159
143
  - !ruby/object:Gem::Dependency
160
- name: rack
144
+ name: coffee-script
161
145
  requirement: !ruby/object:Gem::Requirement
162
146
  none: false
163
147
  requirements:
164
148
  - - ! '>='
165
149
  - !ruby/object:Gem::Version
166
- version: 1.5.2
150
+ version: 2.3.0
167
151
  type: :runtime
168
152
  prerelease: false
169
153
  version_requirements: !ruby/object:Gem::Requirement
@@ -171,7 +155,7 @@ dependencies:
171
155
  requirements:
172
156
  - - ! '>='
173
157
  - !ruby/object:Gem::Version
174
- version: 1.5.2
158
+ version: 2.3.0
175
159
  - !ruby/object:Gem::Dependency
176
160
  name: therubyracer
177
161
  requirement: !ruby/object:Gem::Requirement
@@ -188,38 +172,6 @@ dependencies:
188
172
  - - ! '>='
189
173
  - !ruby/object:Gem::Version
190
174
  version: 0.12.0
191
- - !ruby/object:Gem::Dependency
192
- name: less
193
- requirement: !ruby/object:Gem::Requirement
194
- none: false
195
- requirements:
196
- - - ! '>='
197
- - !ruby/object:Gem::Version
198
- version: 2.6.0
199
- type: :runtime
200
- prerelease: false
201
- version_requirements: !ruby/object:Gem::Requirement
202
- none: false
203
- requirements:
204
- - - ! '>='
205
- - !ruby/object:Gem::Version
206
- version: 2.6.0
207
- - !ruby/object:Gem::Dependency
208
- name: coffee-script
209
- requirement: !ruby/object:Gem::Requirement
210
- none: false
211
- requirements:
212
- - - ! '>='
213
- - !ruby/object:Gem::Version
214
- version: 2.3.0
215
- type: :runtime
216
- prerelease: false
217
- version_requirements: !ruby/object:Gem::Requirement
218
- none: false
219
- requirements:
220
- - - ! '>='
221
- - !ruby/object:Gem::Version
222
- version: 2.3.0
223
175
  - !ruby/object:Gem::Dependency
224
176
  name: rb-fsevent
225
177
  requirement: !ruby/object:Gem::Requirement
@@ -227,7 +179,7 @@ dependencies:
227
179
  requirements:
228
180
  - - ! '>='
229
181
  - !ruby/object:Gem::Version
230
- version: 0.9.3
182
+ version: 0.9.4
231
183
  type: :runtime
232
184
  prerelease: false
233
185
  version_requirements: !ruby/object:Gem::Requirement
@@ -235,15 +187,15 @@ dependencies:
235
187
  requirements:
236
188
  - - ! '>='
237
189
  - !ruby/object:Gem::Version
238
- version: 0.9.3
190
+ version: 0.9.4
239
191
  - !ruby/object:Gem::Dependency
240
- name: yui-compressor
192
+ name: uglifier
241
193
  requirement: !ruby/object:Gem::Requirement
242
194
  none: false
243
195
  requirements:
244
196
  - - ! '>='
245
197
  - !ruby/object:Gem::Version
246
- version: 0.12.0
198
+ version: 2.5.0
247
199
  type: :runtime
248
200
  prerelease: false
249
201
  version_requirements: !ruby/object:Gem::Requirement
@@ -251,7 +203,7 @@ dependencies:
251
203
  requirements:
252
204
  - - ! '>='
253
205
  - !ruby/object:Gem::Version
254
- version: 0.12.0
206
+ version: 2.5.0
255
207
  - !ruby/object:Gem::Dependency
256
208
  name: rspec
257
209
  requirement: !ruby/object:Gem::Requirement
@@ -381,15 +333,14 @@ files:
381
333
  - lib/marv.rb
382
334
  - lib/marv/builder.rb
383
335
  - lib/marv/cli.rb
384
- - lib/marv/config.rb
385
336
  - lib/marv/engines.rb
386
337
  - lib/marv/error.rb
387
338
  - lib/marv/generator.rb
388
339
  - lib/marv/guard.rb
389
340
  - lib/marv/project.rb
390
341
  - lib/marv/version.rb
342
+ - marv-0.2.5.gem
391
343
  - marv.gemspec
392
- - spec/lib/marv/config_spec.rb
393
344
  - spec/lib/marv/project_spec.rb
394
345
  - spec/spec_helper.rb
395
346
  homepage: http://hardpixel.github.io/marv
data/lib/marv/config.rb DELETED
@@ -1,61 +0,0 @@
1
- module Marv
2
- # Reads/Writes a configuration file in the user's home directory
3
- #
4
- class Config
5
-
6
- @config
7
-
8
- attr_accessor :config
9
-
10
- def initialize()
11
- @config = {
12
- :theme => {
13
- :author => nil,
14
- :author_url => nil,
15
- },
16
- :links => []
17
- }
18
- end
19
-
20
- # Provides access to the config using the Hash square brackets
21
- def [](var)
22
- @config[var]
23
- end
24
-
25
- # Allows modifying variables through hash square brackets
26
- def []=(var, value)
27
- @config[var] = value
28
- end
29
-
30
- # Returns the path to the user's configuration file
31
- def config_file
32
- @config_file ||= File.expand_path(File.join('~', '.marv', 'config.yml'))
33
- end
34
-
35
- # Writes the configuration file
36
- def write(options={})
37
- # If we're unit testing then it helps to use a
38
- # StringIO object instead of a file buffer
39
- io = options[:io] || File.open(self.config_file, 'w')
40
-
41
- io.write JSON.generate(@config)
42
-
43
- io.close
44
-
45
- self
46
- end
47
-
48
- # Loads config declarations in user's home dir
49
- #
50
- # If file does not exist then it will be created
51
- def read
52
- return write unless File.exists?(self.config_file)
53
-
54
- data = File.open(self.config_file).read
55
-
56
- @config = data.empty? ? {} : JSON.parse(data)
57
-
58
- self
59
- end
60
- end
61
- end
@@ -1,79 +0,0 @@
1
-
2
- require 'marv/config'
3
-
4
- describe Marv::Config do
5
-
6
- def config_file
7
- File.expand_path(File.join('~', '.marv', '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 ~/.marv/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] = "John Doe"
46
- @config[:theme][:author_url] = "http://john-doe.com"
47
-
48
- @config.write(:io => @buffer)
49
- @buffer.string.should == "---\n:theme:\n :author: John Doe\n :author_url: http://john-doe.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