rfix 1.4.1 → 2.0.0
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.
- checksums.yaml +4 -4
- data/exe/rfix +78 -34
- data/lib/rfix.rb +17 -28
- data/lib/rfix/branch.rb +3 -25
- data/lib/rfix/branch/base.rb +27 -0
- data/lib/rfix/branch/head.rb +15 -0
- data/lib/rfix/branch/main.rb +33 -0
- data/lib/rfix/branch/name.rb +21 -0
- data/lib/rfix/branch/reference.rb +15 -0
- data/lib/rfix/branch/upstream.rb +17 -0
- data/lib/rfix/cli/command.rb +19 -0
- data/lib/rfix/cli/command/base.rb +61 -0
- data/lib/rfix/cli/command/branch.rb +13 -0
- data/lib/rfix/cli/command/config.rb +22 -0
- data/lib/rfix/cli/command/extension.rb +25 -0
- data/lib/rfix/cli/command/help.rb +11 -0
- data/lib/rfix/cli/command/info.rb +11 -0
- data/lib/rfix/cli/command/lint.rb +17 -0
- data/lib/rfix/cli/command/local.rb +11 -0
- data/lib/rfix/cli/command/origin.rb +11 -0
- data/lib/rfix/cli/command/setup.rb +11 -0
- data/lib/rfix/error.rb +5 -1
- data/lib/rfix/extension/offense.rb +79 -0
- data/lib/rfix/extension/pastel.rb +11 -0
- data/lib/rfix/extension/string.rb +12 -0
- data/lib/rfix/extension/strings.rb +9 -0
- data/lib/rfix/file.rb +6 -41
- data/lib/rfix/file/base.rb +73 -0
- data/lib/rfix/file/deleted.rb +17 -0
- data/lib/rfix/file/ignored.rb +17 -0
- data/lib/rfix/file/tracked.rb +42 -0
- data/lib/rfix/file/untracked.rb +20 -0
- data/lib/rfix/formatter.rb +125 -86
- data/lib/rfix/highlighter.rb +118 -0
- data/lib/rfix/indicator.rb +19 -0
- data/lib/rfix/log.rb +12 -121
- data/lib/rfix/rake/gemfile.rb +111 -0
- data/lib/rfix/rake/paths.rb +25 -23
- data/lib/rfix/rake/support.rb +72 -57
- data/lib/rfix/repository.rb +114 -164
- data/lib/rfix/types.rb +52 -0
- data/lib/rfix/version.rb +1 -1
- data/rfix.gemspec +28 -38
- data/vendor/dry-cli/CHANGELOG.md +191 -0
- data/vendor/dry-cli/CODEOWNERS +1 -0
- data/vendor/dry-cli/CODE_OF_CONDUCT.md +13 -0
- data/vendor/dry-cli/CONTRIBUTING.md +29 -0
- data/vendor/dry-cli/Gemfile +14 -0
- data/vendor/dry-cli/Gemfile.devtools +18 -0
- data/vendor/dry-cli/LICENSE +20 -0
- data/vendor/dry-cli/README.md +29 -0
- data/vendor/dry-cli/Rakefile +13 -0
- data/vendor/dry-cli/bin/console +15 -0
- data/vendor/dry-cli/bin/setup +8 -0
- data/vendor/dry-cli/changelog.yml +97 -0
- data/vendor/dry-cli/docsite/source/arguments.html.md +57 -0
- data/vendor/dry-cli/docsite/source/callbacks.html.md +51 -0
- data/vendor/dry-cli/docsite/source/commands-with-subcommands-and-params.md +86 -0
- data/vendor/dry-cli/docsite/source/commands.html.md +41 -0
- data/vendor/dry-cli/docsite/source/index.html.md +302 -0
- data/vendor/dry-cli/docsite/source/options.html.md +51 -0
- data/vendor/dry-cli/docsite/source/subcommands.html.md +38 -0
- data/vendor/dry-cli/docsite/source/variadic-arguments.html.md +45 -0
- data/vendor/dry-cli/dry-cli.gemspec +36 -0
- data/vendor/dry-cli/lib/dry/cli.rb +224 -0
- data/vendor/dry-cli/lib/dry/cli/banner.rb +135 -0
- data/vendor/dry-cli/lib/dry/cli/command.rb +387 -0
- data/vendor/dry-cli/lib/dry/cli/command_registry.rb +253 -0
- data/vendor/dry-cli/lib/dry/cli/errors.rb +37 -0
- data/vendor/dry-cli/lib/dry/cli/inflector.rb +17 -0
- data/vendor/dry-cli/lib/dry/cli/inline.rb +75 -0
- data/vendor/dry-cli/lib/dry/cli/option.rb +131 -0
- data/vendor/dry-cli/lib/dry/cli/parser.rb +138 -0
- data/vendor/dry-cli/lib/dry/cli/program_name.rb +21 -0
- data/vendor/dry-cli/lib/dry/cli/registry.rb +338 -0
- data/vendor/dry-cli/lib/dry/cli/usage.rb +94 -0
- data/vendor/dry-cli/lib/dry/cli/version.rb +8 -0
- data/vendor/dry-cli/project.yml +13 -0
- data/vendor/dry-cli/spec/integration/commands_spec.rb +14 -0
- data/vendor/dry-cli/spec/integration/inherited_commands_spec.rb +24 -0
- data/vendor/dry-cli/spec/integration/inline_spec.rb +43 -0
- data/vendor/dry-cli/spec/integration/processes_errors_spec.rb +29 -0
- data/vendor/dry-cli/spec/integration/rendering_spec.rb +31 -0
- data/vendor/dry-cli/spec/integration/single_command_spec.rb +81 -0
- data/vendor/dry-cli/spec/integration/subcommands_spec.rb +60 -0
- data/vendor/dry-cli/spec/integration/third_party_gems_spec.rb +18 -0
- data/vendor/dry-cli/spec/spec_helper.rb +15 -0
- data/vendor/dry-cli/spec/support/coverage.rb +15 -0
- data/vendor/dry-cli/spec/support/files.rb +13 -0
- data/vendor/dry-cli/spec/support/fixtures/based +65 -0
- data/vendor/dry-cli/spec/support/fixtures/baz +9 -0
- data/vendor/dry-cli/spec/support/fixtures/baz_command.rb +19 -0
- data/vendor/dry-cli/spec/support/fixtures/foo +588 -0
- data/vendor/dry-cli/spec/support/fixtures/infinites +31 -0
- data/vendor/dry-cli/spec/support/fixtures/inline +20 -0
- data/vendor/dry-cli/spec/support/fixtures/registry.rb +15 -0
- data/vendor/dry-cli/spec/support/fixtures/shared_commands.rb +596 -0
- data/vendor/dry-cli/spec/support/fixtures/with_block.rb +86 -0
- data/vendor/dry-cli/spec/support/fixtures/with_registry.rb +90 -0
- data/vendor/dry-cli/spec/support/fixtures/with_zero_arity_block.rb +87 -0
- data/vendor/dry-cli/spec/support/helpers.rb +37 -0
- data/vendor/dry-cli/spec/support/path.rb +24 -0
- data/vendor/dry-cli/spec/support/rspec.rb +26 -0
- data/vendor/dry-cli/spec/support/rspec_options.rb +16 -0
- data/vendor/dry-cli/spec/support/shared_examples/commands.rb +300 -0
- data/vendor/dry-cli/spec/support/shared_examples/inherited_commands.rb +197 -0
- data/vendor/dry-cli/spec/support/shared_examples/rendering.rb +181 -0
- data/vendor/dry-cli/spec/support/shared_examples/subcommands.rb +226 -0
- data/vendor/dry-cli/spec/support/shared_examples/third_party_gems.rb +49 -0
- data/vendor/dry-cli/spec/support/warnings.rb +10 -0
- data/vendor/dry-cli/spec/unit/dry/cli/cli_spec.rb +123 -0
- data/vendor/dry-cli/spec/unit/dry/cli/inflector_spec.rb +26 -0
- data/vendor/dry-cli/spec/unit/dry/cli/registry_spec.rb +78 -0
- data/vendor/dry-cli/spec/unit/dry/cli/version_spec.rb +7 -0
- data/vendor/strings-ansi/CHANGELOG.md +24 -0
- data/vendor/strings-ansi/CODE_OF_CONDUCT.md +74 -0
- data/vendor/strings-ansi/Gemfile +11 -0
- data/{LICENSE.txt → vendor/strings-ansi/LICENSE.txt} +1 -1
- data/vendor/strings-ansi/README.md +155 -0
- data/vendor/strings-ansi/Rakefile +8 -0
- data/vendor/strings-ansi/appveyor.yml +32 -0
- data/vendor/strings-ansi/bin/console +14 -0
- data/vendor/strings-ansi/bin/setup +8 -0
- data/vendor/strings-ansi/lib/strings-ansi.rb +1 -0
- data/vendor/strings-ansi/lib/strings/ansi.rb +84 -0
- data/vendor/strings-ansi/lib/strings/ansi/extensions.rb +23 -0
- data/vendor/strings-ansi/lib/strings/ansi/version.rb +7 -0
- data/vendor/strings-ansi/spec/fixtures/ansi_codes.yaml +194 -0
- data/vendor/strings-ansi/spec/spec_helper.rb +51 -0
- data/vendor/strings-ansi/spec/unit/ansi_spec.rb +15 -0
- data/vendor/strings-ansi/spec/unit/extensions_spec.rb +19 -0
- data/vendor/strings-ansi/spec/unit/only_ansi_spec.rb +36 -0
- data/vendor/strings-ansi/spec/unit/sanitize_spec.rb +53 -0
- data/vendor/strings-ansi/strings-ansi.gemspec +34 -0
- data/vendor/strings-ansi/tasks/console.rake +11 -0
- data/vendor/strings-ansi/tasks/coverage.rake +11 -0
- data/vendor/strings-ansi/tasks/spec.rake +29 -0
- metadata +274 -188
- data/.github/workflows/main.yml +0 -26
- data/.gitignore +0 -43
- data/.rspec +0 -2
- data/.rubocop.yml +0 -87
- data/.travis.yml +0 -35
- data/Gemfile +0 -2
- data/Gemfile.base +0 -14
- data/Gemfile.base.lock +0 -172
- data/Gemfile.lock +0 -188
- data/Guardfile +0 -16
- data/Makefile +0 -12
- data/README.md +0 -85
- data/Rakefile +0 -31
- data/bin/bundle +0 -114
- data/bin/console +0 -29
- data/bin/guard +0 -29
- data/bin/rake +0 -29
- data/bin/rfix +0 -29
- data/bin/rspec +0 -29
- data/bin/setup +0 -29
- data/ci/Gemfile.rubocop-0.80 +0 -2
- data/ci/Gemfile.rubocop-0.80.lock +0 -170
- data/ci/Gemfile.rubocop-0.81 +0 -2
- data/ci/Gemfile.rubocop-0.81.lock +0 -170
- data/ci/Gemfile.rubocop-0.82 +0 -2
- data/ci/Gemfile.rubocop-0.82.lock +0 -170
- data/ci/Gemfile.rubocop-0.83 +0 -2
- data/ci/Gemfile.rubocop-0.83.lock +0 -168
- data/ci/Gemfile.rubocop-0.84 +0 -2
- data/ci/Gemfile.rubocop-0.84.lock +0 -171
- data/ci/Gemfile.rubocop-0.85 +0 -2
- data/ci/Gemfile.rubocop-0.85.1 +0 -2
- data/ci/Gemfile.rubocop-0.85.1.lock +0 -173
- data/ci/Gemfile.rubocop-0.85.lock +0 -173
- data/lib/rfix/box.rb +0 -112
- data/lib/rfix/branches/base.rb +0 -15
- data/lib/rfix/branches/head.rb +0 -13
- data/lib/rfix/branches/main.rb +0 -28
- data/lib/rfix/branches/name.rb +0 -23
- data/lib/rfix/branches/reference.rb +0 -21
- data/lib/rfix/branches/upstream.rb +0 -13
- data/lib/rfix/cmd.rb +0 -39
- data/lib/rfix/commands/branch.rb +0 -15
- data/lib/rfix/commands/extensions/options.rb +0 -8
- data/lib/rfix/commands/help.rb +0 -7
- data/lib/rfix/commands/helper/args.rb +0 -141
- data/lib/rfix/commands/helper/help.rb +0 -6
- data/lib/rfix/commands/helper/loader.rb +0 -6
- data/lib/rfix/commands/helper/option.rb +0 -0
- data/lib/rfix/commands/helper/params.rb +0 -0
- data/lib/rfix/commands/helper/rubocop.rb +0 -17
- data/lib/rfix/commands/info.rb +0 -30
- data/lib/rfix/commands/lint.rb +0 -22
- data/lib/rfix/commands/local.rb +0 -12
- data/lib/rfix/commands/origin.rb +0 -19
- data/lib/rfix/commands/setup.rb +0 -29
- data/lib/rfix/commands/welcome.rb +0 -24
- data/lib/rfix/deleted.rb +0 -13
- data/lib/rfix/extensions/extensions.rb +0 -18
- data/lib/rfix/extensions/offense.rb +0 -78
- data/lib/rfix/extensions/string.rb +0 -8
- data/lib/rfix/file_cache.rb +0 -59
- data/lib/rfix/git_helper.rb +0 -59
- data/lib/rfix/indentation.rb +0 -39
- data/lib/rfix/loader/bundler.rb +0 -37
- data/lib/rfix/loader/env.rb +0 -33
- data/lib/rfix/loader/spec.rb +0 -41
- data/lib/rfix/no_file.rb +0 -13
- data/lib/rfix/rfix.rb +0 -34
- data/lib/rfix/tracked.rb +0 -72
- data/lib/rfix/tracked_file.rb +0 -16
- data/lib/rfix/untracked.rb +0 -13
- data/resources/ps.png +0 -0
- data/tasks/bump.rake +0 -11
- data/tasks/bundle.rake +0 -17
- data/tasks/complex.rake +0 -54
- data/tasks/execute.rake +0 -38
- data/tasks/libgit2.rake +0 -33
- data/tasks/simple.rake +0 -62
- data/tasks/travis.rake +0 -74
- data/tasks/vendor.rake +0 -34
data/tasks/bump.rake
DELETED
data/tasks/bundle.rake
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
namespace :bundle do
|
|
2
|
-
task :install do
|
|
3
|
-
gemfiles.each do |gemfile|
|
|
4
|
-
next if gemfile.end_with?(".lock")
|
|
5
|
-
|
|
6
|
-
sh "bundle install", "--gemfile", gemfile, "--jobs 3"
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
namespace :git do
|
|
11
|
-
task :add do
|
|
12
|
-
gemfiles.each do |gemfile|
|
|
13
|
-
sh "git add", gemfile
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
data/tasks/complex.rake
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
require "tmpdir"
|
|
2
|
-
|
|
3
|
-
namespace :bundle do
|
|
4
|
-
namespace :complex do
|
|
5
|
-
directory Bundle::TMP
|
|
6
|
-
|
|
7
|
-
desc "Build complex bundle"
|
|
8
|
-
task build: [Bundle::Complex::FILE, Bundle::Complex::TEST] do
|
|
9
|
-
say "Complex bundle has been stored @ #{Bundle::Complex::FILE}"
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
desc "Rebuild complex bundle"
|
|
13
|
-
task rebuild: [:flush, Bundle::Complex::BUILD]
|
|
14
|
-
|
|
15
|
-
desc "Remove complex bundle"
|
|
16
|
-
task :flush do
|
|
17
|
-
rm_f Bundle::Complex::FILE
|
|
18
|
-
rm_rf Bundle::Complex::REPO
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
desc "Test repo by cloning to local directory"
|
|
22
|
-
task test: Bundle::Complex::FILE do
|
|
23
|
-
Dir.mktmpdir do |repo|
|
|
24
|
-
sh "git clone", Bundle::Complex::FILE, repo, "--branch master"
|
|
25
|
-
cd repo do
|
|
26
|
-
sh "git rev-list --count HEAD"
|
|
27
|
-
sh "git ls-files"
|
|
28
|
-
sh "git status"
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
say "Finished testing complex bundle"
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
file Bundle::Complex::FILE => Bundle::Complex::REPO do
|
|
36
|
-
cd Bundle::Complex::REPO do
|
|
37
|
-
sh "git bundle create", Bundle::Complex::FILE, "--branches --tags"
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
file Bundle::Complex::REPO do
|
|
42
|
-
sh "git clone", Bundle::Complex::GITHUB, Bundle::Complex::REPO, "--branch", "master"
|
|
43
|
-
|
|
44
|
-
cd Bundle::Complex::REPO do
|
|
45
|
-
sh "git", "reset --hard 27fec8"
|
|
46
|
-
|
|
47
|
-
sh "git config user.email 'not-my@real-email.com'"
|
|
48
|
-
sh "git config user.name 'John Doe'"
|
|
49
|
-
|
|
50
|
-
sh "git tag", Bundle::Complex::TAG
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
data/tasks/execute.rake
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
require "rake/clean"
|
|
2
|
-
require "tmpdir"
|
|
3
|
-
require "pathname"
|
|
4
|
-
|
|
5
|
-
repo_path = Pathname.new(Dir.mktmpdir)
|
|
6
|
-
|
|
7
|
-
CLEAN.include(repo_path)
|
|
8
|
-
|
|
9
|
-
namespace :execute do
|
|
10
|
-
task local: [repo_path, :install] do
|
|
11
|
-
chdir(repo_path) do
|
|
12
|
-
sh "rfix local --main-branch master"
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
task branch: [repo_path, :install] do
|
|
17
|
-
chdir(repo_path) do
|
|
18
|
-
sh "rfix branch master"
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
task origin: [repo_path, :install] do
|
|
23
|
-
chdir(repo_path) do
|
|
24
|
-
sh "rfix origin --main-branch master"
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
task lint: [repo_path, :install] do
|
|
29
|
-
chdir(repo_path) do
|
|
30
|
-
sh "rfix lint --main-branch master"
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
file repo_path => :rebuild do
|
|
35
|
-
sh "git clone spec/fixtures/complex.bundle #{repo_path} --branch master"
|
|
36
|
-
sh "git --work-tree=#{repo_path} branch --set-upstream-to origin/master"
|
|
37
|
-
end
|
|
38
|
-
end
|
data/tasks/libgit2.rake
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
require "rake/clean"
|
|
2
|
-
require "tmpdir"
|
|
3
|
-
require "pathname"
|
|
4
|
-
|
|
5
|
-
root_path = Pathname.new(Dir.mktmpdir)
|
|
6
|
-
# root_path = Pathname.new(__dir__).join("../tmp")
|
|
7
|
-
libgit2_gz_path = root_path.join("v1.0.1.tar.gz")
|
|
8
|
-
libgit2_path = root_path.join("libgit2-1.0.1")
|
|
9
|
-
|
|
10
|
-
CLEAN.include(root_path)
|
|
11
|
-
|
|
12
|
-
namespace :libgit2 do
|
|
13
|
-
task build: libgit2_path do
|
|
14
|
-
chdir(libgit2_path) do
|
|
15
|
-
sh "cmake ."
|
|
16
|
-
sh "make"
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
task install: :build do
|
|
21
|
-
chdir(libgit2_path) do
|
|
22
|
-
sh "make install"
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
file libgit2_gz_path do
|
|
27
|
-
sh "wget -O #{libgit2_gz_path} https://github.com/libgit2/libgit2/archive/v1.0.1.tar.gz"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
file libgit2_path => libgit2_gz_path do
|
|
31
|
-
sh "tar xzf #{libgit2_gz_path} -C #{root_path}"
|
|
32
|
-
end
|
|
33
|
-
end
|
data/tasks/simple.rake
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
namespace :bundle do
|
|
2
|
-
namespace :simple do
|
|
3
|
-
directory Bundle::Simple::REPO
|
|
4
|
-
|
|
5
|
-
desc "Build complex bundle"
|
|
6
|
-
task build: [Bundle::Simple::FILE, Bundle::Simple::TEST] do
|
|
7
|
-
say "Simple bundle has been stored @ #{Bundle::Simple::FILE}"
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
desc "Rebuild complex bundle"
|
|
11
|
-
task rebuild: [:flush, Bundle::Simple::BUILD]
|
|
12
|
-
|
|
13
|
-
desc "Remove complex bundle"
|
|
14
|
-
task :flush do
|
|
15
|
-
rm_f Bundle::Simple::FILE
|
|
16
|
-
rm_rf Bundle::Simple::REPO
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
desc "Test repo by cloning to local directory"
|
|
20
|
-
task test: Bundle::Simple::FILE do
|
|
21
|
-
Dir.mktmpdir do |repo|
|
|
22
|
-
sh "git clone", Bundle::Simple::FILE, repo, "--branch master"
|
|
23
|
-
cd repo do
|
|
24
|
-
sh "git rev-list --count HEAD"
|
|
25
|
-
sh "git ls-files"
|
|
26
|
-
sh "git status"
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
say "Finished testing simple bundle"
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
file Bundle::Simple::FILE => Bundle::Simple::REPO do
|
|
34
|
-
cd Bundle::Simple::REPO do
|
|
35
|
-
sh "git bundle create", Bundle::Simple::FILE, "--branches --tags"
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
file Bundle::Simple::REPO do
|
|
40
|
-
cd Bundle::Simple::REPO do
|
|
41
|
-
touch ".gitignore"
|
|
42
|
-
|
|
43
|
-
sh "git init"
|
|
44
|
-
sh "git add .gitignore"
|
|
45
|
-
|
|
46
|
-
sh "git config user.email 'you@example.com'"
|
|
47
|
-
sh "git config user.name 'Your Name'"
|
|
48
|
-
|
|
49
|
-
sh "git commit -m 'A Commit Message'"
|
|
50
|
-
|
|
51
|
-
sh "git config push.default current"
|
|
52
|
-
sh "git config branch.autosetupmerge always"
|
|
53
|
-
sh "git config branch.autosetuprebase always"
|
|
54
|
-
|
|
55
|
-
sh "git config user.email 'not-my@real-email.com'"
|
|
56
|
-
sh "git config user.name 'John Doe'"
|
|
57
|
-
|
|
58
|
-
sh "git tag", Bundle::Simple::TAG
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
end
|
data/tasks/travis.rake
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
RSpec::Core::RakeTask.new(:rspec)
|
|
2
|
-
|
|
3
|
-
namespace :travis do
|
|
4
|
-
desc "Set up dependencies"
|
|
5
|
-
task setup: [Vendor::BUILD, Bundle::BUILD, Travis::GIT]
|
|
6
|
-
|
|
7
|
-
desc "Install gem"
|
|
8
|
-
task Travis::INSTALL => Travis::SETUP do
|
|
9
|
-
Rake::Task[:install].invoke
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
desc "Run test suite"
|
|
13
|
-
task spec: Travis::SETUP do
|
|
14
|
-
Rake::Task[:rspec].invoke
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
desc "Verify bin on CI"
|
|
18
|
-
task verify: [Travis::INSTALL, Travis::TASKS]
|
|
19
|
-
|
|
20
|
-
namespace :git do
|
|
21
|
-
task :config do
|
|
22
|
-
sh "git config --global user.email 'not-my@real-email.com'"
|
|
23
|
-
sh "git config --global user.name 'John Doe'"
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
namespace :tasks do
|
|
28
|
-
desc "Run this"
|
|
29
|
-
task all: [:welcome, :info]
|
|
30
|
-
|
|
31
|
-
task :rfix do
|
|
32
|
-
clone_and_run do
|
|
33
|
-
sh "rfix"
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
task :info do
|
|
38
|
-
clone_and_run do
|
|
39
|
-
sh "rfix info"
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
task :help do
|
|
44
|
-
clone_and_run do
|
|
45
|
-
sh "rfix --help"
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
task :welcome do
|
|
50
|
-
clone_and_run do
|
|
51
|
-
sh "rfix welcome"
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
task :codeGen do
|
|
58
|
-
sleep rand
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
task compile: :codeGen do
|
|
62
|
-
say "in compile"
|
|
63
|
-
sleep rand
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
task dataLoad: :codeGen do
|
|
67
|
-
say "in data"
|
|
68
|
-
# sleep rand
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
task gtest: [:compile, :dataLoad] do
|
|
72
|
-
say "in test"
|
|
73
|
-
sleep rand
|
|
74
|
-
end
|
data/tasks/vendor.rake
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
namespace :vendor do
|
|
2
|
-
namespace :shopify do
|
|
3
|
-
directory Vendor::DIR
|
|
4
|
-
|
|
5
|
-
desc "Downloads shopify repository"
|
|
6
|
-
task build: [Vendor::REPO, Vendor::TEST]
|
|
7
|
-
|
|
8
|
-
desc "Re-download shopify repository"
|
|
9
|
-
task rebuild: [:flush, Vendor::BUILD]
|
|
10
|
-
|
|
11
|
-
desc "Remove shopify repository"
|
|
12
|
-
task :flush do
|
|
13
|
-
rm_rf Vendor::REPO
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
desc "Test validity of repo"
|
|
17
|
-
task test: Vendor::REPO do
|
|
18
|
-
cd Vendor::REPO do
|
|
19
|
-
sh "git rev-list --count HEAD"
|
|
20
|
-
sh "git status"
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
say "Finished testing vendor"
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
file Vendor::REPO => Vendor::DIR do
|
|
27
|
-
sh "git clone", Vendor::GITHUB, Vendor::REPO
|
|
28
|
-
|
|
29
|
-
cd Vendor::REPO do
|
|
30
|
-
sh "git reset --hard", Vendor::START
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|