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
data/lib/git.rb DELETED
@@ -1,326 +0,0 @@
1
- # Add the directory containing this file to the start of the load path if it
2
- # isn't there already.
3
- $:.unshift(File.dirname(__FILE__)) unless
4
- $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
5
-
6
- require 'git/author'
7
- require 'git/base'
8
- require 'git/branch'
9
- require 'git/branches'
10
- require 'git/config'
11
- require 'git/diff'
12
- require 'git/encoding_utils'
13
- require 'git/escaped_path'
14
- require 'git/index'
15
- require 'git/lib'
16
- require 'git/log'
17
- require 'git/object'
18
- require 'git/path'
19
- require 'git/remote'
20
- require 'git/repository'
21
- require 'git/status'
22
- require 'git/stash'
23
- require 'git/stashes'
24
- require 'git/url'
25
- require 'git/version'
26
- require 'git/working_directory'
27
- require 'git/worktree'
28
- require 'git/worktrees'
29
-
30
- lib = Git::Lib.new(nil, nil)
31
- unless lib.meets_required_version?
32
- $stderr.puts "[WARNING] The git gem requires git #{lib.required_command_version.join('.')} or later, but only found #{lib.current_command_version.join('.')}. You should probably upgrade."
33
- end
34
-
35
- # The Git module provides the basic functions to open a git
36
- # reference to work with. You can open a working directory,
37
- # open a bare repository, initialize a new repo or clone an
38
- # existing remote repository.
39
- #
40
- # @author Scott Chacon (mailto:schacon@gmail.com)
41
- #
42
- module Git
43
- #g.config('user.name', 'Scott Chacon') # sets value
44
- #g.config('user.email', 'email@email.com') # sets value
45
- #g.config('user.name') # returns 'Scott Chacon'
46
- #g.config # returns whole config hash
47
- def config(name = nil, value = nil)
48
- lib = Git::Lib.new
49
- if(name && value)
50
- # set value
51
- lib.config_set(name, value)
52
- elsif (name)
53
- # return value
54
- lib.config_get(name)
55
- else
56
- # return hash
57
- lib.config_list
58
- end
59
- end
60
-
61
- def self.configure
62
- yield Base.config
63
- end
64
-
65
- def self.config
66
- return Base.config
67
- end
68
-
69
- def global_config(name = nil, value = nil)
70
- self.class.global_config(name, value)
71
- end
72
-
73
- # Open a bare repository
74
- #
75
- # Opens a bare repository located in the `git_dir` directory.
76
- # Since there is no working copy, you can not checkout or commit
77
- # but you can do most read operations.
78
- #
79
- # @see https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbarerepositoryabarerepository
80
- # What is a bare repository?
81
- #
82
- # @example Open a bare repository and retrieve the first commit SHA
83
- # repository = Git.bare('ruby-git.git')
84
- # puts repository.log[0].sha #=> "64c6fa011d3287bab9158049c85f3e85718854a0"
85
- #
86
- # @param [Pathname] git_dir The path to the bare repository directory
87
- # containing an initialized Git repository. If a relative path is given, it
88
- # is converted to an absolute path using
89
- # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
90
- #
91
- # @param [Hash] options The options for this command (see list of valid
92
- # options below)
93
- #
94
- # @option options [Logger] :log A logger to use for Git operations. Git commands
95
- # are logged at the `:info` level. Additional logging is done at the `:debug`
96
- # level.
97
- #
98
- # @return [Git::Base] an object that can execute git commands in the context
99
- # of the bare repository.
100
- #
101
- def self.bare(git_dir, options = {})
102
- Base.bare(git_dir, options)
103
- end
104
-
105
- # Clone a repository into an empty or newly created directory
106
- #
107
- # @see https://git-scm.com/docs/git-clone git clone
108
- # @see https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a GIT URLs
109
- #
110
- # @param repository_url [URI, Pathname] The (possibly remote) repository url to clone
111
- # from. See [GIT URLS](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a)
112
- # for more information.
113
- #
114
- # @param directory [Pathname, nil] The directory to clone into
115
- #
116
- # If `directory` is a relative directory it is relative to the `path` option if
117
- # given. If `path` is not given, `directory` is relative to the current working
118
- # directory.
119
- #
120
- # If `nil`, `directory` will be set to the basename of the last component of
121
- # the path from the `repository_url`. For example, for the URL:
122
- # `https://github.com/org/repo.git`, `directory` will be set to `repo`.
123
- #
124
- # If the last component of the path is `.git`, the next-to-last component of
125
- # the path is used. For example, for the URL `/Users/me/foo/.git`, `directory`
126
- # will be set to `foo`.
127
- #
128
- # @param [Hash] options The options for this command (see list of valid
129
- # options below)
130
- #
131
- # @option options [Boolean] :bare Make a bare Git repository. See
132
- # [what is a bare repository?](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbarerepositoryabarerepository).
133
- #
134
- # @option options [String] :branch The name of a branch or tag to checkout
135
- # instead of the default branch.
136
- #
137
- # @option options [Integer] :depth Create a shallow clone with a history
138
- # truncated to the specified number of commits.
139
- #
140
- # @option options [Logger] :log A logger to use for Git operations. Git
141
- # commands are logged at the `:info` level. Additional logging is done
142
- # at the `:debug` level.
143
- #
144
- # @option options [Boolean] :mirror Set up a mirror of the source repository.
145
- #
146
- # @option options [String] :origin Use the value instead `origin` to track
147
- # the upstream repository.
148
- #
149
- # @option options [Pathname] :path The directory to clone into. May be used
150
- # as an alternative to the `directory` parameter. If specified, the
151
- # `path` option is used instead of the `directory` parameter.
152
- #
153
- # @option options [Boolean] :recursive After the clone is created, initialize
154
- # all submodules within, using their default settings.
155
- #
156
- # @example Clone into the default directory `ruby-git`
157
- # git = Git.clone('https://github.com/ruby-git/ruby-git.git')
158
- #
159
- # @example Clone and then checkout the `development` branch
160
- # git = Git.clone('https://github.com/ruby-git/ruby-git.git', branch: 'development')
161
- #
162
- # @example Clone into a different directory `my-ruby-git`
163
- # git = Git.clone('https://github.com/ruby-git/ruby-git.git', 'my-ruby-git')
164
- # # or:
165
- # git = Git.clone('https://github.com/ruby-git/ruby-git.git', path: 'my-ruby-git')
166
- #
167
- # @example Create a bare repository in the directory `ruby-git.git`
168
- # git = Git.clone('https://github.com/ruby-git/ruby-git.git', bare: true)
169
- #
170
- # @return [Git::Base] an object that can execute git commands in the context
171
- # of the cloned local working copy or cloned repository.
172
- #
173
- def self.clone(repository_url, directory = nil, options = {})
174
- clone_to_options = options.select { |key, _value| %i[bare mirror].include?(key) }
175
- directory ||= Git::URL.clone_to(repository_url, **clone_to_options)
176
- Base.clone(repository_url, directory, options)
177
- end
178
-
179
- # Export the current HEAD (or a branch, if <tt>options[:branch]</tt>
180
- # is specified) into the +name+ directory, then remove all traces of git from the
181
- # directory.
182
- #
183
- # See +clone+ for options. Does not obey the <tt>:remote</tt> option,
184
- # since the .git info will be deleted anyway; always uses the default
185
- # remote, 'origin.'
186
- def self.export(repository, name, options = {})
187
- options.delete(:remote)
188
- repo = clone(repository, name, {:depth => 1}.merge(options))
189
- repo.checkout("origin/#{options[:branch]}") if options[:branch]
190
- Dir.chdir(repo.dir.to_s) { FileUtils.rm_r '.git' }
191
- end
192
-
193
- # Same as g.config, but forces it to be at the global level
194
- #
195
- #g.config('user.name', 'Scott Chacon') # sets value
196
- #g.config('user.email', 'email@email.com') # sets value
197
- #g.config('user.name') # returns 'Scott Chacon'
198
- #g.config # returns whole config hash
199
- def self.global_config(name = nil, value = nil)
200
- lib = Git::Lib.new(nil, nil)
201
- if(name && value)
202
- # set value
203
- lib.global_config_set(name, value)
204
- elsif (name)
205
- # return value
206
- lib.global_config_get(name)
207
- else
208
- # return hash
209
- lib.global_config_list
210
- end
211
- end
212
-
213
- # Create an empty Git repository or reinitialize an existing Git repository
214
- #
215
- # @param [Pathname] directory If the `:bare` option is NOT given or is not
216
- # `true`, the repository will be created in `"#{directory}/.git"`.
217
- # Otherwise, the repository is created in `"#{directory}"`.
218
- #
219
- # All directories along the path to `directory` are created if they do not exist.
220
- #
221
- # A relative path is referenced from the current working directory of the process
222
- # and converted to an absolute path using
223
- # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
224
- #
225
- # @param [Hash] options The options for this command (see list of valid
226
- # options below)
227
- #
228
- # @option options [Boolean] :bare Instead of creating a repository at
229
- # `"#{directory}/.git"`, create a bare repository at `"#{directory}"`.
230
- # See [what is a bare repository?](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbarerepositoryabarerepository).
231
- #
232
- # @option options [String] :initial_branch Use the specified name for the
233
- # initial branch in the newly created repository.
234
- #
235
- # @option options [Pathname] :repository the path to put the newly initialized
236
- # Git repository. The default for non-bare repository is `"#{directory}/.git"`.
237
- #
238
- # A relative path is referenced from the current working directory of the process
239
- # and converted to an absolute path using
240
- # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
241
- #
242
- # @option options [Logger] :log A logger to use for Git operations. Git
243
- # commands are logged at the `:info` level. Additional logging is done
244
- # at the `:debug` level.
245
- #
246
- # @return [Git::Base] an object that can execute git commands in the context
247
- # of the newly initialized repository
248
- #
249
- # @example Initialize a repository in the current directory
250
- # git = Git.init
251
- #
252
- # @example Initialize a repository in some other directory
253
- # git = Git.init '~/code/ruby-git'
254
- #
255
- # @example Initialize a bare repository
256
- # git = Git.init '~/code/ruby-git.git', bare: true
257
- #
258
- # @example Initialize a repository in a non-default location (outside of the working copy)
259
- # git = Git.init '~/code/ruby-git', repository: '~/code/ruby-git.git'
260
- #
261
- # @see https://git-scm.com/docs/git-init git init
262
- #
263
- def self.init(directory = '.', options = {})
264
- Base.init(directory, options)
265
- end
266
-
267
- # returns a Hash containing information about the references
268
- # of the target repository
269
- #
270
- # options
271
- # :refs
272
- #
273
- # @param [String|NilClass] location the target repository location or nil for '.'
274
- # @return [{String=>Hash}] the available references of the target repo.
275
- def self.ls_remote(location = nil, options = {})
276
- Git::Lib.new.ls_remote(location, options)
277
- end
278
-
279
- # Open a an existing Git working directory
280
- #
281
- # Git.open will most likely be the most common way to create
282
- # a git reference, referring to an existing working directory.
283
- #
284
- # If not provided in the options, the library will assume
285
- # the repository and index are in the default places (`.git/`, `.git/index`).
286
- #
287
- # @example Open the Git working directory in the current directory
288
- # git = Git.open
289
- #
290
- # @example Open a Git working directory in some other directory
291
- # git = Git.open('~/Projects/ruby-git')
292
- #
293
- # @example Use a logger to see what is going on
294
- # logger = Logger.new(STDOUT)
295
- # git = Git.open('~/Projects/ruby-git', log: logger)
296
- #
297
- # @example Open a working copy whose repository is in a non-standard directory
298
- # git = Git.open('~/Projects/ruby-git', repository: '~/Project/ruby-git.git')
299
- #
300
- # @param [Pathname] working_dir the path to the working directory to use
301
- # for git commands.
302
- #
303
- # A relative path is referenced from the current working directory of the process
304
- # and converted to an absolute path using
305
- # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
306
- #
307
- # @param [Hash] options The options for this command (see list of valid
308
- # options below)
309
- #
310
- # @option options [Pathname] :repository used to specify a non-standard path to
311
- # the repository directory. The default is `"#{working_dir}/.git"`.
312
- #
313
- # @option options [Pathname] :index used to specify a non-standard path to an
314
- # index file. The default is `"#{working_dir}/.git/index"`
315
- #
316
- # @option options [Logger] :log A logger to use for Git operations. Git
317
- # commands are logged at the `:info` level. Additional logging is done
318
- # at the `:debug` level.
319
- #
320
- # @return [Git::Base] an object that can execute git commands in the context
321
- # of the opened working copy
322
- #
323
- def self.open(working_dir, options = {})
324
- Base.open(working_dir, options)
325
- end
326
- end