sam-shepherd 0.8.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0f74445b9a25d5ab1038deeaa2b3ce215c657b3df4888ee6e01e2586919c189b
4
+ data.tar.gz: '04593b3b97f42e5d083aa5eea1d20624815083eee2eb2e079a6505b8d83d5889'
5
+ SHA512:
6
+ metadata.gz: 5dd1b4de7a1883409ed26e98f7156a1d761eb806e7a290540c8729cfda8916a972481e6c048bd715bf270c6d4bdb68bccc17c9e47cf0034538f9fc349e95b153
7
+ data.tar.gz: 286afdcf6ba6806752e879ab7798ad6c6e4a0bef0b87940bda672105a00cade3b1f7e24fafd099cac333027213661079cce2899933a13bf61950ac16417a02db
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format progress
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,22 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.5
3
+
4
+ Metrics/BlockLength:
5
+ Exclude:
6
+ - Guardfile
7
+ - !ruby/regexp /.*_spec\.rb$/
8
+ - sam.gemspec
9
+
10
+ Metrics/LineLength:
11
+ Exclude:
12
+ - sam.gemspec
13
+
14
+ Style/Documentation:
15
+ Enabled: false
16
+
17
+ Metrics/LineLength:
18
+ Max: 120
19
+
20
+ Lint/AmbiguousBlockAssociation:
21
+ Exclude:
22
+ - !ruby/regexp /.*_spec\.rb$/
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.5.0
5
+ before_install: gem install bundler -v 1.16.1
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at marcello.rocha@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in sam.gemspec
8
+ gemspec
@@ -0,0 +1,227 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sam-shepherd (0.8.2)
5
+ hanami-cli (~> 0.2)
6
+ tty-command (~> 0.7)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.5.2)
12
+ public_suffix (>= 2.0.2, < 4.0)
13
+ aruba (0.14.5)
14
+ childprocess (>= 0.6.3, < 0.10.0)
15
+ contracts (~> 0.9)
16
+ cucumber (>= 1.3.19)
17
+ ffi (~> 1.9.10)
18
+ rspec-expectations (>= 2.99)
19
+ thor (~> 0.19)
20
+ ast (2.4.0)
21
+ axiom-types (0.1.1)
22
+ descendants_tracker (~> 0.0.4)
23
+ ice_nine (~> 0.11.0)
24
+ thread_safe (~> 0.3, >= 0.3.1)
25
+ backports (3.11.1)
26
+ builder (3.2.3)
27
+ childprocess (0.9.0)
28
+ ffi (~> 1.0, >= 1.0.11)
29
+ codeclimate-engine-rb (0.4.1)
30
+ virtus (~> 1.0)
31
+ coderay (1.1.2)
32
+ coercible (1.0.0)
33
+ descendants_tracker (~> 0.0.1)
34
+ concurrent-ruby (1.0.5)
35
+ contracts (0.16.0)
36
+ cucumber (3.1.0)
37
+ builder (>= 2.1.2)
38
+ cucumber-core (~> 3.1.0)
39
+ cucumber-expressions (~> 5.0.4)
40
+ cucumber-wire (~> 0.0.1)
41
+ diff-lcs (~> 1.3)
42
+ gherkin (~> 5.0)
43
+ multi_json (>= 1.7.5, < 2.0)
44
+ multi_test (>= 0.1.2)
45
+ cucumber-core (3.1.0)
46
+ backports (>= 3.8.0)
47
+ cucumber-tag_expressions (~> 1.1.0)
48
+ gherkin (>= 5.0.0)
49
+ cucumber-expressions (5.0.14)
50
+ cucumber-tag_expressions (1.1.1)
51
+ cucumber-wire (0.0.1)
52
+ descendants_tracker (0.0.4)
53
+ thread_safe (~> 0.3, >= 0.3.1)
54
+ diff-lcs (1.3)
55
+ docile (1.3.0)
56
+ equalizer (0.0.11)
57
+ equatable (0.5.0)
58
+ erubis (2.7.0)
59
+ ffi (1.9.23)
60
+ flay (2.10.0)
61
+ erubis (~> 2.7.0)
62
+ path_expander (~> 1.0)
63
+ ruby_parser (~> 3.0)
64
+ sexp_processor (~> 4.0)
65
+ flog (4.6.2)
66
+ path_expander (~> 1.0)
67
+ ruby_parser (~> 3.1, > 3.1.0)
68
+ sexp_processor (~> 4.8)
69
+ formatador (0.2.5)
70
+ gherkin (5.0.0)
71
+ guard (2.14.2)
72
+ formatador (>= 0.2.4)
73
+ listen (>= 2.7, < 4.0)
74
+ lumberjack (>= 1.0.12, < 2.0)
75
+ nenv (~> 0.1)
76
+ notiffany (~> 0.0)
77
+ pry (>= 0.9.12)
78
+ shellany (~> 0.0)
79
+ thor (>= 0.18.1)
80
+ guard-bundler (2.1.0)
81
+ bundler (~> 1.0)
82
+ guard (~> 2.2)
83
+ guard-compat (~> 1.1)
84
+ guard-compat (1.2.1)
85
+ guard-rspec (4.7.3)
86
+ guard (~> 2.1)
87
+ guard-compat (~> 1.1)
88
+ rspec (>= 2.99.0, < 4.0)
89
+ guard-rubocop (1.3.0)
90
+ guard (~> 2.0)
91
+ rubocop (~> 0.20)
92
+ hanami-cli (0.2.0)
93
+ concurrent-ruby (~> 1.0)
94
+ hanami-utils (~> 1.2)
95
+ hanami-utils (1.2.0)
96
+ concurrent-ruby (~> 1.0)
97
+ transproc (~> 1.0)
98
+ ice_nine (0.11.2)
99
+ json (2.1.0)
100
+ kgio (2.11.2)
101
+ launchy (2.4.3)
102
+ addressable (~> 2.3)
103
+ listen (3.1.5)
104
+ rb-fsevent (~> 0.9, >= 0.9.4)
105
+ rb-inotify (~> 0.9, >= 0.9.7)
106
+ ruby_dep (~> 1.2)
107
+ lumberjack (1.0.13)
108
+ method_source (0.9.0)
109
+ multi_json (1.13.1)
110
+ multi_test (0.1.2)
111
+ mustermann (1.0.2)
112
+ nenv (0.3.0)
113
+ notiffany (0.1.1)
114
+ nenv (~> 0.1)
115
+ shellany (~> 0.0)
116
+ parallel (1.12.1)
117
+ parser (2.5.0.5)
118
+ ast (~> 2.4.0)
119
+ pastel (0.7.2)
120
+ equatable (~> 0.5.0)
121
+ tty-color (~> 0.4.0)
122
+ path_expander (1.0.3)
123
+ powerpack (0.1.1)
124
+ pry (0.11.3)
125
+ coderay (~> 1.1.0)
126
+ method_source (~> 0.9.0)
127
+ public_suffix (3.0.2)
128
+ puma (3.11.3)
129
+ rack (2.0.4)
130
+ rack-protection (2.0.1)
131
+ rack
132
+ rainbow (3.0.0)
133
+ raindrops (0.19.0)
134
+ rake (12.3.1)
135
+ rb-fsevent (0.10.3)
136
+ rb-inotify (0.9.10)
137
+ ffi (>= 0.5.0, < 2)
138
+ reek (4.8.0)
139
+ codeclimate-engine-rb (~> 0.4.0)
140
+ parser (>= 2.5.0.0, < 2.6)
141
+ rainbow (~> 3.0)
142
+ rspec (3.7.0)
143
+ rspec-core (~> 3.7.0)
144
+ rspec-expectations (~> 3.7.0)
145
+ rspec-mocks (~> 3.7.0)
146
+ rspec-core (3.7.1)
147
+ rspec-support (~> 3.7.0)
148
+ rspec-expectations (3.7.0)
149
+ diff-lcs (>= 1.2.0, < 2.0)
150
+ rspec-support (~> 3.7.0)
151
+ rspec-mocks (3.7.0)
152
+ diff-lcs (>= 1.2.0, < 2.0)
153
+ rspec-support (~> 3.7.0)
154
+ rspec-support (3.7.1)
155
+ rubocop (0.54.0)
156
+ parallel (~> 1.10)
157
+ parser (>= 2.5)
158
+ powerpack (~> 0.1)
159
+ rainbow (>= 2.2.2, < 4.0)
160
+ ruby-progressbar (~> 1.7)
161
+ unicode-display_width (~> 1.0, >= 1.0.1)
162
+ ruby-progressbar (1.9.0)
163
+ ruby_dep (1.5.0)
164
+ ruby_parser (3.11.0)
165
+ sexp_processor (~> 4.9)
166
+ rubycritic (3.4.0)
167
+ flay (~> 2.8)
168
+ flog (~> 4.4)
169
+ launchy (= 2.4.3)
170
+ parser (~> 2.5.0)
171
+ rainbow (~> 3.0)
172
+ reek (~> 4.4)
173
+ ruby_parser (~> 3.8)
174
+ tty-which (~> 0.3.0)
175
+ virtus (~> 1.0)
176
+ sexp_processor (4.10.1)
177
+ shellany (0.0.1)
178
+ simplecov (0.16.1)
179
+ docile (~> 1.1)
180
+ json (>= 1.8, < 3)
181
+ simplecov-html (~> 0.10.0)
182
+ simplecov-html (0.10.2)
183
+ sinatra (2.0.1)
184
+ mustermann (~> 1.0)
185
+ rack (~> 2.0)
186
+ rack-protection (= 2.0.1)
187
+ tilt (~> 2.0)
188
+ thor (0.20.0)
189
+ thread_safe (0.3.6)
190
+ tilt (2.0.8)
191
+ transproc (1.0.2)
192
+ tty-color (0.4.2)
193
+ tty-command (0.7.0)
194
+ pastel (~> 0.7.0)
195
+ tty-which (0.3.0)
196
+ unicode-display_width (1.3.0)
197
+ unicorn (5.4.0)
198
+ kgio (~> 2.6)
199
+ raindrops (~> 0.7)
200
+ virtus (1.0.5)
201
+ axiom-types (~> 0.1)
202
+ coercible (~> 1.0)
203
+ descendants_tracker (~> 0.0, >= 0.0.3)
204
+ equalizer (~> 0.0, >= 0.0.9)
205
+
206
+ PLATFORMS
207
+ ruby
208
+
209
+ DEPENDENCIES
210
+ aruba
211
+ bundler
212
+ guard
213
+ guard-bundler
214
+ guard-rspec
215
+ guard-rubocop
216
+ puma
217
+ rake
218
+ rspec
219
+ rubocop
220
+ rubycritic
221
+ sam-shepherd!
222
+ simplecov
223
+ sinatra
224
+ unicorn
225
+
226
+ BUNDLED WITH
227
+ 1.16.1
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ guard :rspec, cmd: 'bundle exec rspec' do
4
+ require 'guard/rspec/dsl'
5
+ dsl = Guard::RSpec::Dsl.new(self)
6
+
7
+ # Feel free to open issues for suggestions and improvements
8
+
9
+ # RSpec files
10
+ rspec = dsl.rspec
11
+ watch(rspec.spec_helper) { rspec.spec_dir }
12
+ watch(rspec.spec_support) { rspec.spec_dir }
13
+ watch(rspec.spec_files)
14
+
15
+ # Ruby files
16
+ ruby = dsl.ruby
17
+ dsl.watch_spec_files_for(ruby.lib_files)
18
+ end
19
+
20
+ guard :rubocop, cli: '-a -D -E -c .rubocop.yml' do
21
+ watch(/.+\.rb$/)
22
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
23
+ end
24
+
25
+ guard :bundler do
26
+ require 'guard/bundler'
27
+ require 'guard/bundler/verify'
28
+ helper = Guard::Bundler::Verify.new
29
+
30
+ files = ['Gemfile']
31
+ files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
32
+
33
+ # Assume files are symlinked from somewhere
34
+ files.each { |file| watch(helper.real_path(file)) }
35
+ end
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 mereghost
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,56 @@
1
+ # Sam
2
+
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/a8c24394996582c1b59f/maintainability)](https://codeclimate.com/github/VAGAScom/sam/maintainability)
4
+ [![Gem Version](https://badge.fury.io/rb/sam.svg)](https://badge.fury.io/rb/sam)
5
+ [![Build Status](https://travis-ci.org/VAGAScom/sam.svg?branch=master)](https://travis-ci.org/VAGAScom/sam)
6
+ [![Dependency Status](https://beta.gemnasium.com/badges/github.com/VAGAScom/sam.svg)](https://beta.gemnasium.com/projects/github.com/VAGAScom/sam)
7
+
8
+
9
+
10
+ ![Sam](https://vignette.wikia.nocookie.net/looneytunes/images/c/c9/Sam_Sheepdog_300-1-.gif/revision/latest?cb=20170411195916)
11
+
12
+ Sam, the shepphered, will look after your unicorns so that they play nice with `upstarts` and even `systemds`.
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ ```ruby
19
+ gem 'sam'
20
+ ```
21
+
22
+ And then execute:
23
+
24
+ $ bundle
25
+
26
+ Or install it yourself as:
27
+
28
+ $ gem install sam
29
+
30
+ ## Usage
31
+
32
+ **Sam** comes with the following commands:
33
+
34
+ 1. `unicorn start`: starts an `unicorn` instance
35
+ 2. `unicorn stop`: stops an `unicorn` instance
36
+ 3. `unicorn monitor`: start a monitoring loop over the running `unicorn` instance. It will forward the signals `HUP, USR2, TERM, QUIT, TTIN, TTOU` to the `unicorn` instance. `HUP` will do an graceful reload of the application
37
+ 4. `unicorn reload`: reloads the `unicorn` instance by issuing a `USR2` followed by a `QUIT` signal a few seconds later
38
+ 5. `unicorn run`: starts and monitors an `unicorn` instance
39
+
40
+ ## Development
41
+
42
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
43
+
44
+ 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).
45
+
46
+ ## Contributing
47
+
48
+ Bug reports and pull requests are welcome on GitHub at https://github.com/vagascom/sam. 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.
49
+
50
+ ## License
51
+
52
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
53
+
54
+ ## Code of Conduct
55
+
56
+ Everyone interacting in the Sam project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sam/blob/master/CODE_OF_CONDUCT.md).