forge-cli 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/bin/cucumber +16 -0
- data/bin/erubis +16 -0
- data/bin/htmldiff +16 -0
- data/bin/ldiff +16 -0
- data/bin/rackup +16 -0
- data/bin/rake +16 -0
- data/bin/rdoc +16 -0
- data/bin/ri +16 -0
- data/bin/sprockets +16 -0
- data/bin/thor +16 -0
- data/bin/tilt +16 -0
- data/bin/tt +16 -0
- data/lib/forge-cli/modules/base/manifest.yml +18 -0
- data/lib/forge-cli/modules/base/routes.rb +1 -2
- data/lib/forge-cli/modules/events/routes.rb +6 -1
- data/lib/forge-cli/version.rb +1 -1
- data/lib/forge/Gemfile +2 -0
- data/lib/forge/app/controllers/events_controller.rb +11 -0
- data/lib/forge/app/controllers/pages_controller.rb +1 -1
- data/lib/forge/app/controllers/products_controller.rb +1 -1
- data/lib/forge/app/views/forge/dispatches/_form.html.haml +0 -13
- data/lib/forge/app/views/forge/events/_form.html.haml +14 -10
- data/lib/forge/app/views/forge/posts/_form.html.haml +2 -2
- data/lib/forge/app/views/forge/products/_form.html.haml +10 -4
- data/lib/forge/config/routes.rb +8 -3
- data/lib/forge/features/authentication.feature +8 -0
- data/lib/forge/features/step_definitions/web_steps.rb +24 -0
- data/lib/forge/features/support/env.rb +60 -0
- data/lib/forge/features/support/paths.rb +20 -0
- data/lib/forge/lib/assets/javascripts/forge/features/asset_uploads.js.erb +1 -1
- data/lib/forge/lib/generators/forge/scaffold/templates/controller_spec.rb +48 -48
- data/lib/forge/lib/generators/forge/scaffold_small/templates/controller_spec.rb +42 -42
- data/lib/forge/spec/controllers/forge/banners_controller_spec.rb +47 -47
- data/lib/forge/spec/controllers/forge/dispatches_controller_spec.rb +45 -45
- data/lib/forge/spec/controllers/forge/events_controller_spec.rb +45 -45
- data/lib/forge/spec/controllers/forge/galleries_controller_spec.rb +44 -44
- data/lib/forge/spec/controllers/forge/orders_controller_spec.rb +45 -45
- data/lib/forge/spec/controllers/forge/pages_controller_spec.rb +46 -46
- data/lib/forge/spec/controllers/forge/post_categories_controller_spec.rb +41 -41
- data/lib/forge/spec/controllers/forge/posts_controller_spec.rb +45 -45
- data/lib/forge/spec/controllers/forge/product_categories_controller_spec.rb +42 -42
- data/lib/forge/spec/controllers/forge/products_controller_spec.rb +47 -47
- data/lib/forge/spec/controllers/forge/sales_controller_spec.rb +45 -45
- data/lib/forge/spec/controllers/forge/subscriber_groups_controller_spec.rb +45 -45
- data/lib/forge/spec/controllers/forge/subscribers_controller_spec.rb +40 -40
- data/lib/forge/spec/controllers/forge/tax_rates_controller_spec.rb +41 -41
- data/lib/forge/spec/controllers/forge/users_controller_spec.rb +58 -58
- data/lib/forge/spec/controllers/forge/videos_controller_spec.rb +9 -9
- data/lib/forge/spec/models/reorderable_spec.rb +5 -5
- metadata +31 -21
- data/lib/forge/config/database.yml +0 -24
- data/lib/forge/config/deploy.rb +0 -53
- data/lib/forge/config/dispatch_daemon.yml +0 -23
- data/lib/forge/config/s3.yml +0 -19
- data/lib/forge/log/development.log +0 -2
- data/lib/forge/script/dispatch_daemon_fetcher +0 -28
@@ -8,7 +8,7 @@ describe Forge::VideosController do
|
|
8
8
|
describe "As an admin" do
|
9
9
|
fixtures :users, :roles
|
10
10
|
before do
|
11
|
-
controller.stub
|
11
|
+
controller.stub(:current_user).and_return(users(:admin))
|
12
12
|
|
13
13
|
end
|
14
14
|
|
@@ -54,7 +54,7 @@ describe Forge::VideosController do
|
|
54
54
|
describe "with valid attributes" do
|
55
55
|
before do
|
56
56
|
@video = mock_model(Video, :save => true)
|
57
|
-
Video.stub
|
57
|
+
Video.stub(:new).and_return(@video)
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should assign @video" do
|
@@ -81,7 +81,7 @@ describe Forge::VideosController do
|
|
81
81
|
describe "with invalid attributes" do
|
82
82
|
before do
|
83
83
|
@video = mock_model(Video, :save => false)
|
84
|
-
Video.stub
|
84
|
+
Video.stub(:new).and_return(@video)
|
85
85
|
end
|
86
86
|
|
87
87
|
it "should assign @video" do
|
@@ -115,7 +115,7 @@ describe Forge::VideosController do
|
|
115
115
|
describe "with valid params" do
|
116
116
|
before(:each) do
|
117
117
|
@video = mock_model(Video, :update_attributes => true)
|
118
|
-
Video.stub
|
118
|
+
Video.stub(:find).with("1").and_return(@video)
|
119
119
|
end
|
120
120
|
|
121
121
|
it "should find video and return object" do
|
@@ -137,7 +137,7 @@ describe Forge::VideosController do
|
|
137
137
|
describe "with invalid params" do
|
138
138
|
before(:each) do
|
139
139
|
@video = mock_model(Video, :update_attributes => false)
|
140
|
-
Video.stub
|
140
|
+
Video.stub(:find).with("1").and_return(@video)
|
141
141
|
end
|
142
142
|
|
143
143
|
it "should find video and return object" do
|
@@ -167,7 +167,7 @@ describe Forge::VideosController do
|
|
167
167
|
describe "DELETE /videos/:id" do
|
168
168
|
it "should delete" do
|
169
169
|
@video = mock_model(Video)
|
170
|
-
Video.stub
|
170
|
+
Video.stub(:find).and_return(@video)
|
171
171
|
@video.should_receive(:destroy)
|
172
172
|
delete :destroy, :id => 1
|
173
173
|
end
|
@@ -181,8 +181,8 @@ describe Forge::VideosController do
|
|
181
181
|
|
182
182
|
before do
|
183
183
|
@video = mock_model(Video)
|
184
|
-
Video.stub
|
185
|
-
@video.stub
|
184
|
+
Video.stub(:find).and_return(@video)
|
185
|
+
@video.stub(:encode).and_return(mock('response', :success? => true))
|
186
186
|
end
|
187
187
|
|
188
188
|
it "should receive encode" do
|
@@ -206,7 +206,7 @@ describe Forge::VideosController do
|
|
206
206
|
|
207
207
|
describe "As someone who's not logged in" do
|
208
208
|
before do
|
209
|
-
controller.stub
|
209
|
+
controller.stub(:current_user).and_return(nil)
|
210
210
|
end
|
211
211
|
|
212
212
|
it "should not let you get the new action" do
|
@@ -3,11 +3,11 @@ require 'spec_helper'
|
|
3
3
|
class DummyClass
|
4
4
|
include Forge::Reorderable
|
5
5
|
attr_accessor :id, :list_order
|
6
|
-
|
6
|
+
|
7
7
|
def initialize(id)
|
8
8
|
@id = id
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def save
|
12
12
|
true
|
13
13
|
end
|
@@ -16,9 +16,9 @@ end
|
|
16
16
|
describe "Forge::Reorderable" do
|
17
17
|
it "should set the list order on the correct item" do
|
18
18
|
one, two, three = DummyClass.new(1), DummyClass.new(2), DummyClass.new(3)
|
19
|
-
DummyClass.stub
|
20
|
-
DummyClass.stub
|
21
|
-
DummyClass.stub
|
19
|
+
DummyClass.stub(:find_by_id).with(1).and_return(one)
|
20
|
+
DummyClass.stub(:find_by_id).with(2).and_return(two)
|
21
|
+
DummyClass.stub(:find_by_id).with(3).and_return(three)
|
22
22
|
DummyClass.reorder!([2, 1, 3])
|
23
23
|
[one.list_order, two.list_order, three.list_order].should == [1, 0, 2]
|
24
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forge-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- factor[e] design initiative
|
@@ -14,42 +14,42 @@ dependencies:
|
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: aruba
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -70,28 +70,28 @@ dependencies:
|
|
70
70
|
name: rainbow
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: thor
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description:
|
@@ -102,7 +102,19 @@ extensions: []
|
|
102
102
|
extra_rdoc_files:
|
103
103
|
- README.md
|
104
104
|
files:
|
105
|
+
- bin/cucumber
|
106
|
+
- bin/erubis
|
105
107
|
- bin/forge
|
108
|
+
- bin/htmldiff
|
109
|
+
- bin/ldiff
|
110
|
+
- bin/rackup
|
111
|
+
- bin/rake
|
112
|
+
- bin/rdoc
|
113
|
+
- bin/ri
|
114
|
+
- bin/sprockets
|
115
|
+
- bin/thor
|
116
|
+
- bin/tilt
|
117
|
+
- bin/tt
|
106
118
|
- lib/forge/app/abilities/video_ability.rb
|
107
119
|
- lib/forge/app/assets/javascripts/app.js
|
108
120
|
- lib/forge/app/assets/javascripts/application.js
|
@@ -557,10 +569,7 @@ files:
|
|
557
569
|
- lib/forge/Capfile
|
558
570
|
- lib/forge/config/application.rb
|
559
571
|
- lib/forge/config/boot.rb
|
560
|
-
- lib/forge/config/database.yml
|
561
572
|
- lib/forge/config/database.yml.template
|
562
|
-
- lib/forge/config/deploy.rb
|
563
|
-
- lib/forge/config/dispatch_daemon.yml
|
564
573
|
- lib/forge/config/environment.rb
|
565
574
|
- lib/forge/config/environments/development.rb
|
566
575
|
- lib/forge/config/environments/production.rb
|
@@ -582,7 +591,6 @@ files:
|
|
582
591
|
- lib/forge/config/locales/devise.en.yml
|
583
592
|
- lib/forge/config/locales/en.yml
|
584
593
|
- lib/forge/config/routes.rb
|
585
|
-
- lib/forge/config/s3.yml
|
586
594
|
- lib/forge/config/s3.yml.template
|
587
595
|
- lib/forge/config/settings.yml
|
588
596
|
- lib/forge/config/settings.yml.template
|
@@ -621,6 +629,10 @@ files:
|
|
621
629
|
- lib/forge/doc/i18n.md
|
622
630
|
- lib/forge/doc/README_FOR_APP
|
623
631
|
- lib/forge/doc/update_to_rails4_notes.md
|
632
|
+
- lib/forge/features/authentication.feature
|
633
|
+
- lib/forge/features/step_definitions/web_steps.rb
|
634
|
+
- lib/forge/features/support/env.rb
|
635
|
+
- lib/forge/features/support/paths.rb
|
624
636
|
- lib/forge/Gemfile
|
625
637
|
- lib/forge/Gemfile.lock
|
626
638
|
- lib/forge/Guardfile
|
@@ -801,7 +813,6 @@ files:
|
|
801
813
|
- lib/forge/lib/recipes/aaf_recipes.rb
|
802
814
|
- lib/forge/lib/tasks/forge.rake
|
803
815
|
- lib/forge/lib/templates/active_record/model/model.rb
|
804
|
-
- lib/forge/log/development.log
|
805
816
|
- lib/forge/public/404.html
|
806
817
|
- lib/forge/public/422.html
|
807
818
|
- lib/forge/public/500.html
|
@@ -814,7 +825,6 @@ files:
|
|
814
825
|
- lib/forge/public/robots.txt
|
815
826
|
- lib/forge/Rakefile
|
816
827
|
- lib/forge/script/delayed_job
|
817
|
-
- lib/forge/script/dispatch_daemon_fetcher
|
818
828
|
- lib/forge/script/ferret_server
|
819
829
|
- lib/forge/script/rails
|
820
830
|
- lib/forge/spec/controllers/contact_controller_spec.rb
|
@@ -983,18 +993,18 @@ require_paths:
|
|
983
993
|
- lib
|
984
994
|
required_ruby_version: !ruby/object:Gem::Requirement
|
985
995
|
requirements:
|
986
|
-
- -
|
996
|
+
- - '>='
|
987
997
|
- !ruby/object:Gem::Version
|
988
998
|
version: '0'
|
989
999
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
990
1000
|
requirements:
|
991
|
-
- -
|
1001
|
+
- - '>='
|
992
1002
|
- !ruby/object:Gem::Version
|
993
1003
|
version: '0'
|
994
1004
|
requirements: []
|
995
1005
|
rubyforge_project:
|
996
|
-
rubygems_version: 2.0.
|
1006
|
+
rubygems_version: 2.0.3
|
997
1007
|
signing_key:
|
998
1008
|
specification_version: 4
|
999
|
-
summary:
|
1009
|
+
summary: 'Forge: A CMS for Rapid Application Development'
|
1000
1010
|
test_files: []
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
-
development:
|
4
|
-
adapter: postgresql
|
5
|
-
encoding: utf8
|
6
|
-
database: forge4_development
|
7
|
-
|
8
|
-
# Warning: The database defined as "test" will be erased and
|
9
|
-
# re-generated from your development database when you run "rake".
|
10
|
-
# Do not set this db to the same as development or production.
|
11
|
-
test:
|
12
|
-
adapter: postgresql
|
13
|
-
encoding: utf8
|
14
|
-
database: forge4_test
|
15
|
-
|
16
|
-
production:
|
17
|
-
adapter: mysql2
|
18
|
-
encoding: utf8
|
19
|
-
reconnect: true
|
20
|
-
database: _production
|
21
|
-
pool: 5
|
22
|
-
username:
|
23
|
-
password:
|
24
|
-
host: 10.200.113.226
|
data/lib/forge/config/deploy.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
default_run_options[:pty] = true
|
2
|
-
default_run_options[:shell] = '/bin/bash --login'
|
3
|
-
|
4
|
-
set :application, "" # The name of the application
|
5
|
-
set :repository, "git@github.com:factore/#{application}.git" # Path to the github repo
|
6
|
-
# set :repository, "git@bitbucket.org:factore/#{application}.git" # Path to the bitbucket repo
|
7
|
-
|
8
|
-
set :scm, "git"
|
9
|
-
set :scm_passphrase, "9shwartz90005"
|
10
|
-
set :user, "deploy"
|
11
|
-
set :deploy_via, :remote_cache
|
12
|
-
set :bundle_without, [:darwin, :development, :test, :linux]
|
13
|
-
|
14
|
-
set :deploy_to, "/var/apps/#{application}"
|
15
|
-
|
16
|
-
role :web, "metal1.factore.ca", "metal2.factore.ca"
|
17
|
-
role :db, "metal1.factore.ca", :primary => true
|
18
|
-
|
19
|
-
before("deploy:assets:precompile") { run "cd #{current_release}; cp config/database.yml.template config/database.yml" }
|
20
|
-
# Uncomment this line if the app uses ferret_server
|
21
|
-
# after("deploy:symlink") { run "chmod +rx #{current_path}/script/ferret_server" }
|
22
|
-
after("deploy:restart", "deploy:expire_cache")
|
23
|
-
|
24
|
-
# Clean up!
|
25
|
-
set :use_sudo, false
|
26
|
-
set :keep_releases, 2
|
27
|
-
after "deploy", "deploy:cleanup"
|
28
|
-
after "deploy:migrate", "deploy:cleanup"
|
29
|
-
|
30
|
-
|
31
|
-
# Passenger Stuff and Cache Expiry
|
32
|
-
namespace :deploy do
|
33
|
-
desc "Restarting mod_rails with restart.txt"
|
34
|
-
task :restart, :roles => :web, :except => { :no_release => true } do
|
35
|
-
run "touch #{current_path}/tmp/restart.txt"
|
36
|
-
end
|
37
|
-
|
38
|
-
|
39
|
-
[:start, :stop].each do |t|
|
40
|
-
desc "#{t} task is a no-op with mod_rails"
|
41
|
-
task t, :roles => :web do ; end
|
42
|
-
end
|
43
|
-
|
44
|
-
desc "Expire the cache"
|
45
|
-
task :expire_cache, :roles => :db do
|
46
|
-
run "cd /var/apps/#{application}/current; bundle exec rake forge:expire_cache RAILS_ENV=production;"
|
47
|
-
end
|
48
|
-
|
49
|
-
desc "Deploy Forge"
|
50
|
-
task :deploy_forge, :roles => :db do
|
51
|
-
run "cd #{current_release}; bundle exec rake forge:deploy RAILS_ENV=production PASSWORD=#{ENV['PASSWORD']}; bundle exec rake forge:load_help RAILS_ENV=production"
|
52
|
-
end
|
53
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
defaults: &defaults
|
2
|
-
type: pop # pop OR imap
|
3
|
-
server: pop.emailsrvr.com # server hostname
|
4
|
-
port: # 993 for IMAPs
|
5
|
-
ssl: false # Remove if not using SSL
|
6
|
-
username: forgetest-ca@forgemail.ca # Username
|
7
|
-
password: DdQhbTPE # Password
|
8
|
-
receiver: DispatchMailer # ActionMailer that will receive mail
|
9
|
-
use_login: true # Required for GMAIL
|
10
|
-
sleep_time: 60 # Poll Frequency. 60 seconds by default
|
11
|
-
authentication: # LOGIN, CRAM-MD5, PASSWORD (IMAP Only)
|
12
|
-
|
13
|
-
development:
|
14
|
-
<<: *defaults
|
15
|
-
# Override other values here
|
16
|
-
|
17
|
-
test:
|
18
|
-
<<: *defaults
|
19
|
-
# Override other values here
|
20
|
-
|
21
|
-
production:
|
22
|
-
<<: *defaults
|
23
|
-
# Override other values here
|
data/lib/forge/config/s3.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
development:
|
2
|
-
bucket: forge3_development
|
3
|
-
access_key_id: AKIAI6K5OJBKKW2OCSBQ
|
4
|
-
secret_access_key: 7Be6P/8QjQfQ9NcRpaAk5IcGKBBsjMF/kDX1F1ap
|
5
|
-
|
6
|
-
test:
|
7
|
-
bucket: forge3_test
|
8
|
-
access_key_id: AKIAI6K5OJBKKW2OCSBQ
|
9
|
-
secret_access_key: 7Be6P/8QjQfQ9NcRpaAk5IcGKBBsjMF/kDX1F1ap
|
10
|
-
|
11
|
-
production:
|
12
|
-
bucket: forge3_production
|
13
|
-
access_key_id: AKIAI6K5OJBKKW2OCSBQ
|
14
|
-
secret_access_key: 7Be6P/8QjQfQ9NcRpaAk5IcGKBBsjMF/kDX1F1ap
|
15
|
-
|
16
|
-
encoded:
|
17
|
-
bucket: forge3_encoded
|
18
|
-
access_key_id: AKIAI6K5OJBKKW2OCSBQ
|
19
|
-
secret_access_key: 7Be6P/8QjQfQ9NcRpaAk5IcGKBBsjMF/kDX1F1ap
|
@@ -1,2 +0,0 @@
|
|
1
|
-
DEPRECATION WARNING: String based terminators are deprecated, please use a lambda. (called from define_paperclip_callbacks at /Users/adrianduyzer/www/forge/lib/forge/vendor/ruby/2.0.0/gems/paperclip-3.3.1/lib/paperclip/callbacks.rb:10)
|
2
|
-
DEPRECATION WARNING: String based terminators are deprecated, please use a lambda. (called from define_paperclip_callbacks at /Users/adrianduyzer/www/forge/lib/forge/vendor/ruby/2.0.0/gems/paperclip-3.3.1/lib/paperclip/callbacks.rb:10)
|
@@ -1,28 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require File.dirname(__FILE__) + '/../config/environment.rb'
|
3
|
-
require 'daemon'
|
4
|
-
|
5
|
-
class DispatchDaemonFetcherDaemon < Daemon::Base
|
6
|
-
|
7
|
-
@config = YAML.load_file("#{Rails.root}/config/dispatch_daemon.yml")
|
8
|
-
@config = @config[Rails.env].to_options
|
9
|
-
|
10
|
-
@sleep_time = @config.delete(:sleep_time) || 60
|
11
|
-
def self.start
|
12
|
-
puts "Starting DispatchDaemonFetcherDaemon"
|
13
|
-
# Add your own receiver object below
|
14
|
-
@fetcher = Fetcher.create({:receiver => DispatchMailer}.merge(@config))
|
15
|
-
|
16
|
-
loop do
|
17
|
-
@fetcher.fetch
|
18
|
-
sleep(@sleep_time)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.stop
|
23
|
-
puts "Stopping DispatchDaemonFetcherDaemon"
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
DispatchDaemonFetcherDaemon.daemonize
|