can-do 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/can_do.gemspec +3 -3
  4. data/lib/can_do.rb +9 -1
  5. metadata +5 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cdc01b713da704aca92b3bf3f7479b3acab2910
4
- data.tar.gz: 6f526ea285fd00623b423faeba9d8f66b2712578
3
+ metadata.gz: 8eb5a19ab6f14a1d63e0d490b212ce57da941430
4
+ data.tar.gz: 2a53db2847e808306c426853d767a8f2319a62de
5
5
  SHA512:
6
- metadata.gz: f890889c4cb09d3a2da84256acc35a0747c42358691cd98304b27f38f72947ad12bb25578d9a6e9cd6743c241d5171f3d66ee0da8f9807532db2590715af89d1
7
- data.tar.gz: 51e3b27b2b563bc03662fd6eab2b16bd02ef08c9b1fadecb0a4e393abd052a65b4e4ef39560cf7e4410f48dbd4f23eba6e15b32733b39f7b98aea2d211b9828f
6
+ metadata.gz: 335a1d55bbc0ada21058946bf487a46915ed944e93c8d3bc007f0600277f30b656a8b1a324d37bb482a5263c39deff677b9b02e410693baa5b4b8b671e7132f2
7
+ data.tar.gz: 356dfff84096d84920547a38c5787d6d3a58027189cf0d8d3c1b7471a1e7d5b4b71a4ea47491fae93790563e3e68af5e187f8944f15c1dcbda0f49a468ff56cc
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # CanDo
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/can-do.svg)](http://badge.fury.io/rb/can-do)
4
+
3
5
  Flips your features based on a `config/features.yml` file or environment variables. No data store required.
4
6
 
5
7
  ## Usage
@@ -69,7 +71,7 @@ CanDo.feature?(:other_feature) => true
69
71
 
70
72
  ## Contributing
71
73
 
72
- 1. Fork it ( https://github.com/blacklane/can_do/fork )
74
+ 1. Fork it ( https://github.com/blacklane/can-do/fork )
73
75
  2. Create your feature branch (`git checkout -b my-new-feature`)
74
76
  3. Commit your changes (`git commit -am 'Add some feature'`)
75
77
  4. Push to the branch (`git push origin my-new-feature`)
data/can_do.gemspec CHANGED
@@ -3,9 +3,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "can-do"
6
- spec.version = "0.1.0"
7
- spec.authors = ["Florin Lipan"]
8
- spec.email = ["florin.lipan@blacklane.com"]
6
+ spec.version = "0.1.1"
7
+ spec.authors = ["Florin Lipan", "Yuri Veremeyenko"]
8
+ spec.email = ["florin.lipan@blacklane.com", "yuri.veremeyenko@blacklane.com"]
9
9
 
10
10
  spec.summary = %q{Simple feature flags.}
11
11
  spec.description = %q{Simple feature flags based on a YAML config file and/or environment variables.}
data/lib/can_do.rb CHANGED
@@ -68,6 +68,14 @@ class CanDo
68
68
  end
69
69
 
70
70
  def env
71
- ENV["RAILS_ENV"] || ENV["RACK_ENV"]
71
+ rails_env || rack_env
72
+ end
73
+
74
+ def rails_env
75
+ defined?(Rails) ? Rails.env : ENV["RAILS_ENV"]
76
+ end
77
+
78
+ def rack_env
79
+ ENV["RACK_ENV"]
72
80
  end
73
81
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: can-do
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florin Lipan
8
+ - Yuri Veremeyenko
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2016-03-08 00:00:00.000000000 Z
12
+ date: 2016-04-18 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -27,6 +28,7 @@ dependencies:
27
28
  description: Simple feature flags based on a YAML config file and/or environment variables.
28
29
  email:
29
30
  - florin.lipan@blacklane.com
31
+ - yuri.veremeyenko@blacklane.com
30
32
  executables: []
31
33
  extensions: []
32
34
  extra_rdoc_files: []
@@ -57,9 +59,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
59
  version: '0'
58
60
  requirements: []
59
61
  rubyforge_project:
60
- rubygems_version: 2.4.8
62
+ rubygems_version: 2.4.6
61
63
  signing_key:
62
64
  specification_version: 4
63
65
  summary: Simple feature flags.
64
66
  test_files: []
65
- has_rdoc: