env_branch 0.1.1 → 0.2.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: 35b1e2b8022a0e6b2cce452185d5bd2da0a86e2a
4
- data.tar.gz: 99af2c913db60729ed3f70153bcd2315effed3a2
3
+ metadata.gz: 59a9ebce6f2c0af2d0b221313297870deed81cf4
4
+ data.tar.gz: 6072601810abe9faba4117fd30caad5b34a7fe7a
5
5
  SHA512:
6
- metadata.gz: 5929393e51cd487caf1eb82c70cc377466afc39250ecdac7f64bc38fd38f89bdbc3035e9da0ed4757d94ef3f320d8c4306bab770383bffb26901d77702ab7038
7
- data.tar.gz: 53fa7ac9fd84f99b9af255188ccb5c7cacd3271a44718cda96ba06b9947dfface35e102d4d0ee574b0ffc7a2cde2e8a251578ba53dfb6c1afede5fa3959551eb
6
+ metadata.gz: 4402d22e5406531ceb7cc02074f56eae04ad839028b154a64882f7c835166feee74465c493efa6f8cf3dcd58b9271a1c7766861d0a4a6bab04ef303f524bbf52
7
+ data.tar.gz: 0037c4575b86d0382109dd14981b795b90a20c687fe18dbd45514ea346daae95d4d58f07f558b7213a9f8475c0f4bb5d0b0c609459890dc69748548b2de73502
data/changelog.md CHANGED
@@ -1,3 +1,13 @@
1
+ <a name="0.2.0"></a>
2
+ # [0.2.0](https://github.com/packsaddle/ruby-env_branch/compare/v0.1.1...v0.2.0) (2015-09-28)
3
+
4
+
5
+ ### Features
6
+
7
+ * **block:** build env branch with block ([83dd640](https://github.com/packsaddle/ruby-env_branch/commit/83dd640))
8
+
9
+
10
+
1
11
  <a name="0.1.1"></a>
2
12
  ## [0.1.1](https://github.com/packsaddle/ruby-env_branch/compare/v0.1.0...v0.1.1) (2015-09-28)
3
13
 
@@ -2,8 +2,13 @@ module EnvBranch
2
2
  class Base
3
3
  attr_reader :branch_name
4
4
 
5
- def initialize
6
- @branch_name = fetch_branch_name
5
+ def initialize(&block)
6
+ @branch_name =
7
+ if block_given?
8
+ block.call || fetch_branch_name
9
+ else
10
+ fetch_branch_name
11
+ end
7
12
  end
8
13
 
9
14
  # travis-ci.org:
@@ -1,3 +1,3 @@
1
1
  module EnvBranch
2
- VERSION = '0.1.1'
2
+ VERSION = '0.2.0'
3
3
  end
data/lib/env_branch.rb CHANGED
@@ -2,7 +2,7 @@ require 'env_branch/base'
2
2
  require 'env_branch/version'
3
3
 
4
4
  module EnvBranch
5
- def self.new
6
- Base.new
5
+ def self.new(&block)
6
+ Base.new(&block)
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env_branch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat