Compare commits

...

66 Commits

Author SHA1 Message Date
Arfon Smith
c7bab11ebe Merge pull request #2566 from github/cut-release-v4.5.14
v4.5.14 version bump
2015-08-19 10:36:52 +01:00
Arfon Smith
6995fc28b6 v4.5.14 version bump 2015-08-19 07:01:07 +01:00
Arfon Smith
102f14d0e9 Grammars update 2015-08-19 06:59:39 +01:00
Arfon Smith
aac168402b Merge pull request #2565 from pchaigno/aspectj-grammar
Grammar for AspectJ
2015-08-19 06:49:16 +01:00
Paul Chaignon
152d49513f Grammar for AspectJ from Sublime Text package 2015-08-19 00:11:34 +02:00
Arfon Smith
d5564c808d Merge pull request #2560 from larsbrinkhoff/sexp
Add .sexp to Common Lisp.
2015-08-18 21:15:46 +01:00
Lars Brinkhoff
82410e07b2 Add .sexp to Common Lisp.
config.sexp by Jeremie Dimino; Apache License 2.0.
rss.sexp by Dan Lentz; LGPL 2.1.
2015-08-18 12:45:47 +02:00
Arfon Smith
94d90b30b5 Merge pull request #2561 from pchaigno/labview-xml
Highlight LabVIEW files as XML
2015-08-18 12:25:38 +02:00
Paul Chaignon
06997f0da2 Fix scope of grammar for LabVIEW 2015-08-14 14:17:32 +02:00
Paul Chaignon
55aafa416d Highlight LabVIEW files as XML 2015-08-14 13:56:28 +02:00
Arfon Smith
5fcdf6adc2 Merge pull request #2555 from larsbrinkhoff/zone
Add .arpa to DNS Zone.
2015-08-13 10:18:51 +01:00
Lars Brinkhoff
6a565a849b Add .arpa to DNS Zone.
sample.arpa by Freeswitch project; Mozilla Public License 1.1.
2015-08-13 07:38:17 +02:00
Arfon Smith
66fc67e34c Merge pull request #2554 from github/mcandre-master
DNS Zone files
2015-08-12 18:54:04 +01:00
Arfon Smith
7cf140940e Fixing up the build 2015-08-12 17:20:29 +01:00
Arfon Smith
60e90bab23 Removing un-used Bind bundle 2015-08-12 17:06:39 +01:00
Arfon Smith
4f58258186 Removing erroneous submodule 2015-08-12 17:05:57 +01:00
Arfon Smith
03e2904ebf Merge branch 'master' of https://github.com/mcandre/linguist into mcandre-master 2015-08-12 15:15:28 +01:00
Andrew Pennebaker
bea90b256e use st2-zonefile (MIT licensed) instead of Bind.tmbundle (unlicensed) 2015-08-11 14:01:45 -05:00
Arfon Smith
8eb37ba956 Merge pull request #2541 from github/reworking-documentation-paths
Reworking documentation paths
2015-08-11 09:44:19 +01:00
Arfon Smith
8d20c1fb59 More inclusive documentation matches for License and Readme files 2015-08-11 09:39:41 +01:00
Arfon Smith
9a1abf0c49 Merge branch 'master' into reworking-documentation-paths 2015-08-11 09:10:08 +01:00
Arfon Smith
5aae7a4000 Merge pull request #2552 from github/cut-release-v4.5.13
Bumping version to v4.5.13
2015-08-11 07:50:53 +01:00
Arfon Smith
d9509a1750 Bumping version to v4.5.13 2015-08-11 07:01:05 +01:00
Arfon Smith
978c448fb8 Merge pull request #2551 from github/name-checkin
Catching one more edge case
2015-08-11 06:53:25 +01:00
Arfon Smith
997c0fca10 Catching one more edge case 2015-08-11 06:48:54 +01:00
Arfon Smith
3ae6e68492 Merge pull request #2549 from github/name-checkin
Don't blow up if empty string/nil passed to alias methods
2015-08-10 22:17:07 +01:00
Arfon Smith
851c93a1f7 Don't blow up if empty string/nil passed to alias methods 2015-08-10 22:07:28 +01:00
Arfon Smith
a5f7355e16 Merge pull request #2547 from github/grammars
Grammar updates
2015-08-10 15:10:20 +01:00
Arfon Smith
18ffdbaa65 Grammar updates 2015-08-10 15:07:27 +01:00
Arfon Smith
c089222bc6 Merge pull request #2545 from pchaigno/yaml-tmlanguage
YAML extensions for TextMate and Sublime Text grammars
2015-08-10 09:54:20 +01:00
Arfon Smith
37f9535d27 Merge pull request #2546 from ammaraskar/master
Make regex for vim modeline more lenient
2015-08-10 09:53:46 +01:00
Ammar Askar
4650368bc2 Make regex for vim modeline more lenient
This change allows the filetype/language to be retrieved from more complex vim modelines. The current regex strictly allows a set line which contains only the filetype/ft parameter and nothing else
2015-08-10 00:42:14 -05:00
Paul Chaignon
88b14ed455 .syntax extension for YAML 2015-08-09 14:13:48 +02:00
Paul Chaignon
54a2a47bc0 YAML-tmLanguage extension for YAML 2015-08-09 14:11:01 +02:00
Arfon Smith
ffcc970140 Merge pull request #2542 from github/brewfile
Highlight Brewfile as Ruby
2015-08-07 22:26:55 +01:00
Joshua Peek
7a811e39e0 Add sample Brewfile 2015-08-07 14:01:08 -07:00
Joshua Peek
11f158cbb3 Highlight Brewfile as Ruby 2015-08-07 11:12:30 -07:00
Arfon Smith
5d5550c48b Moving vendored definitions to documentation 2015-08-07 10:42:31 +01:00
Arfon Smith
fd570d906a Adding examples path to documentation.yml 2015-08-07 10:35:18 +01:00
Arfon Smith
deab0662f9 Merge pull request #2447 from Ryman/rustup
Split on comma in language name if no match is found
2015-08-07 10:28:21 +01:00
Arfon Smith
7238f50a6b Merge pull request #2539 from rji/puppet-lang-updates
Updates for the Puppet language
2015-08-07 10:25:32 +01:00
Arfon Smith
499fcd1f3f Merge pull request #2540 from pchaigno/makefile.inc
Filename Makefile.inc for Makefile
2015-08-06 09:33:55 +01:00
Paul Chaignon
dc0ddc82d6 Filename Makefile.inc for Makefile 2015-08-06 10:08:30 +02:00
Arfon Smith
436fc34cb9 Merge pull request #2538 from BerkeleyTrue/patch-1
Add codemirror's demo directory
2015-08-06 09:01:01 +01:00
Roger Ignazio
f072cd96e3 Add hiera_include() sample for the Puppet language
Prior to this commit, some Puppet files were being incorrectly
identified as Pascal when they contained only the following content:

  hiera_include('classes')

This commit adds a hiera_include() sample to for the Puppet language to
correct this behavior.
2015-08-05 14:02:09 -07:00
Roger Ignazio
3441a001c7 Modify Puppet color based on style guide
Prior to this commit, the Puppet language was colored to #332A77. The
Puppet Labs style guide (https://puppetlabs.com/styleguide/brand)
specifies Puppet Dark Purple to be #302B6D. Alternately, Puppet Purple,
a lighter variant, may be used: #7C6AAB.

Keeping with the dark purple theme, this commit modifies the Puppet
language to use Puppet Dark Purple, hex #302B6D.
2015-08-05 14:00:08 -07:00
Berkeley Martinez
bc747844ea Add codemirror's demo directory
This accounts for about ~150 html files throwing off the statistics of one of my projects
2015-08-05 12:22:21 -07:00
Arfon Smith
a887f58bcc Merge pull request #2537 from imsys/xbase-extra
#2504 - xBase aliases and extension .prw
2015-08-05 14:06:24 +01:00
Arthur Helfstein Fragoso
f42afef6e0 order - .prw should come after .ch
1) Failure:
TestPedantic#test_extensions_are_sorted
[/home/arthur/Projects/linguist/test/test_pedantic.rb:15]:
.prw should come after .ch
2015-08-05 05:58:02 -03:00
Arthur Helfstein Fragoso
18eaf22cb9 Added xBase/AdvPL sample file 2015-08-05 05:19:41 -03:00
Arthur Helfstein Fragoso
d94f427e12 xBase: Add aliases and extension .prw
xBase: Add aliases:
* advpl
* clipper
* foxpro

And the extension .prw
2015-08-05 05:06:11 -03:00
Arfon Smith
b94eb42db6 Merge pull request #2536 from github/slim-grammar
Adding Slim tm_scope
2015-08-04 22:04:25 +01:00
Arfon Smith
d2297f5516 Adding Slim tm_scope 2015-08-04 21:56:11 +01:00
Arfon Smith
ef6f58b828 Merge pull request #2535 from pchaigno/heuristics-case-insensitive
Case-insensitive extension match for heuristic rules
2015-08-04 21:35:54 +01:00
Paul Chaignon
eb0bf16cce Case-insensitive extension match for heuristic rules 2015-08-04 17:28:52 +02:00
Kevin Butler
bc8d65e7d3 Add 1.0 rust sample and add file with extern crate usage 2015-06-10 17:58:36 +01:00
Kevin Butler
3180c5d554 Allow delimiting by comma in the language name 2015-06-10 15:37:31 +01:00
Andrew Pennebaker
03369b8a6c use https url for travis support 2015-05-03 12:51:52 -05:00
Andrew Pennebaker
3b2ddb1a18 classify DNS zone as a data format 2015-05-01 11:25:16 -05:00
Andrew Pennebaker
1e20b12241 zone: add ace_mode 2015-04-30 15:40:44 -05:00
Andrew Pennebaker
81c41df15c zone: add tm_scope 2015-04-30 15:39:32 -05:00
Andrew Pennebaker
8b736189e0 better name for DNS zone 2015-04-30 15:34:43 -05:00
Andrew Pennebaker
188d2367df add sample zone file 2015-04-30 15:25:52 -05:00
Andrew Pennebaker
5aeac500da list zone in grammars.yml 2015-04-30 15:24:46 -05:00
Andrew Pennebaker
5730ab28ab list zone in languages.yml 2015-04-30 15:23:31 -05:00
Andrew Pennebaker
1c56b03a28 highlight DNS zone (BIND) files 2015-04-30 15:14:26 -05:00
46 changed files with 3196 additions and 49 deletions

6
.gitmodules vendored
View File

@@ -668,3 +668,9 @@
[submodule "vendor/grammars/vue-syntax-highlight"]
path = vendor/grammars/vue-syntax-highlight
url = https://github.com/vuejs/vue-syntax-highlight
[submodule "vendor/grammars/st2-zonefile"]
path = vendor/grammars/st2-zonefile
url = https://github.com/sixty4k/st2-zonefile
[submodule "vendor/grammars/sublime-aspectj"]
path = vendor/grammars/sublime-aspectj
url = https://github.com/pchaigno/sublime-aspectj

View File

@@ -331,6 +331,7 @@ vendor/grammars/language-hy:
vendor/grammars/language-javascript:
- source.js
- source.js.regexp
- source.js.regexp.replacement
vendor/grammars/language-jsoniq/:
- source.jq
- source.xq
@@ -470,6 +471,8 @@ vendor/grammars/smalltalk-tmbundle:
- source.smalltalk
vendor/grammars/sql.tmbundle:
- source.sql
vendor/grammars/st2-zonefile:
- text.zone_file
vendor/grammars/standard-ml.tmbundle:
- source.cm
- source.ml
@@ -477,6 +480,8 @@ vendor/grammars/sublime-MuPAD:
- source.mupad
vendor/grammars/sublime-apl/:
- source.apl
vendor/grammars/sublime-aspectj/:
- source.aspectj
vendor/grammars/sublime-befunge:
- source.befunge
vendor/grammars/sublime-better-typescript:

View File

@@ -13,6 +13,7 @@
- (^|/)[Dd]ocumentation/
- (^|/)javadoc/
- ^man/
- ^[Ee]xamples/
## Documentation files ##
@@ -21,4 +22,9 @@
- (^|/)COPYING(\.|$)
- (^|/)INSTALL(\.|$)
- (^|/)LICEN[CS]E(\.|$)
- (^|/)[Ll]icen[cs]e(\.|$)
- (^|/)README(\.|$)
- (^|/)[Rr]eadme(\.|$)
# Samples folders
- ^[Ss]amples/

View File

@@ -56,7 +56,7 @@ module Linguist
# Internal: Check if this heuristic matches the candidate languages.
def matches?(filename)
@extensions.any? { |ext| filename.end_with?(ext) }
@extensions.any? { |ext| filename.downcase.end_with?(ext) }
end
# Internal: Perform the heuristic
@@ -351,7 +351,7 @@ module Linguist
end
end
disambiguate ".r", ".R" do |data|
disambiguate ".r" do |data|
if /\bRebol\b/i.match(data)
Language["Rebol"]
elsif data.include?("<-")

View File

@@ -150,7 +150,8 @@ module Linguist
#
# Returns the Language or nil if none was found.
def self.find_by_name(name)
name && @name_index[name.downcase]
return nil if name.to_s.empty?
name && (@name_index[name.downcase] || @name_index[name.split(',').first.downcase])
end
# Public: Look up Language by one of its aliases.
@@ -164,7 +165,8 @@ module Linguist
#
# Returns the Language or nil if none was found.
def self.find_by_alias(name)
name && @alias_index[name.downcase]
return nil if name.to_s.empty?
name && (@alias_index[name.downcase] || @alias_index[name.split(',').first.downcase])
end
# Public: Look up Languages by filename.
@@ -240,7 +242,8 @@ module Linguist
#
# Returns the Language or nil if none was found.
def self.[](name)
name && @index[name.downcase]
return nil if name.to_s.empty?
name && (@index[name.downcase] || @index[name.split(',').first.downcase])
end
# Public: A List of popular languages

View File

@@ -214,7 +214,7 @@ AspectJ:
color: "#a957b0"
extensions:
- .aj
tm_scope: none
tm_scope: source.aspectj
ace_mode: text
Assembly:
@@ -616,6 +616,7 @@ Common Lisp:
- .lsp
- .ny
- .podsl
- .sexp
interpreters:
- lisp
- sbcl
@@ -750,6 +751,14 @@ DM:
tm_scope: source.c++
ace_mode: c_cpp
DNS Zone:
type: data
extensions:
- .zone
- .arpa
tm_scope: text.zone_file
ace_mode: text
DTrace:
type: programming
aliases:
@@ -1710,8 +1719,8 @@ LabVIEW:
type: programming
extensions:
- .lvproj
tm_scope: none
ace_mode: text
tm_scope: text.xml
ace_mode: xml
Lasso:
type: programming
@@ -1933,6 +1942,7 @@ Makefile:
- GNUmakefile
- Kbuild
- Makefile
- Makefile.inc
- makefile
interpreters:
- make
@@ -2653,7 +2663,7 @@ Public Key:
Puppet:
type: programming
color: "#332A77"
color: "#302B6D"
extensions:
- .pp
filenames:
@@ -2933,6 +2943,7 @@ Ruby:
- .pryrc
- Appraisals
- Berksfile
- Brewfile
- Buildfile
- Deliverfile
- Fastfile
@@ -3181,6 +3192,7 @@ Slim:
color: "#ff8f77"
extensions:
- .slim
tm_scope: text.slim
ace_mode: text
Smali:
@@ -3716,7 +3728,9 @@ YAML:
- .yml
- .reek
- .rviz
- .syntax
- .yaml
- .yaml-tmlanguage
ace_mode: yaml
Yacc:
@@ -3821,8 +3835,13 @@ wisp:
xBase:
type: programming
color: "#403a40"
aliases:
- advpl
- clipper
- foxpro
extensions:
- .prg
- .ch
- .prw
tm_scope: source.harbour
ace_mode: text

View File

@@ -2,7 +2,7 @@ module Linguist
module Strategy
class Modeline
EmacsModeline = /-\*-\s*(?:(?!mode)[\w-]+\s*:\s*(?:[\w+-]+)\s*;?\s*)*(?:mode\s*:)?\s*([\w+-]+)\s*(?:;\s*(?!mode)[\w-]+\s*:\s*[\w+-]+\s*)*;?\s*-\*-/i
VimModeline = /vim:\s*set\s*(?:ft|filetype)=(\w+):/i
VimModeline = /vim:\s*set.*\s(?:ft|filetype)=(\w+)\s?.*:/i
# Public: Detects language based on Vim and Emacs modelines
#

View File

@@ -122,7 +122,7 @@
- (^|/)Chart\.js$
# Codemirror
- (^|/)[Cc]ode[Mm]irror/(lib|mode|theme|addon|keymap)
- (^|/)[Cc]ode[Mm]irror/(lib|mode|theme|addon|keymap|demo)
# SyntaxHighlighter - http://alexgorbatchev.com/
- (^|/)shBrush([^.]*)\.js$
@@ -179,6 +179,10 @@
# Fabric
- Fabric.framework/
# git config files
- gitattributes$
- gitignore$
- gitmodules$
## Groovy ##
@@ -224,19 +228,6 @@
# Html5shiv
- (^|/)html5shiv\.js$
# Samples folders
- ^[Ss]amples/
# LICENSE, README, git config files
- ^COPYING$
- LICENSE$
- License$
- gitattributes$
- gitignore$
- gitmodules$
- ^README$
- ^readme$
# Test fixtures
- ^[Tt]ests?/fixtures/

View File

@@ -1,3 +1,3 @@
module Linguist
VERSION = "4.5.11"
VERSION = "4.5.14"
end

View File

@@ -0,0 +1,2 @@
((exe_name hello)
(link_order (world hello)))

View File

