Commit fa9ceea65b1d3deb3d0da8eaee575849858902e3
1 parent
5c900c32
Exists in
master
and in
1 other branch
avoid autoload issue_tracker dir
Showing
10 changed files
with
14 additions
and
14 deletions
Show diff stats
Gemfile
... | ... | @@ -25,7 +25,7 @@ gem 'hoptoad_notifier', "~> 2.4" |
25 | 25 | gem 'actionmailer_inline_css', "~> 1.3.0" |
26 | 26 | gem 'kaminari' |
27 | 27 | gem 'rack-ssl-enforcer' |
28 | -gem 'fabrication' # Both for tests, and loading demo data | |
28 | +gem 'fabrication', "~> 1.3.0" # Both for tests, and loading demo data | |
29 | 29 | |
30 | 30 | platform :ruby do |
31 | 31 | gem 'mongo', '= 1.3.1' | ... | ... |
Gemfile.lock
... | ... | @@ -54,7 +54,7 @@ GEM |
54 | 54 | mail (~> 2.2) |
55 | 55 | rspec (~> 2.0) |
56 | 56 | erubis (2.7.0) |
57 | - fabrication (1.4.0) | |
57 | + fabrication (1.3.2) | |
58 | 58 | faraday (0.7.6) |
59 | 59 | addressable (~> 2.2) |
60 | 60 | multipart-post (~> 1.1) |
... | ... | @@ -217,7 +217,7 @@ DEPENDENCIES |
217 | 217 | database_cleaner (~> 0.6.0) |
218 | 218 | devise (~> 1.4.0) |
219 | 219 | email_spec |
220 | - fabrication | |
220 | + fabrication (~> 1.3.0) | |
221 | 221 | haml |
222 | 222 | hoptoad_notifier (~> 2.4) |
223 | 223 | htmlentities (~> 4.3.0) | ... | ... |
config/application.rb
... | ... | @@ -20,7 +20,7 @@ module Errbit |
20 | 20 | # -- all .rb files in that directory are automatically loaded. |
21 | 21 | |
22 | 22 | # Custom directories with classes and modules you want to be autoloadable. |
23 | - config.autoload_paths += [Rails.root.join("app/models/issue_trackers"), Rails.root.join('lib')] | |
23 | + config.autoload_paths += [Rails.root.join('lib')] | |
24 | 24 | |
25 | 25 | # Only load the plugins named here, in the order given (default is alphabetical). |
26 | 26 | # :all can be used as a placeholder for all plugins not explicitly named. | ... | ... |
spec/fabricators/issue_tracker_fabricator.rb
... | ... | @@ -8,19 +8,19 @@ Fabricator :issue_tracker do |
8 | 8 | end |
9 | 9 | |
10 | 10 | %w(lighthouse pivotal_labs fogbugz).each do |t| |
11 | - Fabricator "#{t}_tracker".to_sym, :from => :issue_tracker, :class_name => "#{t}_tracker".to_sym | |
11 | + Fabricator "#{t}_tracker".to_sym, :from => :issue_tracker, :class_name => "IssueTrackers::#{t.camelcase}Tracker" | |
12 | 12 | end |
13 | 13 | |
14 | -Fabricator :redmine_tracker, :from => :issue_tracker, :class_name => :redmine_tracker do | |
14 | +Fabricator :redmine_tracker, :from => :issue_tracker, :class_name => "IssueTrackers::RedmineTracker" do | |
15 | 15 | account 'http://redmine.example.com' |
16 | 16 | end |
17 | 17 | |
18 | -Fabricator :mingle_tracker, :from => :issue_tracker, :class_name => :mingle_tracker do | |
18 | +Fabricator :mingle_tracker, :from => :issue_tracker, :class_name => "IssueTrackers::MingleTracker" do | |
19 | 19 | account 'https://mingle.example.com' |
20 | 20 | ticket_properties 'card_type = Defect, defect_status = open, priority = essential' |
21 | 21 | end |
22 | 22 | |
23 | -Fabricator :github_issues_tracker, :from => :issue_tracker, :class_name => :github_issues_tracker do | |
23 | +Fabricator :github_issues_tracker, :from => :issue_tracker, :class_name => "IssueTrackers::GithubIssuesTracker" do | |
24 | 24 | project_id 'test_account/test_project' |
25 | 25 | username 'test_username' |
26 | 26 | end | ... | ... |
spec/models/issue_trackers/fogbugz_tracker_spec.rb
1 | 1 | require 'spec_helper' |
2 | 2 | |
3 | -describe FogbugzTracker do | |
3 | +describe IssueTrackers::FogbugzTracker do | |
4 | 4 | it "should create an issue on Fogbugz with problem params, and set issue link for problem" do |
5 | 5 | notice = Fabricate :notice |
6 | 6 | tracker = Fabricate :fogbugz_tracker, :app => notice.app | ... | ... |
spec/models/issue_trackers/github_issues_tracker_spec.rb
1 | 1 | require 'spec_helper' |
2 | 2 | |
3 | -describe GithubIssuesTracker do | |
3 | +describe IssueTrackers::GithubIssuesTracker do | |
4 | 4 | it "should create an issue on Github Issues with problem params, and set issue link for problem" do |
5 | 5 | notice = Fabricate :notice |
6 | 6 | tracker = Fabricate :github_issues_tracker, :app => notice.app | ... | ... |
spec/models/issue_trackers/lighthouse_tracker_spec.rb
1 | 1 | require 'spec_helper' |
2 | 2 | |
3 | -describe LighthouseTracker do | |
3 | +describe IssueTrackers::LighthouseTracker do | |
4 | 4 | it "should create an issue on Lighthouse with problem params, and set issue link for problem" do |
5 | 5 | notice = Fabricate :notice |
6 | 6 | tracker = Fabricate :lighthouse_tracker, :app => notice.app | ... | ... |
spec/models/issue_trackers/mingle_tracker_spec.rb
spec/models/issue_trackers/pivotal_labs_tracker_spec.rb
1 | 1 | require 'spec_helper' |
2 | 2 | |
3 | -describe PivotalLabsTracker do | |
3 | +describe IssueTrackers::PivotalLabsTracker do | |
4 | 4 | it "should create an issue on Pivotal Tracker with problem params, and set issue link for problem" do |
5 | 5 | notice = Fabricate :notice |
6 | 6 | tracker = Fabricate :pivotal_labs_tracker, :app => notice.app, :project_id => 10 | ... | ... |
spec/models/issue_trackers/redmine_tracker_spec.rb
1 | 1 | require 'spec_helper' |
2 | 2 | |
3 | -describe RedmineTracker do | |
3 | +describe IssueTrackers::RedmineTracker do | |
4 | 4 | it "should create an issue on Redmine with problem params, and set issue link for problem" do |
5 | 5 | notice = Fabricate(:notice) |
6 | 6 | tracker = Fabricate(:redmine_tracker, :app => notice.app, :project_id => 10) | ... | ... |