env_pull_request 0.1.0 → 0.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 442e21743b005af0692c605e18435c563e22f7d0
4
- data.tar.gz: 35fd286fae0f40c4d5fa3d050085bc555c28ea24
3
+ metadata.gz: db3467f4fc7b91aff0daf1aa073bba93bf97eeaf
4
+ data.tar.gz: d0701ed1e44242d43dd5ccdd3f5e1a855020d160
5
5
  SHA512:
6
- metadata.gz: 24e551531553cba60148700aaf05e72383b3774d44f8a0b0d749d786b63da5028e7c3f085ab50323a913f20f982c5ca4301279a62d4dc8fa0632b61fb5ffa42b
7
- data.tar.gz: 457842dce98b9077e9a2b8268c6a9b34ef7a6f45d1e135f1253d352232db1e7216e83dd87d6571f5ca1826a6fbd00731ebef805de4b8685be8b02d940dfbe8c2
6
+ metadata.gz: cfce42dcd343b8b4072794f5bf52025a5838a158e8b287d8e281b0250b1e28e116cf0eb132fc51d9f464328a66504dfe375bf7ee42661dabafd25d6c770eef7b
7
+ data.tar.gz: 55d834150cdf04c76465bd2ae2e000e3f7a5677f008b47661ff1aa0a9c74013d1f93d49a8e2b108f0307d979618eecb1a6364fd08edfb5f978ff0446e77f0c46
data/README.md CHANGED
@@ -1,8 +1,35 @@
1
1
  # EnvPullRequest
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/env_pull_request`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem version][gem-image]][gem-url] [![Travis-CI Status][travis-image]][travis-url]
4
+
5
+ > Get PULL_REQUEST_ID from environment variables.
6
+
7
+
8
+ ## Usage
9
+
10
+ ```ruby
11
+ require 'env_pull_request'
12
+
13
+ env_pull = EnvPullRequest.new
14
+ env_pull.pull_request? #=> true
15
+ env_pull.pull_request_id #=> 800
16
+ ```
17
+
18
+
19
+ ## API
20
+
21
+
22
+ ## Supported services / applications
23
+
24
+ * Travis-ci
25
+ * `ENV['TRAVIS_PULL_REQUEST']`
26
+ * [Environment Variables - Travis CI](http://docs.travis-ci.com/user/environment-variables/#Convenience-Variables)
27
+
28
+
29
+ ## Changelog
30
+
31
+ [changelog.md](./changelog.md).
4
32
 
5
- TODO: Delete this and the text above, and describe your gem
6
33
 
7
34
  ## Installation
8
35
 
@@ -20,22 +47,26 @@ Or install it yourself as:
20
47
 
21
48
  $ gem install env_pull_request
22
49
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
50
 
27
51
  ## Development
28
52
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
53
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
54
 
31
55
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
56
 
57
+
33
58
  ## Contributing
34
59
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/env_pull_request. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
60
+ Bug reports and pull requests are welcome on GitHub at https://github.com/packsaddle/ruby-env_pull_request. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
36
61
 
37
62
 
38
63
  ## License
39
64
 
65
+ © [sanemat](http://sane.jp)
66
+
40
67
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
68
 
69
+ [travis-url]: https://travis-ci.org/packsaddle/ruby-env_pull_request
70
+ [travis-image]: https://img.shields.io/travis/packsaddle/ruby-env_pull_request/master.svg?style=flat-square&label=build%20%28linux%29
71
+ [gem-url]: https://rubygems.org/gems/env_pull_request
72
+ [gem-image]: http://img.shields.io/gem/v/env_pull_request.svg?style=flat-square
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_pull_request/compare/v0.1.0...v0.2.0) (2015-09-25)
3
+
4
+
5
+ ### Features
6
+
7
+ * **travis-ci:** add travis-ci ([e44dce0](https://github.com/packsaddle/ruby-env_pull_request/commit/e44dce0))
8
+
9
+
10
+
1
11
  <a name="0.1.0"></a>
2
12
  # 0.1.0 (2015-09-25)
3
13
 
@@ -7,7 +7,9 @@ module EnvPullRequest
7
7
  end
8
8
 
9
9
  def fetch_pull_request_id
10
- nil
10
+ if ENV['TRAVIS_PULL_REQUEST'] && ENV['TRAVIS_PULL_REQUEST'].downcase != 'false'
11
+ ENV['TRAVIS_PULL_REQUEST'].to_i
12
+ end
11
13
  end
12
14
 
13
15
  def pull_request?
@@ -1,3 +1,3 @@
1
1
  module EnvPullRequest
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env_pull_request
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat