fluid_cli 0.1.8 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +200 -1
  3. data/exe/fluid +12 -17
  4. data/lib/fluid_cli/version.rb +1 -1
  5. data/lib/fluid_cli.rb +4 -57
  6. metadata +14 -274
  7. data/Rakefile +0 -26
  8. data/dev.yml +0 -5
  9. data/lib/fluid_cli/api.rb +0 -141
  10. data/lib/fluid_cli/assets/post_auth_page/index.html.erb +0 -34
  11. data/lib/fluid_cli/assets/post_auth_page/style.css +0 -58
  12. data/lib/fluid_cli/command.rb +0 -55
  13. data/lib/fluid_cli/commands/help.rb +0 -21
  14. data/lib/fluid_cli/commands/login.rb +0 -30
  15. data/lib/fluid_cli/commands/logout.rb +0 -38
  16. data/lib/fluid_cli/commands/switch.rb +0 -23
  17. data/lib/fluid_cli/commands/theme/common/company_helper.rb +0 -15
  18. data/lib/fluid_cli/commands/theme/common/root_helper.rb +0 -95
  19. data/lib/fluid_cli/commands/theme/dev.rb +0 -61
  20. data/lib/fluid_cli/commands/theme/help.rb +0 -21
  21. data/lib/fluid_cli/commands/theme/init.rb +0 -46
  22. data/lib/fluid_cli/commands/theme/pull.rb +0 -68
  23. data/lib/fluid_cli/commands/theme/push.rb +0 -132
  24. data/lib/fluid_cli/commands/theme.rb +0 -23
  25. data/lib/fluid_cli/commands/whoami.rb +0 -23
  26. data/lib/fluid_cli/commands.rb +0 -19
  27. data/lib/fluid_cli/company_switcher.rb +0 -69
  28. data/lib/fluid_cli/context.rb +0 -691
  29. data/lib/fluid_cli/db.rb +0 -114
  30. data/lib/fluid_cli/entry_point.rb +0 -10
  31. data/lib/fluid_cli/environment.rb +0 -32
  32. data/lib/fluid_cli/file_system_listener.rb +0 -29
  33. data/lib/fluid_cli/form.rb +0 -42
  34. data/lib/fluid_cli/git.rb +0 -319
  35. data/lib/fluid_cli/http_request.rb +0 -60
  36. data/lib/fluid_cli/identity_auth/servlet.rb +0 -39
  37. data/lib/fluid_cli/identity_auth.rb +0 -126
  38. data/lib/fluid_cli/options.rb +0 -38
  39. data/lib/fluid_cli/packager.rb +0 -36
  40. data/lib/fluid_cli/theme/dev_server/certificate_manager.rb +0 -79
  41. data/lib/fluid_cli/theme/dev_server/errors.rb +0 -9
  42. data/lib/fluid_cli/theme/dev_server/header_hash.rb +0 -98
  43. data/lib/fluid_cli/theme/dev_server/hooks/file_change_hook.rb +0 -39
  44. data/lib/fluid_cli/theme/dev_server/hot_reload/resources/hot-reload-no-script.html +0 -27
  45. data/lib/fluid_cli/theme/dev_server/hot_reload/resources/hot_reload.js +0 -28
  46. data/lib/fluid_cli/theme/dev_server/hot_reload/resources/sse_client.js +0 -43
  47. data/lib/fluid_cli/theme/dev_server/hot_reload/resources/theme.js +0 -16
  48. data/lib/fluid_cli/theme/dev_server/hot_reload/script_injector.rb +0 -54
  49. data/lib/fluid_cli/theme/dev_server/hot_reload.rb +0 -75
  50. data/lib/fluid_cli/theme/dev_server/local_assets.rb +0 -92
  51. data/lib/fluid_cli/theme/dev_server/proxy.rb +0 -235
  52. data/lib/fluid_cli/theme/dev_server/proxy_param_builder.rb +0 -82
  53. data/lib/fluid_cli/theme/dev_server/reload_mode.rb +0 -34
  54. data/lib/fluid_cli/theme/dev_server/sse.rb +0 -75
  55. data/lib/fluid_cli/theme/dev_server/watcher.rb +0 -57
  56. data/lib/fluid_cli/theme/dev_server/web_server.rb +0 -140
  57. data/lib/fluid_cli/theme/dev_server.rb +0 -293
  58. data/lib/fluid_cli/theme/development_theme.rb +0 -101
  59. data/lib/fluid_cli/theme/file.rb +0 -105
  60. data/lib/fluid_cli/theme/forms/select.rb +0 -33
  61. data/lib/fluid_cli/theme/mime_type.rb +0 -34
  62. data/lib/fluid_cli/theme/presenters/theme_presenter.rb +0 -49
  63. data/lib/fluid_cli/theme/presenters/themes_presenter.rb +0 -31
  64. data/lib/fluid_cli/theme/root.rb +0 -62
  65. data/lib/fluid_cli/theme/syncer/checksums.rb +0 -66
  66. data/lib/fluid_cli/theme/syncer/downloader.rb +0 -54
  67. data/lib/fluid_cli/theme/syncer/error_reporter.rb +0 -45
  68. data/lib/fluid_cli/theme/syncer/merger.rb +0 -53
  69. data/lib/fluid_cli/theme/syncer/operation.rb +0 -58
  70. data/lib/fluid_cli/theme/syncer/standard_reporter.rb +0 -32
  71. data/lib/fluid_cli/theme/syncer/unsupported_script_warning.rb +0 -90
  72. data/lib/fluid_cli/theme/syncer/uploader/forms/apply_to_all.rb +0 -41
  73. data/lib/fluid_cli/theme/syncer/uploader/forms/apply_to_all_form.rb +0 -37
  74. data/lib/fluid_cli/theme/syncer/uploader/forms/base_strategy_form.rb +0 -64
  75. data/lib/fluid_cli/theme/syncer/uploader/forms/select_delete_strategy.rb +0 -29
  76. data/lib/fluid_cli/theme/syncer/uploader/forms/select_update_strategy.rb +0 -30
  77. data/lib/fluid_cli/theme/syncer/uploader/json_delete_handler.rb +0 -49
  78. data/lib/fluid_cli/theme/syncer/uploader/json_update_handler.rb +0 -71
  79. data/lib/fluid_cli/theme/syncer/uploader.rb +0 -105
  80. data/lib/fluid_cli/theme/syncer.rb +0 -492
  81. data/lib/fluid_cli/theme/theme.rb +0 -186
  82. data/lib/fluid_cli/theme/ui/sync_progress_bar.rb +0 -22
  83. data/lib/fluid_cli/thread_pool/job.rb +0 -35
  84. data/lib/fluid_cli/thread_pool.rb +0 -49
  85. data/packaging/homebrew/fluid_cli.base.rb +0 -103
  86. data/vendor/deps/base64/.document +0 -5
  87. data/vendor/deps/base64/.gitignore +0 -9
  88. data/vendor/deps/base64/BSDL +0 -22
  89. data/vendor/deps/base64/COPYING +0 -56
  90. data/vendor/deps/base64/Gemfile +0 -9
  91. data/vendor/deps/base64/LEGAL +0 -60
  92. data/vendor/deps/base64/README.md +0 -48
  93. data/vendor/deps/base64/Rakefile +0 -31
  94. data/vendor/deps/base64/base64.gemspec +0 -28
  95. data/vendor/deps/base64/bin/console +0 -14
  96. data/vendor/deps/base64/bin/setup +0 -8
  97. data/vendor/deps/base64/lib/base64.rb +0 -382
  98. data/vendor/deps/base64/sig/base64.rbs +0 -358
  99. data/vendor/deps/base64/test/base64/test_base64.rb +0 -115
  100. data/vendor/deps/base64/test_sig/test_base64.rb +0 -44
  101. data/vendor/deps/cli-kit/REVISION +0 -1
  102. data/vendor/deps/cli-kit/lib/cli/kit/args/definition.rb +0 -286
  103. data/vendor/deps/cli-kit/lib/cli/kit/args/evaluation.rb +0 -215
  104. data/vendor/deps/cli-kit/lib/cli/kit/args/parser/node.rb +0 -128
  105. data/vendor/deps/cli-kit/lib/cli/kit/args/parser.rb +0 -125
  106. data/vendor/deps/cli-kit/lib/cli/kit/args/tokenizer.rb +0 -130
  107. data/vendor/deps/cli-kit/lib/cli/kit/args.rb +0 -16
  108. data/vendor/deps/cli-kit/lib/cli/kit/base_command.rb +0 -30
  109. data/vendor/deps/cli-kit/lib/cli/kit/command_help.rb +0 -268
  110. data/vendor/deps/cli-kit/lib/cli/kit/command_registry.rb +0 -150
  111. data/vendor/deps/cli-kit/lib/cli/kit/config.rb +0 -137
  112. data/vendor/deps/cli-kit/lib/cli/kit/core_ext.rb +0 -28
  113. data/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +0 -166
  114. data/vendor/deps/cli-kit/lib/cli/kit/executor.rb +0 -92
  115. data/vendor/deps/cli-kit/lib/cli/kit/ini.rb +0 -91
  116. data/vendor/deps/cli-kit/lib/cli/kit/levenshtein.rb +0 -92
  117. data/vendor/deps/cli-kit/lib/cli/kit/logger.rb +0 -94
  118. data/vendor/deps/cli-kit/lib/cli/kit/opts.rb +0 -248
  119. data/vendor/deps/cli-kit/lib/cli/kit/parse_args.rb +0 -55
  120. data/vendor/deps/cli-kit/lib/cli/kit/resolver.rb +0 -66
  121. data/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +0 -260
  122. data/vendor/deps/cli-kit/lib/cli/kit/support.rb +0 -11
  123. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +0 -290
  124. data/vendor/deps/cli-kit/lib/cli/kit/util.rb +0 -118
  125. data/vendor/deps/cli-kit/lib/cli/kit/version.rb +0 -7
  126. data/vendor/deps/cli-kit/lib/cli/kit.rb +0 -139
  127. data/vendor/deps/cli-ui/REVISION +0 -1
  128. data/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +0 -218
  129. data/vendor/deps/cli-ui/lib/cli/ui/color.rb +0 -101
  130. data/vendor/deps/cli-ui/lib/cli/ui/formatter.rb +0 -219
  131. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +0 -67
  132. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +0 -179
  133. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +0 -152
  134. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +0 -127
  135. data/vendor/deps/cli-ui/lib/cli/ui/frame.rb +0 -286
  136. data/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +0 -92
  137. data/vendor/deps/cli-ui/lib/cli/ui/os.rb +0 -63
  138. data/vendor/deps/cli-ui/lib/cli/ui/printer.rb +0 -64
  139. data/vendor/deps/cli-ui/lib/cli/ui/progress.rb +0 -132
  140. data/vendor/deps/cli-ui/lib/cli/ui/progress_reporter.rb +0 -209
  141. data/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +0 -583
  142. data/vendor/deps/cli-ui/lib/cli/ui/prompt/options_handler.rb +0 -36
  143. data/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +0 -381
  144. data/vendor/deps/cli-ui/lib/cli/ui/spinner/async.rb +0 -48
  145. data/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +0 -602
  146. data/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +0 -79
  147. data/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb +0 -399
  148. data/vendor/deps/cli-ui/lib/cli/ui/table.rb +0 -83
  149. data/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +0 -55
  150. data/vendor/deps/cli-ui/lib/cli/ui/truncater.rb +0 -106
  151. data/vendor/deps/cli-ui/lib/cli/ui/version.rb +0 -8
  152. data/vendor/deps/cli-ui/lib/cli/ui/widgets/base.rb +0 -46
  153. data/vendor/deps/cli-ui/lib/cli/ui/widgets/status.rb +0 -79
  154. data/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +0 -89
  155. data/vendor/deps/cli-ui/lib/cli/ui/work_queue.rb +0 -142
  156. data/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +0 -61
  157. data/vendor/deps/cli-ui/lib/cli/ui.rb +0 -359
  158. data/vendor/deps/cli-ui/vendor/reentrant_mutex.rb +0 -78
  159. data/vendor/deps/webrick/.gitignore +0 -9
  160. data/vendor/deps/webrick/Gemfile +0 -3
  161. data/vendor/deps/webrick/LICENSE.txt +0 -22
  162. data/vendor/deps/webrick/README.md +0 -61
  163. data/vendor/deps/webrick/Rakefile +0 -10
  164. data/vendor/deps/webrick/lib/webrick/accesslog.rb +0 -157
  165. data/vendor/deps/webrick/lib/webrick/cgi.rb +0 -313
  166. data/vendor/deps/webrick/lib/webrick/compat.rb +0 -36
  167. data/vendor/deps/webrick/lib/webrick/config.rb +0 -158
  168. data/vendor/deps/webrick/lib/webrick/cookie.rb +0 -172
  169. data/vendor/deps/webrick/lib/webrick/htmlutils.rb +0 -30
  170. data/vendor/deps/webrick/lib/webrick/httpauth/authenticator.rb +0 -117
  171. data/vendor/deps/webrick/lib/webrick/httpauth/basicauth.rb +0 -116
  172. data/vendor/deps/webrick/lib/webrick/httpauth/digestauth.rb +0 -395
  173. data/vendor/deps/webrick/lib/webrick/httpauth/htdigest.rb +0 -132
  174. data/vendor/deps/webrick/lib/webrick/httpauth/htgroup.rb +0 -97
  175. data/vendor/deps/webrick/lib/webrick/httpauth/htpasswd.rb +0 -158
  176. data/vendor/deps/webrick/lib/webrick/httpauth/userdb.rb +0 -53
  177. data/vendor/deps/webrick/lib/webrick/httpauth.rb +0 -96
  178. data/vendor/deps/webrick/lib/webrick/httpproxy.rb +0 -354
  179. data/vendor/deps/webrick/lib/webrick/httprequest.rb +0 -636
  180. data/vendor/deps/webrick/lib/webrick/httpresponse.rb +0 -564
  181. data/vendor/deps/webrick/lib/webrick/https.rb +0 -152
  182. data/vendor/deps/webrick/lib/webrick/httpserver.rb +0 -294
  183. data/vendor/deps/webrick/lib/webrick/httpservlet/abstract.rb +0 -152
  184. data/vendor/deps/webrick/lib/webrick/httpservlet/cgi_runner.rb +0 -47
  185. data/vendor/deps/webrick/lib/webrick/httpservlet/cgihandler.rb +0 -126
  186. data/vendor/deps/webrick/lib/webrick/httpservlet/erbhandler.rb +0 -88
  187. data/vendor/deps/webrick/lib/webrick/httpservlet/filehandler.rb +0 -552
  188. data/vendor/deps/webrick/lib/webrick/httpservlet/prochandler.rb +0 -47
  189. data/vendor/deps/webrick/lib/webrick/httpservlet.rb +0 -23
  190. data/vendor/deps/webrick/lib/webrick/httpstatus.rb +0 -194
  191. data/vendor/deps/webrick/lib/webrick/httputils.rb +0 -512
  192. data/vendor/deps/webrick/lib/webrick/httpversion.rb +0 -76
  193. data/vendor/deps/webrick/lib/webrick/log.rb +0 -156
  194. data/vendor/deps/webrick/lib/webrick/server.rb +0 -381
  195. data/vendor/deps/webrick/lib/webrick/ssl.rb +0 -215
  196. data/vendor/deps/webrick/lib/webrick/utils.rb +0 -265
  197. data/vendor/deps/webrick/lib/webrick/version.rb +0 -18
  198. data/vendor/deps/webrick/lib/webrick.rb +0 -232
  199. data/vendor/deps/webrick/webrick.gemspec +0 -74
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module FluidCLI
4
- class ThreadPool
5
- class Job
6
- attr_reader :error, :interval
7
-
8
- def initialize(interval = 0)
9
- @interval = interval
10
- end
11
-
12
- def perform!
13
- raise "`#{self.class.name}#perform!' must be defined"
14
- end
15
-
16
- def call
17
- perform!
18
- rescue StandardError => error
19
- @error = error
20
- end
21
-
22
- def success?
23
- !@error
24
- end
25
-
26
- def error?
27
- !!@error
28
- end
29
-
30
- def recurring?
31
- !interval.zero?
32
- end
33
- end
34
- end
35
- end
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module FluidCLI
4
- class ThreadPool
5
- attr_reader :errors
6
-
7
- def initialize(pool_size: 10)
8
- @jobs = Queue.new
9
- @pool = Array.new(pool_size) { spawn_thread }
10
- end
11
-
12
- def schedule(job)
13
- @jobs << job
14
- end
15
-
16
- def shutdown
17
- @pool.size.times do
18
- schedule(-> { throw(:stop_thread) })
19
- end
20
- @pool.map(&:join)
21
- ensure
22
- @jobs.close
23
- end
24
-
25
- private
26
-
27
- def spawn_thread
28
- Thread.new do
29
- catch(:stop_thread) do
30
- loop { perform(@jobs.pop) }
31
- end
32
- end
33
- end
34
-
35
- def perform(job)
36
- job.call
37
- reschedule(job) if job.recurring?
38
- end
39
-
40
- def reschedule(job)
41
- wait(job.interval)
42
- schedule(job)
43
- end
44
-
45
- def wait(seconds)
46
- sleep(seconds)
47
- end
48
- end
49
- end
@@ -1,103 +0,0 @@
1
- # typed: strict
2
- # frozen_string_literal: true
3
-
4
- # formula generated from gem 'fluid_cli'
5
- class FluidCli < Formula
6
- # Module to get Ruby binary path from Homebrew Ruby formula
7
- module RubyBin
8
- def ruby_bin
9
- Formula["ruby"].opt_bin
10
- end
11
- end
12
-
13
- # Custom download strategy to fetch gem from RubyGems
14
- class RubyGemsDownloadStrategy < AbstractDownloadStrategy
15
- include RubyBin
16
-
17
- def fetch(_timeout: nil, **_options)
18
- ohai("Fetching fluid-cli from gem source")
19
- cache.cd do
20
- ENV["GEM_SPEC_CACHE"] = "#{cache}/gem_spec_cache"
21
-
22
- _, err, status = Open3.capture3("gem", "fetch", "fluid_cli", "--version", gem_version)
23
- odie err unless status.success?
24
- end
25
- end
26
-
27
- def cached_location
28
- Pathname.new("#{cache}/fluid_cli-#{gem_version}.gem")
29
- end
30
-
31
- def cache
32
- @cache ||= HOMEBREW_CACHE
33
- end
34
-
35
- def gem_version
36
- @version ||= @resource&.version if defined?(@resource)
37
- raise "Unable to determine version; did Homebrew change?" unless @version
38
-
39
- @version
40
- end
41
-
42
- def clear_cache
43
- cached_location.unlink if cached_location.exist?
44
- end
45
- end
46
-
47
- include RubyBin
48
-
49
- desc "Fluid CLI tool"
50
- homepage "https://fluid.app"
51
- url "fluid_cli", using: RubyGemsDownloadStrategy
52
- version "FLUID_CLI_VERSION"
53
- sha256 "FLUID_CLI_GEM_CHECKSUM"
54
- depends_on "ruby"
55
-
56
- def install
57
- # set GEM_HOME and GEM_PATH to make sure we package all the dependent gems
58
- # together without accidently picking up other gems on the gem path since
59
- # they might not be there if, say, we change to a different rvm gemset
60
- ENV["GEM_HOME"] = prefix.to_s
61
- ENV["GEM_PATH"] = prefix.to_s
62
-
63
- # Use /usr/local/bin at the front of the path instead of Homebrew shims,
64
- # which mess with Ruby's own compiler config when building native extensions
65
- ENV["PATH"] = ENV["PATH"].sub(HOMEBREW_SHIMS_PATH.to_s, "/usr/local/bin") if defined?(HOMEBREW_SHIMS_PATH)
66
-
67
- system(
68
- "gem",
69
- "install",
70
- cached_download,
71
- "--no-document",
72
- "--no-wrapper",
73
- "--no-user-install",
74
- "--install-dir", prefix,
75
- "--bindir", bin,
76
- "--",
77
- "--skip-cli-build"
78
- )
79
-
80
- raise "gem install 'fluid_cli' failed with status #{$CHILD_STATUS.exitstatus}" unless $CHILD_STATUS.success?
81
-
82
- rm_r(bin) if bin.exist?
83
- bin.mkpath
84
-
85
- brew_gem_prefix = "#{prefix}/gems/fluid_cli-#{version}"
86
-
87
- ruby_libs = Dir.glob("#{prefix}/gems/*/lib")
88
- exe = "fluid"
89
- file = Pathname.new("#{brew_gem_prefix}/exe/#{exe}")
90
- (bin + file.basename.to_s).open("w") do |f|
91
- f << <<~RUBY
92
- #!#{ruby_bin}/ruby -rjson --disable-gems
93
- ENV['ORIGINAL_ENV']=ENV.to_h.to_json
94
- ENV['GEM_HOME']="#{prefix}"
95
- ENV['GEM_PATH']="#{prefix}"
96
- ENV['RUBY_BINDIR']="#{ruby_bin}/"
97
- require 'rubygems'
98
- $:.unshift(#{ruby_libs.map(&:inspect).join(",")})
99
- load "#{file}"
100
- RUBY
101
- end
102
- end
103
- end
@@ -1,5 +0,0 @@
1
- BSDL
2
- COPYING
3
- LEGAL
4
- lib/base64.rb
5
- README.md
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- Gemfile.lock
@@ -1,22 +0,0 @@
1
- Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2
-
3
- Redistribution and use in source and binary forms, with or without
4
- modification, are permitted provided that the following conditions
5
- are met:
6
- 1. Redistributions of source code must retain the above copyright
7
- notice, this list of conditions and the following disclaimer.
8
- 2. Redistributions in binary form must reproduce the above copyright
9
- notice, this list of conditions and the following disclaimer in the
10
- documentation and/or other materials provided with the distribution.
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22
- SUCH DAMAGE.
@@ -1,56 +0,0 @@
1
- Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
- You can redistribute it and/or modify it under either the terms of the
3
- 2-clause BSDL (see the file BSDL), or the conditions below:
4
-
5
- 1. You may make and give away verbatim copies of the source form of the
6
- software without restriction, provided that you duplicate all of the
7
- original copyright notices and associated disclaimers.
8
-
9
- 2. You may modify your copy of the software in any way, provided that
10
- you do at least ONE of the following:
11
-
12
- a. place your modifications in the Public Domain or otherwise
13
- make them Freely Available, such as by posting said
14
- modifications to Usenet or an equivalent medium, or by allowing
15
- the author to include your modifications in the software.
16
-
17
- b. use the modified software only within your corporation or
18
- organization.
19
-
20
- c. give non-standard binaries non-standard names, with
21
- instructions on where to get the original software distribution.
22
-
23
- d. make other distribution arrangements with the author.
24
-
25
- 3. You may distribute the software in object code or binary form,
26
- provided that you do at least ONE of the following:
27
-
28
- a. distribute the binaries and library files of the software,
29
- together with instructions (in the manual page or equivalent)
30
- on where to get the original distribution.
31
-
32
- b. accompany the distribution with the machine-readable source of
33
- the software.
34
-
35
- c. give non-standard binaries non-standard names, with
36
- instructions on where to get the original software distribution.
37
-
38
- d. make other distribution arrangements with the author.
39
-
40
- 4. You may modify and include the part of the software into any other
41
- software (possibly commercial). But some files in the distribution
42
- are not written by the author, so that they are not under these terms.
43
-
44
- For the list of those files and their copying conditions, see the
45
- file LEGAL.
46
-
47
- 5. The scripts and library files supplied as input to or produced as
48
- output from the software do not automatically fall under the
49
- copyright of the software, but belong to whomever generated them,
50
- and may be sold commercially, and may be aggregated with this
51
- software.
52
-
53
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
- PURPOSE.
@@ -1,9 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "rake"
4
- gem "test-unit"
5
-
6
- group :sig do
7
- gem "rbs"
8
- gem "rdoc", "<= 6.11"
9
- end
@@ -1,60 +0,0 @@
1
- # -*- rdoc -*-
2
-
3
- = LEGAL NOTICE INFORMATION
4
- --------------------------
5
-
6
- All the files in this distribution are covered under either the Ruby's
7
- license (see the file COPYING) or public-domain except some files
8
- mentioned below.
9
-
10
- == MIT License
11
- >>>
12
- Permission is hereby granted, free of charge, to any person obtaining
13
- a copy of this software and associated documentation files (the
14
- "Software"), to deal in the Software without restriction, including
15
- without limitation the rights to use, copy, modify, merge, publish,
16
- distribute, sublicense, and/or sell copies of the Software, and to
17
- permit persons to whom the Software is furnished to do so, subject to
18
- the following conditions:
19
-
20
- The above copyright notice and this permission notice shall be
21
- included in all copies or substantial portions of the Software.
22
-
23
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
-
31
- == Old-style BSD license
32
- >>>
33
- Redistribution and use in source and binary forms, with or without
34
- modification, are permitted provided that the following conditions
35
- are met:
36
- 1. Redistributions of source code must retain the above copyright
37
- notice, this list of conditions and the following disclaimer.
38
- 2. Redistributions in binary form must reproduce the above copyright
39
- notice, this list of conditions and the following disclaimer in the
40
- documentation and/or other materials provided with the distribution.
41
- 3. Neither the name of the University nor the names of its contributors
42
- may be used to endorse or promote products derived from this software
43
- without specific prior written permission.
44
-
45
- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
46
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48
- ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
49
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55
- SUCH DAMAGE.
56
-
57
- IMPORTANT NOTE::
58
-
59
- From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
60
- paragraph 3 above is now null and void.
@@ -1,48 +0,0 @@
1
- # Base64
2
-
3
- The Base64 module provides for the encoding (`#encode64`, `#strict_encode64`,
4
- `#urlsafe_encode64`) and decoding (`#decode64`, `#strict_decode64`,
5
- `#urlsafe_decode64`) of binary data using a Base64 representation.
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'base64'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle install
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install base64
22
-
23
- ## Usage
24
-
25
- A simple encoding and decoding.
26
-
27
- ```ruby
28
- require "base64"
29
-
30
- enc = Base64.encode64('Send reinforcements')
31
- # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n"
32
- plain = Base64.decode64(enc)
33
- # -> "Send reinforcements"
34
- ```
35
-
36
- The purpose of using base64 to encode data is that it translates any
37
- binary data into purely printable characters.
38
-
39
- ## Development
40
-
41
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
42
-
43
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
-
45
- ## Contributing
46
-
47
- Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/base64.
48
-
@@ -1,31 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/test_*.rb"]
8
- end
9
-
10
- namespace :rbs do
11
- task :test do
12
- sh "ruby -I lib test_sig/test_base64.rb"
13
- end
14
-
15
- task :annotate do
16
- require "tmpdir"
17
- require "pathname"
18
-
19
- Dir.mktmpdir do |tmpdir|
20
- system("rdoc --ri --output #{tmpdir}/doc --root=. lib")
21
- system("rbs annotate --no-system --no-gems --no-site --no-home -d #{tmpdir}/doc sig")
22
- end
23
- end
24
-
25
- task :confirm do
26
- puts "Testing if RBS docs are updated with respect to RDoc"
27
- sh "git diff --exit-code sig/"
28
- end
29
- end
30
-
31
- task :default => :test
@@ -1,28 +0,0 @@
1
- name = File.basename(__FILE__, ".gemspec")
2
- version = ["lib", Array.new(name.count("-")+1).join("/")].find do |dir|
3
- break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
4
- /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
5
- end rescue nil
6
- end
7
-
8
- Gem::Specification.new do |spec|
9
- spec.name = name
10
- spec.version = version
11
- spec.authors = ["Yusuke Endoh"]
12
- spec.email = ["mame@ruby-lang.org"]
13
-
14
- spec.summary = %q{Support for encoding and decoding binary data using a Base64 representation.}
15
- spec.description = %q{Support for encoding and decoding binary data using a Base64 representation.}
16
- spec.homepage = "https://github.com/ruby/base64"
17
- spec.required_ruby_version = Gem::Requirement.new(">= 2.4")
18
- spec.licenses = ["Ruby", "BSD-2-Clause"]
19
-
20
- spec.metadata["homepage_uri"] = spec.homepage
21
- spec.metadata["source_code_uri"] = spec.homepage
22
- spec.metadata["changelog_uri"] = spec.homepage + "/releases"
23
-
24
- spec.files = ["README.md", "BSDL", "COPYING", "LEGAL", "lib/base64.rb", "sig/base64.rbs"]
25
- spec.bindir = "exe"
26
- spec.executables = []
27
- spec.require_paths = ["lib"]
28
- end
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "base64"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here