sfb_scripts 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/app_up +4 -4
- data/lib/active_repo.rb +13 -2
- data/lib/bundle_manager.rb +1 -0
- data/lib/lazy_repo.rb +10 -1
- data/lib/migrator.rb +1 -0
- data/lib/repo.rb +0 -6
- data/lib/upper.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0464c1e7fede7cccf98042d942788add0dfae24
|
4
|
+
data.tar.gz: 0fca59a3f0c6b4722fdbc13d6319fc5576a7fef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8051d17a37e864aceb3fcae7f7812670d41d09254742e53ccbe5a1cc6c4f204f39c78f24e25f9990cb53a70693dab393bf653126ba3577f99f01022fc6bb2f80
|
7
|
+
data.tar.gz: 325b98013c47a1b60020128b23f6c71b4ddfd3396691b27dfb7a69155b9a18a813a4deb2bf71ee13c373d0fdf62972a7d86017cab9c6d03db1495249cafac723
|
data/bin/app_up
CHANGED
@@ -9,12 +9,12 @@ class CLI < Thor
|
|
9
9
|
# REBASE
|
10
10
|
#
|
11
11
|
|
12
|
-
desc "
|
13
|
-
option :loud, :type => :boolean, :desc => 'Pipe output to terminal or not (output is always piped to /tmp/
|
12
|
+
desc "app_up", "Rebase your commits onto master. Bundle installs and migrates as needed. Will terminate if conflicts are found."
|
13
|
+
option :loud, :type => :boolean, :desc => 'Pipe output to terminal or not (output is always piped to /tmp/app_up.log)'
|
14
14
|
option :no_git, aliases: :all, :type => :boolean, :desc => "Don't update the repo, just bundle and migrate everywhere."
|
15
15
|
option :no_engines, type: :boolean, desc: "Don't migrate engines"
|
16
16
|
|
17
|
-
def
|
17
|
+
def app_up
|
18
18
|
if options[:no_git]
|
19
19
|
Upper.no_git(options)
|
20
20
|
else
|
@@ -32,7 +32,7 @@ class CLI < Thor
|
|
32
32
|
Upper.pre_push_hook(git_command, options)
|
33
33
|
end
|
34
34
|
|
35
|
-
default_task :
|
35
|
+
default_task :app_up
|
36
36
|
end
|
37
37
|
|
38
38
|
CLI.start(ARGV)
|
data/lib/active_repo.rb
CHANGED
@@ -3,6 +3,7 @@ require_relative 'repo'
|
|
3
3
|
class ActiveRepo < Repo
|
4
4
|
|
5
5
|
def rebase_on_master!
|
6
|
+
shell.notify "\nRebasing current branch on master:"
|
6
7
|
up do
|
7
8
|
# will raise an error with merge conflicts
|
8
9
|
begin
|
@@ -21,9 +22,19 @@ class ActiveRepo < Repo
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def up
|
24
|
-
|
25
|
+
old_sha = current_sha
|
25
26
|
yield
|
26
|
-
|
27
|
+
|
28
|
+
set_files_changed(old_sha)
|
29
|
+
end
|
30
|
+
|
31
|
+
def set_files_changed(old_sha)
|
32
|
+
shell.notify "\nIdentifying changed files:"
|
33
|
+
@files_changed = (shell.run "git diff --name-only #{old_sha}").split("\n")
|
34
|
+
end
|
35
|
+
|
36
|
+
def files_changed
|
37
|
+
@files_changed
|
27
38
|
end
|
28
39
|
|
29
40
|
def pull_origin_master!
|
data/lib/bundle_manager.rb
CHANGED
data/lib/lazy_repo.rb
CHANGED
@@ -2,8 +2,17 @@ require_relative 'repo'
|
|
2
2
|
|
3
3
|
class LazyRepo < Repo
|
4
4
|
|
5
|
+
def initialize(*args)
|
6
|
+
super
|
7
|
+
set_all_files
|
8
|
+
end
|
9
|
+
|
5
10
|
def files_changed
|
6
|
-
all_files
|
11
|
+
@all_files
|
7
12
|
end
|
8
13
|
|
14
|
+
def set_all_files
|
15
|
+
shell.notify "\nIdentifying all files:"
|
16
|
+
@all_files = shell.run("git ls-tree --full-tree -r HEAD --name-only").split("\n")
|
17
|
+
end
|
9
18
|
end
|
data/lib/migrator.rb
CHANGED
data/lib/repo.rb
CHANGED
@@ -10,17 +10,11 @@ class Repo
|
|
10
10
|
@shell = shell
|
11
11
|
end
|
12
12
|
|
13
|
-
def files_changed
|
14
|
-
@files_changed ||= (shell.run "git diff --name-only #{@old_sha}").split("\n")
|
15
|
-
end
|
16
13
|
|
17
14
|
def changed?(file_path)
|
18
15
|
files_changed.include? file_path
|
19
16
|
end
|
20
17
|
|
21
|
-
def all_files
|
22
|
-
@all_files ||= shell.run("git ls-tree --full-tree -r HEAD --name-only").split("\n")
|
23
|
-
end
|
24
18
|
|
25
19
|
def find_files(pattern)
|
26
20
|
shell.run("git ls-files '*#{pattern}*'").split("\n")
|
data/lib/upper.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: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Kinnecom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -85,3 +85,4 @@ signing_key:
|
|
85
85
|
specification_version: 4
|
86
86
|
summary: Easily update your rails app and run tests from command line
|
87
87
|
test_files: []
|
88
|
+
has_rdoc:
|