fastenv 0.0.1 → 0.0.2

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: 67e94392e708cc2b285d3119726e1eed616e8686
4
- data.tar.gz: 44e4e5fef08f8c4642c0716286f282393df15f14
3
+ metadata.gz: 89d95332b8d91bbba1eb1523620932eb276e641f
4
+ data.tar.gz: 8517cf01810d392a8384754023b3bd3de5c330ee
5
5
  SHA512:
6
- metadata.gz: ecdba5415fcef25f353950593676e110f23477f39b3d764b5acde4690ec720fe32959ee718b2571dfbdf94d4a51a17c0e38bd3f0dadf1a042eb2a9850fdb9655
7
- data.tar.gz: 9010c39ca0b05282722ed4f1f5dd461732546334a4af3f7a3b7b95fa74aa5f8e830c14456e9e3efba1d919a23473b76c649650e7c96fa37f710d93568d513f84
6
+ metadata.gz: a1208a38f61a7a81bfef27150593da1a5f31fb2aa8a8845aa585273c1df711444550e9016a04297c96cc047a7ed14df11822c7c922edb225a50c5902a40c772e
7
+ data.tar.gz: 97c0d65a617a616389ceaaed40732d856534cc1965911f69ec92c2c4042fd0bfd2d2156e00b1048bcf00087f6593ed2106bfb1c245927f1ead1485228233eb59
data/LICENSE.txt CHANGED
@@ -20,3 +20,4 @@ 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
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Fastenv
2
2
 
3
- TODO: Write a gem description
3
+ Fast access to environment variables. Takes advantage of method_missing to
4
+ easily return values of environment variable.
5
+
6
+ Why? Because TYPING_IN_ALL_CAPS isn't fun or readable.
4
7
 
5
8
  ## Installation
6
9
 
@@ -12,20 +15,68 @@ gem 'fastenv'
12
15
 
13
16
  And then execute:
14
17
 
15
- $ bundle
18
+ ```
19
+ $ bundle
20
+ ```
16
21
 
17
22
  Or install it yourself as:
18
23
 
19
- $ gem install fastenv
24
+ ```
25
+ $ gem install fastenv
26
+ ```
20
27
 
21
28
  ## Usage
22
29
 
23
- TODO: Write usage instructions here
30
+ Say you have an environment variable
31
+
32
+ ```bash
33
+ WORDPRESS_USERNAME="La-de-da-de-da"
34
+ ```
35
+
36
+ You can access it from your Ruby code as simply as
37
+
38
+ ```ruby
39
+ require 'fastenv'
40
+
41
+ Fastenv.wordpress_username
42
+ ```
43
+
44
+ If the environment variable doesn't exist, a `NameError` will be raise.
45
+
46
+ Fastenv is intended for querying credentials. Missing credentials is an
47
+ exceptional event.
48
+
49
+ ---
50
+
51
+ ## Goes Well With
52
+
53
+ Pair it with [dotenv](https://github.com/bkeepers/dotenv) to easily set _and_
54
+ retrieve your credentials from environment variables.
55
+
56
+ ```bash
57
+ # .env
58
+ WORDPRESS_USERNAME="TweedleDee"
59
+ WORDPRESS_PASSWORD="password"
60
+ ```
61
+
62
+ ```ruby
63
+ # your_app.rb
64
+ require 'dotenv'
65
+ Dotenv.load
66
+
67
+ require 'fastenv'
68
+
69
+ credentials = {
70
+ username: Fastenv.wordpress_username,
71
+ password: Fastenv.wordpress_password }
72
+ # => {:username=>"TweedleDee", :password=>"password"}
73
+ ```
24
74
 
25
75
  ## Contributing
26
76
 
27
- 1. Fork it ( https://github.com/[my-github-username]/fastenv/fork )
77
+ 1. Fork it ( https://github.com/kyletolle/fastenv/fork )
28
78
  2. Create your feature branch (`git checkout -b my-new-feature`)
29
79
  3. Commit your changes (`git commit -am 'Add some feature'`)
30
80
  4. Push to the branch (`git push origin my-new-feature`)
31
81
  5. Create a new Pull Request
82
+
data/fastenv.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["kyle@nullsix.com"]
11
11
  spec.summary = %q{Fast access to environment variables.}
12
12
  spec.description = %q{Takes advantage of method_missing to give you fast access to environment variables.}
13
- spec.homepage = "https://rubygems.org/gems/fastenv"
13
+ spec.homepage = "https://github.com/kyletolle/fastenv"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -1,4 +1,4 @@
1
1
  class Fastenv
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Tolle
@@ -72,7 +72,7 @@ files:
72
72
  - lib/fastenv/version.rb
73
73
  - spec/fastenv_spec.rb
74
74
  - spec/spec_helper.rb
75
- homepage: https://rubygems.org/gems/fastenv
75
+ homepage: https://github.com/kyletolle/fastenv
76
76
  licenses:
77
77
  - MIT
78
78
  metadata: {}