funnel 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/funnel CHANGED
@@ -22,6 +22,18 @@ OptionParser.new do |opts|
22
22
  exit
23
23
  end
24
24
 
25
+ opts.on( '-w amqp', '--with-amqp', 'Include amqp proxy handler' ) do
26
+ options[:amqp] = true
27
+ end
28
+
29
+ opts.on( '-w xmpp', '--with-xmpp', 'Include xmpp proxy handler' ) do
30
+ options[:xmpp] = true
31
+ end
32
+
33
+ opts.on( '-w twitter', '--with-twitter', 'Include twitter stream proxy handler' ) do
34
+ options[:twitter] = true
35
+ end
36
+
25
37
  if ARGV.length < 1
26
38
  puts opts
27
39
  exit
@@ -30,4 +42,4 @@ OptionParser.new do |opts|
30
42
  end.parse!
31
43
 
32
44
  app = Funnel::Generators::Application.new
33
- app.generate "#{Dir.getwd}/#{ARGV[0]}", options
45
+ app.generate "#{Dir.getwd}/#{ARGV.last}", options
data/funnel.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'funnel'
3
- s.version = '0.1.4'
3
+ s.version = '0.1.5'
4
4
  s.date = '2009-12-30'
5
5
  s.summary = 'A realtime resource-centric application framework'
6
6
  s.email = 'dan.simpson@gmail.com'
@@ -33,6 +33,12 @@ spec = Gem::Specification.new do |s|
33
33
  'templates/application/config/config.rb',
34
34
  'templates/application/config/routes.rb',
35
35
  'templates/application/script/run',
36
- 'templates/application/handlers/echo_handler.rb'
36
+ 'templates/application/handlers/echo_handler.rb',
37
+ 'templates/amqp/config/amqp.rb',
38
+ 'templates/amqp/handlers/amqp.rb',
39
+ 'templates/xmpp/config/xmpp.rb',
40
+ 'templates/xmpp/handlers/xmpp.rb',
41
+ 'templates/twitter/config/twitter.rb',
42
+ 'templates/twitter/handlers/twitter.rb'
37
43
  ]
38
44
  end
@@ -4,12 +4,27 @@ module Funnel
4
4
  module Generators
5
5
  class Application
6
6
 
7
- def generate destination, options
8
- FileUtils.cp_r(template_dir, destination, options)
7
+
8
+ def generate destination, options={}
9
+ FileUtils.cp_r(template_dir, destination)
10
+
11
+ if options[:amqp]
12
+ FileUtils.cp_r(template_dir("amqp"), destination)
13
+ end
14
+
15
+ if options[:xmpp]
16
+ FileUtils.cp_r(template_dir("xmpp"), destination)
17
+ end
18
+
19
+ if options[:twitter]
20
+ FileUtils.cp_r(template_dir("twitter"), destination)
21
+ end
9
22
  end
10
-
11
- def template_dir
12
- File.expand_path('../../../../templates/application', __FILE__)
23
+
24
+ private
25
+
26
+ def template_dir tpl="application"
27
+ File.expand_path("../../../../templates/#{tpl}", __FILE__)
13
28
  end
14
29
  end
15
30
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funnel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Simpson
@@ -49,6 +49,12 @@ files:
49
49
  - templates/application/config/routes.rb
50
50
  - templates/application/script/run
51
51
  - templates/application/handlers/echo_handler.rb
52
+ - templates/amqp/config/amqp.rb
53
+ - templates/amqp/handlers/amqp.rb
54
+ - templates/xmpp/config/xmpp.rb
55
+ - templates/xmpp/handlers/xmpp.rb
56
+ - templates/twitter/config/twitter.rb
57
+ - templates/twitter/handlers/twitter.rb
52
58
  has_rdoc: true
53
59
  homepage: http://github.com/dansimpson/funnel
54
60
  licenses: []