spitball-server 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module Bundler
2
2
  class FakeDsl
3
-
3
+
4
4
  def initialize(file)
5
5
  @groups = Hash.new{|h, k| h[k] = []}
6
6
  @gems = []
@@ -19,10 +19,12 @@ module Bundler
19
19
  __gems.map(&:first)
20
20
  end
21
21
 
22
- def group(name, &blk)
23
- @current_group = name.to_sym
24
- instance_eval(&blk)
25
- @current_group = nil
22
+ def group(*group_names, &blk)
23
+ group_names.each do |name|
24
+ @current_group = name.to_sym
25
+ instance_eval(&blk)
26
+ @current_group = nil
27
+ end
26
28
  end
27
29
  alias_method :groups, :group
28
30
 
@@ -30,7 +32,7 @@ module Bundler
30
32
  @gems << args
31
33
  @groups[@current_group] << args.first
32
34
  end
33
-
35
+
34
36
  def method_missing(*args)
35
37
  end
36
38
  end
@@ -1,3 +1,3 @@
1
1
  class Spitball
2
- VERSION = '0.7.3' unless const_defined?(:VERSION)
2
+ VERSION = '0.7.4' unless const_defined?(:VERSION)
3
3
  end
@@ -305,3 +305,55 @@ describe Spitball do
305
305
  end
306
306
  end
307
307
  end
308
+
309
+ describe Bundler::FakeDsl do
310
+ it "should support a single group" do
311
+ gemfile = <<-end_gemfile
312
+ source :rubygems
313
+ gem "json_pure"
314
+
315
+ group :development do
316
+ gem 'rails'
317
+ gem 'json_pure'
318
+ end
319
+ end_gemfile
320
+
321
+ dsl = Bundler::FakeDsl.new(gemfile)
322
+ dsl.__groups[:development].should == ["rails", "json_pure"]
323
+ end
324
+
325
+ it "should support multiple groups in one line" do
326
+ gemfile = <<-end_gemfile
327
+ source :rubygems
328
+ gem "json_pure"
329
+
330
+ group :development, :test do
331
+ gem 'rails'
332
+ gem 'json_pure'
333
+ end
334
+ end_gemfile
335
+
336
+ dsl = Bundler::FakeDsl.new(gemfile)
337
+ dsl.__groups[:development].should == ["rails", "json_pure"]
338
+ dsl.__groups[:test].should == ["rails", "json_pure"]
339
+ end
340
+
341
+ it "should support multiple groups on several lines" do
342
+ gemfile = <<-end_gemfile
343
+ source :rubygems
344
+ gem "json_pure"
345
+
346
+ group :development do
347
+ gem 'rails'
348
+ end
349
+
350
+ group :test do
351
+ gem 'json_pure'
352
+ end
353
+ end_gemfile
354
+
355
+ dsl = Bundler::FakeDsl.new(gemfile)
356
+ dsl.__groups[:development].should == ["rails"]
357
+ dsl.__groups[:test].should == ["json_pure"]
358
+ end
359
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spitball-server
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 3
10
- version: 0.7.3
9
+ - 4
10
+ version: 0.7.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Freels
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2014-01-04 00:00:00 Z
20
+ date: 2014-05-31 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  requirement: &id001 !ruby/object:Gem::Requirement