middleman-dotenv 1.1.1 → 2.0.0

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: 3d0a7c15d2c99f66f30868ac76f352446987065c
4
- data.tar.gz: d0633f521c32e7b44130f3b768491a9575d187ed
3
+ metadata.gz: b412d29dde7f54c396884bb7b2d0efe730f20876
4
+ data.tar.gz: 7939bd9d7db173d4b84efc1079cd48655461a57f
5
5
  SHA512:
6
- metadata.gz: 63c0bc468260367b96f740335cc8b30a0d354fa9a2cdf981361bec384a8225d5c2cb626377655099142e6b6af1f94a8a8a4f524faaf96ec7e1615bca8dc19a7d
7
- data.tar.gz: a9fb2670a3eb31ccb994d926f0cc514a52067bde4f0ad4c906a6a2d8e1459b383fb6e3f2b5cf598c099678135d759c0aaa2c2a1fd3485025777335b77dce6d1c
6
+ metadata.gz: b8b0ca1e4e79151fe0ba3111628da554945f9a951d76889da1d8ecce7472aa7481197452e1e5910b47bcab9d61f171e089f4c87521fb2f65b4d76537888b77a3
7
+ data.tar.gz: 14ea8c73b29e93e18759a612259f097d547849535e9d8cbe03fc516e13bd54a2276d4520d5ebcdbc6ac32e1d075bfde7f43a48e8979fcec1a763a122a6015260
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  cache: bundler
3
4
  bundler_args: --without development
4
5
  rvm:
@@ -6,10 +7,12 @@ rvm:
6
7
  - ruby
7
8
  - jruby-head
8
9
  - jruby
10
+ - 2.2.0
9
11
  - 2.1.0
10
12
  - 2.0.0
11
13
  - 1.9.3
12
14
  - rbx-2
15
+ before_script: bundle update
13
16
  matrix:
14
17
  fast_finish: true
15
18
  allow_failures:
@@ -21,4 +24,4 @@ matrix:
21
24
  notifications:
22
25
  email: false
23
26
  env:
24
- - CODECLIMATE_REPO_TOKEN=e5926063262b3a825cb9457b161e408788126431305069ae0d67d8179793e9e9
27
+ - CODECLIMATE_REPO_TOKEN=e5926063262b3a825cb9457b161e408788126431305069ae0d67d8179793e9e9
@@ -0,0 +1,7 @@
1
+ Next Release
2
+ ============
3
+ * Your contribution here.
4
+
5
+ 1.2.0 (10/02/2016)
6
+ ==================
7
+ * [Moves away from module-style extension to support Middleman v4](https://github.com/middleman-contrib/middleman-dotenv/pull/4) - [@pcoliveira](https://github.com/pcoliveira). Thanks [@hats](https://github.com/hats)
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2014 Karl Freeman
1
+ Copyright (c) 2013-2015 Karl Freeman
2
2
 
3
3
  MIT License
4
4
 
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -5,7 +5,7 @@ Integrates [Dotenv](https://github.com/bkeepers/dotenv) into [Middleman](http://
5
5
  ## Installation
6
6
 
7
7
  ```ruby
8
- gem 'middleman-dotenv', '~> 1.0'
8
+ gem 'middleman-dotenv', '~> 2.0'
9
9
  ```
10
10
 
11
11
  Open your `config.rb` and add the following right at the top of the file
@@ -31,16 +31,16 @@ end
31
31
  ## Badges
32
32
 
33
33
  [![Gem Version](http://img.shields.io/gem/v/middleman-dotenv.svg)][gem]
34
- [![Build Status](http://img.shields.io/travis/karlfreeman/middleman-dotenv.svg)][travis]
35
- [![Code Quality](http://img.shields.io/codeclimate/github/karlfreeman/middleman-dotenv.svg)][codeclimate]
36
- [![Code Coverage](http://img.shields.io/codeclimate/coverage/github/karlfreeman/middleman-dotenv.svg)][codeclimate]
37
- [![Gittip](http://img.shields.io/gittip/karlfreeman.svg)][gittip]
34
+ [![Build Status](http://img.shields.io/travis/middleman-contrib/middleman-dotenv.svg)][travis]
35
+ [![Code Quality](http://img.shields.io/codeclimate/github/middleman-contrib/middleman-dotenv.svg)][codeclimate]
36
+ [![Code Coverage](http://img.shields.io/codeclimate/coverage/github/middleman-contrib/middleman-dotenv.svg)][codeclimate]
38
37
 
39
38
  ## Supported Ruby Versions
40
39
 
41
40
  This library aims to support and is [tested against][travis] the following Ruby
42
41
  implementations:
43
42
 
43
+ - Ruby 2.2.0
44
44
  - Ruby 2.1.0
45
45
  - Ruby 2.0.0
46
46
  - Ruby 1.9.3
@@ -48,8 +48,7 @@ implementations:
48
48
  - [Rubinius][rubinius]
49
49
 
50
50
  [gem]: https://rubygems.org/gems/middleman-dotenv
51
- [travis]: http://travis-ci.org/karlfreeman/middleman-dotenv
52
- [codeclimate]: https://codeclimate.com/github/karlfreeman/middleman-dotenv
53
- [gittip]: https://www.gittip.com/karlfreeman/
51
+ [travis]: http://travis-ci.org/middleman-contrib/middleman-dotenv
52
+ [codeclimate]: https://codeclimate.com/github/middleman-contrib/middleman-dotenv
54
53
  [jruby]: http://www.jruby.org
55
54
  [rubinius]: http://rubini.us
@@ -1,6 +1,7 @@
1
1
  require 'middleman-core'
2
2
 
3
3
  ::Middleman::Extensions.register(:dotenv) do
4
+ require 'dotenv'
4
5
  require 'middleman-dotenv/extension'
5
- ::Middleman::Dotenv
6
+ ::Middleman::Dotenv::Extension
6
7
  end
@@ -1,15 +1,17 @@
1
1
  module Middleman
2
2
  module Dotenv
3
- class << self
4
- def registered(app, options_hash = {})
5
- env = options_hash[:env] || '.env'
6
- require 'dotenv' unless defined?(::Dotenv)
7
- ::Dotenv.load File.join(Dir.pwd, env)
3
+ class Extension < ::Middleman::Extension
4
+ option :env, '.env', 'environment file name'
5
+
6
+ def initialize(app, options_hash = {}, &block)
7
+ super
8
+
9
+ env = options.env
10
+ ::Dotenv.load File.join(app.root, env)
8
11
  app.before do
9
- ::Dotenv.load File.join(self.class.inst.root, env)
12
+ ::Dotenv.load File.join(self.root, env)
10
13
  end
11
14
  end
12
- alias_method :included, :registered
13
15
  end
14
16
  end
15
17
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Dotenv
3
- VERSION = '1.1.1' unless defined?(Middleman::Dotenv::VERSION)
3
+ VERSION = '2.0.0' unless defined?(Middleman::Dotenv::VERSION)
4
4
  end
5
5
  end
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
  spec.required_ruby_version = '>= 1.9.3'
21
21
 
22
- spec.add_runtime_dependency 'middleman-core', '>= 3.2'
23
- spec.add_runtime_dependency 'dotenv', '~> 1.0'
22
+ spec.add_runtime_dependency 'middleman-core', '>= 4.0'
23
+ spec.add_runtime_dependency 'dotenv', '>= 2.0'
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 1.5'
26
26
  spec.add_development_dependency 'rake', '~> 10.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-dotenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Freeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-21 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '4.0'
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: '3.2'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dotenv
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: '2.0'
34
34
  type: :runtime
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.0'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  version: '0'
173
173
  requirements: []
174
174
  rubyforge_project:
175
- rubygems_version: 2.2.2
175
+ rubygems_version: 2.5.1
176
176
  signing_key:
177
177
  specification_version: 4
178
178
  summary: Dotenv for Middleman