Skip to content

Commit

Permalink
[yegor256#312] update file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mbao01 committed May 17, 2022
1 parent c4f8750 commit c5dfa3d
Show file tree
Hide file tree
Showing 44 changed files with 60 additions and 60 deletions.
46 changes: 23 additions & 23 deletions 0pdd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@
require 'glogin'

require_relative 'version'
require_relative 'objects/job'
require_relative 'objects/job_detached'
require_relative 'objects/job_emailed'
require_relative 'objects/job_recorded'
require_relative 'objects/job_starred'
require_relative 'objects/job_commiterrors'
require_relative 'objects/jobs/job'
require_relative 'objects/jobs/job_detached'
require_relative 'objects/jobs/job_emailed'
require_relative 'objects/jobs/job_recorded'
require_relative 'objects/jobs/job_starred'
require_relative 'objects/jobs/job_commiterrors'
require_relative 'objects/log'
require_relative 'objects/github'
require_relative 'objects/clients/github'
require_relative 'objects/user_error'
require_relative 'objects/git_repo'
require_relative 'objects/github_invitations'
require_relative 'objects/github_tickets'
require_relative 'objects/github_tagged_tickets'
require_relative 'objects/emailed_tickets'
require_relative 'objects/logged_tickets'
require_relative 'objects/commit_tickets'
require_relative 'objects/sentry_tickets'
require_relative 'objects/milestone_tickets'
require_relative 'objects/safe_storage'
require_relative 'objects/sync_storage'
require_relative 'objects/logged_storage'
require_relative 'objects/versioned_storage'
require_relative 'objects/upgraded_storage'
require_relative 'objects/cached_storage'
require_relative 'objects/once_storage'
require_relative 'objects/s3'
require_relative 'objects/invitations/github_invitations'
require_relative 'objects/tickets/github_tickets'
require_relative 'objects/tickets/github_tagged_tickets'
require_relative 'objects/tickets/emailed_tickets'
require_relative 'objects/tickets/logged_tickets'
require_relative 'objects/tickets/commit_tickets'
require_relative 'objects/tickets/sentry_tickets'
require_relative 'objects/tickets/milestone_tickets'
require_relative 'objects/storage/safe_storage'
require_relative 'objects/storage/sync_storage'
require_relative 'objects/storage/logged_storage'
require_relative 'objects/storage/versioned_storage'
require_relative 'objects/storage/upgraded_storage'
require_relative 'objects/storage/cached_storage'
require_relative 'objects/storage/once_storage'
require_relative 'objects/storage/s3'
require_relative 'objects/dynamo'

configure do
Expand Down
2 changes: 1 addition & 1 deletion objects/github.rb → objects/clients/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def initialize(config = {})

def client
client = if @config['testing']
require_relative '../test/fake_github'
require_relative '../../test/fake_github'
FakeGithub.new
else
args = {}
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions objects/job.rb → objects/jobs/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
# SOFTWARE.

require 'mail'
require_relative 'puzzles'
require_relative 'diff'
require_relative '../puzzles'
require_relative '../diff'

#
# One job.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

require_relative 'truncated'
require_relative '../truncated'

#
# Job that posts exceptions as commit messages.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion objects/s3.rb → objects/storage/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

require 'aws-sdk-s3'
require 'nokogiri'
require_relative '../version'
require_relative '../../version'

#
# S3 storage.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

require 'haml'
require 'octokit'
require_relative 'truncated'
require_relative 'maybe_text'
require_relative '../truncated'
require_relative '../maybe_text'

#
# Tickets in Github.
Expand Down Expand Up @@ -118,7 +118,7 @@ def body(puzzle)
sha = @github.list_commits(@repo)[0]['sha']
url = "https://github.com/#{@repo}/blob/#{sha}/#{file}#L#{start}-L#{stop}"
template = File.read(
File.join(File.dirname(__FILE__), 'templates/github_tickets_body.haml')
File.join(File.dirname(__FILE__), '../templates/github_tickets_body.haml')
)
Haml::Engine.new(template).render(
Object.new, url: url, puzzle: puzzle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
# SOFTWARE.

require 'cgi'
require_relative 'truncated'
require_relative 'user_error'
require_relative '../truncated'
require_relative '../user_error'

#
# Tickets that are logged.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
require 'octokit'
require 'mail'
require 'raven'
require_relative 'user_error'
require_relative 'truncated'
require_relative '../user_error'
require_relative '../truncated'

#
# Tickets that report to Sentry.
Expand Down
2 changes: 1 addition & 1 deletion test/test_cached_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require 'test/unit'
require_relative 'test__helper'
require_relative 'fake_storage'
require_relative '../objects/cached_storage'
require_relative '../objects/storage/cached_storage'

# CachedStorage test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_commit_tickets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require 'test/unit'
require 'yaml'
require_relative 'test__helper'
require_relative '../objects/commit_tickets'
require_relative '../objects/tickets/commit_tickets'

# CommitTickets test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
4 changes: 2 additions & 2 deletions test/test_credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
require 'tmpdir'
require 'aws-sdk-dynamodb'
require_relative 'test__helper'
require_relative '../objects/s3'
require_relative '../objects/github_tickets'
require_relative '../objects/storage/s3'
require_relative '../objects/tickets/github_tickets'
require_relative '../objects/log'
require_relative '../objects/git_repo'

Expand Down
2 changes: 1 addition & 1 deletion test/test_github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

require 'test/unit'
require_relative 'test__helper'
require_relative '../objects/github'
require_relative '../objects/clients/github'

# Github test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_github_invitations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require 'test/unit'
require_relative 'test__helper'
require_relative 'fake_github'
require_relative '../objects/github_invitations'
require_relative '../objects/invitations/github_invitations'

# GithubInvitations test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_github_tickets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
require 'nokogiri'
require 'yaml'
require_relative 'test__helper'
require_relative '../objects/github_tickets'
require_relative '../objects/tickets/github_tickets'

# GithubTickets test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
4 changes: 2 additions & 2 deletions test/test_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
require_relative 'fake_repo'
require_relative 'fake_tickets'
require_relative 'fake_storage'
require_relative '../objects/job'
require_relative '../objects/safe_storage'
require_relative '../objects/jobs/job'
require_relative '../objects/storage/safe_storage'

# Job test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_job_commiterrors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require 'test/unit'
require 'mocha/test_unit'
require_relative 'test__helper'
require_relative '../objects/job_commiterrors'
require_relative '../objects/jobs/job_commiterrors'

# JobCommitErrors test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_job_detached.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

require 'test/unit'
require_relative 'test__helper'
require_relative '../objects/job_detached'
require_relative '../objects/jobs/job_detached'

# JobDetached test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_job_emailed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
require_relative 'test__helper'
require_relative 'fake_repo'
require_relative 'fake_github'
require_relative '../objects/job_emailed'
require_relative '../objects/jobs/job_emailed'

# JobEmailed test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
4 changes: 2 additions & 2 deletions test/test_logged_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
require_relative 'test__helper'
require_relative 'fake_storage'
require_relative 'fake_log'
require_relative '../objects/logged_storage'
require_relative '../objects/versioned_storage'
require_relative '../objects/storage/logged_storage'
require_relative '../objects/storage/versioned_storage'

# LoggedStorage test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_logged_tickets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
require_relative 'test__helper'
require_relative 'fake_log'
require_relative 'fake_tickets'
require_relative '../objects/logged_tickets'
require_relative '../objects/tickets/logged_tickets'

# LoggedTickets test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_milestone_tickets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
require 'yaml'
require 'fake_github'
require_relative 'test__helper'
require_relative '../objects/milestone_tickets'
require_relative '../objects/tickets/milestone_tickets'

# MilestoneTickets test.
# Author:: George Aristy ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_once_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require 'test/unit'
require_relative 'test__helper'
require_relative 'fake_storage'
require_relative '../objects/once_storage'
require_relative '../objects/storage/once_storage'

# OnceStorage test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
4 changes: 2 additions & 2 deletions test/test_puzzles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
require_relative '../version'
require_relative '../objects/git_repo'
require_relative '../objects/puzzles'
require_relative '../objects/safe_storage'
require_relative '../objects/versioned_storage'
require_relative '../objects/storage/safe_storage'
require_relative '../objects/storage/versioned_storage'

# Puzzles test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_safe_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
require_relative 'test__helper'
require_relative 'fake_storage'
require_relative 'fake_log'
require_relative '../objects/safe_storage'
require_relative '../objects/storage/safe_storage'

# SafeStorage test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_sentry_tickets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require 'test/unit'
require 'mocha/test_unit'
require_relative 'test__helper'
require_relative '../objects/sentry_tickets'
require_relative '../objects/tickets/sentry_tickets'

# SentryTickets test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
6 changes: 3 additions & 3 deletions test/test_upgraded_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
require_relative 'test__helper'
require_relative 'fake_storage'
require_relative 'fake_log'
require_relative '../objects/safe_storage'
require_relative '../objects/upgraded_storage'
require_relative '../objects/versioned_storage'
require_relative '../objects/storage/safe_storage'
require_relative '../objects/storage/upgraded_storage'
require_relative '../objects/storage/versioned_storage'

# UpgradedStorage test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion test/test_versioned_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
require_relative 'test__helper'
require_relative 'fake_storage'
require_relative 'fake_log'
require_relative '../objects/versioned_storage'
require_relative '../objects/storage/versioned_storage'

# VersionedStorage test.
# Author:: Yegor Bugayenko ([email protected])
Expand Down

0 comments on commit c5dfa3d

Please sign in to comment.