rails-creds 0.2.2 → 0.2.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
  SHA256:
3
- metadata.gz: d903ea2ac20a921704ba5cd22a2d37433abfef0aa0d8e5cd8c0c70786bab3a21
4
- data.tar.gz: 301155a8839f397d45f72634e2797156a5236fbcb1070572bf167d57861f7814
3
+ metadata.gz: 180c1ca9192de8e7d152b8287d51031006f724e76e35620c7c19111c97cca536
4
+ data.tar.gz: dc4cb85e4083a01a2b825b5568cc56e0391d932e3c9683c466c55f72d676656b
5
5
  SHA512:
6
- metadata.gz: bc2a5d19ffa43ce20d751e2d1de7ac469bbcbbb399163d45c24258e24100e6f04d099724051a55bb7bc50cac8f4b74d14a8b39fefbff3771271ce223acca11ef
7
- data.tar.gz: ede5610566a31e345b38646d0e1955c5f25b6128045be900f5bfae4faff41d192d42d138433e474abc48a4369fe72e204d8e1dad2468180c4060f5c0c3d53c62
6
+ metadata.gz: 56cd8bd00245b4e15d5a9b145e420e8f330a7d76a5db58a38d9580d97b4cdf3319ce10ddc52c6b7de1a4611e20c2a69a836978c21e1af988e50025548ee7f8e1
7
+ data.tar.gz: d017e6fbaf58ae2844a91bd820930054696b2b438ec995ff7fc37a1cad8b5f2983fcde085662afa8e15d489552fd0f81b1e989ffc921429c080c4d79122a022a
data/.travis.yml CHANGED
@@ -1,5 +1,11 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.5.1
5
- before_install: gem install bundler -v 1.16.1
4
+ - 2.3
5
+ - 2.4
6
+ - 2.5
7
+ - 2.6
8
+ - jruby
9
+ before_install:
10
+ - gem update --system
11
+ - gem install bundler
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.2.3 (2019-08-19)
2
+
3
+ Fixed:
4
+
5
+ - Require strip_heredoc extension before use
6
+
1
7
  # 0.2.1
2
8
 
3
9
  Changed:
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
data/creds.gemspec CHANGED
@@ -1,30 +1,30 @@
1
- lib = File.expand_path('lib', __dir__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'creds/version'
3
+ require "creds/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'rails-creds'
7
- spec.version = Creds::VERSION
8
- spec.authors = ['Mikkel Malmberg']
9
- spec.email = ['mikkel@brnbw.com']
6
+ spec.name = "rails-creds"
7
+ spec.version = Creds::VERSION
8
+ spec.authors = ["Mikkel Malmberg"]
9
+ spec.email = ["mikkel@brnbw.com"]
10
10
 
11
- spec.summary = "Shorter, env-scoped version of Rails' credentials"
12
- spec.description = ''
13
- spec.homepage = 'https://github.com/mikker/rails-creds'
14
- spec.metadata = { 'source_code_uri' => 'https://github.com/mikker/rails-creds' }
15
- spec.license = 'MIT'
11
+ spec.summary = "Shorter, env-scoped version of Rails' credentials"
12
+ spec.description = ""
13
+ spec.homepage = "https://github.com/mikker/rails-creds"
14
+ spec.metadata = {"source_code_uri" => "https://github.com/mikker/rails-creds"}
15
+ spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
18
  f.match(%r{^(test|spec|features)/})
19
19
  end
20
- spec.bindir = 'exe'
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ['lib']
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
23
 
24
- spec.add_dependency 'rails', '> 5.2'
24
+ spec.add_dependency "rails", "> 5.2"
25
25
 
26
- spec.add_development_dependency 'bundler', '~> 1.16'
27
- spec.add_development_dependency 'rake', '~> 10.0'
28
- spec.add_development_dependency 'rspec', '~> 3.0'
29
- spec.add_development_dependency 'rubocop', '~> 0.54'
26
+ spec.add_development_dependency "bundler", "~> 2.0"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rspec", "~> 3.0"
29
+ spec.add_development_dependency "standard", "~> 0.1.0"
30
30
  end
data/lib/creds/errors.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require "active_support/core_ext/string/strip"
2
+
1
3
  class Creds
2
4
  class MissingCredentialsWarning
3
5
  MESSAGE =
@@ -6,8 +8,8 @@ class Creds
6
8
  Creds will return nil for any key.
7
9
  Run this to generate your credentials file:
8
10
  $ bin/rails credentials:edit
9
- MSG
10
- .strip_heredoc.freeze
11
+ MSG
12
+ .strip_heredoc.freeze
11
13
  end
12
14
 
13
15
  # @api private
@@ -43,7 +45,7 @@ class Creds
43
45
  <<: *default
44
46
  aws_key: 'you can override defaults for individual environments'
45
47
  MSG
46
- .strip_heredoc.freeze
48
+ .strip_heredoc.freeze
47
49
  # rubocop:enable Layout/TrailingWhitespace
48
50
 
49
51
  def initialize(env)
@@ -60,7 +62,7 @@ class Creds
60
62
  Either get or recover the file config/master.key
61
63
  or set the environment variable RAILS_MASTER_KEY
62
64
  MSG
63
- .strip_heredoc.freeze
65
+ .strip_heredoc.freeze
64
66
 
65
67
  def initalize
66
68
  super(MESSAGE)
data/lib/creds/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Creds
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = "0.2.3".freeze
3
3
  end
data/lib/creds.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails'
3
+ require "rails"
4
4
 
5
- require 'creds/version'
6
- require 'creds/errors'
5
+ require "creds/version"
6
+ require "creds/errors"
7
7
 
8
8
  # The main module of rails-creds
9
9
  class Creds
@@ -15,9 +15,11 @@ class Creds
15
15
  true
16
16
  end
17
17
 
18
+ # rubocop:disable Style/MethodMissingSuper
18
19
  def method_missing(*_args)
19
20
  nil
20
21
  end
22
+ # rubocop:enable Style/MethodMissingSuper
21
23
 
22
24
  def nil?
23
25
  true
@@ -28,11 +30,13 @@ class Creds
28
30
  true
29
31
  end
30
32
 
33
+ # rubocop:disable Style/MethodMissingSuper
31
34
  def self.method_missing(name, *_args)
32
35
  instance.credentials.fetch(name)
33
36
  rescue KeyError
34
37
  raise MissingKeyError.new(name, Rails.env)
35
38
  end
39
+ # rubocop:enable Style/MethodMissingSuper
36
40
 
37
41
  def self.to_h
38
42
  instance.credentials
@@ -60,12 +64,12 @@ class Creds
60
64
  end
61
65
 
62
66
  def encrypted_credentials_exist?
63
- File.exist? Rails.root.join('config', 'credentials.yml.enc')
67
+ File.exist? Rails.root.join("config", "credentials.yml.enc")
64
68
  end
65
69
 
66
70
  def master_key_present?
67
- return true if ENV['RAILS_MASTER_KEY']
68
- return true if File.exist?(Rails.root.join('config', 'master.key'))
71
+ return true if ENV["RAILS_MASTER_KEY"]
72
+ return true if File.exist?(Rails.root.join("config", "master.key"))
69
73
  false
70
74
  end
71
75
  end
data/lib/rails-creds.rb CHANGED
@@ -1,3 +1 @@
1
- # rubocop:disable Naming/FileName
2
- # rubocop:enable Naming/FileName
3
- require 'creds'
1
+ require "creds"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-creds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-21 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.16'
33
+ version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.16'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -67,19 +67,19 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rubocop
70
+ name: standard
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.54'
75
+ version: 0.1.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.54'
82
+ version: 0.1.0
83
83
  description: ''
84
84
  email:
85
85
  - mikkel@brnbw.com
@@ -89,7 +89,6 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".rspec"
92
- - ".rubocop.yml"
93
92
  - ".travis.yml"
94
93
  - CHANGELOG.md
95
94
  - CODE_OF_CONDUCT.md
@@ -123,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
122
  - !ruby/object:Gem::Version
124
123
  version: '0'
125
124
  requirements: []
126
- rubygems_version: 3.0.2
125
+ rubygems_version: 3.0.4
127
126
  signing_key:
128
127
  specification_version: 4
129
128
  summary: Shorter, env-scoped version of Rails' credentials
data/.rubocop.yml DELETED
@@ -1,10 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - 'creds.gemspec'
4
-
5
- Metrics/BlockLength:
6
- Exclude:
7
- - 'spec/**/*.rb'
8
-
9
- Style/MethodMissingSuper:
10
- Enabled: false