Detect link, name and time for specified tag.

 @param [Hash] newer_tag newer tag. Can be nil, if it's Unreleased section.
 @return [Array] link, name and time of the tag
329439
def detect_link_tag_time(newer_tag)
      # if tag is nil - set current time
      newer_tag_time = newer_tag.nil? ? Time.new : get_time_of_tag(newer_tag)

      # if it's future release tag - set this value
      if newer_tag.nil? && options[:future_release]
        newer_tag_name = options[:future_release]
        newer_tag_link = options[:future_release]
      else
        # put unreleased label if there is no name for the tag
        newer_tag_name = newer_tag.nil? ? options[:unreleased_label] : newer_tag["name"]
        newer_tag_link = newer_tag.nil? ? "HEAD" : newer_tag_name
      end
      [newer_tag_link, newer_tag_name, newer_tag_time]
    end
168516
def lookup_tag_due_date
      config.fetch(:tags).fetch(match[:tag])
    rescue KeyError
      msg = "#{match[:tag]} tag not defined in config file"
      raise KeyError, msg
    end
17625
def last_tag_protocol
      tag = ::FFI::MemoryPointer.new(:string)
	  proto = ::FFI::MemoryPointer.new(:int)
      Klass.getLastTag2(@handle, tag, proto)
      Phidgets::FFI::RFIDTagProtocol[proto.get_int(0)]
	end
139322
def get_tag(self, tag_name, **kwargs):
        
        return self._get_object_by_name(self._TAG_ENDPOINT_SUFFIX,
                                        tag_name,
                                        **kwargs)
1294395
def current(self):
        
        results = self._timeline.find_withtag(tk.CURRENT)
        return results[0] if len(results) != 0 else None
712890
def _parse_section_links(self, id_tag):
        
        soup = BeautifulSoup(self.html, "html.parser")
        info = soup.find("span", {"id": id_tag})
        all_links = list()

        if info is None:
            return all_links

        for node in soup.find(id=id_tag).parent.next_siblings:
            if not isinstance(node, Tag):
                continue
            elif node.get("role", "") == "navigation":
                continue
            elif "infobox" in node.get("class", []):
                continue

            # this is actually the child node's class...
            is_headline = node.find("span", {"class": "mw-headline"})
            if is_headline is not None:
                break
            elif node.name == "a":
                all_links.append(self.__parse_link_info(node))
            else:
                for link in node.findAll("a"):
                    all_links.append(self.__parse_link_info(link))
        return all_links
82873
def tag(self, name, attrs=None, selfclosing=None):
        """"""
        if self.disable_tags > 0:
            return

        if name in self.linkable_tags and attrs and len(attrs) > 0:
            for attrib in attrs:
                if attrib[0] in self.linkable_attrs:
                    attrib[1] = INTERNAL_LINK.sub('{\g<1>}', attrib[1])

        super().tag(name, attrs, selfclosing)
160955
def get_tag_hash(self, tag_name):
        
        tag_object = get_single_item_from_sequence(
            sequence=self._github_repository.tags(),
            condition=lambda tag: tag.name == tag_name,
            no_item_error_message='No tag "{}" exist'.format(tag_name),
            too_many_item_error_message='Too many tags "{}" found'.format(tag_name),
        )

        return tag_object.commit.sha
199929
def filter_by_tag(issues, newer_tag = nil)
      issues.select do |issue|
        issue["first_occurring_tag"] == (newer_tag.nil? ? nil : newer_tag["name"])
      end
    end
1118585
def render_refresh(tags)
      refresh = meta_tags.extract(:refresh)
      tags << Tag.new(:meta, 'http-equiv' => 'refresh', content: refresh.to_s) if refresh.present?
    end
1240725
def new
      if params[:duplicate_id] && banner_dup = Banner.find(params[:duplicate_id])
        @banner = banner_dup.dup
        @banner.name += " (copy)"
        @banner.confirmed = false

        banner_dup.helper_items.each do |hi|
          @banner.helper_items << hi.dup
        end

      else
        @banner = Banner.new
        @banner.start_time = Time.now.at_midnight
        @banner.end_time = 1.week.from_now.end_of_day
      end

      respond_to do |format|
        format.html # new.html.erb
        format.json { render :json => @banner }
      end
    end
675005
def new
      @news = Cmtool::News.new :date => Date.today

      respond_to do |format|
        format.html # new.html.erb
        format.xml  { render :xml => @news }
      end
    end
1325690
def new_tag(self, name: str, category: str=None) -> models.Tag:
        """"""
        new_tag = self.Tag(name=name, category=category)
        return new_tag
1075501
def audit_tag_with(tag)
      if audit = last_audit
        audit.update_attribute(:tag, tag)

        # Force the trigger of a reload if audited_version is used. Happens automatically otherwise
        audits.reload if self.class.audited_version
      else
        self.audit_tag = tag
        snap!
      end
    end
439508
def sort_tags_by_date(tags)
      puts "Sorting tags..." if options[:verbose]
      tags.sort_by! do |x|
        get_time_of_tag(x)
      end.reverse!
    end
57907
def fetch_date_of_tag(tag)
      commit_data = fetch_commit(tag["commit"]["sha"])
      commit_data = stringify_keys_deep(commit_data.to_hash)

      commit_data["commit"]["committer"]["date"]
    end
632448
def _get_last_tag(self):
        

        current_version = LooseVersion(
            self._get_version_from_tag(self.release_notes_generator.current_tag)
        )

        versions = []
        for tag in self.repo.tags():
            if not tag.name.startswith(self.github_info["prefix_prod"]):
                continue
            version = LooseVersion(self._get_version_from_tag(tag.name))
            if version >= current_version:
                continue
            versions.append(version)
        if versions:
            versions.sort()
            return "{}{}".format(self.github_info["prefix_prod"], versions[-1])