sfb_scripts 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63037a35b8555aa27cdc4ebf8c69c6f1c601fee1
4
- data.tar.gz: a332d1edad8d74ed313db45b51377d024802c538
3
+ metadata.gz: 51e26558ffa44abae64a37e623586c78015ff3eb
4
+ data.tar.gz: 1d72a0dce0e76e1a2af590d9178065c349396d2d
5
5
  SHA512:
6
- metadata.gz: f5c9db6e9da834cb63d7ccfe53632de62afeb4c7a88168a633b899af04d95542b8c5fa2940f528a5d161374d21f3513395114744b3e8e8b27df5752f68890ce2
7
- data.tar.gz: 904ed7af26e0d873a823d11186c23728ce74c5d67875c1978cec0d871d1e5afb503e1bbf5f15c9071642317975d9a56bcd852fa8afeda079e921d29099384356
6
+ metadata.gz: 554114b6d746e2c08676b8966860b70a58e3fa1f0b45b75257d1ed65822832804024d13f33e86ac6f01df83261aed33aba85622e35fc8f591e2284fffc180820
7
+ data.tar.gz: 7fc7190c9a20ca6db0209361398d673d39befba8526424e6bcade8ea3402782d30f6755a83d74c064faf873f8d4f5d839ffbf8a7968c4d32e8836cfcdf246680
data/bin/app_up CHANGED
@@ -9,7 +9,7 @@ class CLI < Thor
9
9
  # REBASE
10
10
  #
11
11
 
12
- desc "rebase", "Rebase your commits onto master. Bundle installs and migrates as needed. Will terminate if conflicts are found."
12
+ desc "up", "Rebase your commits onto master. Bundle installs and migrates as needed. Will terminate if conflicts are found."
13
13
  option :loud, :type => :boolean, :desc => 'Pipe output to terminal or not (output is always piped to /tmp/up.log)'
14
14
  option :all, :type => :boolean, :desc => "Don't update the repo, just bundle and migrate everywhere."
15
15
 
data/lib/migrator.rb CHANGED
@@ -8,8 +8,9 @@ class Migrator
8
8
 
9
9
  def migrate_where_necessary
10
10
  directories_to_migrate.each do |dir|
11
- shell.run "bundle exec rake db:create db:migrate", dir: dir
12
- shell.run "RAILS_ENV=test bundle exec rake db:create db:migrate", dir: dir
11
+ begin
12
+ shell.run "bundle exec rake db:migrate", dir: dir
13
+ shell.run "RAILS_ENV=test bundle exec rake db:migrate", dir: dir
13
14
  end
14
15
  end
15
16
 
@@ -22,7 +23,7 @@ class Migrator
22
23
 
23
24
  def in_rack_application?(migrate_dir)
24
25
  root_dir = migrate_dir.gsub(/db\/migrate$/, '')
25
- File.file?("#{root_dir}/config.ru")
26
+ true
26
27
  end
27
28
 
28
29
  end
data/lib/test_case.rb CHANGED
@@ -11,14 +11,14 @@ class TestCase
11
11
  def working_dir
12
12
  @working_dir ||=
13
13
  if full_path.match(/^(.*)test\//)
14
- "#{full_path.match(/^(.*)test\//)[1]}"
14
+ "./#{full_path.match(/^(.*)test\//)[1]}"
15
15
  else
16
16
  raise TestDirectoryError.new("Can't find test's working directory")
17
17
  end
18
18
  end
19
19
 
20
20
  def relative_path
21
- @relative_path ||= full_path.gsub(/^#{working_dir}/, '') || raise_file_path_error
21
+ @relative_path ||= full_path.gsub(/^#{working_dir.gsub(/^\.\//, '')}/, '') || raise_file_path_error
22
22
  end
23
23
 
24
24
  def raise_file_path_error
metadata CHANGED
@@ -1,33 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sfb_scripts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-04-25 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.19'
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '1.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0.19'
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '1.0'
33
33
  description: Easily update your rails app and run tests from command line
@@ -70,12 +70,12 @@ require_paths:
70
70
  - lib
71
71
  required_ruby_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
@@ -85,4 +85,3 @@ 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: