middleman-dotenv 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NGQ3NGEwMzFmNTUyZjhkNjdlODVhOThmOWJhM2FkNDc2MTI5MmFlZQ==
5
+ data.tar.gz: !binary |-
6
+ ZTdiNDBmZjYwM2RiZjllYWEwNWNkMWFmOTYwYmE1YjcxYzFkYTc1NA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YTgxNjI5ZTgzYmEzYWU0ZWE0YWM2ZmVhMWZiN2ZmMjhiODI0MzI2MTJmZjU1
10
+ ZTg3NjRhNWFhMmJhNGRmNzNmYzMwMTY5ZjUxMjQxMzcyZGFkZjM4NWU3NzIy
11
+ YWNlOWU2ZGNmZjA3MDkzNDk0NzZlNTUzNzJjYTllZGNmNGFiOTE=
12
+ data.tar.gz: !binary |-
13
+ YzAwMjE4NmQyNjk3NzBjNDVmOGYzYTkwNDg0ZDc5NTM3MzZiYjVhNTcxMGFj
14
+ NDgyNTY4MWY1NzMxM2M0N2U4ZTQ3YmI3ZTBiMzc2Y2FmZjQyMzA4OGEwZmI2
15
+ NTE1NmU4YTAyMGUzMjZlZjc4NWRjNzFhMjYzMTMxZjA2M2E4OTY=
@@ -0,0 +1,17 @@
1
+ .DS_Store
2
+ coverage
3
+ rdoc
4
+ pkg
5
+ .sass-cache
6
+ .sassc
7
+ .tmp
8
+ Gemfile.lock
9
+ docs
10
+ .rbenv-*
11
+ .*.swp
12
+ build
13
+ doc
14
+ .yardoc
15
+ tmp
16
+ Makefile
17
+ .mm-pid-*
@@ -0,0 +1,12 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - jruby-18mode
6
+ - jruby-19mode
7
+ script: "bundle exec rake test"
8
+ env: TEST=true
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: jruby-18mode
12
+ - rvm: jruby-19mode
File without changes
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git "git://github.com/middleman/middleman.git", :branch => "3.0-stable" do
4
+ gem "middleman-core"
5
+ end
6
+
7
+ gemspec
8
+
9
+ gem "rake", "~> 0.9.2"
10
+ gem "rdoc", "~> 3.9"
11
+ gem "yard", "~> 0.8.0"
12
+ gem "cucumber", "~> 1.2.0"
13
+ gem "fivemat"
14
+ gem "aruba", "~> 0.4.11"
15
+ gem "rspec", "~> 2.7"
@@ -0,0 +1,9 @@
1
+ ## Middleman Dotenv ( WIP ) [![Gem Version](https://badge.fury.io/rb/middleman-dotenv.png)][gem] [![Build Status](https://travis-ci.org/karlfreeman/middleman-dotenv.png?branch=feature/3-1-rewrite)][travis] [![Dependency Status](https://gemnasium.com/karlfreeman/middleman-dotenv.png?travis)][gemnasium] [![Coverage Status](https://coveralls.io/repos/karlfreeman/middleman-dotenv/badge.png?branch=feature/3-1-rewrite)][coveralls] [![Code Climate](https://codeclimate.com/github/karlfreeman/middleman-dotenv.png)][codeclimate]
2
+
3
+ Dotenv for Middleman
4
+
5
+ [gem]: https://rubygems.org/gems/middleman-dotenv
6
+ [travis]: http://travis-ci.org/karlfreeman/middleman-dotenv
7
+ [gemnasium]: https://gemnasium.com/karlfreeman/middleman-dotenv
8
+ [coveralls]: https://coveralls.io/r/karlfreeman/middleman-dotenv
9
+ [codeclimate]: https://codeclimate.com/github/karlfreeman/middleman-dotenv
@@ -0,0 +1,19 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'cucumber/rake/task'
5
+ Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
6
+ ENV["TEST"] = "true"
7
+ exempt_tags = ""
8
+ exempt_tags << "--tags ~@nojava" if RUBY_PLATFORM == "java"
9
+ t.cucumber_opts = "--color --tags ~@wip #{exempt_tags} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
10
+ end
11
+
12
+ require 'rake/clean'
13
+
14
+ task :test => ["cucumber"]
15
+
16
+ desc "Build HTML documentation"
17
+ task :doc do
18
+ sh 'bundle exec yard'
19
+ end
@@ -0,0 +1,11 @@
1
+ Feature: loading .env variables
2
+
3
+ Scenario: With .dotenv
4
+ Given the Server is running at "env-app"
5
+ When I go to "/test.html"
6
+ Then I should see "<h1>BAR</h1>"
7
+
8
+ Scenario: Without .dotenv
9
+ Given the Server is running at "envless-app"
10
+ When I go to "/test.html"
11
+ Then I should see "<h1></h1>"
@@ -0,0 +1,4 @@
1
+ PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
2
+ require "middleman-core"
3
+ require "middleman-core/step_definitions"
4
+ require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-dotenv')
@@ -0,0 +1 @@
1
+ FOO=BAR
@@ -0,0 +1 @@
1
+ activate :dotenv
@@ -0,0 +1 @@
1
+ <h1><%= ENV["FOO"] %></h1>
@@ -0,0 +1 @@
1
+ activate :dotenv
@@ -0,0 +1 @@
1
+ <h1><%= ENV["BAR"] %></h1>
@@ -0,0 +1,7 @@
1
+ require "middleman-core"
2
+ require "middleman-dotenv/version"
3
+
4
+ ::Middleman::Extensions.register(:dotenv) do
5
+ require "middleman-dotenv/extension"
6
+ ::Middleman::Dotenv
7
+ end
@@ -0,0 +1,14 @@
1
+ module Middleman
2
+ module Dotenv
3
+ class << self
4
+ def registered(app, options_hash={})
5
+ require 'dotenv'
6
+ ::Dotenv.load File.join(Dir.pwd, ".env")
7
+ app.before do
8
+ ::Dotenv.load File.join(self.class.inst.root, ".env")
9
+ end
10
+ end
11
+ alias :included :registered
12
+ end
13
+ end
14
+ end
@@ -0,0 +1 @@
1
+ require 'middleman-dotenv'
@@ -0,0 +1,5 @@
1
+ module Middleman
2
+ module Dotenv
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path(File.join("..", "lib", "middleman-dotenv", "version"), __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "middleman-dotenv"
6
+ s.version = Middleman::Dotenv::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["Karl Freeman"]
9
+ s.email = ["karlfreeman@gmail.com"]
10
+ s.homepage = "https://github.com/karlfreeman/middleman-dotenv"
11
+ s.summary = %q{}
12
+ s.description = %q{}
13
+
14
+ s.files = `git ls-files -z`.split("\0")
15
+ s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
16
+ s.require_paths = ["lib"]
17
+
18
+ s.add_runtime_dependency("middleman-core", "~> 3.0")
19
+ s.add_runtime_dependency("dotenv", "~> 0.7.0")
20
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: middleman-dotenv
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Karl Freeman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-05-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: middleman-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: dotenv
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.0
41
+ description: ''
42
+ email:
43
+ - karlfreeman@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - .gitignore
49
+ - .travis.yml
50
+ - CHANGELOG.md
51
+ - Gemfile
52
+ - README.md
53
+ - Rakefile
54
+ - features/dotenv.feature
55
+ - features/support/env.rb
56
+ - fixtures/env-app/.env
57
+ - fixtures/env-app/config.rb
58
+ - fixtures/env-app/source/test.html.erb
59
+ - fixtures/envless-app/config.rb
60
+ - fixtures/envless-app/source/test.html.erb
61
+ - lib/middleman-dotenv.rb
62
+ - lib/middleman-dotenv/extension.rb
63
+ - lib/middleman-dotenv/middleman_extension.rb
64
+ - lib/middleman-dotenv/version.rb
65
+ - middleman-dotenv.gemspec
66
+ homepage: https://github.com/karlfreeman/middleman-dotenv
67
+ licenses: []
68
+ metadata: {}
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubyforge_project:
85
+ rubygems_version: 2.0.1
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: ''
89
+ test_files:
90
+ - features/dotenv.feature
91
+ - features/support/env.rb
92
+ - fixtures/env-app/.env
93
+ - fixtures/env-app/config.rb
94
+ - fixtures/env-app/source/test.html.erb
95
+ - fixtures/envless-app/config.rb
96
+ - fixtures/envless-app/source/test.html.erb
97
+ has_rdoc: