Sha256: fca85c0f6cb114cbff93be784ce1b6d9ada840d0c7402d67415fbe06fbf1e321

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

# -*- coding: UTF-8 -*-
#
# Copyright 2014 PagerDuty, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module LitaGithub
  # Github handler common-use regex constants
  module R
    # command alias regex (!gh or !github for example)
    A_REG     ||= '(?:gh|github)\s+?'

    # option regex, letting you scan the command string of things like:
    # key1:value key2:value, etc.
    OPT_REGEX ||= /((?:\s+?[a-zA-Z0-9_]+?):(?:[a-zA-Z0-9_]+))/

    # regex matcher for: Org/repo
    REPO_REGEX = '(?:(?<org>[a-zA-Z0-9_\-]+)(?:\s+?)?\/)?(?:\s+?)?(?<repo>[a-zA-Z0-9_\-]+)'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lita-github-0.0.10 lib/lita-github/r.rb
lita-github-0.0.9 lib/lita-github/r.rb
lita-github-0.0.8 lib/lita-github/r.rb
lita-github-0.0.7 lib/lita-github/r.rb
lita-github-0.0.6 lib/lita-github/r.rb
lita-github-0.0.5 lib/lita-github/r.rb
lita-github-0.0.4 lib/lita-github/r.rb
lita-github-0.0.3 lib/lita-github/r.rb
lita-github-0.0.2 lib/lita-github/r.rb