sprout 0.7.211-darwin → 0.7.212-darwin

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprout might be problematic. Click here for more details.

data/lib/progress_bar.rb CHANGED
@@ -174,10 +174,10 @@ class ProgressBarImpl # :nodoc:[all]
174
174
  end
175
175
 
176
176
  def show
177
- arguments = @format_arguments.map {|method|
177
+ arguments = @format_arguments.map do |method|
178
178
  method = sprintf("fmt_%s", method)
179
179
  send(method)
180
- }
180
+ end
181
181
  line = sprintf(@format, *arguments)
182
182
 
183
183
  width = get_width
data/lib/sprout.rb CHANGED
@@ -130,6 +130,9 @@ module Sprout
130
130
  # * +project_path+ Optional parameter. Will default to the nearest folder that contains a valid Rakefile.
131
131
  # This Rakefile will usually be loaded by the referenced Generator, and it should have a configured ProjectModel
132
132
  # defined in it.
133
+
134
+ # TODO: This command should accept an array of sprout names to fall back on...
135
+ # for example: generate(['flex4', 'as3'], ...)
133
136
  def self.generate(sprout_name, generator_name, params, project_path=nil)
134
137
  # params.each_index do |index|
135
138
  # params[index] = clean_project_name(params[index])
@@ -97,23 +97,23 @@ module RubiGen # :nodoc:[all]
97
97
 
98
98
  # Yield latest versions of generator gems.
99
99
  def each
100
- Gem::cache.sprout_search(/sprout-*#{@sprout_name}-bundle$/).inject({}) { |latest, gem|
100
+ Gem::cache.sprout_search(/sprout-*#{@sprout_name}-bundle$/).inject({}) do |latest, gem|
101
101
  hem = latest[gem.name]
102
102
  latest[gem.name] = gem if hem.nil? or gem.version > hem.version
103
103
  latest
104
- }.values.each { |gem|
104
+ end.values.each do |gem|
105
105
  yield Spec.new(gem.name.sub(/sprout-*#{@sprout_name}-bundle$/, ''), gem.full_gem_path, label)
106
- }
106
+ end
107
107
  end
108
108
 
109
109
  def each_sprout
110
- Gem::cache.sprout_search(/^sprout-.*/).inject({}) { |latest, gem|
110
+ Gem::cache.sprout_search(/^sprout-.*/).inject({}) do |latest, gem|
111
111
  hem = latest[gem.name]
112
112
  latest[gem.name] = gem if hem.nil? or gem.version > hem.version
113
113
  latest
114
- }.values.each { |gem|
114
+ end.values.each do |gem|
115
115
  yield Spec.new(gem.name, gem.full_gem_path, label)
116
- }
116
+ end
117
117
  end
118
118
  end
119
119
 
@@ -52,10 +52,10 @@ module Sprout
52
52
  },
53
53
  :progress_proc => lambda {|s|
54
54
  progress.set s if progress
55
- }) {|f|
55
+ }) do |f|
56
56
  response = f.read
57
57
  progress.finish
58
- }
58
+ end
59
59
  rescue SocketError => sock_err
60
60
  raise RemoteFileLoaderError.new("[ERROR] #{sock_err.to_s}")
61
61
  rescue OpenURI::HTTPError => http_err
@@ -70,7 +70,7 @@ module Sprout
70
70
  content = download(url, update)
71
71
  FileUtils.makedirs(File.dirname(downloaded_path))
72
72
  FileUtils.touch(downloaded_path)
73
- File.open(downloaded_path, 'r+') do |file|
73
+ File.open(downloaded_path, 'rb+') do |file|
74
74
  file.write(content)
75
75
  end
76
76
  end
@@ -109,9 +109,9 @@ module Sprout
109
109
  s.requirements << dep
110
110
  end
111
111
 
112
- sprout_requirement = s.requirements.collect { |req|
112
+ sprout_requirement = s.requirements.collect do |req|
113
113
  (req[0] == 'sprout')
114
- }
114
+ end
115
115
 
116
116
  if(!sprout_requirement)
117
117
  s.add_dependency('sprout', '>= 0.7.209')
@@ -175,9 +175,9 @@ module Sprout
175
175
  full = File.expand_path(ext)
176
176
  t = nil
177
177
 
178
- zip full do |t|
179
- t.input = full
180
- t.output = File.join(gem_name, 'ext', File.basename(full) + '.zip')
178
+ zip full do |z|
179
+ z.input = full
180
+ z.output = File.join(gem_name, 'ext', File.basename(full) + '.zip')
181
181
  end
182
182
  puts "pwd: #{Dir.pwd} out #{t.output}"
183
183
  zipped_extensions << File.expand_path(t.output)
@@ -169,8 +169,8 @@ module Sprout
169
169
  while(part)
170
170
  begin
171
171
  sftp.stat(part)
172
- rescue Net::SFTP::Operations::StatusException => e
173
- raise unless e.code == 2
172
+ rescue Net::SFTP::Operations::StatusException => ne
173
+ raise unless ne.code == 2
174
174
  sftp.mkdir(part, :permissions => @dir_mode)
175
175
  end
176
176
  if(parts.size > 0)
@@ -341,7 +341,7 @@ module Sprout
341
341
  name = name.to_s
342
342
  cleaned = clean_name(name)
343
343
  if(!respond_to?(cleaned))
344
- raise NoMethodError.new("undefined method '#{name}' for #{self.class}")
344
+ raise NoMethodError.new("undefined method '#{name}' for #{self.class}", name)
345
345
  end
346
346
  param = param_hash[cleaned]
347
347
 
@@ -560,11 +560,11 @@ module Sprout
560
560
  end
561
561
 
562
562
  def text_file?(file_name)
563
- [/\.as$/, /\.txt$/, /\.mxml$/, /\.xml$/, /\.js$/, /\.html$/, /\.htm$/].select { |regex|
564
- if(file_name.match(regex))
563
+ [/\.as$/, /\.txt$/, /\.mxml$/, /\.xml$/, /\.js$/, /\.html$/, /\.htm$/].select do |regex|
564
+ if (file_name.match(regex))
565
565
  return true
566
566
  end
567
- }.size > 0
567
+ end.size > 0
568
568
  end
569
569
 
570
570
  def setup_preprocessing_file_tasks(input_file, output_file)
data/lib/sprout/user.rb CHANGED
@@ -231,9 +231,9 @@ module Sprout
231
231
  end
232
232
 
233
233
  def execute_thread(tool, options='')
234
- return Thread.new {
234
+ return Thread.new do
235
235
  execute(tool, options)
236
- }
236
+ end
237
237
  end
238
238
 
239
239
  def clean_path(path)
@@ -3,7 +3,7 @@ module Sprout
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 7
6
- TINY = 211
6
+ TINY = 212
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  MAJOR_MINOR = [MAJOR, MINOR].join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.211
4
+ version: 0.7.212
5
5
  platform: darwin
6
6
  authors:
7
7
  - Luke Bayes
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-15 00:00:00 -07:00
12
+ date: 2009-08-22 00:00:00 -07:00
13
13
  default_executable: sprout
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -86,7 +86,6 @@ files:
86
86
  - TODO
87
87
  - samples/gem_wrap/rakefile.rb
88
88
  - bin/sprout
89
- - lib/corelib.swc
90
89
  - lib/platform.rb
91
90
  - lib/progress_bar.rb
92
91
  - lib/sprout/archive_unpacker.rb
@@ -153,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
152
  requirements: []
154
153
 
155
154
  rubyforge_project: sprout
156
- rubygems_version: 1.3.4
155
+ rubygems_version: 1.3.5
157
156
  signing_key:
158
157
  specification_version: 3
159
158
  summary: Sprouts is an open-source, cross-platform project generation, configuration and build tool.
data/lib/corelib.swc DELETED
Binary file