chris_lib 1.0.8 → 1.0.9

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
  SHA256:
3
- metadata.gz: 1fbf38de9668a840371126f8c4cacd9045580c3169daeb3c1f4da20ccee0986d
4
- data.tar.gz: deb9e2c6c087f68c77d535d0a9645f7043b130b8169134d2d0ee413645fb4ab6
3
+ metadata.gz: 0ce44bf4942612a42db0dac83f13c662238adc1c77342e8f1b237531a89bd700
4
+ data.tar.gz: d9098d622b91ad907c0e838b1b4743c8cfeab11371f8b52edde766737f1f8a40
5
5
  SHA512:
6
- metadata.gz: e7169afba723864d050155f6a03849d7812d2d74d24560fc81e4ec2a243454a0791c20a3077e102bbfe1411db9a9847b135c08607643d5af2a2323c974e1a5ea
7
- data.tar.gz: bb527bb44506decd391a7bf3494c30660a931cee4ea6e74dbafa3ee8f8f69856fe0baa48585c99caef4628d705b0153849d751a4aebe9d37df3c809c1e6a1e22
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 { `heroku run rake db:version #{destination}` }
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
- get a.to_sym, params: { id: 1}
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
- get a, params: { id: 1}
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
@@ -1,3 +1,3 @@
1
1
  module ChrisLib
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  end
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.8
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-17 00:00:00.000000000 Z
11
+ date: 2018-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv