paste2 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/paste2.rb +356 -237
- data/lib/paste2/client.rb +10 -10
- data/lib/paste2/version.rb +1 -1
- data/paste2.gemspec +8 -8
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd609a8d6c485a6252fa1678478bba8a3d998590
|
4
|
+
data.tar.gz: 3d65e3d6715adb8569f1daca1bb11ae99b624cc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd510c9ce70a65926730ddd1aa4c514d7e0f2624ce6c7ea58cbbe34f4844a9f1eccc8706d81b85979bfdb8d34ca17c718eb447a58f19d9062504eceedb39d74d
|
7
|
+
data.tar.gz: c8c5597e56fb96173075705c102432f8fc4cd2655010d17008a6c7e9c7af7af77cb52ae9e4ef531f1e9cf3da3dea03a559075870dfc8dda1b384cb1b033fb5cd
|
data/Rakefile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
data/lib/paste2.rb
CHANGED
@@ -1,243 +1,362 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'paste2/version'
|
2
|
+
require 'paste2/client'
|
3
3
|
|
4
4
|
module Paste2
|
5
5
|
URL = 'http://paste2.org/'
|
6
6
|
LANGUAGES = {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
7
|
+
'text' => 'Plain Targetext / Other',
|
8
|
+
'abap' => 'ABAP',
|
9
|
+
'ada' => 'Ada',
|
10
|
+
'agda' => 'Agda',
|
11
|
+
'ahk' => 'autohotkey',
|
12
|
+
'alloy' => 'Alloy',
|
13
|
+
'antlr-as' => 'ANTLR With ActionScript Target',
|
14
|
+
'antlr-cpp' => 'ANTLR With CPP Target',
|
15
|
+
'antlr-csharp' => 'ANTLR With C# Target',
|
16
|
+
'antlr-java' => 'ANTLR With Java Target',
|
17
|
+
'antlr-objc' => 'ANTLR With ObjectiveC Target',
|
18
|
+
'antlr-perl' => 'ANTLR With Perl Target',
|
19
|
+
'antlr-python' => 'ANTLR With Python Target',
|
20
|
+
'antlr-ruby' => 'ANTLR With Ruby Target',
|
21
|
+
'antlr' => 'ANTLR',
|
22
|
+
'apacheconf' => 'ApacheConf',
|
23
|
+
'apl' => 'APL',
|
24
|
+
'applescript' => 'AppleScript',
|
25
|
+
'as' => 'ActionScript',
|
26
|
+
'as3' => 'ActionScript 3',
|
27
|
+
'aspectj' => 'AspectJ',
|
28
|
+
'aspx-cs' => 'aspx-cs',
|
29
|
+
'aspx-vb' => 'aspx-vb',
|
30
|
+
'asy' => 'Asymptote',
|
31
|
+
'at' => 'AmbientTalk',
|
32
|
+
'autoit' => 'AutoIt',
|
33
|
+
'awk' => 'Awk',
|
34
|
+
'basemake' => 'Base Makefile',
|
35
|
+
'bash' => 'Bash',
|
36
|
+
'bat' => 'Batchfile',
|
37
|
+
'bbcode' => 'BBCode',
|
38
|
+
'befunge' => 'Befunge',
|
39
|
+
'blitzbasic' => 'BlitzBasic',
|
40
|
+
'blitzmax' => 'BlitzMax',
|
41
|
+
'boo' => 'Boo',
|
42
|
+
'brainfuck' => 'Brainfuck',
|
43
|
+
'bro' => 'Bro',
|
44
|
+
'bugs' => 'BUGS',
|
45
|
+
'c-objdump' => 'c-objdump',
|
46
|
+
'c' => 'C',
|
47
|
+
'ca65' => 'ca65 assembler',
|
48
|
+
'cbmbas' => 'CBM BASIC V2',
|
49
|
+
'ceylon' => 'Ceylon',
|
50
|
+
'cfc' => 'Coldfusion CFC',
|
51
|
+
'cfengine3' => 'CFEngine3',
|
52
|
+
'cfm' => 'Coldfusion HTML',
|
53
|
+
'cfs' => 'cfstatement',
|
54
|
+
'chai' => 'ChaiScript',
|
55
|
+
'chapel' => 'Chapel',
|
56
|
+
'cheetah' => 'Cheetah',
|
57
|
+
'cirru' => 'Cirru',
|
58
|
+
'clay' => 'Clay',
|
59
|
+
'clojure' => 'Clojure',
|
60
|
+
'clojurescript' => 'ClojureScript',
|
61
|
+
'cmake' => 'CMake',
|
62
|
+
'cobol' => 'COBOL',
|
63
|
+
'cobolfree' => 'COBOLFree',
|
64
|
+
'coffee-script' => 'CoffeeScript',
|
65
|
+
'common-lisp' => 'Common Lisp',
|
66
|
+
'console' => 'Bash Session',
|
67
|
+
'control' => 'Debian Control file',
|
68
|
+
'coq' => 'Coq',
|
69
|
+
'cpp' => 'C++',
|
70
|
+
'cpp-objdump' => 'cpp-objdump',
|
71
|
+
'croc' => 'Croc',
|
72
|
+
'cryptol' => 'Cryptol',
|
73
|
+
'csharp' => 'C#',
|
74
|
+
'css+django' => 'CSS+Django/Jinja',
|
75
|
+
'css+erb' => 'CSS+Ruby',
|
76
|
+
'css+genshitext' => 'CSS+Genshi Text',
|
77
|
+
'css+lasso' => 'CSS+Lasso',
|
78
|
+
'css+mako' => 'CSS+Mako',
|
79
|
+
'css+mozpreproc' => 'CSS+mozpreproc',
|
80
|
+
'css+myghty' => 'CSS+Myghty',
|
81
|
+
'css+php' => 'CSS+PHP',
|
82
|
+
'css+smarty' => 'CSS+Smarty',
|
83
|
+
'css' => 'CSS',
|
84
|
+
'cucumber' => 'Gherkin',
|
85
|
+
'cuda' => 'CUDA',
|
86
|
+
'cypher' => 'Cypher',
|
87
|
+
'cython' => 'Cython',
|
88
|
+
'd-objdump' => 'd-objdump',
|
89
|
+
'd' => 'D',
|
90
|
+
'dart' => 'Dart',
|
91
|
+
'delphi' => 'Delphi',
|
92
|
+
'dg' => 'dg',
|
93
|
+
'diff' => 'Diff',
|
94
|
+
'django' => 'Django/Jinja',
|
95
|
+
'docker' => 'Docker',
|
96
|
+
'dpatch' => 'Darcs Patch',
|
97
|
+
'dtd' => 'DTD',
|
98
|
+
'duel' => 'Duel',
|
99
|
+
'dylan-console' => 'Dylan session',
|
100
|
+
'dylan-lid' => 'DylanLID',
|
101
|
+
'dylan' => 'Dylan',
|
102
|
+
'ebnf' => 'EBNF',
|
103
|
+
'ec' => 'eC',
|
104
|
+
'ecl' => 'ECL',
|
105
|
+
'eiffel' => 'Eiffel',
|
106
|
+
'elixir' => 'Elixir',
|
107
|
+
'erb' => 'ERB',
|
108
|
+
'erl' => 'Erlang erl session',
|
109
|
+
'erlang' => 'Erlang',
|
110
|
+
'evoque' => 'Evoque',
|
111
|
+
'factor' => 'Factor',
|
112
|
+
'fan' => 'Fantom',
|
113
|
+
'fancy' => 'Fancy',
|
114
|
+
'felix' => 'Felix',
|
115
|
+
'fortran' => 'Fortran',
|
116
|
+
'foxpro' => 'FoxPro',
|
117
|
+
'fsharp' => 'FSharp',
|
118
|
+
'gap' => 'GAP',
|
119
|
+
'gas' => 'GAS',
|
120
|
+
'genshi' => 'Genshi',
|
121
|
+
'genshitext' => 'Genshi Text',
|
122
|
+
'glsl' => 'GLSL',
|
123
|
+
'gnuplot' => 'Gnuplot',
|
124
|
+
'go' => 'Go',
|
125
|
+
'golo' => 'Golo',
|
126
|
+
'gooddata-cl' => 'GoodData-CL',
|
127
|
+
'gosu' => 'Gosu',
|
128
|
+
'groff' => 'Groff',
|
129
|
+
'groovy' => 'Groovy',
|
130
|
+
'gst' => 'Gosu Template',
|
131
|
+
'haml' => 'Haml',
|
132
|
+
'handlebars' => 'Handlebars',
|
133
|
+
'haskell' => 'Haskell',
|
134
|
+
'haxeml' => 'Hxml',
|
135
|
+
'html+cheetah' => 'HTML+Cheetah',
|
136
|
+
'html+django' => 'HTML+Django/Jinja',
|
137
|
+
'html+evoque' => 'HTML+Evoque',
|
138
|
+
'html+genshi' => 'HTML+Genshi',
|
139
|
+
'html+handlebars' => 'HTML+Handlebars',
|
140
|
+
'html+lasso' => 'HTML+Lasso',
|
141
|
+
'html+mako' => 'HTML+Mako',
|
142
|
+
'html+myghty' => 'HTML+Myghty',
|
143
|
+
'html+php' => 'HTML+PHP',
|
144
|
+
'html+smarty' => 'HTML+Smarty',
|
145
|
+
'html+twig' => 'HTML+Twig',
|
146
|
+
'html+velocity' => 'HTML+Velocity',
|
147
|
+
'html' => 'HTML',
|
148
|
+
'http' => 'HTTP',
|
149
|
+
'hx' => 'Haxe',
|
150
|
+
'hybris' => 'Hybris',
|
151
|
+
'hylang' => 'Hy',
|
152
|
+
'i6t' => 'Inform 6 template',
|
153
|
+
'idl' => 'IDL',
|
154
|
+
'idris' => 'Idris',
|
155
|
+
'iex' => 'Elixir iex session',
|
156
|
+
'igor' => 'Igor',
|
157
|
+
'inform6' => 'Inform 6',
|
158
|
+
'inform7' => 'Inform 7',
|
159
|
+
'ini' => 'INI',
|
160
|
+
'io' => 'Io',
|
161
|
+
'ioke' => 'Ioke',
|
162
|
+
'irc' => 'IRC logs',
|
163
|
+
'isabelle' => 'Isabelle',
|
164
|
+
'jade' => 'Jade',
|
165
|
+
'jags' => 'JAGS',
|
166
|
+
'jasmin' => 'Jasmin',
|
167
|
+
'java' => 'Java',
|
168
|
+
'javascript+mozpreproc' => 'Javascript+mozpreproc',
|
169
|
+
'jlcon' => 'Julia console',
|
170
|
+
'js+cheetah' => 'JavaScript+Cheetah',
|
171
|
+
'js+django' => 'JavaScript+Django/Jinja',
|
172
|
+
'js+erb' => 'JavaScript+Ruby',
|
173
|
+
'js+genshitext' => 'JavaScript+Genshi Text',
|
174
|
+
'js+lasso' => 'JavaScript+Lasso',
|
175
|
+
'js+mako' => 'JavaScript+Mako',
|
176
|
+
'js+myghty' => 'JavaScript+Myghty',
|
177
|
+
'js+php' => 'JavaScript+PHP',
|
178
|
+
'js+smarty' => 'JavaScript+Smarty',
|
179
|
+
'js' => 'JavaScript',
|
180
|
+
'json' => 'JSON',
|
181
|
+
'jsonld' => 'JSON-LD',
|
182
|
+
'jsp' => 'Java Server Page',
|
183
|
+
'julia' => 'Julia',
|
184
|
+
'kal' => 'Kal',
|
185
|
+
'kconfig' => 'Kconfig',
|
186
|
+
'koka' => 'Koka',
|
187
|
+
'kotlin' => 'Kotlin',
|
188
|
+
'lagda' => 'Literate Agda',
|
189
|
+
'lasso' => 'Lasso',
|
190
|
+
'lcry' => 'Literate Cryptol',
|
191
|
+
'lean' => 'Lean',
|
192
|
+
'lhs' => 'Literate Haskell',
|
193
|
+
'lidr' => 'Literate Idris',
|
194
|
+
'lighty' => 'Lighttpd configuration file',
|
195
|
+
'limbo' => 'Limbo',
|
196
|
+
'liquid' => 'liquid',
|
197
|
+
'live-script' => 'LiveScript',
|
198
|
+
'llvm' => 'LLVM',
|
199
|
+
'logos' => 'Logos',
|
200
|
+
'logtalk' => 'Logtalk',
|
201
|
+
'lsl' => 'LSL',
|
202
|
+
'lua' => 'Lua',
|
203
|
+
'make' => 'Makefile',
|
204
|
+
'mako' => 'Mako',
|
205
|
+
'maql' => 'MAQL',
|
206
|
+
'mask' => 'Mask',
|
207
|
+
'mason' => 'Mason',
|
208
|
+
'mathematica' => 'Mathematica',
|
209
|
+
'matlab' => 'Matlab',
|
210
|
+
'matlabsession' => 'Matlab session',
|
211
|
+
'minid' => 'MiniD',
|
212
|
+
'modelica' => 'Modelica',
|
213
|
+
'modula2' => 'Modula-2',
|
214
|
+
'monkey' => 'Monkey',
|
215
|
+
'moocode' => 'MOOCode',
|
216
|
+
'moon' => 'MoonScript',
|
217
|
+
'mozhashpreproc' => 'mozhashpreproc',
|
218
|
+
'mozpercentpreproc' => 'mozpercentpreproc',
|
219
|
+
'mql' => 'MQL',
|
220
|
+
'mscgen' => 'Mscgen',
|
221
|
+
'mupad' => 'MuPAD',
|
222
|
+
'mxml' => 'MXML',
|
223
|
+
'myghty' => 'Myghty',
|
224
|
+
'mysql' => 'MySQL',
|
225
|
+
'nasm' => 'NASM',
|
226
|
+
'nemerle' => 'Nemerle',
|
227
|
+
'nesc' => 'nesC',
|
228
|
+
'newlisp' => 'NewLisp',
|
229
|
+
'newspeak' => 'Newspeak',
|
230
|
+
'nginx' => 'Nginx configuration file',
|
231
|
+
'nimrod' => 'Nimrod',
|
232
|
+
'nit' => 'Nit',
|
233
|
+
'nixos' => 'Nix',
|
234
|
+
'nsis' => 'NSIS',
|
235
|
+
'numpy' => 'NumPy',
|
236
|
+
'objdump-nasm' => 'objdump-nasm',
|
237
|
+
'objdump' => 'objdump',
|
238
|
+
'objective-c++' => 'Objective-C++',
|
239
|
+
'objective-c' => 'Objective-C',
|
240
|
+
'objective-j' => 'Objective-J',
|
241
|
+
'ocaml' => 'OCaml',
|
242
|
+
'octave' => 'Octave',
|
243
|
+
'ooc' => 'Ooc',
|
244
|
+
'opa' => 'Opa',
|
245
|
+
'openedge' => 'OpenEdge ABL',
|
246
|
+
'pan' => 'Pan',
|
247
|
+
'pawn' => 'Pawn',
|
248
|
+
'perl' => 'Perl',
|
249
|
+
'perl6' => 'Perl6',
|
250
|
+
'php' => 'PHP',
|
251
|
+
'pig' => 'Pig',
|
252
|
+
'pike' => 'Pike',
|
253
|
+
'plpgsql' => 'PL/pgSQL',
|
254
|
+
'postgresql' => 'PostgreSQL SQL dialect',
|
255
|
+
'postscript' => 'PostScript',
|
256
|
+
'pot' => 'Gettext Catalog',
|
257
|
+
'pov' => 'POVRay',
|
258
|
+
'powershell' => 'PowerShell',
|
259
|
+
'prolog' => 'Prolog',
|
260
|
+
'properties' => 'Properties',
|
261
|
+
'protobuf' => 'Protocol Buffer',
|
262
|
+
'psql' => 'PostgreSQL console (psql)',
|
263
|
+
'puppet' => 'Puppet',
|
264
|
+
'py3tb' => 'Python 3.0 Traceback',
|
265
|
+
'pycon' => 'Python console session',
|
266
|
+
'pypylog' => 'PyPy Log',
|
267
|
+
'pytb' => 'Python Traceback',
|
268
|
+
'python' => 'Python',
|
269
|
+
'python3' => 'Python 3',
|
270
|
+
'qbasic' => 'QBasic',
|
271
|
+
'qml' => 'QML',
|
272
|
+
'racket' => 'Racket',
|
273
|
+
'ragel-c' => 'Ragel in C Host',
|
274
|
+
'ragel-cpp' => 'Ragel in CPP Host',
|
275
|
+
'ragel-d' => 'Ragel in D Host',
|
276
|
+
'ragel-em' => 'Embedded Ragel',
|
277
|
+
'ragel-java' => 'Ragel in Java Host',
|
278
|
+
'ragel-objc' => 'Ragel in Objective C Host',
|
279
|
+
'ragel-ruby' => 'Ragel in Ruby Host',
|
280
|
+
'ragel' => 'Ragel',
|
281
|
+
'raw' => 'Raw token data',
|
282
|
+
'rb' => 'Ruby',
|
283
|
+
'rbcon' => 'Ruby irb session',
|
284
|
+
'rconsole' => 'RConsole',
|
285
|
+
'rd' => 'Rd',
|
286
|
+
'rebol' => 'REBOL',
|
287
|
+
'red' => 'Red',
|
288
|
+
'redcode' => 'Redcode',
|
289
|
+
'registry' => 'reg',
|
290
|
+
'resource' => 'ResourceBundle',
|
291
|
+
'rexx' => 'Rexx',
|
292
|
+
'rhtml' => 'RHTML',
|
293
|
+
'robotframework' => 'RobotFramework',
|
294
|
+
'rql' => 'RQL',
|
295
|
+
'rsl' => 'RSL',
|
296
|
+
'rst' => 'reStructuredText',
|
297
|
+
'rust' => 'Rust',
|
298
|
+
'sass' => 'Sass',
|
299
|
+
'scala' => 'Scala',
|
300
|
+
'scaml' => 'Scaml',
|
301
|
+
'scheme' => 'Scheme',
|
302
|
+
'scilab' => 'Scilab',
|
303
|
+
'scss' => 'SCSS',
|
304
|
+
'shell-session' => 'Shell Session',
|
305
|
+
'slim' => 'Slim',
|
306
|
+
'smali' => 'Smali',
|
307
|
+
'smalltalk' => 'Smalltalk',
|
308
|
+
'smarty' => 'Smarty',
|
309
|
+
'sml' => 'Standard ML',
|
310
|
+
'snobol' => 'Snobol',
|
311
|
+
'sourceslist' => 'Debian Sourcelist',
|
312
|
+
'sp' => 'SourcePawn',
|
313
|
+
'sparql' => 'SPARQL',
|
314
|
+
'spec' => 'RPMSpec',
|
315
|
+
'splus' => 'S',
|
316
|
+
'sql' => 'SQL',
|
317
|
+
'sqlite3' => 'sqlite3con',
|
318
|
+
'squidconf' => 'SquidConf',
|
319
|
+
'ssp' => 'Scalate Server Page',
|
320
|
+
'stan' => 'Stan',
|
321
|
+
'swift' => 'Swift',
|
322
|
+
'swig' => 'SWIG',
|
323
|
+
'systemverilog' => 'systemverilog',
|
324
|
+
'tads3' => 'TADS 3',
|
325
|
+
'tcl' => 'Tcl',
|
326
|
+
'tcsh' => 'Tcsh',
|
327
|
+
'tea' => 'Tea',
|
328
|
+
'tex' => 'TeX',
|
329
|
+
'todotxt' => 'Todotxt',
|
330
|
+
'trac-wiki' => 'MoinMoin/Trac Wiki markup',
|
331
|
+
'treetop' => 'Treetop',
|
332
|
+
'ts' => 'TypeScript',
|
333
|
+
'twig' => 'Twig',
|
334
|
+
'urbiscript' => 'UrbiScript',
|
335
|
+
'vala' => 'Vala',
|
336
|
+
'vb.net' => 'VB.net',
|
337
|
+
'vctreestatus' => 'VCTreeStatus',
|
338
|
+
'velocity' => 'Velocity',
|
339
|
+
'verilog' => 'verilog',
|
340
|
+
'vgl' => 'VGL',
|
341
|
+
'vhdl' => 'vhdl',
|
342
|
+
'vim' => 'VimL',
|
343
|
+
'xml+cheetah' => 'XML+Cheetah',
|
344
|
+
'xml+django' => 'XML+Django/Jinja',
|
345
|
+
'xml+erb' => 'XML+Ruby',
|
346
|
+
'xml+evoque' => 'XML+Evoque',
|
347
|
+
'xml+lasso' => 'XML+Lasso',
|
348
|
+
'xml+mako' => 'XML+Mako',
|
349
|
+
'xml+myghty' => 'XML+Myghty',
|
350
|
+
'xml+php' => 'XML+PHP',
|
351
|
+
'xml+smarty' => 'XML+Smarty',
|
352
|
+
'xml+velocity' => 'XML+Velocity',
|
353
|
+
'xml' => 'XML',
|
354
|
+
'xquery' => 'XQuery',
|
355
|
+
'xslt' => 'XSLT',
|
356
|
+
'xtend' => 'Xtend',
|
357
|
+
'xul+mozpreproc' => 'XUL+mozpreproc',
|
358
|
+
'yaml+jinja' => 'YAML+Jinja',
|
359
|
+
'yaml' => 'YAML',
|
360
|
+
'zephir' => 'Zephir'
|
242
361
|
}
|
243
362
|
end
|
data/lib/paste2/client.rb
CHANGED
@@ -5,26 +5,26 @@ class Paste2::Client
|
|
5
5
|
def self.post(code, description = '', lang = 'text')
|
6
6
|
uri = URI(Paste2::URL)
|
7
7
|
res = Net::HTTP.post_form(uri, :code => code, :description => description, :lang => lang)
|
8
|
-
File.join(Paste2::URL,res[
|
8
|
+
File.join(Paste2::URL,res['location'])
|
9
9
|
end
|
10
10
|
def initialize
|
11
11
|
@options = {}
|
12
12
|
parser = OptionParser.new do|opts|
|
13
|
-
opts.separator
|
14
|
-
opts.separator
|
13
|
+
opts.separator ''
|
14
|
+
opts.separator 'Examples:'
|
15
15
|
opts.separator " echo 'code' | paste2"
|
16
|
-
opts.separator
|
17
|
-
opts.separator
|
18
|
-
opts.separator
|
19
|
-
opts.banner =
|
16
|
+
opts.separator ' paste2 < file'
|
17
|
+
opts.separator ''
|
18
|
+
opts.separator 'Specific options:'
|
19
|
+
opts.banner = 'Usage: paste2 [options]'
|
20
20
|
opts.on( '-f', '--file FILE', 'Post content from file' ) do|file|
|
21
21
|
@options[:file] = file
|
22
22
|
end
|
23
23
|
opts.on( '-d', '--description TEXT', 'Description for post' ) do|description|
|
24
24
|
@options[:description] = description
|
25
25
|
end
|
26
|
-
opts.on( '-a', '--all', 'List supported languages' ) do
|
27
|
-
puts
|
26
|
+
opts.on( '-a', '--all', 'List supported languages' ) do
|
27
|
+
puts 'Supported languages:'
|
28
28
|
Paste2::LANGUAGES.each do |lang, name|
|
29
29
|
printf "\t%-20s %s\n", lang, name
|
30
30
|
end
|
@@ -55,7 +55,7 @@ class Paste2::Client
|
|
55
55
|
return if @options[:help]
|
56
56
|
begin
|
57
57
|
code ||= @options[:file].nil? ? STDIN.readlines : File.open(@options[:file]).readlines
|
58
|
-
puts Paste2::Client.post(code.join(
|
58
|
+
puts Paste2::Client.post(code.join(''), @options[:description], @options[:language])
|
59
59
|
rescue => e
|
60
60
|
puts e.message
|
61
61
|
exit(1)
|
data/lib/paste2/version.rb
CHANGED
data/paste2.gemspec
CHANGED
@@ -4,20 +4,20 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'paste2/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'paste2'
|
8
8
|
spec.version = Paste2::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Evgeniy Shurmin ']
|
10
|
+
spec.email = ['eshurmin@gmail.com']
|
11
11
|
spec.description = %q{Utility allow create posts on Paste2.org}
|
12
12
|
spec.summary = %q{Utility allow create posts on Paste2.org}
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
13
|
+
spec.homepage = 'http://github.com/jpascal/paste2'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
23
|
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paste2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 'Evgeniy Shurmin '
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Utility allow create posts on Paste2.org
|
@@ -46,7 +46,7 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
- .gitignore
|
49
|
+
- ".gitignore"
|
50
50
|
- Gemfile
|
51
51
|
- LICENSE.txt
|
52
52
|
- README.md
|
@@ -66,18 +66,19 @@ require_paths:
|
|
66
66
|
- lib
|
67
67
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
78
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.
|
79
|
+
rubygems_version: 2.2.2
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
82
|
summary: Utility allow create posts on Paste2.org
|
83
83
|
test_files: []
|
84
|
+
has_rdoc:
|