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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d970b9ad13f149aa66b4170e59b38306c4f3a7f7
4
- data.tar.gz: 14f9437c465de28b9b2ad9a46a05506189da08bf
3
+ metadata.gz: 02dd19b9cdaacb6853c5b08314058dc6e718b9f2
4
+ data.tar.gz: a1ed6da592e72632ce23c6e691d47b2454092be4
5
5
  SHA512:
6
- metadata.gz: 708fabb11c903d350ed6e3c4ea7e8708deaf28801ee1b8b712e8e34d6152aa1636eaa843542f86b6e06387d4dc1136d42d190a7dfdecdf428260eefd87fa56a2
7
- data.tar.gz: c8c38254f5a85a3f3989e40b2eb7e9e47dcaabc748533a7a3d0964ca25842400aceee2724a41b162e693a8a4ba39fbfb465e2680a7ad9f2f71efc6c4ceb86d0e
6
+ metadata.gz: 17a40603be86d7716aa49493a057936fdbf791d09d4e7d09ca912a0afdc9602bcb1b88a17418e0f68ffa66c45d45d81928eedd543ddddc28a0e4b93448be0972
7
+ data.tar.gz: e2f467ae630937c97cf80770d4c6d8ce2e930faff01f839b998115d11e32833a416d8e3ce3cb946750abc51144d1cf18025184caded5096b56976f8a4cf3bfbf
data/README.md CHANGED
@@ -1,28 +1,38 @@
1
1
  # Resr
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/resr`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'resr'
13
- ```
7
+ $ gem install resr
8
+
9
+ ## Setup
14
10
 
15
- And then execute:
11
+ Copy the following to `~/.resr.yml`, and adjust as necessary.
16
12
 
17
- $ bundle
13
+ ```yml
14
+ slack_token: [YOUR_OAUTH_SLACK_TOKEN]
18
15
 
19
- Or install it yourself as:
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
- $ gem install resr
22
+ dev-deploys:
23
+ prod: ':cat2:'
24
+ canary: ':canary:'
25
+ ```
22
26
 
23
27
  ## Usage
24
28
 
25
- TODO: Write usage instructions here
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/[USERNAME]/resr.
45
+ Bug reports and pull requests are welcome on GitHub at https://github.com/AaronRustad/resr.
36
46
 
37
47
  ## License
38
48
 
@@ -45,7 +45,11 @@ module Resr
45
45
  end
46
46
 
47
47
  def write_topic
48
- @client.channels_setTopic(channel: channel_name, topic: to_slack, as_user: true)
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
@@ -1,3 +1,3 @@
1
1
  module Resr
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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 00:00:00.000000000 Z
11
+ date: 2017-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler