Module: Amp

Defined in:
lib/amp.rb,
lib/amp.rb,
lib/amp.rb,
lib/amp/revlogs/node.rb,
lib/amp/graphs/copies.rb,
lib/amp/revlogs/index.rb,
lib/amp/support/match.rb,
lib/amp/commands/hooks.rb,
lib/amp/revlogs/revlog.rb,
lib/amp/support/amp_ui.rb,
lib/amp/support/ignore.rb,
lib/amp/support/logger.rb,
lib/amp/encoding/base85.rb,
lib/amp/graphs/ancestor.rb,
lib/amp/merges/merge_ui.rb,
lib/amp/repository/lock.rb,
lib/amp/server/amp_user.rb,
lib/amp/support/openers.rb,
lib/amp/commands/command.rb,
lib/amp/commands/command.rb,
lib/amp/encoding/difflib.rb,
lib/amp/repository/store.rb,
lib/amp/revlogs/file_log.rb,
lib/amp/revlogs/manifest.rb,
lib/amp/support/multi_io.rb,
lib/amp/commands/dispatch.rb,
lib/amp/revlogs/changelog.rb,
lib/amp/revlogs/changeset.rb,
lib/amp/merges/merge_state.rb,
lib/amp/repository/journal.rb,
lib/amp/server/http_server.rb,
lib/amp/support/amp_config.rb,
lib/amp/templates/template.rb,
lib/amp/templates/template.rb,
lib/amp/merges/simple_merge.rb,
lib/amp/revlogs/changegroup.rb,
lib/amp/encoding/binary_diff.rb,
lib/amp/repository/dir_state.rb,
lib/amp/repository/updatable.rb,
lib/amp/extensions/lighthouse.rb,
lib/amp/repository/repository.rb,
lib/amp/repository/tag_manager.rb,
lib/amp/revlogs/bundle_revlogs.rb,
lib/amp/revlogs/revlog_support.rb,
lib/amp/encoding/mercurial_diff.rb,
lib/amp/repository/verification.rb,
lib/amp/commands/command_support.rb,
lib/amp/server/fancy_http_server.rb,
lib/amp/repository/branch_manager.rb,
lib/amp/repository/versioned_file.rb,
lib/amp/server/repo_user_management.rb,
lib/amp/encoding/pure_ruby/ruby_mercurial_patch.rb,
lib/amp/repository/repositories/local_repository.rb,
lib/amp/repository/repositories/bundle_repository.rb,
ext/amp/mercurial_patch/mpatch.c,
lib/amp/repository/repositories/http_repository.rb,
lib/amp/support/support.rb

Overview

RepoUserManagement

This module manages the repository-user relationships that occur. Information is stored in memory.

Defined Under Namespace

Modules: Bundles, CommandSupport, Diffs, Encoding, Graphs, Ignore, KernelMethods, Merges, Repositories, RevlogSupport, Servers, Support, UI Classes: AmpConfig, ChangeLog, Changeset, Command, DelayedOpener, Dispatch, FakeFileAppender, FileLog, Hook, Journal, LighthouseHook, Manifest, ManifestEntry, Match, Opener, Revlog, StandardErrorReporter, UIMenu, VersionedFile, VersionedWorkingFile, WorkingDirectoryChangeset

Constant Summary collapse

CODE_ROOT =

The root directory of this application

File.expand_path File.dirname(__FILE__)
VERSION =
'0.5.0'
VERSION_TITLE =
"John Locke"

Class Method Summary collapse

Class Method Details

.new_irb_session(bndng) ⇒ Object



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/amp.rb', line 158

def self.new_irb_session(bndng)
  require 'irb'
  
  # Alter IRB appropriately
  # http://jameskilton.com/2009/04/02/embedding-irb-into-your-ruby-application/
  ::IRB.class_eval do
    def self.start_session(binding)
      unless @__initialized
        args = ARGV
        ARGV.replace(ARGV.dup)
        IRB.setup(nil)
        ARGV.replace(args)
        @__initialized = true
      end

      workspace = WorkSpace.new(binding)

      irb = Irb.new(workspace)

      @CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
      @CONF[:MAIN_CONTEXT] = irb.context

      catch(:IRB_EXIT) do
        irb.eval_input
      end
    end
  end
  
  IRB::start_session bndng
end