danger-mcbrain 0.0.1 → 0.0.2
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 +4 -4
- data/.travis.yml +12 -1
- data/LICENSE.txt +1 -1
- data/README.md +25 -22
- data/danger-mcbrain.gemspec +1 -1
- data/lib/mcbrain/gem_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c28770c9d6f5acec085f8493c0dbe522049d7217
|
4
|
+
data.tar.gz: 9d350d636f64a3cbc46118498261dff1559b3f19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96e9c7e0b67d59dd9ee65e0a154b2fe8a419312674fc036d8398988d9459cffc4ba614671a6cef3f785b64bf747c70aa6a7022877839af9b1d4ea854964b42a1
|
7
|
+
data.tar.gz: '093c3eff5dda5d0416a02ae012d4eeecbfc0396319bed9a17aadf6defeb3118bb603393c391dcad0f72694782339ffd304334edb496e902d8a12d5805b311570'
|
data/.travis.yml
CHANGED
@@ -8,5 +8,16 @@ rvm:
|
|
8
8
|
- 2.1.3
|
9
9
|
- 2.3.1
|
10
10
|
|
11
|
+
bundler_args: "--without documentation --path bundle"
|
12
|
+
|
13
|
+
before_install:
|
14
|
+
- gem install bundler
|
15
|
+
|
16
|
+
after_install:
|
17
|
+
- rake install
|
18
|
+
|
11
19
|
script:
|
12
|
-
|
20
|
+
# Tests use real git commands
|
21
|
+
- git config --global user.email "danger@example.com"
|
22
|
+
- git config --global user.name "Danger McShane"
|
23
|
+
- bundle exec rake spec
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# danger-mcbrain
|
2
2
|
|
3
|
+
[](https://github.com/dbgrandi/danger-mcbrain/blob/master/LICENSE)
|
4
|
+
[](http://rubygems.org/gems/danger-mcbrain)
|
5
|
+
|
3
6
|
Give Danger a memory, so she can check your PR today, and then answer questions about it tomorrow. Uses Redis for the persistence.
|
4
7
|
|
5
8
|
## Installation
|
@@ -8,35 +11,35 @@ Give Danger a memory, so she can check your PR today, and then answer questions
|
|
8
11
|
|
9
12
|
## Usage
|
10
13
|
|
11
|
-
|
12
|
-
|
14
|
+
Methods and attributes from this plugin are available in
|
15
|
+
your `Dangerfile` under the `brain` namespace.
|
13
16
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
You need to connect Danger's `brain` to a redis instance by
|
18
|
+
calling `brain.connect` somewhere in your `Dangerfile`. You
|
19
|
+
can pass any arguments into `connect` that you would normally
|
20
|
+
pass directly into `Redis.new`. You can read more about that
|
21
|
+
in their [Getting Started](https://github.com/redis/redis-rb#getting-started)
|
22
|
+
guide.
|
20
23
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
After you have connected, `brain` acts quite like a regular old
|
25
|
+
Ruby Hash, so you can use the `[]` operator and `[]=` operator to
|
26
|
+
get or set key/value pairs.
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
+
You can set a `namespace` on the `brain` if needed. This can be handy
|
29
|
+
in cases where you want to share a redis instance across multiple projecs
|
30
|
+
or repositories.
|
28
31
|
|
29
|
-
|
32
|
+
e.g.
|
30
33
|
|
31
|
-
|
32
|
-
|
34
|
+
```ruby
|
35
|
+
brain.namespace = "dbgrandi/danger-prose"
|
33
36
|
|
34
|
-
|
37
|
+
last_build_time = brain[last_pr + ":build_time"]
|
35
38
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
39
|
+
if last_build_time > build_time
|
40
|
+
warn "Your build time is getting longer. #{last_pr}: #{last_build_time} -> #{pr}: #{build_time}"
|
41
|
+
end
|
42
|
+
```
|
40
43
|
|
41
44
|
## Development
|
42
45
|
|
data/danger-mcbrain.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'danger-mcbrain'
|
8
8
|
spec.version = McBrain::VERSION
|
9
9
|
spec.authors = ['David Grandinetti']
|
10
|
-
spec.email = ['dbgrandi@
|
10
|
+
spec.email = ['dbgrandi@gmail.com']
|
11
11
|
spec.description = %q{Give Danger some persistent memory.}
|
12
12
|
spec.summary = %q{Give Danger a redis backed key/value store, so you can extend Danger rules beyond just this PR.}
|
13
13
|
spec.homepage = 'https://github.com/dbgrandi/danger-mcbrain'
|
data/lib/mcbrain/gem_version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-mcbrain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Grandinetti
|
@@ -166,7 +166,7 @@ dependencies:
|
|
166
166
|
version: '0'
|
167
167
|
description: Give Danger some persistent memory.
|
168
168
|
email:
|
169
|
-
- dbgrandi@
|
169
|
+
- dbgrandi@gmail.com
|
170
170
|
executables: []
|
171
171
|
extensions: []
|
172
172
|
extra_rdoc_files: []
|