env_branch 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +0 -0
- data/CONTRIBUTING.md +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +5 -0
- data/Rakefile +2 -2
- data/changelog.md +6 -0
- data/env_branch.gemspec +5 -4
- data/example/Gemfile +0 -0
- data/example/Gemfile.lock +0 -0
- data/lib/env_branch.rb +0 -0
- data/lib/env_branch/base.rb +2 -2
- data/lib/env_branch/test_helper.rb +4 -2
- data/lib/env_branch/version.rb +1 -1
- metadata +3 -8
- data/.conventional-changelog.context.js +0 -17
- data/.gitignore +0 -12
- data/.rubocop.yml +0 -10
- data/.travis.yml +0 -20
- data/package.json +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46629e008ce472695be6afcb51446ef1d378d141
|
4
|
+
data.tar.gz: e2336cced6797fb7a33cb8cdb39f18931026607b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 681644597ab6907f9a136f6d642449492c04ac2b1437cc35ba9f835ae83d94baad50021d0292a9c5f4cc85feb255f17dbae54cbbac3364dd03cdd13545a569f8
|
7
|
+
data.tar.gz: bf528d8a98eeb72fd8bbe83e15cd8fd0e1bad3e73edfbb80b016259d08bdc3e8453025693ba38d1325a3233efb8c9ffd0e8f1a7b7253a6db2eaf7ab00ddfc079
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/CONTRIBUTING.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -70,6 +70,11 @@ And more *[details][docs-url]*.
|
|
70
70
|
* [Environment variables - CircleCI](https://circleci.com/docs/environment-variables#build-details)
|
71
71
|
|
72
72
|
|
73
|
+
## Related
|
74
|
+
|
75
|
+
* [env_pull_request](https://github.com/packsaddle/ruby-env_pull_request)
|
76
|
+
|
77
|
+
|
73
78
|
## Changelog
|
74
79
|
|
75
80
|
[changelog.md](./changelog.md).
|
data/Rakefile
CHANGED
@@ -10,8 +10,8 @@ task default: :test
|
|
10
10
|
|
11
11
|
require 'yard'
|
12
12
|
require 'yard/rake/yardoc_task'
|
13
|
-
DOC_FILES = ['lib/**/*.rb']
|
14
|
-
DOC_OPTIONS = ['--debug', '--verbose']
|
13
|
+
DOC_FILES = ['lib/**/*.rb'].freeze
|
14
|
+
DOC_OPTIONS = ['--debug', '--verbose'].freeze
|
15
15
|
YARD::Rake::YardocTask.new(:doc) do |t|
|
16
16
|
t.files = DOC_FILES
|
17
17
|
t.options = DOC_OPTIONS if Rake.application.options.trace
|
data/changelog.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
<a name="0.2.2"></a>
|
2
|
+
## [0.2.2](https://github.com/packsaddle/ruby-env_branch/compare/v0.2.1...v0.2.2) (2016-05-01)
|
3
|
+
|
4
|
+
* Remove warning about instance variable.
|
5
|
+
|
6
|
+
|
1
7
|
<a name="0.2.1"></a>
|
2
8
|
## [0.2.1](https://github.com/packsaddle/ruby-env_branch/compare/v0.2.0...v0.2.1) (2015-09-28)
|
3
9
|
|
data/env_branch.gemspec
CHANGED
@@ -18,13 +18,14 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.files =
|
20
20
|
`git ls-files -z`
|
21
|
-
|
22
|
-
|
21
|
+
.split("\x0")
|
22
|
+
.reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
.reject { |f| f.match(/^\.|package\.json/) }
|
23
24
|
spec.bindir = 'exe'
|
24
25
|
spec.executables =
|
25
26
|
spec
|
26
|
-
|
27
|
-
|
27
|
+
.files
|
28
|
+
.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
29
|
spec.require_paths = ['lib']
|
29
30
|
|
30
31
|
spec.add_development_dependency 'bundler'
|
data/example/Gemfile
CHANGED
File without changes
|
data/example/Gemfile.lock
CHANGED
File without changes
|
data/lib/env_branch.rb
CHANGED
File without changes
|
data/lib/env_branch/base.rb
CHANGED
@@ -25,10 +25,10 @@ module EnvBranch
|
|
25
25
|
#
|
26
26
|
# @yield user defined block
|
27
27
|
# @return [Base] Branch information object
|
28
|
-
def initialize
|
28
|
+
def initialize
|
29
29
|
@branch_name =
|
30
30
|
if block_given?
|
31
|
-
|
31
|
+
yield || fetch_branch_name
|
32
32
|
else
|
33
33
|
fetch_branch_name
|
34
34
|
end
|
@@ -44,8 +44,10 @@ module EnvBranch
|
|
44
44
|
#
|
45
45
|
# @see Base#fetch_branch_name
|
46
46
|
def restore_env_branch
|
47
|
-
|
48
|
-
|
47
|
+
original_travis_branch = (defined?(@original_travis_branch) && @original_travis_branch) || nil
|
48
|
+
original_circle_branch = (defined?(@original_circle_branch) && @original_circle_branch) || nil
|
49
|
+
ENV['TRAVIS_BRANCH'] = original_travis_branch
|
50
|
+
ENV['CIRCLE_BRANCH'] = original_circle_branch
|
49
51
|
end
|
50
52
|
end
|
51
53
|
end
|
data/lib/env_branch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: env_branch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanemat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -59,10 +59,6 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- ".conventional-changelog.context.js"
|
63
|
-
- ".gitignore"
|
64
|
-
- ".rubocop.yml"
|
65
|
-
- ".travis.yml"
|
66
62
|
- CODE_OF_CONDUCT.md
|
67
63
|
- CONTRIBUTING.md
|
68
64
|
- Gemfile
|
@@ -80,7 +76,6 @@ files:
|
|
80
76
|
- lib/env_branch/base.rb
|
81
77
|
- lib/env_branch/test_helper.rb
|
82
78
|
- lib/env_branch/version.rb
|
83
|
-
- package.json
|
84
79
|
homepage: https://github.com/packsaddle/ruby-env_branch
|
85
80
|
licenses:
|
86
81
|
- MIT
|
@@ -101,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
96
|
version: '0'
|
102
97
|
requirements: []
|
103
98
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.5.1
|
105
100
|
signing_key:
|
106
101
|
specification_version: 4
|
107
102
|
summary: Get BRANCH_NAME from environment variables.
|
@@ -1,17 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
var execSync = require('child_process').execSync;
|
3
|
-
var URI = require('urijs');
|
4
|
-
|
5
|
-
var gemspec = JSON.parse(execSync('bundle exec parse-gemspec-cli env_branch.gemspec'));
|
6
|
-
var homepageUrl = gemspec.homepage;
|
7
|
-
var url = new URI(homepageUrl);
|
8
|
-
var host = url.protocol() + '://' + url.authority();
|
9
|
-
var owner = url.pathname().split('/')[1];
|
10
|
-
var repository = url.pathname().split('/')[2];
|
11
|
-
|
12
|
-
module.exports = {
|
13
|
-
version: gemspec.version,
|
14
|
-
host: host,
|
15
|
-
owner: owner,
|
16
|
-
repository: repository
|
17
|
-
};
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
data/.travis.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# CAUTION: DO NOT ADD encrypted value!
|
2
|
-
# test/test_test_helper.rb asserts ENV.
|
3
|
-
# And this will show ENV accidentally in CI log.
|
4
|
-
language: "ruby"
|
5
|
-
rvm:
|
6
|
-
- "1.9"
|
7
|
-
- "2.0"
|
8
|
-
- "2.1"
|
9
|
-
- "2.2"
|
10
|
-
- "ruby-head"
|
11
|
-
matrix:
|
12
|
-
allow_failures:
|
13
|
-
- rvm: "ruby-head"
|
14
|
-
before_install:
|
15
|
-
- "gem update bundler"
|
16
|
-
- "bin/setup"
|
17
|
-
before_script:
|
18
|
-
- "printenv"
|
19
|
-
after_script:
|
20
|
-
- "printenv"
|
data/package.json
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"devDependencies": {
|
3
|
-
"conventional-changelog": "0.4.3",
|
4
|
-
"npm-check-updates": "^2.2.3",
|
5
|
-
"urijs": "^1.16.1"
|
6
|
-
},
|
7
|
-
"scripts": {
|
8
|
-
"changelog": "conventional-changelog -i changelog.md --overwrite --preset angular --context .conventional-changelog.context.js",
|
9
|
-
"ncu": "ncu -u"
|
10
|
-
}
|
11
|
-
}
|