guard-consistency_fail 0.0.10 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmU1MzU4NzFlNDc1MDEzYjI0ZTQyZWZhYzQzNjgxOWY0MjFlMzNkNw==
4
+ ODQ1OTlmZTQ3YWQxY2Y3NWI5ZjRjZGY0MzIyMmUzNTJhN2RkOTJhMA==
5
5
  data.tar.gz: !binary |-
6
- YTgzMzdmZTZhMzNmZmJkZjZkNWViZDkzNzllMDFmNTc5YTFhYTkyYw==
6
+ OTM1ZGFiNThiNTU4OThkZGVkYmI4ZGRlODIxNDczMjNhNjI5N2E4ZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NGYwNTAwNGU3MThjZTZlMTVkNTkzYzgwNDRkMGFhZmI2NTA4M2ZkOGViNDFh
10
- MGJhMzJiZmQwYWEwODQ4NWEzYTQ5ZGEwM2RkYjlkMDEwM2YwMzRlYTJlNDNh
11
- NmQwZjk2ZDA1MjhhNTUyODkxMmM2YWQzMjBiYWE3ZTY1MzZmZjg=
9
+ NDYyYmY5MDNkZmExZThjNTEwM2M3YmJmMzIxYjkzYmY3YmQxNzdmZjk3ZGVi
10
+ MWZhNjk5MGExYzc4NDdmY2EzZDYzMGIwMTI1NzRlZWMyNTQzYmE5MTE1ZjE5
11
+ MjhjYWFlN2QzYzc0ZDUwYTFiMTdlNTNmZDJkNzlmOWFjYzJlMTk=
12
12
  data.tar.gz: !binary |-
