repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/cname_spec.rb | spec/models/cname_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/macro_spec.rb | spec/models/macro_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/domain_spec.rb | spec/models/domain_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/mx_spec.rb | spec/models/mx_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/auth_token_spec.rb | spec/models/auth_token_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/loc_spec.rb | spec/models/loc_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/srv_spec.rb | spec/models/srv_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/soa_spec.rb | spec/models/soa_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/spf_spec.rb | spec/models/spf_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/txt_spec.rb | spec/models/txt_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/aaaa_spec.rb | spec/models/aaaa_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/zone_template_spec.rb | spec/models/zone_template_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/ns_spec.rb | spec/models/ns_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/models/user_spec.rb | spec/models/user_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/macros/edit.html.haml_spec.rb | spec/views/macros/edit.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/macros/index.html.haml_spec.rb | spec/views/macros/index.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/macros/show.html.haml_spec.rb | spec/views/macros/show.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/domains/apply_macro.html.haml_spec.rb | spec/views/domains/apply_macro.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/domains/new.html.haml_spec.rb | spec/views/domains/new.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/domains/show.html.haml_spec.rb | spec/views/domains/show.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/domains/_record.html.haml_spec.rb | spec/views/domains/_record.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/templates/new.html.haml_spec.rb | spec/views/templates/new.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/templates/edit.html.haml_spec.rb | spec/views/templates/edit.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/templates/show.html.haml_spec.rb | spec/views/templates/show.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/audits/domain.html.haml_spec.rb | spec/views/audits/domain.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/search/results.html.haml_spec.rb | spec/views/search/results.html.haml_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/macro_steps/update.js.rjs_spec.rb | spec/views/macro_steps/update.js.rjs_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/spec/views/macro_steps/create.js.rjs_spec.rb | spec/views/macro_steps/create.js.rjs_spec.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/scoped_finders.rb | lib/scoped_finders.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/model_serialization_with_warnings.rb | lib/model_serialization_with_warnings.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/domain_ownership.rb | lib/domain_ownership.rb | require 'singleton'
module DomainOwnership
class API
include Singleton
def initialize
end
def has_permission?(name, user, action = @permissions_action)
false
end
def users_permissions_info(user)
{:sub_components => [["sub_component_name_1", "sub_component_id_1"],["sub_component... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/zonefile.rb | lib/zonefile.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/ip_address_validator.rb | lib/ip_address_validator.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/record_patterns.rb | lib/record_patterns.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/hijacker.rb | lib/hijacker.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/hostname_validator.rb | lib/hostname_validator.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/exporter.rb | lib/globo_dns/exporter.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | true |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/resolver.rb | lib/globo_dns/resolver.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/string_io_logger.rb | lib/globo_dns/string_io_logger.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/config.rb | lib/globo_dns/config.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/importer.rb | lib/globo_dns/importer.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/tester.rb | lib/globo_dns/tester.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/util.rb | lib/globo_dns/util.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/importer/named_conf_parser.rb | lib/globo_dns/importer/named_conf_parser.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | true |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/lib/globo_dns/importer/util.rb | lib/globo_dns/importer/util.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/application.rb | config/application.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/environment.rb | config/environment.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/routes.rb | config/routes.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/unicorn.rb | config/unicorn.rb | # Sample verbose configuration file for Unicorn (not Rack)
#
# This configuration file documents many features of Unicorn
# that may not be needed for some applications. See
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb
# for a much simpler configuration file.
#
# See http://unicorn.bogomips.org/Unicor... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/boot.rb | config/boot.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/syslogger.rb | config/initializers/syslogger.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/session_store.rb | config/initializers/session_store.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/devise.rb | config/initializers/devise.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/new_rails_defaults.rb | config/initializers/new_rails_defaults.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/omniauth.rb | config/initializers/omniauth.rb | # OmniAuth.config.logger = Rails.logger
# Rails.application.config.middleware.use OmniAuth::Builder do
# provider :oauth_provider,
# Rails.application.secrets.oauth_provider_client_id,
# Rails.application.secrets.oauth_provider_client_secret,
# {provider_ignores_state: true, environment: Rails.env}
# end
| ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/inflections.rb | config/initializers/inflections.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/globodns.rb | config/initializers/globodns.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/define_enum.rb | config/initializers/define_enum.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/override_active_record_becomes.rb | config/initializers/override_active_record_becomes.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/backtrace_silencers.rb | config/initializers/backtrace_silencers.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/mime_types.rb | config/initializers/mime_types.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/initializers/secret_token.rb | config/initializers/secret_token.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/environments/test.rb | config/environments/test.rb | ertando configu# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); y... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/environments/cucumber.rb | config/environments/cucumber.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/environments/development.rb | config/environments/development.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
globocom/GloboDNS | https://github.com/globocom/GloboDNS/blob/d745871945c76cd26a8c926873b59690ef1ea5a7/config/environments/production.rb | config/environments/production.rb | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | ruby | Apache-2.0 | d745871945c76cd26a8c926873b59690ef1ea5a7 | 2026-01-04T17:43:23.539268Z | false |
jqr/php-serialize | https://github.com/jqr/php-serialize/blob/68c0b6f9a20c07d7498d3bce62a37f1e240eddfe/benchmark.rb | benchmark.rb | $:.push(File.dirname(__FILE__) + '/lib')
require 'php_serialize'
require 'benchmark'
TIMES = 10000
value1 = {[1, 2, 5] * 10 => {'b' * 40 => [1, 2, 'Hello world' * 200, {'c' => 33}]}}
value2 = {'125' * 10 => {'b' * 40 => [1, 2, 'Hello world' * 200, {'c' => 33}]}}
php1 = PHP.serialize(value1)
php2 = PHP.serialize_sessio... | ruby | MIT | 68c0b6f9a20c07d7498d3bce62a37f1e240eddfe | 2026-01-04T17:48:15.410864Z | false |
jqr/php-serialize | https://github.com/jqr/php-serialize/blob/68c0b6f9a20c07d7498d3bce62a37f1e240eddfe/test/php_serialize_test.rb | test/php_serialize_test.rb | #!/usr/local/bin/ruby
# encoding: utf-8
require 'test/unit'
$:.unshift File.join(File.dirname(__FILE__), 'lib')
require 'php_serialize'
TestStruct = Struct.new(:name, :value)
class TestClass
attr_accessor :name
attr_accessor :value
def initialize(name = nil, value = nil)
@name = name
@value = value
end
de... | ruby | MIT | 68c0b6f9a20c07d7498d3bce62a37f1e240eddfe | 2026-01-04T17:48:15.410864Z | false |
jqr/php-serialize | https://github.com/jqr/php-serialize/blob/68c0b6f9a20c07d7498d3bce62a37f1e240eddfe/lib/php-serialize.rb | lib/php-serialize.rb | # Bunlder auto requires the gemname, so we redirect to the right file.
require "php_serialize"
| ruby | MIT | 68c0b6f9a20c07d7498d3bce62a37f1e240eddfe | 2026-01-04T17:48:15.410864Z | false |
jqr/php-serialize | https://github.com/jqr/php-serialize/blob/68c0b6f9a20c07d7498d3bce62a37f1e240eddfe/lib/php_serialize.rb | lib/php_serialize.rb | # frozen_string_literal: true
require 'stringio'
module PHP
class StringIOReader < StringIO
# Reads data from the buffer until +char+ is found. The
# returned string will include +char+.
def read_until(char)
val, cpos = '', pos
if idx = string.index(char, cpos)
val = read(idx - cpos + 1)
end
va... | ruby | MIT | 68c0b6f9a20c07d7498d3bce62a37f1e240eddfe | 2026-01-04T17:48:15.410864Z | false |
jqr/php-serialize | https://github.com/jqr/php-serialize/blob/68c0b6f9a20c07d7498d3bce62a37f1e240eddfe/lib/php/serialize/version.rb | lib/php/serialize/version.rb | module PHP
module Serialize
VERSION = "1.4.1"
end
end
| ruby | MIT | 68c0b6f9a20c07d7498d3bce62a37f1e240eddfe | 2026-01-04T17:48:15.410864Z | false |
rubaidh/google_analytics | https://github.com/rubaidh/google_analytics/blob/d834044d84a8954bf58d57663523b25c2a8cbbc6/init.rb | init.rb | require File.dirname(__FILE__) + "/rails/init" | ruby | MIT | d834044d84a8954bf58d57663523b25c2a8cbbc6 | 2026-01-04T17:48:05.438336Z | false |
rubaidh/google_analytics | https://github.com/rubaidh/google_analytics/blob/d834044d84a8954bf58d57663523b25c2a8cbbc6/rails/init.rb | rails/init.rb | require 'rubaidh/google_analytics'
require 'rubaidh/view_helpers'
ActionController::Base.send :include, Rubaidh::GoogleAnalyticsMixin
ActionController::Base.send :after_filter, :add_google_analytics_code
ActionView::Base.send :include, Rubaidh::GoogleAnalyticsViewHelper | ruby | MIT | d834044d84a8954bf58d57663523b25c2a8cbbc6 | 2026-01-04T17:48:05.438336Z | false |
rubaidh/google_analytics | https://github.com/rubaidh/google_analytics/blob/d834044d84a8954bf58d57663523b25c2a8cbbc6/test/google_analytics_test.rb | test/google_analytics_test.rb | require File.dirname(__FILE__) + '/test_helper.rb'
require 'test/unit'
require 'rubygems'
require 'mocha'
RAILS_ENV = 'test'
class TestMixin
class MockRequest
attr_accessor :format
end
class MockResponse
attr_accessor :body
end
include Rubaidh::GoogleAnalyticsMixin
attr_accessor :request, :respons... | ruby | MIT | d834044d84a8954bf58d57663523b25c2a8cbbc6 | 2026-01-04T17:48:05.438336Z | false |
rubaidh/google_analytics | https://github.com/rubaidh/google_analytics/blob/d834044d84a8954bf58d57663523b25c2a8cbbc6/test/test_helper.rb | test/test_helper.rb | ENV['RAILS_ENV'] = 'test'
require 'rubygems'
require 'test/unit'
require File.expand_path(File.dirname(__FILE__) + '/../lib/rubaidh/google_analytics.rb')
require File.expand_path(File.dirname(__FILE__) + '/../lib/rubaidh/view_helpers.rb')
| ruby | MIT | d834044d84a8954bf58d57663523b25c2a8cbbc6 | 2026-01-04T17:48:05.438336Z | false |
rubaidh/google_analytics | https://github.com/rubaidh/google_analytics/blob/d834044d84a8954bf58d57663523b25c2a8cbbc6/test/view_helpers_test.rb | test/view_helpers_test.rb | require File.dirname(__FILE__) + '/test_helper.rb'
include Rubaidh::GoogleAnalyticsViewHelper
include ActionView::Helpers::UrlHelper
include ActionView::Helpers::TagHelper
class ViewHelpersTest < Test::Unit::TestCase
def setup
Rubaidh::GoogleAnalytics.defer_load = false
end
def test_link_to_tracked_sho... | ruby | MIT | d834044d84a8954bf58d57663523b25c2a8cbbc6 | 2026-01-04T17:48:05.438336Z | false |
rubaidh/google_analytics | https://github.com/rubaidh/google_analytics/blob/d834044d84a8954bf58d57663523b25c2a8cbbc6/lib/rubaidh.rb | lib/rubaidh.rb | module Rubaidh #:nodoc:
end
| ruby | MIT | d834044d84a8954bf58d57663523b25c2a8cbbc6 | 2026-01-04T17:48:05.438336Z | false |
rubaidh/google_analytics | https://github.com/rubaidh/google_analytics/blob/d834044d84a8954bf58d57663523b25c2a8cbbc6/lib/rubaidh/view_helpers.rb | lib/rubaidh/view_helpers.rb | module Rubaidh
# Collection of methods similar to the ones in ActionView::Helpers::UrlHelper,
# with the addition of outbound link tracking. See the Google Analytics help
# at http://www.google.com/support/googleanalytics/bin/answer.py?answer=55527
# for more information on outbound link tracking.
module Goog... | ruby | MIT | d834044d84a8954bf58d57663523b25c2a8cbbc6 | 2026-01-04T17:48:05.438336Z | false |
rubaidh/google_analytics | https://github.com/rubaidh/google_analytics/blob/d834044d84a8954bf58d57663523b25c2a8cbbc6/lib/rubaidh/google_analytics.rb | lib/rubaidh/google_analytics.rb | require 'active_support'
require 'action_pack'
require 'action_view'
module Rubaidh # :nodoc:
# This module gets mixed in to ActionController::Base
module GoogleAnalyticsMixin
# The javascript code to enable Google Analytics on the current page.
# Normally you won't need to call this directly; the +add_goo... | ruby | MIT | d834044d84a8954bf58d57663523b25c2a8cbbc6 | 2026-01-04T17:48:05.438336Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/benchmarks/speed_profile.rb | benchmarks/speed_profile.rb | require 'benchmark/ips'
require 'strings'
text = "Ignorance is the parent of fear."
Benchmark.ips do |x|
x.report('wrap') do
Strings::Wrap.wrap(text, 10)
end
x.report('truncate') do
Strings::Truncate.truncate(text, 10)
end
x.compare!
end
# (2017-12-09)
#
# Calculating ----------------------------... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/spec_helper.rb | spec/spec_helper.rb | # frozen_string_literal: true
if ENV["COVERAGE"] == "true"
require "simplecov"
require "coveralls"
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
])
SimpleCov.start do
command_name "spec"
add_filter "spec... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/truncate_spec.rb | spec/unit/truncate_spec.rb | # frozen_string_literal: true
RSpec.describe Strings, "#truncate" do
it "truncates text" do
text = "ラドクリフ、マラソン五輪代表に1万m出場にも含み"
expect(Strings.truncate(text, 12)).to eq("ラドクリフ…")
end
end
| ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/fold_spec.rb | spec/unit/fold_spec.rb | # fronzen_string_literal: true
RSpec.describe Strings, "#fold" do
it "folds a multiline text into a single line" do
expect(Strings.fold("\tfoo \r\n\n\n bar")).to eq(" foo bar")
end
end
| ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/sanitize_spec.rb | spec/unit/sanitize_spec.rb | # frozen_string_literal: true
RSpec.describe Strings, "#sanitize" do
it "removes ansi codes" do
expect(Strings.sanitize("\e[33mfoo\e[0m")).to eq("foo")
end
end
| ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/wrap_spec.rb | spec/unit/wrap_spec.rb | # frozen_string_literal: true
RSpec.describe Strings, "#wrap" do
it "wraps text" do
text = "ラドクリフ、マラソン五輪代表に1万m出場にも含み"
expect(Strings.wrap(text, 8)).to eql([
"ラドクリ",
"フ、マラ",
"ソン五輪",
"代表に1",
"万m出場",
"にも含み"
].join("\n"))
end
end
| ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/pad_spec.rb | spec/unit/pad_spec.rb | # frozen_string_literal: true
RSpec.describe Strings, "#pad" do
it "pads text" do
text = "ラドクリフ、マラソン五輪代表に1万m出場にも含み"
expect(Strings.pad(text, [1,1,1,1])).to eql([
" ",
" ラドクリフ、マラソン五輪代表に1万m出場にも含み ",
" ... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/align_spec.rb | spec/unit/align_spec.rb | # frozen_string_literal: true
RSpec.describe Strings, "#align" do
it "aligns text" do
text = "the madness of men"
expect(Strings.align(text, 22, direction: :center)).to eq(" the madness of men ")
end
it "aligns text to left" do
text = "the madness of men"
expect(Strings.align_left(text, 22)).t... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/extensions_spec.rb | spec/unit/extensions_spec.rb | # frozen_string_literal: true
require "strings/extensions"
using Strings::Extensions
RSpec.describe Strings::Extensions do
let(:text) { "the madness of men" }
it "aligns a line in the center" do
expect(text.align(22, direction: :center)).to eq(" the madness of men ")
end
it "aligns a line to the left... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/ansi_spec.rb | spec/unit/ansi_spec.rb | # frozen_string_literal: true
RSpec.describe Strings, "#ansi?" do
it "checks if string has any ansi codes" do
expect(Strings.ansi?("\e[33mfoo\e[0m")).to eq(true)
end
end
| ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/fold/fold_spec.rb | spec/unit/fold/fold_spec.rb | # unicode: utf-8
# frozen_string_literals: true
RSpec.describe Strings, "#fold" do
{
" \n" => " ",
"\n " => " ",
"\n" => " ",
"\n\n\n" => " ",
" \n " => " ",
" \n \n \n" => " "
}.each do |actual, expected|
it "removes newline '#{actual.gsub(/\n/, '\\n')}'... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/padder/parse_spec.rb | spec/unit/padder/parse_spec.rb | # frozen_string_literal:true
RSpec.describe Strings::Padder, "#parse" do
it "parses nil" do
instance = Strings::Padder.parse(nil)
expect(instance.padding).to eq([])
end
it "parses self" do
value = Strings::Padder.new([])
instance = Strings::Padder.parse(value)
expect(instance.padding).to eq(... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/pad/pad_spec.rb | spec/unit/pad/pad_spec.rb | # frozen_string_literal: true
RSpec.describe Strings::Pad, "#pad" do
it "pads content with padding as a single value" do
text = "Ignorance is the parent of fear."
expect(Strings::Pad.pad(text, 1)).to eq([
" ",
" Ignorance is the parent of fear. ",
" ... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/wrap/insert_ansi_spec.rb | spec/unit/wrap/insert_ansi_spec.rb | # frozen_string_literal: true
RSpec.describe "#insert_ansi" do
it "doesn't do anything when empty stack" do
text = "Ignorance is the parent of fear."
val = Strings::Wrap.insert_ansi(text, [])
expect(val).to eq(text)
end
it "inserts ANSI strings in a single line" do
text = "Ignorance is the par... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/wrap/wrap_spec.rb | spec/unit/wrap/wrap_spec.rb | # frozen_string_literal: true
RSpec.describe Strings::Wrap, ".wrap" do
context "when unicode" do
let(:text) { "ラドクリフ、マラソン五輪代表に1万m出場にも含み" }
it "doesn't wrap at zero length" do
expect(Strings::Wrap.wrap(text, 0)).to eq(text)
end
it "doesn't wrap at nil length" do
expect(Strings::Wrap.wrap... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/truncate/truncate_spec.rb | spec/unit/truncate/truncate_spec.rb | # frozen_string_literal: true
RSpec.describe Strings::Truncate, "#truncate" do
let(:text) { "ラドクリフ、マラソン五輪代表に1万m出場にも含み" }
it "doesn't change text for 0 length" do
expect(Strings::Truncate.truncate(text, 0)).to eq(text)
end
it "doensn't change text for nil length" do
expect(Strings::Truncate.truncate(t... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/align/align_left_spec.rb | spec/unit/align/align_left_spec.rb | # frozen_string_literal: true
RSpec.describe Strings::Align, "#align_left" do
it "aligns line to left" do
text = "the madness of men"
expect(Strings::Align.align_left(text, 22)).to eq("the madness of men ")
end
it "fills empty" do
expect(Strings::Align.align_left("", 22)).to eq(" ... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/align/align_right_spec.rb | spec/unit/align/align_right_spec.rb | # frozen_string_literal: true
RSpec.describe Strings::Align, "#align_right" do
it "aligns line to right" do
text = "the madness of men"
expect(Strings::Align.align_right(text, 22)).to eq(" the madness of men")
end
it "fills empty" do
expect(Strings::Align.align_right("", 22)).to eq(" ... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/spec/unit/align/align_spec.rb | spec/unit/align/align_spec.rb | # frozen_string_literal: true
RSpec.describe Strings::Align, "#align" do
it "doesn't align unrecognized direction" do
text = "the madness of men"
expect {
Strings::Align.align(text, 22, direction: :unknown)
}.to raise_error(ArgumentError, /Unknown alignment/)
end
it "fills empty" do
expect... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/lib/strings.rb | lib/strings.rb | # frozen_string_literal: true
require "strings-ansi"
require_relative "strings/align"
require_relative "strings/fold"
require_relative "strings/pad"
require_relative "strings/truncate"
require_relative "strings/wrap"
require_relative "strings/version"
module Strings
# Align text within the width.
#
# @see Stri... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
piotrmurach/strings | https://github.com/piotrmurach/strings/blob/30854c1544d0ae020e2c00ef3b33f0240f47a921/lib/strings/align.rb | lib/strings/align.rb | # frozen_string_literal: true
require "strings-ansi"
require "unicode/display_width"
module Strings
# Responsible for text alignment
module Align
NEWLINE = "\n"
SPACE = " "
LINE_BREAK = %r{\r\n|\r|\n}.freeze
# Aligns text within the width.
#
# If the text is greater than the width then un... | ruby | MIT | 30854c1544d0ae020e2c00ef3b33f0240f47a921 | 2026-01-04T17:48:15.474368Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.