redminerb 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +0 -3
- data/README.md +10 -3
- data/lib/redminerb/config.rb +15 -4
- data/lib/redminerb/version.rb +1 -1
- data/redminerb.gemspec +4 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a49e586712bf0924ff9b33e62ced033b819f04c9
|
4
|
+
data.tar.gz: 701469b08e46198247d08f594a408adf2d337bfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 748833ecb5650f32b39bd15701a8b8920cec019dae74cbf9cfadaad204d42fee75a5c388f3cf1c230b2f86c0cea6ec11ce3fb0e2735139525554261ea2201487
|
7
|
+
data.tar.gz: 7b332454c69db01165a560f4bf83d04a099fd8293e142d8b605483de73bd33087acf4257a3104db64415e9bae90ee8dc68234c5fab3190b0e2b9c5f8b5806086
|
data/CHANGELOG.rdoc
CHANGED
data/README.md
CHANGED
@@ -34,12 +34,19 @@ Or install it yourself as:
|
|
34
34
|
|
35
35
|
## Usage
|
36
36
|
|
37
|
-
The URL
|
38
|
-
|
37
|
+
The URL and the API key needed to access to your Redmine REST API need to be in
|
38
|
+
in your environment or in the `~/.redminerb.yml`.
|
39
|
+
|
40
|
+
For example, this `~/.redminerb.yml`:
|
39
41
|
|
40
42
|
url: http://localhost:3000/
|
41
43
|
api_key: 69b47d74e36a6757bac5d45f8398dd23bfa8f52c
|
42
44
|
|
45
|
+
Would be the same as having the following in your `.bashrc`:
|
46
|
+
|
47
|
+
export REDMINERB_URL=http://localhost:3000/
|
48
|
+
export REDMINERB_API_KEY=69b47d74e36a6757bac5d45f8398dd23bfa8f52c
|
49
|
+
|
43
50
|
### Configuration (config)
|
44
51
|
|
45
52
|
To see the current configuration used by Redminerb we have the `config` command:
|
@@ -75,5 +82,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
75
82
|
|
76
83
|
## Contributing
|
77
84
|
|
78
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/nando/redminerb. 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.
|
85
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/nando/redminerb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
79
86
|
|
data/lib/redminerb/config.rb
CHANGED
@@ -5,10 +5,7 @@ module Redminerb
|
|
5
5
|
# Read user's config from ~/.redminerb.yml
|
6
6
|
class Config
|
7
7
|
def initialize
|
8
|
-
|
9
|
-
@url = yaml['url']
|
10
|
-
@api_key = yaml['api_key']
|
11
|
-
end
|
8
|
+
ENV['REDMINERB_URL'] ? _from_env : _from_yml
|
12
9
|
end
|
13
10
|
|
14
11
|
def url
|
@@ -20,5 +17,19 @@ module Redminerb
|
|
20
17
|
Redminerb.init_required!
|
21
18
|
@api_key
|
22
19
|
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def _from_yml
|
24
|
+
YAML.load_file(File.join(ENV['HOME'], '.redminerb.yml')).tap do |yaml|
|
25
|
+
@url = yaml['url']
|
26
|
+
@api_key = yaml['api_key']
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def _from_env
|
31
|
+
@url = ENV['REDMINERB_URL']
|
32
|
+
@api_key = ENV['REDMINERB_API_KEY']
|
33
|
+
end
|
23
34
|
end
|
24
35
|
end
|
data/lib/redminerb/version.rb
CHANGED
data/redminerb.gemspec
CHANGED
@@ -36,7 +36,11 @@ Gem::Specification.new do |spec|
|
|
36
36
|
|
37
37
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
38
38
|
spec.add_development_dependency 'rake', '~> 10.0'
|
39
|
+
|
39
40
|
spec.add_development_dependency 'minitest'
|
41
|
+
spec.add_development_dependency 'climate_control' # fake ENV
|
42
|
+
|
40
43
|
spec.add_development_dependency 'rubocop'
|
44
|
+
|
41
45
|
spec.add_development_dependency 'pry'
|
42
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redminerb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Garcia Samblas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: climate_control
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rubocop
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|