gemtronics 0.4.8 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/bin/gemtronics CHANGED
@@ -46,7 +46,11 @@ group(:development, :dependencies => :default) do |g|
46
46
 
47
47
  end
48
48
 
49
- group(:test, :dependencies => :development) do |g|
49
+ group(:test, :dependencies => :development, :load => false) do |g|
50
+
51
+ end
52
+
53
+ group(:cucumber, :dependencies => :test) do |g|
50
54
 
51
55
  end
52
56
  }.strip
@@ -67,27 +71,41 @@ when 'convert'
67
71
 
68
72
  out_path = path.gsub('gems.yml', 'gemtronics.rb')
69
73
  File.open(out_path, 'w') do |f|
74
+ out = ''
75
+
70
76
  unless top_options.empty?
71
- f.puts "group(:default, #{top_options.inspect.gsub('=>', ' => ')}) do |g|"
77
+ out << "group(:default, #{top_options.inspect.gsub('=>', ' => ')}) do |g|\n"
72
78
  else
73
- f.puts "group(:default) do |g|"
79
+ out << "group(:default) do |g|\n"
74
80
  end
75
81
 
76
82
  gems.each do |gemdef|
77
- x = " g.add('#{gemdef['name']}'"
83
+ out << " g.add('#{gemdef['name']}'"
78
84
  options = {}
79
85
  options[:require] = gemdef['require_name'] if gemdef['require_name']
80
86
  options[:version] = gemdef['version'] if gemdef['version']
81
87
  options[:load] = false if gemdef['load'] == false
82
88
  unless options.empty?
83
- x << ", #{options.inspect.gsub('=>', ' => ')})"
89
+ out << ", #{options.inspect.gsub('=>', ' => ')})\n"
84
90
  else
85
- x << ')'
91
+ out << ")\n"
86
92
  end
87
- f.puts x
88
93
  end
89
94
 
90
- f.puts 'end'
95
+ out << "end\n"
96
+ out << %{
97
+
98
+ alias_group :production, :default
99
+ alias_group :development, :default
100
+
101
+ group(:test, :dependencies => :development, :load => false) do |g|
102
+
103
+ end
104
+
105
+ alias_group :cucumber, :test
106
+ }
107
+
108
+ f.puts out.strip.gsub('{', '').gsub('}', '').gsub('"', '\'')
91
109
  end
92
110
  puts File.read(out_path)
93
111
  else
@@ -38,13 +38,12 @@ module Gemtronics
38
38
  self.gems = []
39
39
  self.dependents = []
40
40
  options = {} if options.nil?
41
+ deps = [options.delete(:dependencies)].flatten.compact
41
42
  self.group_options = Gemtronics::Manager::GLOBAL_DEFAULT_OPTIONS.merge(options)
42
- deps = self.group_options.delete(:dependencies)
43
- if deps
44
- [deps].flatten.each do |dep|
45
- self.dependency(dep)
46
- end
43
+ deps.each do |dep|
44
+ self.dependency(dep)
47
45
  end
46
+ self.group_options.merge!(options)
48
47
  self
49
48
  end
50
49
 
@@ -136,6 +135,7 @@ module Gemtronics
136
135
  def dependency(name)
137
136
  group = Gemtronics::Manager.instance.groups[name.to_sym]
138
137
  if group
138
+ self.group_options.merge!(group.group_options)
139
139
  Gemtronics.group(name.to_sym).dependents << self.name
140
140
  group.gems.dup.each do |gemdef|
141
141
  self.add(gemdef.name, gemdef)
@@ -28,8 +28,7 @@ module Gemtronics
28
28
  # For more information see Gemtronics::Grouper
29
29
  def group(name, options = {})
30
30
  name = name.to_sym
31
- options = GLOBAL_DEFAULT_OPTIONS.merge(options)
32
- g = (self.groups[name] ||= Gemtronics::Grouper.new(name, options))
31
+ g = (self.groups[name] ||= Gemtronics::Grouper.new(name, options || {}))
33
32
  if block_given?
34
33
  yield g
35
34
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemtronics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies: []
15
15
 
16
16
  description: "gemtronics was developed by: markbates"
17
- email: ""
17
+ email: mark@markbates.com
18
18
  executables:
19
19
  - gemtronics
20
20
  extensions: []
@@ -31,7 +31,7 @@ files:
31
31
  - README
32
32
  - LICENSE
33
33
  has_rdoc: true
34
- homepage: ""
34
+ homepage: http://www.metabates.com
35
35
  licenses: []
36
36
 
37
37
  post_install_message: