resr 0.1.0 → 0.1.1
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/README.md +24 -14
- data/lib/resr/state.rb +5 -1
- data/lib/resr/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: 02dd19b9cdaacb6853c5b08314058dc6e718b9f2
|
4
|
+
data.tar.gz: a1ed6da592e72632ce23c6e691d47b2454092be4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17a40603be86d7716aa49493a057936fdbf791d09d4e7d09ca912a0afdc9602bcb1b88a17418e0f68ffa66c45d45d81928eedd543ddddc28a0e4b93448be0972
|
7
|
+
data.tar.gz: e2f467ae630937c97cf80770d4c6d8ce2e930faff01f839b998115d11e32833a416d8e3ce3cb946750abc51144d1cf18025184caded5096b56976f8a4cf3bfbf
|
data/README.md
CHANGED
@@ -1,28 +1,38 @@
|
|
1
1
|
# Resr
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
A ridiculous way soft-managing ownership of staging servers, using Slack and channel topics for state.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
gem 'resr'
|
13
|
-
```
|
7
|
+
$ gem install resr
|
8
|
+
|
9
|
+
## Setup
|
14
10
|
|
15
|
-
|
11
|
+
Copy the following to `~/.resr.yml`, and adjust as necessary.
|
16
12
|
|
17
|
-
|
13
|
+
```yml
|
14
|
+
slack_token: [YOUR_OAUTH_SLACK_TOKEN]
|
18
15
|
|
19
|
-
|
16
|
+
channels:
|
17
|
+
dev-deploy-io: # Your slack channel name
|
18
|
+
io: ':flag-io:' # Mapping between the server console name and how
|
19
|
+
cat: ':cat2:' # it is represented in Slack. In this case,
|
20
|
+
dog: ':trashdog:' # as emoji.
|
20
21
|
|
21
|
-
|
22
|
+
dev-deploys:
|
23
|
+
prod: ':cat2:'
|
24
|
+
canary: ':canary:'
|
25
|
+
```
|
22
26
|
|
23
27
|
## Usage
|
24
28
|
|
25
|
-
|
29
|
+
Commands:
|
30
|
+
resr free SERVER # Free/release ownership of the SERVER
|
31
|
+
resr help [COMMAND] # Describe available commands or one specific command
|
32
|
+
resr list # List all servers and who owns them
|
33
|
+
resr take SERVER # Take ownership of the SERVER
|
34
|
+
|
35
|
+
The command options `free`, `list`, and `take` are aliased as `f`, `l`, and `t` respectively.
|
26
36
|
|
27
37
|
## Development
|
28
38
|
|
@@ -32,7 +42,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
42
|
|
33
43
|
## Contributing
|
34
44
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
45
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/AaronRustad/resr.
|
36
46
|
|
37
47
|
## License
|
38
48
|
|
data/lib/resr/state.rb
CHANGED
@@ -45,7 +45,11 @@ module Resr
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def write_topic
|
48
|
-
|
48
|
+
if ENV['DRY_RUN'] == '1'
|
49
|
+
puts to_slack
|
50
|
+
else
|
51
|
+
@client.channels_setTopic(channel: channel_name, topic: to_slack, as_user: true)
|
52
|
+
end
|
49
53
|
end
|
50
54
|
|
51
55
|
def topic
|
data/lib/resr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Rustad
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|