diff --git a/Gemfile b/Gemfile
index c276d68..984d384 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,11 @@
source 'http://rubygems.org'
-gem 'rails', '3.0.10'
+RAILS_VERSION = '~> 3.2.0'
+gem 'activesupport',RAILS_VERSION, :require => 'active_support'
+gem 'actionpack', RAILS_VERSION, :require => 'action_pack'
+gem 'actionmailer', RAILS_VERSION, :require => 'action_mailer'
+gem 'railties', RAILS_VERSION, :require => 'rails'
+
gem 'nokogiri'
gem 'mongoid', '~> 2.2.2'
@@ -35,7 +40,7 @@ group :development, :test do
gem 'webmock', :require => false
unless ENV['TRAVIS']
gem 'ruby-debug', :platform => :mri_18
- gem 'ruby-debug19', :platform => :mri_19, :require => 'ruby-debug'
+ # gem 'ruby-debug19', :platform => :mri_19, :require => 'ruby-debug'
end
# gem 'rpm_contrib', :git => "git://github.com/bensymonds/rpm_contrib.git", :branch => "mongo-1.4.0_update"
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 19844d1..5bcf21e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,50 +2,50 @@ GEM
remote: http://rubygems.org/
specs:
SystemTimer (1.2.3)
- abstract (1.0.0)
- actionmailer (3.0.10)
- actionpack (= 3.0.10)
- mail (~> 2.2.19)
+ actionmailer (3.2.3)
+ actionpack (= 3.2.3)
+ mail (~> 2.4.4)
actionmailer_inline_css (1.3.1)
actionmailer (>= 3.0.0)
nokogiri (>= 1.4.4)
premailer (>= 1.7.1)
- actionpack (3.0.10)
- activemodel (= 3.0.10)
- activesupport (= 3.0.10)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.5.0)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.14)
- rack-test (~> 0.5.7)
- tzinfo (~> 0.3.23)
- activemodel (3.0.10)
- activesupport (= 3.0.10)
- builder (~> 2.1.2)
- i18n (~> 0.5.0)
- activerecord (3.0.10)
- activemodel (= 3.0.10)
- activesupport (= 3.0.10)
- arel (~> 2.0.10)
- tzinfo (~> 0.3.23)
- activeresource (3.0.10)
- activemodel (= 3.0.10)
- activesupport (= 3.0.10)
- activesupport (3.0.10)
- addressable (2.2.6)
- archive-tar-minitar (0.5.2)
- arel (2.0.10)
+ actionpack (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
+ builder (~> 3.0.0)
+ activerecord (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ activesupport (3.2.3)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ addressable (2.2.8)
+ arel (3.0.2)
bcrypt-ruby (3.0.1)
bson (1.3.1)
bson_ext (1.3.1)
- builder (2.1.2)
- columnize (0.3.4)
+ builder (3.0.0)
+ columnize (0.3.6)
crack (0.3.1)
- css_parser (1.2.5)
+ css_parser (1.2.6)
addressable
+ rdoc
database_cleaner (0.6.7)
- devise (1.4.7)
+ devise (1.4.9)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
@@ -53,48 +53,49 @@ GEM
email_spec (1.2.1)
mail (~> 2.2)
rspec (~> 2.0)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- fabrication (1.2.0)
- faraday (0.7.4)
- addressable (~> 2.2.6)
- multipart-post (~> 1.1.0)
- rack (>= 1.1.0, < 2)
+ erubis (2.7.0)
+ fabrication (1.4.0)
+ faraday (0.7.6)
+ addressable (~> 2.2)
+ multipart-post (~> 1.1)
+ rack (~> 1.1)
faraday_middleware (0.7.0)
faraday (~> 0.7.3)
- haml (3.1.3)
+ haml (3.1.5)
happymapper (0.4.0)
libxml-ruby (~> 2.0)
has_scope (0.5.1)
hashie (1.0.0)
+ hike (1.2.1)
hoptoad_notifier (2.4.11)
activesupport
builder
- htmlentities (4.3.0)
- i18n (0.5.0)
- inherited_resources (1.3.0)
+ htmlentities (4.3.1)
+ i18n (0.6.0)
+ inherited_resources (1.3.1)
has_scope (~> 0.5.0)
- responders (~> 0.6.0)
- kaminari (0.12.4)
- rails (>= 3.0.0)
- kgio (2.6.0)
- libxml-ruby (2.2.2)
+ responders (~> 0.6)
+ journey (1.0.3)
+ json (1.7.1)
+ kaminari (0.13.0)
+ actionpack (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ railties (>= 3.0.0)
+ kgio (2.7.4)
+ libxml-ruby (2.3.2)
lighthouse-api (2.0)
activeresource (>= 3.0.0)
activesupport (>= 3.0.0)
linecache (0.46)
rbx-require-relative (> 0.0.4)
- linecache19 (0.5.12)
- ruby_core_source (>= 0.1.4)
- mail (2.2.19)
- activesupport (>= 2.3.6)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.16)
+ mime-types (1.18)
mongo (1.3.1)
bson (>= 1.3.1)
- mongoid (2.2.4)
+ mongoid (2.2.5)
activemodel (~> 3.0)
mongo (~> 1.3)
tzinfo (~> 0.3.22)
@@ -104,18 +105,18 @@ GEM
rails (>= 3.0.0)
railties (>= 3.0.0)
multi_json (1.0.4)
- multipart-post (1.1.4)
- nokogiri (1.5.0)
+ multipart-post (1.1.5)
+ nokogiri (1.5.2)
octokit (0.6.4)
addressable (~> 2.2.6)
faraday (~> 0.7.3)
faraday_middleware (~> 0.7.0.rc1)
hashie (~> 1.0.0)
multi_json (~> 1.0.2)
- orm_adapter (0.0.5)
+ orm_adapter (0.0.7)
oruen_redmine_client (0.0.1)
activeresource (>= 2.3.0)
- pivotal-tracker (0.4.1)
+ pivotal-tracker (0.5.4)
builder
builder
happymapper (>= 0.3.2)
@@ -124,86 +125,82 @@ GEM
nokogiri (~> 1.4)
rest-client (~> 1.6.0)
rest-client (~> 1.6.0)
- polyglot (0.3.2)
+ polyglot (0.3.3)
premailer (1.7.3)
css_parser (>= 1.1.9)
htmlentities (>= 4.0.0)
- rack (1.2.4)
- rack-mount (0.6.14)
- rack (>= 1.0.0)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
rack-ssl-enforcer (0.2.4)
- rack-test (0.5.7)
+ rack-test (0.6.1)
rack (>= 1.0)
- rails (3.0.10)
- actionmailer (= 3.0.10)
- actionpack (= 3.0.10)
- activerecord (= 3.0.10)
- activeresource (= 3.0.10)
- activesupport (= 3.0.10)
+ rails (3.2.3)
+ actionmailer (= 3.2.3)
+ actionpack (= 3.2.3)
+ activerecord (= 3.2.3)
+ activeresource (= 3.2.3)
+ activesupport (= 3.2.3)
bundler (~> 1.0)
- railties (= 3.0.10)
- railties (3.0.10)
- actionpack (= 3.0.10)
- activesupport (= 3.0.10)
+ railties (= 3.2.3)
+ railties (3.2.3)
+ actionpack (= 3.2.3)
+ activesupport (= 3.2.3)
+ rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
- thor (~> 0.14.4)
+ thor (~> 0.14.6)
raindrops (0.8.0)
- rake (0.9.2)
- rbx-require-relative (0.0.5)
- rdoc (3.9.4)
- responders (0.6.4)
+ rake (0.9.2.2)
+ rbx-require-relative (0.0.9)
+ rdoc (3.12)
+ json (~> 1.4)
+ responders (0.9.1)
+ railties (~> 3.1)
rest-client (1.6.7)
mime-types (>= 1.16)
ri_cal (0.8.8)
- rspec (2.6.0)
- rspec-core (~> 2.6.0)
- rspec-expectations (~> 2.6.0)
- rspec-mocks (~> 2.6.0)
- rspec-core (2.6.4)
- rspec-expectations (2.6.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.6.0)
- rspec-rails (2.6.1)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- railties (~> 3.0)
- rspec (~> 2.6.0)
+ rspec (2.10.0)
+ rspec-core (~> 2.10.0)
+ rspec-expectations (~> 2.10.0)
+ rspec-mocks (~> 2.10.0)
+ rspec-core (2.10.0)
+ rspec-expectations (2.10.0)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.10.1)
+ rspec-rails (2.10.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.10.0)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
- ruby-debug-base19 (0.11.25)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby_core_source (>= 0.1.4)
- ruby-debug19 (0.11.6)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby-debug-base19 (>= 0.11.19)
- ruby-fogbugz (0.0.4)
+ ruby-fogbugz (0.1.1)
crack
- typhoeus
- ruby_core_source (0.1.5)
- archive-tar-minitar (>= 0.5.2)
+ sprockets (2.1.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
thor (0.14.6)
+ tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- typhoeus (0.2.4)
- mime-types
- mime-types
- tzinfo (0.3.30)
- unicorn (4.1.1)
- kgio (~> 2.4)
+ tzinfo (0.3.33)
+ unicorn (4.3.1)
+ kgio (~> 2.6)
rack
- raindrops (~> 0.6)
+ raindrops (~> 0.7)
useragent (0.3.2)
- warden (1.0.5)
+ warden (1.0.6)
rack (>= 1.0)
- webmock (1.7.6)
- addressable (~> 2.2, > 2.2.5)
+ webmock (1.8.6)
+ addressable (>= 2.2.7)
crack (>= 0.1.7)
PLATFORMS
@@ -211,7 +208,10 @@ PLATFORMS
DEPENDENCIES
SystemTimer
+ actionmailer (~> 3.2.0)
actionmailer_inline_css (~> 1.3.0)
+ actionpack (~> 3.2.0)
+ activesupport (~> 3.2.0)
bson (= 1.3.1)
bson_ext (= 1.3.1)
database_cleaner (~> 0.6.0)
@@ -232,12 +232,11 @@ DEPENDENCIES
oruen_redmine_client
pivotal-tracker
rack-ssl-enforcer
- rails (= 3.0.10)
+ railties (~> 3.2.0)
ri_cal
rspec (~> 2.6)
rspec-rails (~> 2.6)
ruby-debug
- ruby-debug19
ruby-fogbugz
unicorn
useragent (~> 0.3.1)
diff --git a/app/models/app.rb b/app/models/app.rb
index e088126..ffd206d 100644
--- a/app/models/app.rb
+++ b/app/models/app.rb
@@ -14,12 +14,13 @@ class App
# Some legacy apps may have string as key instead of BSON::ObjectID
identity :type => String
- # There seems to be a Mongoid bug making it impossible to use String identity with references_many feature:
- # https://github.com/mongoid/mongoid/issues/703
- # Using 32 character string as a workaround.
- before_create do |r|
- r.id = ActiveSupport::SecureRandom.hex
- end
+ # Bug fix
+ # # There seems to be a Mongoid bug making it impossible to use String identity with references_many feature:
+ # # https://github.com/mongoid/mongoid/issues/703
+ # # Using 32 character string as a workaround.
+ # before_create do |r|
+ # r.id = ActiveSupport::SecureRandom.hex
+ # end
embeds_many :watchers
embeds_many :deploys
@@ -154,7 +155,7 @@ class App
end
def generate_api_key
- self.api_key ||= ActiveSupport::SecureRandom.hex
+ self.api_key ||= SecureRandom.hex
end
def check_issue_tracker
diff --git a/app/models/issue_trackers/lighthouse_tracker.rb b/app/models/issue_trackers/lighthouse_tracker.rb
index f574d59..b7edc99 100644
--- a/app/models/issue_trackers/lighthouse_tracker.rb
+++ b/app/models/issue_trackers/lighthouse_tracker.rb
@@ -23,7 +23,7 @@ class IssueTrackers::LighthouseTracker < IssueTracker
Lighthouse.token = api_token
# updating lighthouse account
Lighthouse::Ticket.site
-
+ Lighthouse::Ticket.format = :xml
ticket = Lighthouse::Ticket.new(:project_id => project_id)
ticket.title = issue_title problem
diff --git a/app/models/issue_trackers/redmine_tracker.rb b/app/models/issue_trackers/redmine_tracker.rb
index 2f69617..76aee4e 100644
--- a/app/models/issue_trackers/redmine_tracker.rb
+++ b/app/models/issue_trackers/redmine_tracker.rb
@@ -31,6 +31,7 @@ class IssueTrackers::RedmineTracker < IssueTracker
RedmineClient::Base.configure do
self.token = token
self.site = acc
+ self.format = :xml
end
issue = RedmineClient::Issue.new(:project_id => project_id)
issue.subject = issue_title problem
diff --git a/lib/issue_tracker_apis/mingle.rb b/lib/issue_tracker_apis/mingle.rb
index 319c3c8..8853978 100644
--- a/lib/issue_tracker_apis/mingle.rb
+++ b/lib/issue_tracker_apis/mingle.rb
@@ -1,6 +1,7 @@
module Mingle
class Card < ActiveResource::Base
# site template ~> "https://username:password@mingle.example.com/api/v1/projects/:project_id/"
+ self.format = :xml
end
def self.set_site(site)
# ActiveResource seems to clone and freeze the @site variable
diff --git a/spec/fabricators/app_fabricator.rb b/spec/fabricators/app_fabricator.rb
index f560375..30e1c25 100644
--- a/spec/fabricators/app_fabricator.rb
+++ b/spec/fabricators/app_fabricator.rb
@@ -22,6 +22,6 @@ Fabricator(:deploy) do
username 'clyde.frog'
repository 'git@github.com/errbit/errbit.git'
environment 'production'
- revision { ActiveSupport::SecureRandom.hex(10) }
+ revision { SecureRandom.hex(10) }
end
diff --git a/spec/fabricators/err_fabricator.rb b/spec/fabricators/err_fabricator.rb
index 1ae3591..6d842c2 100644
--- a/spec/fabricators/err_fabricator.rb
+++ b/spec/fabricators/err_fabricator.rb
@@ -19,7 +19,7 @@ def random_backtrace
backtrace = []
99.times {|t| backtrace << {
'number' => rand(999),
- 'file' => "/path/to/file/#{ActiveSupport::SecureRandom.hex(4)}.rb",
+ 'file' => "/path/to/file/#{SecureRandom.hex(4)}.rb",
'method' => ActiveSupport.methods.shuffle.first
}}
backtrace
diff --git a/spec/views/errs/show.html.haml_spec.rb b/spec/views/errs/show.html.haml_spec.rb
index ca7eb77..e66a4b7 100644
--- a/spec/views/errs/show.html.haml_spec.rb
+++ b/spec/views/errs/show.html.haml_spec.rb
@@ -17,7 +17,7 @@ describe "errs/show.html.haml" do
it "should confirm the 'resolve' link by default" do
render
- action_bar = String.new(view.instance_variable_get(:@_content_for)[:action_bar])
+ action_bar = String.new(view.view_flow.get(:action_bar))
resolve_link = action_bar.match(/()/)[0]
resolve_link.should =~ /data-confirm="Seriously\?"/
end
@@ -25,7 +25,7 @@ describe "errs/show.html.haml" do
it "should confirm the 'resolve' link if configuration is unset" do
Errbit::Config.stub(:confirm_resolve_err).and_return(nil)
render
- action_bar = String.new(view.instance_variable_get(:@_content_for)[:action_bar])
+ action_bar = String.new(view.view_flow.get(:action_bar))
resolve_link = action_bar.match(/()/)[0]
resolve_link.should =~ /data-confirm="Seriously\?"/
end
@@ -33,7 +33,7 @@ describe "errs/show.html.haml" do
it "should not confirm the 'resolve' link if configured not to" do
Errbit::Config.stub(:confirm_resolve_err).and_return(false)
render
- action_bar = String.new(view.instance_variable_get(:@_content_for)[:action_bar])
+ action_bar = String.new(view.view_flow.get(:action_bar))
resolve_link = action_bar.match(/()/)[0]
resolve_link.should_not =~ /data-confirm=/
end
@@ -42,7 +42,7 @@ describe "errs/show.html.haml" do
url = 'http://localhost:3000/errs'
controller.request.env['HTTP_REFERER'] = url
render
- action_bar = String.new(view.instance_variable_get(:@_content_for)[:action_bar])
+ action_bar = String.new(view.view_flow.get(:action_bar))
action_bar.should =~ /up<\/a><\/span>/
end
@@ -52,7 +52,7 @@ describe "errs/show.html.haml" do
assign :problem, problem
assign :app, problem.app
render
- action_bar = String.new(view.instance_variable_get(:@_content_for)[:action_bar])
+ action_bar = String.new(view.view_flow.get(:action_bar))
action_bar.should =~ /up<\/a><\/span>/
end
@@ -68,7 +68,7 @@ describe "errs/show.html.haml" do
assign :problem, problem
assign :app, problem.app
render
- comments_section = String.new(view.instance_variable_get(:@_content_for)[:comments])
+ comments_section = String.new(view.view_flow.get(:comments))
comments_section.should =~ /Test comment/
comments_section.should =~ /Add a comment/
end
@@ -84,7 +84,7 @@ describe "errs/show.html.haml" do
problem = Fabricate(:problem)
with_issue_tracker(problem)
render
- view.instance_variable_get(:@_content_for)[:comments].should be_blank
+ view.view_flow.get(:comments).should be_blank
end
it 'should display existing comments' do
@@ -92,7 +92,7 @@ describe "errs/show.html.haml" do
problem.reload
with_issue_tracker(problem)
render
- comments_section = String.new(view.instance_variable_get(:@_content_for)[:comments])
+ comments_section = String.new(view.view_flow.get(:comments))
comments_section.should =~ /Test comment/
comments_section.should_not =~ /Add a comment/
end
--
libgit2 0.21.2