sfb_scripts 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sfb_scripts/version.rb +1 -1
- metadata +21 -19
- data/bin/app_up +0 -73
- data/bin/git_up +0 -20
- data/bin/test_runner +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fd75408e167245b56c581cd3e22c79b0df6529e
|
4
|
+
data.tar.gz: adf8eb1b438eb7299640f5f852bd93caaa459298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6412bbd135d78597f482cb72f124afbfadbe1bb798c00a00b980e8bfe57d0c73038e0aa2e92a5362f73b9b70f9eb7d150eb9d6fa54f29314df888ca3ddcaa1a2
|
7
|
+
data.tar.gz: 167bbb5708e46f49090647344e3f9c1a719074212001ffa5bc8e40c3280f8028c33f41e63c167d5c7ec94ff4228187c799d9b49ee0f5ab3f50091b73101f6264
|
data/lib/sfb_scripts/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfb_scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Kinnecom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -31,38 +31,40 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '1.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: app_up
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 2.5.3
|
40
|
-
- - "<"
|
37
|
+
- - '='
|
41
38
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
39
|
+
version: 1.0.2
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
|
-
- -
|
44
|
+
- - '='
|
48
45
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
50
|
-
|
46
|
+
version: 1.0.2
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: test_run
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - '='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.0.3
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - '='
|
51
59
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
60
|
+
version: 0.0.3
|
53
61
|
description: Easily update your rails app and run tests from command line
|
54
62
|
email:
|
55
63
|
- pete.kinnecom@gmail.com
|
56
|
-
executables:
|
57
|
-
- test_runner
|
58
|
-
- app_up
|
59
|
-
- git_up
|
64
|
+
executables: []
|
60
65
|
extensions: []
|
61
66
|
extra_rdoc_files: []
|
62
67
|
files:
|
63
|
-
- bin/app_up
|
64
|
-
- bin/git_up
|
65
|
-
- bin/test_runner
|
66
68
|
- lib/sfb_scripts/bundler/bundle_manager.rb
|
67
69
|
- lib/sfb_scripts/dependency_loader.rb
|
68
70
|
- lib/sfb_scripts/folder_guard.rb
|
data/bin/app_up
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'thor'
|
4
|
-
require_relative '../lib/sfb_scripts/upper'
|
5
|
-
|
6
|
-
class CLI < Thor
|
7
|
-
|
8
|
-
def initialize(args, options, config)
|
9
|
-
# reset --hard hack!
|
10
|
-
#
|
11
|
-
# if the -g option is passed,
|
12
|
-
# we concatenate the rest of the
|
13
|
-
# command into a single string.
|
14
|
-
#
|
15
|
-
# This prevents Thor from interpreting
|
16
|
-
# app_up -g reset --hard
|
17
|
-
# as having the flags -g and --hard
|
18
|
-
#
|
19
|
-
# (we want to ignore the --hard
|
20
|
-
# and just pass it on to git)
|
21
|
-
|
22
|
-
action_flag_index = options.find_index('-g') || options.find_index('--git-action') || options.find_index('--action')
|
23
|
-
|
24
|
-
if action_flag_index
|
25
|
-
new_options = options[0..action_flag_index]
|
26
|
-
new_options << options[action_flag_index+1 .. -1].join(' ')
|
27
|
-
options = new_options
|
28
|
-
end
|
29
|
-
|
30
|
-
super(args, options, config)
|
31
|
-
end
|
32
|
-
|
33
|
-
#
|
34
|
-
# REBASE
|
35
|
-
#
|
36
|
-
|
37
|
-
desc :up, "Rebase your commits onto master. Bundle installs and migrates as needed. Will terminate if conflicts are found. After conflicts are resolved, run again with --no-rebase."
|
38
|
-
option :loud, :type => :boolean, :desc => 'Pipe output to terminal or not (output is always piped to /tmp/app_up.log)'
|
39
|
-
option :no_git, aliases: ['--no-pull', '--no-rebase'], :type => :boolean, :desc => "Don't update the repo, just bundle and migrate everywhere."
|
40
|
-
option :ignore, type: :array, desc: "Directories matching this pattern will be ignored. Example: 'app_up --ignore engines' will not bundle or migrate in a directory matching the word engines. You can specify multiple patterns: 'app_up --ignore dir1 dir2"
|
41
|
-
option :on_branch, desc: "Rebase the current branch onto it's upstream counterpart. [Example: While on branch (feature_branch), using the --on-branch flag will yield the git command: 'git pull --rebase origin feature_branch'", default: 'master', default: false
|
42
|
-
option :git_action, aliases: ['--action', '-g'], type: :array, desc: "Specify what command to pass to git [Example: app_up --git-action 'pull --rebase origin branch_name']. Defaults to 'pull --rebase origin master'."
|
43
|
-
option :finish_rebase, aliases: ['--finish-merge'], type: :boolean, desc: "Recovers from rebase or merge conflicts"
|
44
|
-
option :reset, aliases: ['--drop-dbs'], type: :boolean, desc: "Drop and recreate all databases"
|
45
|
-
|
46
|
-
def up
|
47
|
-
if options[:no_git]
|
48
|
-
Upper.no_git(options)
|
49
|
-
elsif options[:finish_rebase]
|
50
|
-
Upper.finish_rebase(options)
|
51
|
-
elsif options[:on_branch]
|
52
|
-
Upper.rebase_on_branch!(options)
|
53
|
-
elsif options[:git_action]
|
54
|
-
Upper.arbitrary_action!(options[:git_action].join(' '), options)
|
55
|
-
else
|
56
|
-
Upper.rebase_on_master!(options)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
desc "install_hooks", "Install a pre-push git hook that will not let you push to remote master."
|
61
|
-
def install_hooks
|
62
|
-
Upper.install_hooks(options)
|
63
|
-
end
|
64
|
-
|
65
|
-
desc "pre_push_hook", "Deny destructive actions to the remote master."
|
66
|
-
def pre_push_hook(git_command)
|
67
|
-
Upper.pre_push_hook(git_command, options)
|
68
|
-
end
|
69
|
-
|
70
|
-
default_task :up
|
71
|
-
end
|
72
|
-
|
73
|
-
CLI.start(ARGV)
|
data/bin/git_up
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# This belongs in a bash_profile, but I can't for the
|
4
|
-
# life of me figure out how to quote all of the arguments
|
5
|
-
# :(
|
6
|
-
#
|
7
|
-
# The problem is that: app_up --git-action reset --hard
|
8
|
-
# is misinterpreted by Thor and needs quotes:
|
9
|
-
#
|
10
|
-
# app_up --git-action 'reset --hard'
|
11
|
-
#
|
12
|
-
# putting :
|
13
|
-
#
|
14
|
-
# function git_up()
|
15
|
-
# {
|
16
|
-
# app_up --git-action "'$@'"
|
17
|
-
# }
|
18
|
-
#
|
19
|
-
# just doesn't work. :( :( :(
|
20
|
-
Kernel.exec("app_up --git-action \"#{ARGV.join(' ')}\"")
|
data/bin/test_runner
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'thor'
|
4
|
-
require_relative '../lib/sfb_scripts/tester'
|
5
|
-
|
6
|
-
class CLI < Thor
|
7
|
-
class_option :verbose, type: :boolean, desc: "Pipe the log file to stdout."
|
8
|
-
class_option :loud, type: :boolean, desc: "Show all shell commands being run. This *does not* show the output of those commands, only what is being run."
|
9
|
-
#
|
10
|
-
# run
|
11
|
-
#
|
12
|
-
desc "status", "Find dirty tests in your git status and run them."
|
13
|
-
option :all_engines, :type => :boolean, :desc => 'Run all tests identified, regardless of engine'
|
14
|
-
option :no_selenium, :type => :boolean, :desc => 'Ignore selenium'
|
15
|
-
def status
|
16
|
-
Tester.status(options)
|
17
|
-
end
|
18
|
-
|
19
|
-
#
|
20
|
-
# run
|
21
|
-
#
|
22
|
-
desc "find", <<-DESC
|
23
|
-
Find tests and run them. By trying to match an individual test or the name of a test file(s).
|
24
|
-
DESC
|
25
|
-
option :timid, type: :boolean, desc: "Always ask user which tests to run if multiple test files are found. Defaults to false", default: false
|
26
|
-
def find(input)
|
27
|
-
if input == '--help'
|
28
|
-
puts "use 'test_runner --help find' to see the help"
|
29
|
-
exit
|
30
|
-
end
|
31
|
-
|
32
|
-
Tester.find(input, options)
|
33
|
-
end
|
34
|
-
|
35
|
-
desc "status_check", "Verify that you don't edit a file without editing its corresponding test file."
|
36
|
-
option :confirm_exit_status, :type => :boolean, :desc => 'Asks user whether to exit with status 0 or 1. Used in the pre-commit hook'
|
37
|
-
def status_check
|
38
|
-
Tester.status_check(options)
|
39
|
-
end
|
40
|
-
|
41
|
-
default_task :status_check
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
CLI.start(ARGV)
|