add magic encoding comments to all ruby source files

This commit is contained in:
Laurent Sansonetti
2014-03-05 12:20:20 +01:00
parent 0bef56f493
commit f29d89f89a
230 changed files with 465 additions and 1 deletions

View File

@@ -267,6 +267,12 @@ task :install do
=end
end
desc "Add magic encoding to all source files in the project"
task :magic do
require './magic_encoding.rb'
MagicEncoding.apply
end
desc "Generate .pkg"
task :package do
destdir = '/tmp/Motion'

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2013, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2013, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012, HipByte SPRL and contributors

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
true

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
unless defined?(Motion::Project::Config)
raise "This file must be required within a RubyMotion project Rakefile."
end

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
begin
require 'bundler/gem_helper'

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
true

View File

@@ -1,6 +1,8 @@
# encoding: utf-8
# macbacon-ui extensions.
#
# Copyright (C) 2012 Eloy Durán eloy.de.enige@gmail.com
# Copyright (C) 2012 Eloy Duran eloy.de.enige@gmail.com
#
# Bacon is freely distributable under the terms of an MIT-style license.
# See COPYING or http://www.opensource.org/licenses/mit-license.php.

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012, HipByte SPRL and contributors

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class AppDelegate
def applicationDidFinishLaunching(notification)
buildMenu

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class AppDelegate
def buildMenu
@mainMenu = NSMenu.new

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module Motion; module Project; class Vendor;
class XCPrettyPrinter
include XCPretty::Printer

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Bacon -- small RSpec clone.
#
# "Truth will sooner come out from error than from confusion." ---Francis Bacon

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module Motion; module Util
module CodeSign
class << self

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module Motion; module Util
class Version
include Comparable

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'ripper/core'
require 'ripper/lexer'
require 'ripper/filter'

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
#
# $Id: core.rb 25189 2009-10-02 12:04:37Z akr $
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
#
# $Id: filter.rb 25189 2009-10-02 12:04:37Z akr $
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
#
# $Id: lexer.rb 25189 2009-10-02 12:04:37Z akr $
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
#
# $Id: sexp.rb 25189 2009-10-02 12:04:37Z akr $
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
unless defined?(Gem::DocManager.load_yardoc)
require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/specification')
require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/doc_manager')

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require File.expand_path('../yard/version.rb', __FILE__)
module YARD

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# @private
def __p(path) File.join(YARD::ROOT, 'yard', *path.split('/')); end

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'optparse'
module YARD

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CLI
# This class parses a command name out of the +yard+ CLI command and calls

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CLI
# CLI command to view or edit configuration options

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'tmpdir'
require 'fileutils'
require 'open-uri'

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CLI
# @since 0.6.0

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CLI
# Options to pass to the {Graph} CLI.

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CLI
# Handles help for commands

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require "pathname"
module YARD

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CLI
# Lists all constant and method names in the codebase. Uses {Yardoc} --list.

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CLI
# A local documentation server

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CLI
# @since 0.6.0

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'digest/sha1'
require 'fileutils'

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'optparse'
module YARD

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'rbconfig'
module YARD

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CodeObjects
# A list of code objects. This array acts like a set (no unique items)

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD::CodeObjects
# A ClassObject represents a Ruby class in source code. It is a {ModuleObject}
# with extra inheritance semantics through the superclass.

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD::CodeObjects
# Represents a class variable inside a namespace. The path is expressed
# in the form "A::B::@@classvariable"

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD::CodeObjects
# A +ConstantObject+ represents a Ruby constant (not a module or class).
# To access the constant's (source code) value, use {#value}.

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD::CodeObjects
# Represents an instance method of a module that was mixed into the class
# scope of another namespace.

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD::CodeObjects
# An ExtraFileObject represents an extra documentation file (README or other
# file). It is not strictly a CodeObject (does not inherit from `Base`) although

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'ostruct'
module YARD

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD::CodeObjects
# Represents a Ruby method in source
class MethodObject < Base

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD::CodeObjects
# Represents a Ruby module.
class ModuleObject < NamespaceObject

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD::CodeObjects
# A "namespace" is any object that can store other objects within itself.
# The two main Ruby objects that can act as namespaces are modules

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CodeObjects
# A special type of +NoMethodError+ when raised from a {Proxy}

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module CodeObjects
# Represents the root namespace object (the invisible Ruby module that

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
# This class maintains all system-wide configuration for YARD and handles
# the loading of plugins. To access options call {options}, and to load

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class Array
# Places values before or after another object (by value) in
# an array. This is used in tandem with the before and after

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'fileutils'
class File

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class Hash
class << self
def create(*args)

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# The Insertion class inserts a value before or after another
# value in a list.
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class Module
# Returns the class name of a full module namespace path
#

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class String
# Splits text into tokens the way a shell would, handling quoted
# text as a single token. Use '\"' and "\'" to escape quotes and

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# A subclass of Hash where all keys are converted into Symbols, and
# optionally, all String values are converted into Symbols.
class SymbolHash < Hash

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
# A documentation string, or "docstring" for short, encapsulates the
# comments and metadata, or "tags", of an object. Meta-data is expressed

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'ostruct'
module YARD

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# @group Global Convenience Methods
# Shortcut for creating a YARD::CodeObjects::Proxy via a path

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module Handlers
# Raised during processing phase when a handler needs to perform

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::AliasHandler < YARD::Handlers::C::Base
MATCH = %r{rb_define_alias
\s*\(\s*([\w\.]+),

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::AttributeHandler < YARD::Handlers::C::Base
MATCH = %r{rb_define_attr\s*\(\s*([\w\.]+),\s*"([^"]+)",\s*(0|1)\s*,\s*(0|1)\s*\)}
handles MATCH

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module Handlers
module C

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::ClassHandler < YARD::Handlers::C::Base
MATCH1 = /([\w\.]+)\s* = \s*(?:rb_define_class|boot_defclass)\s*
\(

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::ConstantHandler < YARD::Handlers::C::Base
MATCH = %r{\brb_define_((?:readonly_)?variable|(?:global_)?const)
\s*\((?:\s*(\w+),)?\s*"(\w+)",\s*(.*?)\s*\)\s*;}xm

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
module YARD
module Handlers
module C

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Handles the Init_Libname() method
class YARD::Handlers::C::InitHandler < YARD::Handlers::C::Base
MATCH = %r{\A\s*(?:static\s+)?void\s+(?:[Ii]nit_)?(\w+)\s*}

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::MethodHandler < YARD::Handlers::C::Base
MATCH1 = %r{rb_define_
(

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::MixinHandler < YARD::Handlers::C::Base
MATCH = /rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/
handles MATCH

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::ModuleHandler < YARD::Handlers::C::Base
MATCH1 = /([\w\.]+)\s* = \s*rb_define_module\s*\(\s*"([\w:]+)"\s*\)/mx
MATCH2 = /([\w\.]+)\s* = \s*rb_define_module_under\s*\(\s*(\w+),\s*"(\w+)"\s*\)/mx

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Parses comments
class YARD::Handlers::C::OverrideCommentHandler < YARD::Handlers::C::Base
handles %r{.}

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::PathHandler < YARD::Handlers::C::Base
MATCH = /([\w\.]+)\s* = \s*rb_path2class\s*\(\s*"([\w:]+)"\)/mx
handles MATCH

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
class YARD::Handlers::C::StructHandler < YARD::Handlers::C::Base
MATCH = /([\w\.]+)\s*=\s*(?:rb_struct_define_without_accessor)\s*
\(\s*"([\w:]+)"\s*,\s*(\w+)\s*/mx

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
# Keeps track of function bodies for symbol lookup during Ruby method declarations
class YARD::Handlers::C::SymbolHandler < YARD::Handlers::C::Base
MATCH = %r{\A\s*(?:(?:static|SWIGINTERN)\s+)?(?:intern\s+)?VALUE\s+(\w+)\s*\(}

View File

@@ -1,3 +1,5 @@
# encoding: utf-8
require 'ostruct'
module YARD

Some files were not shown because too many files have changed in this diff Show More