chris_lib 1.0.8 → 1.0.9
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/lib/chris_lib/shell_methods.rb +4 -1
- data/lib/chris_lib/test_access.rb +10 -2
- data/lib/chris_lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ce44bf4942612a42db0dac83f13c662238adc1c77342e8f1b237531a89bd700
|
4
|
+
data.tar.gz: d9098d622b91ad907c0e838b1b4743c8cfeab11371f8b52edde766737f1f8a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18641cf3a255fb14e0b67c9d703a6c57cede1aa3c4f3426d213319c464ad3fdcd0919a1fb5dfb8ad4f62cabfe0f2b0ef0a08c28c0b1ca1cb3d308c908ecfdf34
|
7
|
+
data.tar.gz: 7c4432ac3b238f7b8982b09b1c2f7824ebac1c769a33f483326557994c70b3c0e3259dba56128b316748c0f81a71ef2e2e2f057b4bf7b93a632d2aeef50889ad
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# methods for bash ruby scripts
|
2
2
|
module ShellMethods
|
3
3
|
require 'dotenv'
|
4
|
+
require 'bundler'
|
4
5
|
Dotenv.load
|
5
6
|
|
6
7
|
def precompile_assets(target: 'local')
|
@@ -30,7 +31,9 @@ module ShellMethods
|
|
30
31
|
destination = (remote.nil? ? nil : "--remote #{remote}")
|
31
32
|
lv = `rake db:version`
|
32
33
|
puts 'Local version: ', lv
|
33
|
-
hv = Bundler.with_clean_env {
|
34
|
+
hv = Bundler.with_clean_env {
|
35
|
+
`heroku run rake db:version #{destination}`
|
36
|
+
}
|
34
37
|
puts hv
|
35
38
|
return nil if hv.nil? || hv.empty?
|
36
39
|
return nil if lv.nil? || lv.empty?
|
@@ -11,12 +11,20 @@ module TestAccess
|
|
11
11
|
def it_should_route_to(path,actions,flash_message=nil)
|
12
12
|
actions.each do |a|
|
13
13
|
it "should deny access to #{a}" do
|
14
|
-
|
14
|
+
if Rails::VERSION::MAJOR >= 5
|
15
|
+
get a.to_sym, params: { id: 1}
|
16
|
+
else
|
17
|
+
get a.to_sym, id: 1
|
18
|
+
end
|
15
19
|
expect(response).to redirect_to send(path)
|
16
20
|
end
|
17
21
|
if flash_message.present?
|
18
22
|
it "should have correct flash message for #{a}" do
|
19
|
-
|
23
|
+
if Rails::VERSION::MAJOR >= 5
|
24
|
+
get a.to_sym, params: { id: 1}
|
25
|
+
else
|
26
|
+
get a.to_sym, id: 1
|
27
|
+
end
|
20
28
|
expect(flash[:error]).to include flash_message
|
21
29
|
end
|
22
30
|
end
|
data/lib/chris_lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chris_lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|