lg_pod_plugin 1.0.8 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/bin/lg +5 -0
  3. data/lib/command/cache.rb +22 -18
  4. data/lib/command/command.rb +27 -35
  5. data/lib/command/install.rb +52 -0
  6. data/lib/command/update.rb +39 -0
  7. data/lib/lg_pod_plugin/downloader.rb +12 -17
  8. data/lib/lg_pod_plugin/git_util.rb +150 -106
  9. data/lib/lg_pod_plugin/install.rb +74 -88
  10. data/lib/lg_pod_plugin/l_cache.rb +11 -77
  11. data/lib/lg_pod_plugin/l_util.rb +6 -2
  12. data/lib/lg_pod_plugin/request.rb +90 -82
  13. data/lib/lg_pod_plugin/version.rb +1 -1
  14. data/lib/lg_pod_plugin.rb +9 -5
  15. metadata +57 -118
  16. data/lib/git/author.rb +0 -14
  17. data/lib/git/base/factory.rb +0 -101
  18. data/lib/git/base.rb +0 -670
  19. data/lib/git/branch.rb +0 -126
  20. data/lib/git/branches.rb +0 -71
  21. data/lib/git/config.rb +0 -22
  22. data/lib/git/diff.rb +0 -155
  23. data/lib/git/encoding_utils.rb +0 -33
  24. data/lib/git/escaped_path.rb +0 -77
  25. data/lib/git/index.rb +0 -5
  26. data/lib/git/lib.rb +0 -1215
  27. data/lib/git/log.rb +0 -135
  28. data/lib/git/object.rb +0 -312
  29. data/lib/git/path.rb +0 -31
  30. data/lib/git/remote.rb +0 -36
  31. data/lib/git/repository.rb +0 -6
  32. data/lib/git/stash.rb +0 -27
  33. data/lib/git/stashes.rb +0 -55
  34. data/lib/git/status.rb +0 -199
  35. data/lib/git/url.rb +0 -127
  36. data/lib/git/version.rb +0 -5
  37. data/lib/git/working_directory.rb +0 -4
  38. data/lib/git/worktree.rb +0 -38
  39. data/lib/git/worktrees.rb +0 -47
  40. data/lib/git.rb +0 -326
  41. data/lib/rchardet/big5freq.rb +0 -927
  42. data/lib/rchardet/big5prober.rb +0 -42
  43. data/lib/rchardet/chardistribution.rb +0 -250
  44. data/lib/rchardet/charsetgroupprober.rb +0 -110
  45. data/lib/rchardet/charsetprober.rb +0 -70
  46. data/lib/rchardet/codingstatemachine.rb +0 -67
  47. data/lib/rchardet/constants.rb +0 -42
  48. data/lib/rchardet/escprober.rb +0 -90
  49. data/lib/rchardet/escsm.rb +0 -245
  50. data/lib/rchardet/eucjpprober.rb +0 -88
  51. data/lib/rchardet/euckrfreq.rb +0 -597
  52. data/lib/rchardet/euckrprober.rb +0 -42
  53. data/lib/rchardet/euctwfreq.rb +0 -431
  54. data/lib/rchardet/euctwprober.rb +0 -42
  55. data/lib/rchardet/gb18030freq.rb +0 -474
  56. data/lib/rchardet/gb18030prober.rb +0 -42
  57. data/lib/rchardet/hebrewprober.rb +0 -289
  58. data/lib/rchardet/jisfreq.rb +0 -571
  59. data/lib/rchardet/jpcntx.rb +0 -229
  60. data/lib/rchardet/langbulgarianmodel.rb +0 -229
  61. data/lib/rchardet/langcyrillicmodel.rb +0 -330
  62. data/lib/rchardet/langgreekmodel.rb +0 -227
  63. data/lib/rchardet/langhebrewmodel.rb +0 -202
  64. data/lib/rchardet/langhungarianmodel.rb +0 -226
  65. data/lib/rchardet/langthaimodel.rb +0 -201
  66. data/lib/rchardet/latin1prober.rb +0 -147
  67. data/lib/rchardet/mbcharsetprober.rb +0 -89
  68. data/lib/rchardet/mbcsgroupprober.rb +0 -47
  69. data/lib/rchardet/mbcssm.rb +0 -542
  70. data/lib/rchardet/sbcharsetprober.rb +0 -122
  71. data/lib/rchardet/sbcsgroupprober.rb +0 -58
  72. data/lib/rchardet/sjisprober.rb +0 -88
  73. data/lib/rchardet/universaldetector.rb +0 -179
  74. data/lib/rchardet/utf8prober.rb +0 -87
  75. data/lib/rchardet/version.rb +0 -3
  76. data/lib/rchardet.rb +0 -67
  77. data/lib/zip/central_directory.rb +0 -212
  78. data/lib/zip/compressor.rb +0 -9
  79. data/lib/zip/constants.rb +0 -115
  80. data/lib/zip/crypto/decrypted_io.rb +0 -40
  81. data/lib/zip/crypto/encryption.rb +0 -11
  82. data/lib/zip/crypto/null_encryption.rb +0 -43
  83. data/lib/zip/crypto/traditional_encryption.rb +0 -99
  84. data/lib/zip/decompressor.rb +0 -31
  85. data/lib/zip/deflater.rb +0 -34
  86. data/lib/zip/dos_time.rb +0 -53
  87. data/lib/zip/entry.rb +0 -719
  88. data/lib/zip/entry_set.rb +0 -88
  89. data/lib/zip/errors.rb +0 -19
  90. data/lib/zip/extra_field/generic.rb +0 -44
  91. data/lib/zip/extra_field/ntfs.rb +0 -94
  92. data/lib/zip/extra_field/old_unix.rb +0 -46
  93. data/lib/zip/extra_field/universal_time.rb +0 -77
  94. data/lib/zip/extra_field/unix.rb +0 -39
  95. data/lib/zip/extra_field/zip64.rb +0 -70
  96. data/lib/zip/extra_field/zip64_placeholder.rb +0 -15
  97. data/lib/zip/extra_field.rb +0 -103
  98. data/lib/zip/file.rb +0 -468
  99. data/lib/zip/filesystem.rb +0 -643
  100. data/lib/zip/inflater.rb +0 -54
  101. data/lib/zip/input_stream.rb +0 -180
  102. data/lib/zip/ioextras/abstract_input_stream.rb +0 -122
  103. data/lib/zip/ioextras/abstract_output_stream.rb +0 -43
  104. data/lib/zip/ioextras.rb +0 -36
  105. data/lib/zip/null_compressor.rb +0 -15
  106. data/lib/zip/null_decompressor.rb +0 -19
  107. data/lib/zip/null_input_stream.rb +0 -10
  108. data/lib/zip/output_stream.rb +0 -198
  109. data/lib/zip/pass_thru_compressor.rb +0 -23
  110. data/lib/zip/pass_thru_decompressor.rb +0 -31
  111. data/lib/zip/streamable_directory.rb +0 -15
  112. data/lib/zip/streamable_stream.rb +0 -52
  113. data/lib/zip/version.rb +0 -3
  114. data/lib/zip.rb +0 -72