@@ -0,0 +1,103 @@
(:TURTLE
(:@PREFIX "rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>")
(:@PREFIX "owl:" "<http://www.w3.org/2002/07/owl#>")
(:@PREFIX "dc:" "<http://purl.org/dc/elements/1.1/>")
(:@PREFIX "xsd:" "<http://www.w3.org/2001/XMLSchema#>")
(:@PREFIX "rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>")
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/channel>")
(:PREDICATE-OBJECT-LIST
(:URIREF #1="<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>")
(:OBJECTS
(:QNAME "rdfs:Class")))
(:PREDICATE-OBJECT-LIST
(:QNAME "rdfs:comment")
(:OBJECTS
(:STRING "An RSS information channel.")))
(:PREDICATE-OBJECT-LIST
(:QNAME "rdfs:isDefinedBy")
(:OBJECTS
(:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST
(:QNAME "rdfs:label")
(:OBJECTS
(:STRING "Channel"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/description>")
(:PREDICATE-OBJECT-LIST
(:URIREF #1#)
(:OBJECTS
(:QNAME "rdf:Property")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
(:OBJECTS (:STRING "A short text description of the subject.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Description")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:subPropertyOf") (:OBJECTS (:QNAME "dc:description"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/image>")
(:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdfs:Class")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment") (:OBJECTS (:STRING "An RSS image.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Image"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/item>")
(:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdfs:Class")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment") (:OBJECTS (:STRING "An RSS item.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Item"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/items>")
(:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
(:OBJECTS
(:STRING "Points to a list of rss:item elements that are members of the subject channel.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Items"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/link>")
(:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
(:OBJECTS (:STRING "The URL to which an HTML rendering of the subject will link.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Link")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:subPropertyOf") (:OBJECTS (:QNAME "dc:identifier"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/name>")
(:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
(:OBJECTS (:STRING "The text input field's (variable) name.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Name"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/textinput>")
(:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdfs:Class")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment") (:OBJECTS (:STRING "An RSS text input.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Text Input"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/title>")
(:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
(:OBJECTS (:STRING "A descriptive title for the channel.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "Title")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:subPropertyOf") (:OBJECTS (:QNAME "dc:title"))))
(:TRIPLES (:URIREF "<http://purl.org/rss/1.0/url>")
(:PREDICATE-OBJECT-LIST (:URIREF #1#) (:OBJECTS (:QNAME "rdf:Property")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:comment")
(:OBJECTS
(:STRING
"The URL of the image to used in the 'src' attribute of the channel's image tag when rendered as HTML.")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:isDefinedBy")
(:OBJECTS (:URIREF "<http://purl.org/rss/1.0/>")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:label") (:OBJECTS (:STRING "URL")))
(:PREDICATE-OBJECT-LIST (:QNAME "rdfs:subPropertyOf") (:OBJECTS (:QNAME "dc:identifier")))))

View File

@@ -0,0 +1,13 @@
$ORIGIN 0.0.0.c.2.1.0.3.0.0.2.1.e.f.f.3.ip6.arpa.
$TTL 60
@ IN SOA ns root (
2002042901 ; SERIAL
7200 ; REFRESH
600 ; RETRY
36000000 ; EXPIRE
120 ; MINIMUM
)
NS ns.example.com.
c.a.7.e.d.7.e.f.f.f.0.2.8.0.a.0 PTR sip01.example.com.

View File

@@ -0,0 +1,12 @@
$TTL 3d
@ IN SOA root.localhost. root.sneaky.net. (
2015042907 ; serial
3d ; refresh
1h ; retry
12d ; expire
2h ; negative response TTL
)
IN NS root.localhost.
IN NS localhost. ; secondary name server is preferably externally maintained
www IN A 3.141.59.26

View File

@@ -0,0 +1,31 @@
# $OpenBSD: Makefile.inc,v 1.2 2003/11/14 20:09:20 drahn Exp $
# $NetBSD: Makefile.inc,v 1.1 1996/09/30 16:34:59 ws Exp $
.if !defined(__stand_makefile_inc)
__stand_makefile_inc=1
KERN_AS= library
S=$(.CURDIR)/../../../$(R)
.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) && !defined(NOMACHINE)
.BEGIN:
@([ -h machine ] || ln -s $(S)/arch/$(MACHINE)/include machine)
.endif
#
EXTRACFLAGS= -msoft-float
REAL_VIRT?= -v
ENTRY?= _start
INCLUDES+= -I. -I$(.OBJDIR) -I$(.CURDIR)/.. -I$(S)/arch -I$(S)
INCLUDES+= -I$(S)/lib/libsa
DEFS+= -DSTANDALONE
CFLAGS+= $(INCLUDES) $(DEFS) $(EXTRACFLAGS)
CFLAGS+= -fno-stack-protector
LDFLAGS?= -X -N -Ttext $(RELOC) -e $(ENTRY)
cleandir:
rm -rf lib machine
.endif

View File

@@ -0,0 +1 @@
hiera_include('classes')

View File

@@ -0,0 +1,9 @@
tap 'caskroom/cask'
tap 'telemachus/brew', 'https://telemachus@bitbucket.org/telemachus/brew.git'
brew 'emacs', args: ['with-cocoa', 'with-gnutls']
brew 'redis', restart_service: true
brew 'mongodb'
brew 'sphinx'
brew 'imagemagick'
brew 'mysql'
cask 'google-chrome'

2324
samples/Rust/hashmap.rs Normal file

File diff suppressed because it is too large Load Diff

12
samples/Rust/main.rs Normal file
View File

@@ -0,0 +1,12 @@
extern crate foo;
extern crate bar;
use foo::{self, quix};
use bar::car::*;
use bar;
fn main() {
println!("Hello {}", "World");
panic!("Goodbye")
}

View File

@@ -0,0 +1,38 @@
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Ansible
scopeName: source.ansible
fileTypes: []
uuid: 787ae642-b4ae-48b1-94e9-f935bec43a8f
patterns:
- name: comment.line.number-sign.ansible
match: (?:^ *|\G *)((#).*)
captures:
'1': {name: comment.line.number-sign.ansible}
'2': {name: punctuation.definition.comment.line.ansible}
- name: storage.type.ansible
match: (\{\{ *[^\{\}]+ *\}\})|(\$\{[^\{\}]+\})
- name: keyword.other.ansible
match: \- (name\:|include\:) (.*)|(^(- |\s*)\w+\:)
captures:
'2': {name: string.quoted.double.ansible}
- name: variable.complex.ansible
contentName: string.other.ansible
begin: (\w+)(=)\"?
beginCaptures:
'1': {name: entity.other.attribute-name.ansible}
'2': {name: text}
end: \"?\s
patterns:
- include: $self
- name: constant.other.ansible
match: .
- name: string.quoted.double.ansible
match: ^(\[[0-9a-zA-Z_-]+(((\:)children)*)\])
captures:
'2': {name: variable.parameter.ansible}

View File

@@ -0,0 +1,16 @@
---
name: R Console
fileTypes: []
scopeName: source.r-console
uuid: F629C7F3-823B-4A4C-8EEE-9971490C5710
patterns:
- name: source.r.embedded.r-console
begin: "^> "
beginCaptures:
"0":
name: punctuation.section.embedded.r-console
end: \n|\z
patterns:
- include: source.r
keyEquivalent: ^~R

512
samples/xBase/sample.prw Executable file
View File

@@ -0,0 +1,512 @@
/**
* This is a sample file for Linguist.
* It's written in AdvPL, a xBase Language.
*
* Author: Arthur Helfstein Fragoso
*
* This script has the specific use of integrating between a financial institution
* and other two companies in the process of creating Installment Bills for
* customers.
*
* The functions are called from the ERP Protheus TOTVS.
*
**/
#Include "TOPCONN.ch"
#include "tbiconn.ch"
#Include "Protheus.ch"
#Include "rwmake.ch"
#Include "FileIO.ch"
#Include "json.ch"
#Include "utils.ch"
////////////////////////
// Faturando (Reparcelando)
// FA280
// FA280_01
//
User Function FA280()
//Executado uma vez para cada parcela
If cEmpAnt == '06'
SE5->(dbSelectArea("SE5"))
cSet3Filter := "SE5->E5_FATURA == SE1->E1_NUM"
SE5->(dbSetFilter( {|| &cSet3Filter }, cSet3Filter ))
SE5->(dbGoTOP())
aOrig06Tit := {} // = Todos os Titulos que ser<65>o reparcelados
nTotal := 0
While SE5->(!EOF())
AADD(aOrig06Tit, {SE5->E5_PREFIXO, SE5->E5_NUMERO, SE5->E5_VALOR})
nTotal += SE5->E5_VALOR
SE5->(dbSkip())
End
aNovoTitulo:= {;//{"E1_FILIAL" ,SE1ORIG->E1_FILIAL ,Nil},;
;//{"E1_PREFIXO" ,SE1->E1_PREFIXO ,Nil},;
{"E1_NUM" ,SE1->E1_NUM ,Nil},;
{"E1_TIPO" ,SE1->E1_TIPO ,Nil},;
{"E1_PARCELA" ,SE1->E1_PARCELA ,Nil},;
{"E1_NATUREZ" ,SE1->E1_NATUREZ ,Nil},;
{"E1_CLIENTE" ,SE1->E1_CLIENTE ,Nil},;
{"E1_LOJA" ,SE1->E1_LOJA ,Nil},;
{"E1_NRDOC" ,SE1->E1_NRDOC ,Nil},;
;//{"E1_X_COD" ,SE1->E1_NATUREZ ,Nil},;
{"E1_EMISSAO" ,SE1->E1_EMISSAO ,Nil},;
{"E1_VENCTO" ,SE1->E1_VENCTO ,Nil},;
{"E1_VENCREA" ,SE1->E1_VENCREA ,Nil},;
;//{"E1_VALOR" ,SE1->E1_VALOR ,Nil},;
;//{"E1_SALDO" ,SE1->E1_SALDO ,Nil},;
;//{"E1_VLCRUZ" ,SE1->E1_VLCRUZ ,Nil},;
{"E1_PORTADO" ,SE1->E1_PORTADO ,Nil},;
{"E1_FATURA" ,SE1->E1_FATURA ,Nil},;
{"E1_X_DTPAV" ,SE1->E1_X_DTPAV ,Nil},;
{"E1_X_DTSAV" ,SE1->E1_X_DTSAV ,Nil},;
{"E1_X_DTTAV" ,SE1->E1_X_DTTAV ,Nil},;
{"E1_X_DTSPC" ,SE1->E1_X_DTSPC ,Nil},;
{"E1_X_DTPRO" ,SE1->E1_X_DTPRO ,Nil},;
{"E1_NUMBCO" ,SE1->E1_NUMBCO ,Nil},;
{"E1_X_DUDME" ,SE1->E1_X_DUDME ,Nil},;
{"E1_X_TIPOP" ,SE1->E1_X_TIPOP ,Nil},;
{"E1_X_DTCAN" ,SE1->E1_X_DTCAN ,Nil},;
{"E1_X_MOTIV" ,SE1->E1_X_MOTIV ,Nil},;
{"E1_X_DESPC" ,SE1->E1_X_DESPC ,Nil},;
{"E1_NUMNOTA" ,SE1->E1_NUMNOTA ,Nil},;
{"E1_SERIE" ,SE1->E1_SERIE ,Nil},;
{"E1_X_DEPRO" ,SE1->E1_X_DEPRO ,Nil},;
{"E1_X_TPPAI" ,SE1->E1_X_TPPAI ,Nil},;
{"E1_X_CGC" ,SE1->E1_X_CGC ,Nil},;
{"E1_XTPEMP" ,SE1->E1_XTPEMP ,Nil},;
{"E1_X_CTRIM" ,SE1->E1_X_CTRIM ,Nil}}
StartJob("U_FA280_01",getenvserver(),.T., SE1->E1_PREFIXO ,SE1->E1_NUM, SE1->E1_TIPO, SE1->E1_VALOR, aOrig06Tit, nTotal, SE1->E1_PARCELA, aNovoTitulo)
SE5->(dbClearFilter())
EndIf
Return nil
User Function FA280_01(cE1PREFIXO, cE1NUM, cE1TIPO, nE1Valor, aOrig06Tit, nTotal, cE1PARCELA, aNovoTitulo)
Local nValPar := nil
Local aTit05 := {}
RpcSetType(3) // Nao consome licensa
//Prepare Environment Empresa "01" Filial '0102'
// Muda de empresa
While !RpcSetEnv('01', '0102',,,,GetEnvServer(),{})
Sleep(400)
End
nFileLog := u_OpenLog("\Logs\FA280_"+dToS(dDataBase)+".log")
fWrite(nFileLog,"----- FA280 -----"+CRLF)
fWrite(nFileLog,cE1NUM+CRLF)
nParcelas := round(nTotal/nE1Valor, 0)
cUltima := '0'+ chr(64+nParcelas)
fWrite(nFileLog,"valor das parcelas: "+ cvaltochar(nE1Valor) +CRLF)
fWrite(nFileLog,"parcelas: "+ cvaltochar(nParcelas) +CRLF)
fWrite(nFileLog,"parcela atual: "+ cE1PARCELA +CRLF)
fWrite(nFileLog,"ultima parcela: "+ cUltima +CRLF)
n0102total := 0
n0105total := 0
//Loop entre todos os Titulos que serão Reparcelados
For nI := 1 To len(aOrig06Tit)
fWrite(nFileLog,"E5_NUMERO: "+aOrig06Tit[nI][2] +CRLF)
cQuery := "select * from SE1010 where E1_PREFIXO = '"+ aOrig06Tit[nI][1] +"' and E1_NUM = '"+ aOrig06Tit[nI][2] +"' and E1_TIPO = 'FAT' and D_E_L_E_T_ <> '*'"
fWrite(nFileLog,cQuery +CRLF)
If select("SE1ORIG") > 0
SE1ORIG->(DbCloseArea())
endif
TcQuery cQuery New Alias 'SE1ORIG'
dbSelectArea("SE1ORIG")
SE1ORIG->(DBGOTOP())
While SE1ORIG->(!EOF()) //Loop entre as duas filiais: 0102, 0105
fWrite(nFileLog,"SE1ORIG loop: "+SE1ORIG->E1_FILIAL +CRLF)
cFilAnt := SE1ORIG->E1_FILIAL
//Faz a baixa
if alltrim(SE1ORIG->E1_STATUS) == 'A'
fWrite(nFileLog, SE1ORIG->E1_FILIAL+" : Fazendo baixa" +CRLF)
aBaixa := {{"E1_FILIAL" ,SE1ORIG->E1_FILIAL ,Nil},;
{"E1_PREFIXO" ,SE1ORIG->E1_PREFIXO ,Nil},;
{"E1_NUM" ,SE1ORIG->E1_NUM ,Nil},;
{"E1_TIPO" ,SE1ORIG->E1_TIPO ,Nil},;
{"E1_PARCELA" ,SE1ORIG->E1_PARCELA ,Nil},;
{"E1_DESCONT" ,SE1ORIG->E1_DESCONT ,Nil},;
{"E1_JUROS" ,SE1ORIG->E1_JUROS ,Nil},;
{"E1_MULTA" ,SE1ORIG->E1_MULTA ,Nil},;
{"E1_VLRREAL" ,SE1ORIG->E1_VLRREAL ,Nil},;
{"AUTMOTBX" ,"FAT" ,Nil},;
{"AUTDTBAIXA" ,date() ,Nil},;
{"AUTDTCREDITO",date() ,Nil},;
{"AUTHIST" ,"Bx.Emis.Fat."+cE1NUM,Nil},;
{"AUTVALREC" ,SE1ORIG->E1_VALOR ,Nil}}
lMsErroAuto:=.F. //reseta lMsErroAuto
MSExecAuto ({|x,y| FINA070(x,y)},aBaixa, 3)
If lMsErroAuto
fWrite(nFileLog,SE1ORIG->E1_FILIAL+" : Não foi efetuada a baixa do titulo : "+CRLF+ MSErroString()+ CRLF + tojson(aBaixa) + CRLF)
return
else
RECLOCK('SE5',.F.)
E5_FATURA := cE1NUM
E5_FATPREF:= cE1PREFIXO
//E5_LA = S
//E5_MOEDA = ''
//E5_TXMOEDA = 1
MSUNLOCK()
RECLOCK('SE1',.F.)
E1_FATURA := cE1NUM
E1_FATPREF:= cE1PREFIXO
E1_TIPOFAT:= cE1TIPO
E1_FLAGFAT:= 'S'
E1_DTFATUR:= dDataBase
MSUNLOCK()
fWrite(nFileLog,SE1ORIG->E1_FILIAL+" : baixa feita" +CRLF)
endif
endif
//calcula valor total de cada filial para poder calcular a Fatura
if SE1ORIG->E1_FILIAL == '0102'
n0102total += SE1ORIG->E1_VALOR
elseif SE1ORIG->E1_FILIAL == '0105'
n0105total += SE1ORIG->E1_VALOR
else
fWrite(nFileLog,"Programa nao preparado para a filial "+SE1ORIG->E1_FILIAL +CRLF)
endif
SE1ORIG->(dbskip())
End
Next nI
cFilAnt := '0102'
fWrite(nFileLog,"Total 0102: "+cvaltochar(n0102total) +CRLF)
fWrite(nFileLog,"Total 0105: "+cvaltochar(n0105total) +CRLF)
n0102val := round(nE1Valor * n0102total/nTotal, 2)
n0105val := nE1Valor - n0102val
aFili := {}
if n0102total > 0
AADD(aFili,'0102')
endif
if n0105total > 0
AADD(aFili,'0105')
endif
For nI := 1 To len(aFili)
cQuery := "select COUNT(*) as QUANT, SUM(E1_VALOR) as TOTALINC from SE1010 where E1_NUM = '"+ cE1NUM +"' and E1_FILIAL='"+ aFili[nI] +"' and E1_PREFIXO = '"+ cE1PREFIXO +"' and D_E_L_E_T_ <> '*'"
If select("PARC") > 0
PARC->(DbCloseArea())
endif
TcQuery cQuery New Alias 'PARC'
dbSelectArea("PARC")
//verificamos se estamos na ultima parcela
if PARC->QUANT == nParcelas -1 //QUANT = quantidade de parcelas incluida
fWrite(nFileLog,"Ultima Parcela"+CRLF)
//o valor desta será o valor que resta
nValPar := SE1ORIG->E1_VALOR - PARC->TOTALINC
if aFili[nI] == '0102'
n0102val := n0102total - PARC->TOTALINC
elseif aFili[nI] == '0105'
n0105val := n0105total - PARC->TOTALINC
endif
endif
Next nI
fWrite(nFileLog,"Total 0102: "+cvaltochar(n0102total) + " -> Parcela de: "+cvaltochar(n0102val) +CRLF)
fWrite(nFileLog,"Total 0105: "+cvaltochar(n0105total) + " -> Parcela de: "+cvaltochar(n0105val) +CRLF)
/////////////////
For nI := 1 To len(aFili)
if aFili[nI] == '0102'
nValPar := n0102val
elseif aFili[nI] == '0105'
nValPar := n0105val
endif
aTitulo := ACLONE(aNovoTitulo)
AADD(aTitulo, {"E1_PREFIXO" ,cE1PREFIXO ,Nil})
AADD(aTitulo, {"E1_FILIAL" ,aFili[nI] ,Nil})
AADD(aTitulo, {"E1_VALOR" ,nValPar ,Nil})
AADD(aTitulo, {"E1_SALDO" ,nValPar ,Nil})
AADD(aTitulo, {"E1_VLCRUZ" ,nValPar ,Nil})
lMsErroAuto := .F.
if aFili[nI] == '0102'
MSExecAuto({|x,y| FINA040(x,y)},aTitulo,3) //Inclusao
If lMsErroAuto
fWrite(nFileLog,"Erro " + CRLF)
fWrite(nFileLog,"Erro ao incluir titulo: "+CRLF+ MSErroString()+ CRLF + tojson(aTitulo) + CRLF)
return
else
fWrite(nFileLog,"Sucesso "+ CRLF)
fWrite(nFileLog,"Titulo incluido: "+ aFili[nI] +" : " + cValToChar(nValPar) +CRLF)
endif
elseif aFili[nI] == '0105'
fWrite(nFileLog,"Salvando titulos 05 para o final "+aFili[nI]+CRLF)
//StartJob("U_JOBF040",getenvserver(),.T., SE1ORIG->E1_FILIAL, aTitulo)
AADD(aTit05, aTitulo)
//fWrite(nFileLog,"passou pela thread "+CRLF)
else
fWrite(nFileLog,"Erro, filial nao tratada "+aFili[nI]+CRLF)
endif
Next nI
Reset Environment
While !RpcSetEnv('01', '0105',,,,GetEnvServer(),{})
Sleep(400)
End
For nI := 1 To len(aTit05)
lMsErroAuto := .F.
MSExecAuto({|x,y| FINA040(x,y)},aTit05[nI],3) //Inclusao
If lMsErroAuto
fWrite(nFileLog,"Erro " + CRLF)
fWrite(nFileLog,"Erro ao incluir titulo: "+CRLF+ MSErroString()+ CRLF + tojson(aTit05[nI]) + CRLF)
return
else
fWrite(nFileLog,"Sucesso "+ CRLF)
fWrite(nFileLog,"Titulo incluido: "+CRLF)
endif
Next nI
Reset Environment
fClose(nFileLog)
Return
////////////////////////
// Cancelamento da Fatura (Cancelamento do Reparcelamento)
// F280PCAN
// JOBF280C
//
User Function F280PCAN()
/**
* cFatCan - numero da fatura
* cPrefCan - prefixo
* cTipoCan - tipo
**/
If cEmpAnt == '06'
StartJob("U_JOBF280C",getenvserver(),.T., cPrefCan, cFatCan, cTipoCan)
EndIf
Return .T.
User Function JOBF280C(cPrefCan, cFatCan, cTipoCan)
RpcSetType(3) // Nao consome licensa
While !RpcSetEnv('01', '0102',,,,GetEnvServer(),{})
Sleep(400)
End
nFileLog := u_OpenLog("\Logs\F280PCAN_"+dToS(dDataBase)+".log")
fWrite(nFileLog,"----- F280PCAN -----"+CRLF)
fWrite(nFileLog,"E1_PREFIXO = '"+ cPrefCan +"' and E1_NUM = '"+ cFatCan +"' and E1_TIPO = '"+ cTipoCan +"'"+CRLF)
cQuery := "select * from SE1010 where E1_PREFIXO = '"+ cPrefCan +"' and E1_NUM = '"+ cFatCan +"' and E1_TIPO = '"+ cTipoCan +"' and D_E_L_E_T_ <> '*'"
If select("SE1ORIG") > 0
SE1ORIG->(DbCloseArea())
endif
TcQuery cQuery New Alias 'SE1ORIG'
dbSelectArea("SE1ORIG")
SE1ORIG->(DBGOTOP())
While SE1ORIG->(!EOF()) //Loop entre todas as parcelas e filiais
SE1->(dbselectarea("SE1"))
SE1->(dbSetOrder(1))
fWrite(nFileLog,"dbseek" + CRLF)
if ! SE1->(dbSeek(SE1ORIG->E1_FILIAL+ SE1ORIG->E1_PREFIXO+ SE1ORIG->E1_NUM+ SE1ORIG->E1_PARCELA+ SE1ORIG->E1_TIPO))
fWrite(nFileLog,"Erro dbseek" + CRLF)
Alert("Erro. Verificar F280PCAN() - dbseek")
fWrite(nFileLog,"Erro dbseek("+SE1ORIG->E1_FILIAL+ SE1ORIG->E1_PREFIXO+ SE1ORIG->E1_NUM+ SE1ORIG->E1_PARCELA+ SE1ORIG->E1_TIPO+")" + CRLF)
return .F.
endif
cFilAnt := SE1ORIG->E1_FILIAL
aFatura:= {{"E1_FILIAL" ,SE1ORIG->E1_FILIAL ,Nil},;
{"E1_PREFIXO" ,SE1ORIG->E1_PREFIXO ,Nil},;
{"E1_NUM" ,SE1ORIG->E1_NUM ,Nil},;
{"E1_PARCELA" ,SE1ORIG->E1_PARCELA ,Nil},;
{"E1_TIPO" ,SE1ORIG->E1_TIPO ,Nil}}
lMsErroAuto := .F.
MSExecAuto({|x,y| FINA040(x,y)},aFatura,5) //Exclus<75>o
If lMsErroAuto
fWrite(nFileLog,"Erro " + CRLF)
fWrite(nFileLog,"Erro ao remover o titulo: "+CRLF+ MSErroString()+ CRLF + tojson(aFatura) + CRLF)
Alert("Erro ao remover o titulo. Verificar F280PCAN()")
return .F.
else
fWrite(nFileLog,"Sucesso "+ CRLF)
fWrite(nFileLog,"Titulo removido" +CRLF)
endif
SE1ORIG->(dbskip())
end
/////////////////////////////////////////////
/////// Cancela as baixas
///
fWrite(nFileLog,"- cancela baixas" + CRLF)
cQuery := "select * from SE1060 where E1_FATURA = '"+ cFatCan +"' and D_E_L_E_T_ <> '*'"
If select("SE1ORIG") > 0
SE1ORIG->(DbCloseArea())
endif
TcQuery cQuery New Alias 'SE1ORIG'
dbSelectArea("SE1ORIG")
SE1ORIG->(DBGOTOP())
aFili := {"0102", "0105"}
While SE1ORIG->(!EOF()) //Loop entre todas as parcelas e filiais
SE1->(dbselectarea("SE1"))
SE1->(dbSetOrder(1))
For nI := 1 To len(aFili)
cFilAnt := aFili[nI]
fWrite(nFileLog,"dbseek" + CRLF)
if ! SE1->(dbSeek(aFili[nI]+ SE1ORIG->E1_PREFIXO+ SE1ORIG->E1_NUM+ SE1ORIG->E1_PARCELA+ SE1ORIG->E1_TIPO))
fWrite(nFileLog,"dbseek nao encontrou titulo para filial "+aFili[nI] + CRLF)
fWrite(nFileLog,"dbseek('"+aFili[nI]+ SE1ORIG->E1_PREFIXO+ SE1ORIG->E1_NUM+ SE1ORIG->E1_PARCELA+ SE1ORIG->E1_TIPO+"')" + CRLF)
LOOP
endif
nSE5Recno := u_RetSQLOne("select R_E_C_N_O_ from SE5010 where E5_FILIAL = '"+SE1->E1_FILIAL+"' and E5_PREFIXO = '"+SE1->E1_PREFIXO+"' and E5_TIPO = '"+SE1->E1_TIPO+"' and E5_NUMERO = '"+SE1->E1_NUM+"' "+;
" and E5_FATURA = '"+SE1->E1_FATURA+"' and E5_FATPREF='"+SE1->E1_FATPREF+"' and D_E_L_E_T_ <> '*' ", "R_E_C_N_O_")
//Removemos os Flags de Fatura para conseguirmos cancelar a baixa pelo FINA070
RECLOCK('SE1',.F.)
E1_FATURA := ''
E1_FATPREF:= ''
E1_TIPOFAT:= ''
E1_FLAGFAT:= ''
E1_DTFATUR:= StoD('')
MSUNLOCK()
SE5->(DbGoTo(nSE5Recno))
RECLOCK('SE5',.F.)
E5_MOTBX := 'NOR'
//E5_FATURA := ''
//E5_FATPREF:= ''
MSUNLOCK()
aBaixa := {{"E1_FILIAL" ,SE1->E1_FILIAL ,Nil},;
{"E1_PREFIXO" ,SE1->E1_PREFIXO ,Nil},;
{"E1_NUM" ,SE1->E1_NUM ,Nil},;
{"E1_TIPO" ,SE1->E1_TIPO ,Nil},;
{"E1_PARCELA" ,SE1->E1_PARCELA ,Nil},;
{"E1_DESCONT" ,SE1->E1_DESCONT ,Nil},;
{"E1_JUROS" ,SE1->E1_JUROS ,Nil},;
{"E1_MULTA" ,SE1->E1_MULTA ,Nil},;
{"E1_VLRREAL" ,SE1->E1_VLRREAL ,Nil},;
{"AUTMOTBX" ,"NOR" ,Nil},;
{"AUTDTBAIXA" ,date() ,Nil},;
{"AUTDTCREDITO",date() ,Nil},;
{"AUTHIST" ,"" ,Nil},;
{"AUTVALREC" ,SE1->E1_VALOR ,Nil}}
lMsErroAuto:=.F. //reseta lMsErroAuto
MSExecAuto ({|x,y| FINA070(x,y)},aBaixa, 5)
If lMsErroAuto
fWrite(nFileLog,SE1->E1_FILIAL+" : Não foi efetuada o cancelamento de baixa : "+CRLF+ MSErroString()+ CRLF + tojson(aBaixa) + CRLF)
return
else
fWrite(nFileLog,SE1->E1_FILIAL+" : cancelamento de baixa feito" +CRLF)
endif
Next nI
SE1ORIG->(dbskip())
end
Reset Environment
Return

3
test/fixtures/Data/Modelines/ruby2 vendored Normal file
View File

@@ -0,0 +1,3 @@
/* vim: set ts=8 sw=4 filetype=ruby tw=0: */
# Please help how do I into setting vim modlines

3
test/fixtures/Data/Modelines/ruby3 vendored Normal file
View File

@@ -0,0 +1,3 @@
/* vim: set ft=ruby ts=8 sw=4 tw=0: */
# I am not good at humor

View File

@@ -308,6 +308,12 @@ class TestBlob < Minitest::Test
# Erlang
assert sample_blob("rebar").vendored?
# git config files
assert_predicate fixture_blob("some/path/.gitattributes"), :vendored?
assert_predicate fixture_blob(".gitignore"), :vendored?
assert_predicate fixture_blob("special/path/.gitmodules"), :vendored?
# Minified JavaScript and CSS
assert sample_blob("foo.min.js").vendored?
assert sample_blob("foo.min.css").vendored?
@@ -326,9 +332,6 @@ class TestBlob < Minitest::Test
assert sample_blob("public/javascripts/controls.js").vendored?
assert sample_blob("public/javascripts/dragdrop.js").vendored?
# Samples
assert sample_blob("Samples/Ruby/foo.rb").vendored?
# jQuery
assert sample_blob("jquery.js").vendored?
assert sample_blob("public/javascripts/jquery.js").vendored?
@@ -511,13 +514,15 @@ class TestBlob < Minitest::Test
assert_predicate fixture_blob("README"), :documentation?
assert_predicate fixture_blob("README.md"), :documentation?
assert_predicate fixture_blob("README.txt"), :documentation?
assert_predicate fixture_blob("Readme"), :documentation?
assert_predicate fixture_blob("readme"), :documentation?
assert_predicate fixture_blob("foo/README"), :documentation?
assert_predicate fixture_blob("CHANGE"), :documentation?
assert_predicate fixture_blob("CHANGE.md"), :documentation?
assert_predicate fixture_blob("CHANGE.txt"), :documentation?
assert_predicate fixture_blob("foo/CHANGE"), :documentation?
assert_predicate fixture_blob("CHANGELOG"), :documentation?
assert_predicate fixture_blob("CHANGELOG.md"), :documentation?
assert_predicate fixture_blob("CHANGELOG.txt"), :documentation?
@@ -526,15 +531,19 @@ class TestBlob < Minitest::Test
assert_predicate fixture_blob("CHANGES"), :documentation?
assert_predicate fixture_blob("CHANGES.md"), :documentation?
assert_predicate fixture_blob("CHANGES.txt"), :documentation?
assert_predicate fixture_blob("foo/CHANGES"), :documentation?
assert_predicate fixture_blob("foo/CHANGES"), :documentation?
assert_predicate fixture_blob("CONTRIBUTING"), :documentation?
assert_predicate fixture_blob("CONTRIBUTING.md"), :documentation?
assert_predicate fixture_blob("CONTRIBUTING.txt"), :documentation?
assert_predicate fixture_blob("foo/CONTRIBUTING"), :documentation?
assert_predicate fixture_blob("examples/some-file.pl"), :documentation?
assert_predicate fixture_blob("Examples/some-example-file.rb"), :documentation?
assert_predicate fixture_blob("LICENSE"), :documentation?
assert_predicate fixture_blob("LICENCE.md"), :documentation?
assert_predicate fixture_blob("License.txt"), :documentation?
assert_predicate fixture_blob("LICENSE.txt"), :documentation?
assert_predicate fixture_blob("foo/LICENSE"), :documentation?
@@ -549,6 +558,11 @@ class TestBlob < Minitest::Test
assert_predicate fixture_blob("foo/INSTALL"), :documentation?
refute_predicate fixture_blob("foo.md"), :documentation?
# Samples
assert sample_blob("Samples/Ruby/foo.rb").documentation?
assert_predicate fixture_blob("INSTALL.txt"), :documentation?
end
def test_language

View File

@@ -263,6 +263,24 @@ class TestLanguage < Minitest::Test
assert_equal 'AGS Script', Language.find_by_alias('AGS').name
end
def test_find_ignores_comma
assert_equal 'Rust', Language['rust,no_run'].name
end
def test_find_by_name_ignores_comma
assert_equal Language['Rust'], Language.find_by_name('rust,no_run')
end
def test_find_by_alias_ignores_comma
assert_equal Language['Rust'], Language.find_by_alias('rust,no_run')
end
def test_doesnt_blow_up_with_blank_lookup
assert_equal nil, Language.find_by_alias('')
assert_equal nil, Language.find_by_name(nil)
assert_equal nil, Language[""]
end
def test_name
assert_equal 'Perl', Language['Perl'].name
assert_equal 'Python', Language['Python'].name

View File

@@ -9,6 +9,8 @@ class TestModelines < Minitest::Test
def test_modeline_strategy
assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby")
assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby2")
assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby3")
assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplus")
assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs1")
assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs2")
@@ -27,6 +29,8 @@ class TestModelines < Minitest::Test
def test_modeline_languages
assert_equal Language["Ruby"], fixture_blob("Data/Modelines/ruby").language
assert_equal Language["Ruby"], fixture_blob("Data/Modelines/ruby2").language
assert_equal Language["Ruby"], fixture_blob("Data/Modelines/ruby3").language
assert_equal Language["C++"], fixture_blob("Data/Modelines/seeplusplus").language
assert_equal Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs1").language
assert_equal Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs2").language

1
vendor/grammars/st2-zonefile vendored Submodule