change_manager 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f33fc250c2fd0536c0c4190a9230647631ede5ee
4
- data.tar.gz: 1dbfacf950ce6d15e5e497a599bf940eb206bbcb
3
+ metadata.gz: 5fa04626ce9410cb3ab2d9fb4a3b03ae9d8424c2
4
+ data.tar.gz: 7b182c7a4cde9c3b6f7c4ffc11dde88a5f454c3c
5
5
  SHA512:
6
- metadata.gz: eaa2e388ae68b4d6f1e8961a90b851fd142f1ffc3525795027be4876bb0c85984bc135de0540a86218d51427fecdbc690600a65b02ef906ac61a65877f64bacf
7
- data.tar.gz: 7d3e159bcb60454498f6b2333c09815e9b0e46c70e1f8c1569f9e3a2db5d040ea7d8a4fe8137f0300548199c06b37ed0c0182362a2ba6cda452fb117e97ae8c7
6
+ metadata.gz: 19fc8cfc5ad5ec5e8fa57e4f1268fac3f591067f0ee4f56e9aaf885d0f03990202c5127992a984987d42f4d691fc7a2eac8259cd80d1e84582dda93bd7389953
7
+ data.tar.gz: ae997373c19fa9232654b7fafd1e1bed8ced14892a0f6e373aa106fdbcd20ab942973aa0542603702cc2bd97952a7f35a290a239a17650f0e9ad6c6ce5286aec
@@ -0,0 +1,11 @@
1
+ module ChangeManager
2
+ class BeginChange
3
+ def self.queue
4
+ :change
5
+ end
6
+
7
+ def self.perform(change_id)
8
+ ChangeManager::Manager.process_change(change_id)
9
+ end
10
+ end
11
+ end
@@ -3,14 +3,14 @@ module ChangeManager
3
3
  def self.queue_change(owner, change_type, context, target)
4
4
  change_id = Change.new_change(owner, change_type, context, target)
5
5
  # Resque.enqueue(MakeChange, change_id)
6
- Resque.enqueue_in(30.seconds, MakeChange, change_id)
6
+ Resque.enqueue_in(30.seconds, ChangeManager::BeginChange, change_id)
7
7
  end
8
8
 
9
- def self.notify(change_id)
9
+ def self.process_change(change_id)
10
10
  unless Change.find(change_id).cancelled?
11
- change = Change.find(change_id)
12
- verified_changes = process_changes(change)
13
- notify_users(verified_changes) unless verified_changes.empty?
11
+ change = Change.find change_id
12
+ verified_changes = process_changes change
13
+ notify verified_changes unless verified_changes.empty?
14
14
  end
15
15
  end
16
16
 
@@ -1,3 +1,3 @@
1
1
  module ChangeManager
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: change_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Lawhorn
@@ -77,7 +77,7 @@ files:
77
77
  - MIT-LICENSE
78
78
  - README.rdoc
79
79
  - Rakefile
80
- - app/jobs/make_change.rb
80
+ - app/jobs/change_manager/begin_change.rb
81
81
  - app/mailers/change_manager/notification_mailer.rb
82
82
  - app/models/change_manager/change.rb
83
83
  - app/services/change_manager/manager.rb
@@ -1,9 +0,0 @@
1
- class MakeChange
2
- def self.queue
3
- :change
4
- end
5
-
6
- def self.perform(change_id)
7
- ChangeManager::Manager.notify(change_id)
8
- end
9
- end