@@ -1,147 +0,0 @@
1
- ######################## BEGIN LICENSE BLOCK ########################
2
- # The Original Code is Mozilla Universal charset detector code.
3
- #
4
- # The Initial Developer of the Original Code is
5
- # Netscape Communications Corporation.
6
- # Portions created by the Initial Developer are Copyright (C) 2001
7
- # the Initial Developer. All Rights Reserved.
8
- #
9
- # Contributor(s):
10
- # Jeff Hodges - port to Ruby
11
- # Mark Pilgrim - port to Python
12
- # Shy Shalom - original C code
13
- #
14
- # This library is free software; you can redistribute it and/or
15
- # modify it under the terms of the GNU Lesser General Public
16
- # License as published by the Free Software Foundation; either
17
- # version 2.1 of the License, or (at your option) any later version.
18
- #
19
- # This library is distributed in the hope that it will be useful,
20
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
- # Lesser General Public License for more details.
23
- #
24
- # You should have received a copy of the GNU Lesser General Public
25
- # License along with this library; if not, write to the Free Software
26
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27
- # 02110-1301 USA
28
- ######################### END LICENSE BLOCK #########################
29
-
30
- module CharDet
31
- FREQ_CAT_NUM = 4
32
-
33
- UDF = 0 # undefined
34
- OTH = 1 # other
35
- ASC = 2 # ascii capital letter
36
- ASS = 3 # ascii small letter
37
- ACV = 4 # accent capital vowel
38
- ACO = 5 # accent capital other
39
- ASV = 6 # accent small vowel
40
- ASO = 7 # accent small other
41
- CLASS_NUM = 8 # total classes
42
-
43
- Latin1_CharToClass = [
44
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 00 - 07
45
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 08 - 0F
46
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 10 - 17
47
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 18 - 1F
48
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 20 - 27
49
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 28 - 2F
50
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 30 - 37
51
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 38 - 3F
52
- OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 40 - 47
53
- ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 48 - 4F
54
- ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 50 - 57
55
- ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH, # 58 - 5F
56
- OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 60 - 67
57
- ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 68 - 6F
58
- ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 70 - 77
59
- ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH, # 78 - 7F
60
- OTH, UDF, OTH, ASO, OTH, OTH, OTH, OTH, # 80 - 87
61
- OTH, OTH, ACO, OTH, ACO, UDF, ACO, UDF, # 88 - 8F
62
- UDF, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 90 - 97
63
- OTH, OTH, ASO, OTH, ASO, UDF, ASO, ACO, # 98 - 9F
64
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # A0 - A7
65
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # A8 - AF
66
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # B0 - B7
67
- OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # B8 - BF
68
- ACV, ACV, ACV, ACV, ACV, ACV, ACO, ACO, # C0 - C7
69
- ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV, # C8 - CF
70
- ACO, ACO, ACV, ACV, ACV, ACV, ACV, OTH, # D0 - D7
71
- ACV, ACV, ACV, ACV, ACV, ACO, ACO, ACO, # D8 - DF
72
- ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASO, # E0 - E7
73
- ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV, # E8 - EF
74
- ASO, ASO, ASV, ASV, ASV, ASV, ASV, OTH, # F0 - F7
75
- ASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO, # F8 - FF
76
- ].freeze
77
-
78
- # 0 : illegal
79
- # 1 : very unlikely
80
- # 2 : normal
81
- # 3 : very likely
82
- Latin1ClassModel = [
83
- # UDF OTH ASC ASS ACV ACO ASV ASO
84
- 0, 0, 0, 0, 0, 0, 0, 0, # UDF
85
- 0, 3, 3, 3, 3, 3, 3, 3, # OTH
86
- 0, 3, 3, 3, 3, 3, 3, 3, # ASC
87
- 0, 3, 3, 3, 1, 1, 3, 3, # ASS
88
- 0, 3, 3, 3, 1, 2, 1, 2, # ACV
89
- 0, 3, 3, 3, 3, 3, 3, 3, # ACO
90
- 0, 3, 1, 3, 1, 1, 1, 3, # ASV
91
- 0, 3, 1, 3, 1, 1, 3, 3, # ASO
92
- ].freeze
93
-
94
- class Latin1Prober < CharSetProber
95
- def initialize
96
- super
97
- reset()
98
- end
99
-
100
- def reset
101
- @lastCharClass = OTH
102
- @freqCounter = [0] * FREQ_CAT_NUM
103
- super
104
- end
105
-
106
- def get_charset_name
107
- return "windows-1252"
108
- end
109
-
110
- def feed(aBuf)
111
- aBuf = filter_with_english_letters(aBuf)
112
- aBuf.each_byte do |b|
113
- c = b.chr
114
- charClass = Latin1_CharToClass[c.bytes.first]
115
- freq = Latin1ClassModel[(@lastCharClass * CLASS_NUM) + charClass]
116
- if freq == 0
117
- @state = ENotMe
118
- break
119
- end
120
- @freqCounter[freq] += 1
121
- @lastCharClass = charClass
122
- end
123
-
124
- return get_state()
125
- end
126
-
127
- def get_confidence
128
- if get_state() == ENotMe
129
- return 0.01
130
- end
131
-
132
- total = @freqCounter.inject{|a,b| a+b}
133
- if total < 0.01
134
- confidence = 0.0
135
- else
136
- confidence = (@freqCounter[3] / total) - (@freqCounter[1] * 20.0 / total)
137
- end
138
- if confidence < 0.0
139
- confidence = 0.0
140
- end
141
- # lower the confidence of latin1 so that other more accurate detector
142
- # can take priority.
143
- confidence = confidence * 0.5
144
- return confidence
145
- end
146
- end
147
- end
@@ -1,89 +0,0 @@
1
- ######################## BEGIN LICENSE BLOCK ########################
2
- # The Original Code is Mozilla Universal charset detector code.
3
- #
4
- # The Initial Developer of the Original Code is
5
- # Netscape Communications Corporation.
6
- # Portions created by the Initial Developer are Copyright (C) 2001
7
- # the Initial Developer. All Rights Reserved.
8
- #
9
- # Contributor(s):
10
- # Jeff Hodges - port to Ruby
11
- # Mark Pilgrim - port to Python
12
- # Shy Shalom - original C code
13
- # Proofpoint, Inc.
14
- #
15
- # This library is free software; you can redistribute it and/or
16
- # modify it under the terms of the GNU Lesser General Public
17
- # License as published by the Free Software Foundation; either
18
- # version 2.1 of the License, or (at your option) any later version.
19
- #
20
- # This library is distributed in the hope that it will be useful,
21
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
- # Lesser General Public License for more details.
24
- #
25
- # You should have received a copy of the GNU Lesser General Public
26
- # License along with this library; if not, write to the Free Software
27
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
28
- # 02110-1301 USA
29
- ######################### END LICENSE BLOCK #########################
30
-
31
- module CharDet
32
- class MultiByteCharSetProber < CharSetProber
33
- def initialize
34
- super
35
- @distributionAnalyzer = nil
36
- @codingSM = nil
37
- @lastChar = "\x00\x00"
38
- end
39
-
40
- def reset
41
- super
42
- if @codingSM
43
- @codingSM.reset()
44
- end
45
- if @distributionAnalyzer
46
- @distributionAnalyzer.reset()
47
- end
48
- @lastChar = "\x00\x00"
49
- end
50
-
51
- def get_charset_name
52
- end
53
-
54
- def feed(aBuf)
55
- aLen = aBuf.length
56
- for i in (0...aLen)
57
- codingState = @codingSM.next_state(aBuf[i, 1])
58
- if codingState == EError
59
- $stderr << "#{get_charset_name} prober hit error at byte #{i}\n" if $debug
60
- @state = ENotMe
61
- break
62
- elsif codingState == EItsMe
63
- @state = EFoundIt
64
- break
65
- elsif codingState == EStart
66
- charLen = @codingSM.get_current_charlen()
67
- if i == 0
68
- @lastChar[1] = aBuf[0, 1]
69
- @distributionAnalyzer.feed(@lastChar, charLen)
70
- else
71
- @distributionAnalyzer.feed(aBuf[i-1, 2], charLen)
72
- end
73
- end
74
- end
75
- @lastChar[0] = aBuf[aLen-1, 1]
76
-
77
- if get_state() == EDetecting
78
- if @distributionAnalyzer.got_enough_data() and (get_confidence() > SHORTCUT_THRESHOLD)
79
- @state = EFoundIt
80
- end
81
- end
82
- return get_state()
83
- end
84
-
85
- def get_confidence
86
- return @distributionAnalyzer.get_confidence()
87
- end
88
- end
89
- end
@@ -1,47 +0,0 @@
1
- ######################## BEGIN LICENSE BLOCK ########################
2
- # The Original Code is Mozilla Universal charset detector code.
3
- #
4
- # The Initial Developer of the Original Code is
5
- # Netscape Communications Corporation.
6
- # Portions created by the Initial Developer are Copyright (C) 2001
7
- # the Initial Developer. All Rights Reserved.
8
- #
9
- # Contributor(s):
10
- # Jeff Hodges - port to Ruby
11
- # Mark Pilgrim - port to Python
12
- # Shy Shalom - original C code
13
- # Proofpoint, Inc.
14
- #
15
- # This library is free software; you can redistribute it and/or
16
- # modify it under the terms of the GNU Lesser General Public
17
- # License as published by the Free Software Foundation; either
18
- # version 2.1 of the License, or (at your option) any later version.
19
- #
20
- # This library is distributed in the hope that it will be useful,
21
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
- # Lesser General Public License for more details.
24
- #
25
- # You should have received a copy of the GNU Lesser General Public
26
- # License along with this library; if not, write to the Free Software
27
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
28
- # 02110-1301 USA
29
- ######################### END LICENSE BLOCK #########################
30
-
31
- module CharDet
32
- class MBCSGroupProber < CharSetGroupProber
33
- def initialize
34
- super
35
- @probers = [
36
- UTF8Prober.new,
37
- SJISProber.new,
38
- EUCJPProber.new,
39
- GB18030Prober.new,
40
- EUCKRProber.new,
41
- Big5Prober.new,
42
- EUCTWProber.new
43
- ]
44
- reset()
45
- end
46
- end
47
- end