13
- YjQxZDgwNDZkMThmMGUwNzJiZDA0YjVjNGMyZTZhZjI4Y2U4YjZlOTAzMGU5
14
- ZTJmOWNlYjE3NzgwMTcwZGI0MjI0ZDhhOTc1NTI5ZjA0ODA1YzAxNzczMzQy
15
- MjA0N2JiZWJkMzlmMTM5NjY3OWJiNWMxYmM0N2JhM2M3YzU2NzE=
13
+ Nzg1ZTY0NjEwYTI1YWViMjYxYzZhOTM0M2Y5Y2M2NTk5ZWU0NjJiNDRmMDJm
14
+ NjVjODAyZDQ0Y2I0MjUxYzQ1YzhkMjcyNmUwZDk4Mjg4MTE2MDllYjdmZDBh
15
+ ZDExZGExOGM0NWYyNzY3YWQzNGMwZjJlMjQ2ZTgwNmZjNDQxMDY=
data/README.markdown CHANGED
@@ -8,13 +8,21 @@ Guard::ConsistencyFail automates running of checks from [consistency_fail](https
8
8
 
9
9
  Please be sure to have [Guard](http://github.com/guard/guard) installed before continue.
10
10
 
11
- Install the gem:
11
+ You can do one of the following:
12
12
 
13
- gem install guard-delayed
13
+ Install the gem:
14
14
 
15
- Add it to your Gemfile (inside development group):
16
15
 
17
- gem 'guard-consistency_fail'
16
+ gem install guard-consistency_fail
17
+
18
+ or add it to your Gemfile (inside development group):
19
+
20
+
21
+ gem 'guard-consistency_fail'
22
+
23
+ Note: for Guard version below 2.1 use version 0.0.10 of this gem so in your `Gemfile`
24
+
25
+ gem 'guard-consistency_fail', '0.0.10'
18
26
 
19
27
  Add guard definition to your Guardfile by running this command:
20
28
 
@@ -49,11 +57,11 @@ you make.
49
57
 
50
58
  * Push to rubygems.org
51
59
 
52
- `gem push guard-consistency_fail-0.0.10.gem`
60
+ `gem push guard-consistency_fail-0.1.1.gem`
53
61
 
54
62
  ## Testing the gem locally
55
63
 
56
- gem install guard-consistency_fail-0.0.10.gem
64
+ gem install guard-consistency_fail-0.1.1.gem
57
65
 
58
66
 
59
67
  ## Authors
@@ -1,15 +1,15 @@
1
1
  require 'guard'
2
- require 'guard/guard'
3
2
 
4
3
  module Guard
5
- class ConsistencyFail < Guard
4
+ class ConsistencyFail < Plugin
6
5
 
7
6
  # Allowable options are:
8
7
  # :environment defaults to 'development'
9
8
 
10
- def initialize(watchers = [], options = {})
9
+ def initialize(options = {})
11
10
  @options = options
12
- super(watchers, options)
11
+ @watchers = options[:watchers]
12
+ super
13
13
  end
14
14
 
15
15
  def start
@@ -42,7 +42,7 @@ module Guard
42
42
  def cmd
43
43
  command = 'consistency_fail'
44
44
  command = "export RAILS_ENV=#{@options[:environment]}; #{command}" if @options[:environment]
45
- UI.info "Running consistency_fail: #{command}"
45
+ Compat::UI.info "Running consistency_fail: #{command}"
46
46
  command
47
47
  end
48
48
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module ConsistencyFailVersion
3
- VERSION = '0.0.10'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
@@ -1,11 +1,21 @@
1
1
  require 'spec_helper'
2
+ require 'guard/compat/test/helper'
2
3
 
3
4
  describe Guard::ConsistencyFail do
4
5
  describe "when passing an environment option" do
6
+
7
+ let(:consistency_fail) {Guard::ConsistencyFail.new({watchers:[], environment: 'test'})}
8
+
9
+ before do
10
+ allow(Guard::Compat::UI).to receive(:notify)
11
+ allow(Guard::Compat::UI).to receive(:info)
12
+ allow(Guard::Compat::UI).to receive(:error)
13
+ end
14
+
5
15
  it "calls system with 'export RAILS_ENV=test;' call first" do
6
- @delayed = Guard::ConsistencyFail.new([], {:environment => 'test'})
7
- @delayed.should_receive(:system).with("export RAILS_ENV=test; consistency_fail").and_return(true)
8
- @delayed.start
16
+
17
+ expect(consistency_fail).to receive(:system).with("export RAILS_ENV=test; consistency_fail").and_return(true)
18
+ consistency_fail.start
9
19
  end
10
20
  end
11
21
  end
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,15 @@
1
- require 'rspec'
1
+ require 'rubygems'
2
2
  require 'guard/consistency_fail'
3
+ require 'rspec'
3
4
 
4
5
  ENV["GUARD_ENV"] = 'test'
5
6
 
6
7
  RSpec.configure do |config|
7
- config.color_enabled = true
8
+ config.color = true
9
+ config.run_all_when_everything_filtered = true
10
+
11
+ config.before(:each) do
12
+ allow(Guard::UI).to receive(:notify).and_return(true)
13
+ end
14
+
8
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-consistency_fail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pankaj Tyagi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-06 00:00:00.000000000 Z
11
+ date: 2014-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.0
19
+ version: '2.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.0
26
+ version: '2.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: guard-compat
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: consistency_fail
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -42,58 +56,58 @@ dependencies:
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ! '>'
59
+ - - ! '>='
46
60
  - !ruby/object:Gem::Version
47
- version: 1.0.10
61
+ version: '0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ! '>'
66
+ - - ! '>='
53
67
  - !ruby/object:Gem::Version
54
- version: 1.0.10
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rspec
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - ! '>'
73
+ - - ! '>='
60
74
  - !ruby/object:Gem::Version
61
- version: 2.5.0
75
+ version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ! '>'
80
+ - - ! '>='
67
81
  - !ruby/object:Gem::Version
68
- version: 2.5.0
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: guard-rspec
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - ! '>'
87
+ - - ! '>='
74
88
  - !ruby/object:Gem::Version
75
- version: 0.2.0
89
+ version: '0'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - ! '>'
94
+ - - ! '>='
81
95
  - !ruby/object:Gem::Version
82
- version: 0.2.0
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: guard-bundler
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ! '>'
101
+ - - ! '>='
88
102
  - !ruby/object:Gem::Version
89
- version: 0.1.1
103
+ version: '0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ! '>'
108
+ - - ! '>='
95
109
  - !ruby/object:Gem::Version
96
- version: 0.1.1
110
+ version: '0'
97
111
  description: Guard::ConsistencyFail automatically runs consistency fail when model
98
112
  or schema.rb changes
99
113
  email: