errbit_cloudfuji 0.2.0 → 0.2.1

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.
@@ -0,0 +1,7 @@
1
+ class AddIdoIdToExistingErrs < Mongoid::Migration
2
+ def self.up
3
+ Err.where(:ido_id => nil).all do |err|
4
+ err.update_attribute :ido_id, UUID.new.generate
5
+ end
6
+ end
7
+ end
@@ -6,7 +6,7 @@ module Errbit
6
6
  def project_task_created
7
7
  data = params['data']
8
8
  # Find error with matching ido_id
9
- if err = Err.where(:ido_id => data['ido_id']).first
9
+ if data['ido_id'] && err = Err.where(:ido_id => data['ido_id']).first
10
10
  # Update issue link on error with task url
11
11
  if data['url'] && err.problem.issue_link != data['url']
12
12
  err.problem.update_attribute :issue_link, data['url']
@@ -1,5 +1,5 @@
1
1
  module Errbit
2
2
  module Cloudfuji
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
@@ -19,3 +19,11 @@ namespace :cloudfuji do
19
19
  Rake::Task['db:mongoid:create_indexes'].invoke
20
20
  end
21
21
  end
22
+
23
+ namespace :db do
24
+ desc "Migrate errbit_cloudfuji"
25
+ task :migrate => :environment do
26
+ Mongoid::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
27
+ Mongoid::Migrator.migrate(File.expand_path("../../../db/migrate/", __FILE__), ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
28
+ end
29
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errbit_cloudfuji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -86,6 +86,7 @@ files:
86
86
  - config/initializers/cloudfuji_config.rb
87
87
  - config/mongoid.cloudfuji.yml
88
88
  - config/routes.rb
89
+ - db/migrate/20120530212439_add_ido_id_to_existing_errs.rb
89
90
  - errbit_cloudfuji.gemspec
90
91
  - lib/errbit/cloudfuji.rb
91
92
  - lib/errbit/cloudfuji/event_observers/app_observer.rb
@@ -109,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
110
  version: '0'
110
111
  segments:
111
112
  - 0
112
- hash: -4071831119419895463
113
+ hash: -4446084361810108616
113
114
  required_rubygems_version: !ruby/object:Gem::Requirement
114
115
  none: false
115
116
  requirements:
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
119
  version: '0'
119
120
  segments:
120
121
  - 0
121
- hash: -4071831119419895463
122
+ hash: -4446084361810108616
122
123
  requirements: []
123
124
  rubyforge_project:
124
125
  rubygems_version: 1.8.24