circlemator 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20e499cf49cb667491cdbcc4461f803a915c4f723c3724ce6190560151612b1e
4
- data.tar.gz: 3d7593e004adc53e015691940feff6db04535863bc980e8f64c49a59302d54c0
3
+ metadata.gz: 9f7dd98e5d8ec606b4b65aa1439f4030aa16a31b95483196cc74c04c52ed13a6
4
+ data.tar.gz: c0316444467344ebdf8135a26a46c20aba0ed906d1c35a4fb37f29895d4c4bf3
5
5
  SHA512:
6
- metadata.gz: 07657c548b74615461d3a50cd7472503338d519d6a737141b21383ae10d5dbfa80ef4c656d86be50b48bc484c1fcfab6a1dbd11f02782332f7166fc5d36f0116
7
- data.tar.gz: 8490f8c638ec58e9ca01ba1d09473b543c36f2ddfbb5366266fd03fe5927a27bf358e0c35daf06e76a6858306c519022f1a4ec8db6b84db55e470bec1020db0f
6
+ metadata.gz: 04cd0aa984b94d5cb85ec994c6f3f59fbef36bfcce1bad8f4396e43ae89796e2de15611b73f547b740eb14d3cd2aed6b24945f101dac878da537f9632f6b22a2
7
+ data.tar.gz: 9af2ccd3b73ec05634aba0e851d56346150dd3aa09b4a5fe8075f422cf6f65c1e0cf9c1bb190203e076d271b66395f544a0f669f6872212e6f7277545c24cfc0
@@ -3,7 +3,7 @@ version: 2
3
3
  jobs:
4
4
  test:
5
5
  docker:
6
- - image: circleci/ruby:2.4.2
6
+ - image: circleci/ruby:2.5
7
7
  steps:
8
8
  - checkout
9
9
  - run:
@@ -17,6 +17,7 @@ jobs:
17
17
  command: |
18
18
  sudo apt-get update
19
19
  sudo apt-get install cmake pkg-config
20
+ gem install bundler
20
21
  - restore_cache:
21
22
  key: v1-rainforest-bundler-{{ checksum "Gemfile.lock" }}
22
23
  - run:
@@ -44,7 +45,7 @@ jobs:
44
45
  command: bundle exec exe/circlemator test-security --base-branch=master
45
46
  push_to_rubygems:
46
47
  docker:
47
- - image: circleci/ruby:2.4.2
48
+ - image: circleci/ruby:2.5
48
49
  steps:
49
50
  - checkout
50
51
  - run:
@@ -1 +1 @@
1
- 2.4.2
1
+ 2.5.3
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.4.2-jessie
1
+ FROM ruby:2.5
2
2
  RUN apt-get update -y && apt-get install -y cmake
3
3
 
4
4
  # Set default locale for Ruby to avoid encoding errors
@@ -6,6 +6,14 @@ ENV LC_ALL=C.UTF-8
6
6
  ENV LANG=C.UTF-8
7
7
 
8
8
  WORKDIR /app
9
+
10
+ RUN gem update --system
11
+ RUN gem install bundler
12
+
9
13
  COPY . .
10
14
  RUN bundle install
15
+
16
+ # makes the circlemator binstub accessible outside this bundle
17
+ RUN rake install:local
18
+
11
19
  ENTRYPOINT ["circlemator"]
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- circlemator (0.4.2)
4
+ circlemator (0.6.0)
5
5
  httparty (~> 0.13.7)
6
6
  pronto (~> 0.9.5)
7
7
  pronto-brakeman (~> 0.9.1)
@@ -15,57 +15,57 @@ GEM
15
15
  addressable (2.5.2)
16
16
  public_suffix (>= 2.0.2, < 4.0)
17
17
  ast (2.4.0)
18
- brakeman (4.3.1)
18
+ brakeman (4.5.1)
19
19
  coderay (1.1.2)
20
20
  crack (0.4.3)
21
21
  safe_yaml (~> 1.0.0)
22
22
  diff-lcs (1.3)
23
23
  docile (1.3.1)
24
- faraday (0.15.3)
24
+ faraday (0.15.4)
25
25
  multipart-post (>= 1.2, < 3)
26
- ffi (1.9.25)
26
+ ffi (1.10.0)
27
27
  formatador (0.2.5)
28
28
  gitlab (4.3.0)
29
29
  httparty
30
30
  terminal-table
31
- guard (2.14.1)
31
+ guard (2.15.0)
32
32
  formatador (>= 0.2.4)
33
33
  listen (>= 2.7, < 4.0)
34
- lumberjack (~> 1.0)
34
+ lumberjack (>= 1.0.12, < 2.0)
35
35
  nenv (~> 0.1)
36
36
  notiffany (~> 0.0)
37
37
  pry (>= 0.9.12)
38
38
  shellany (~> 0.0)
39
39
  thor (>= 0.18.1)
40
40
  guard-compat (1.2.1)
41
- guard-rspec (4.6.5)
41
+ guard-rspec (4.7.3)
42
42
  guard (~> 2.1)
43
43
  guard-compat (~> 1.1)
44
44
  rspec (>= 2.99.0, < 4.0)
45
- hashdiff (0.3.6)
45
+ hashdiff (0.3.8)
46
46
  httparty (0.13.7)
47
47
  json (~> 1.8)
48
48
  multi_xml (>= 0.5.2)
49
- imagen (0.1.5)
49
+ imagen (0.1.8)
50
50
  parser (>= 2.5, != 2.5.1.1)
51
- jaro_winkler (1.5.1)
51
+ jaro_winkler (1.5.2)
52
52
  json (1.8.6)
53
53
  listen (3.1.5)
54
54
  rb-fsevent (~> 0.9, >= 0.9.4)
55
55
  rb-inotify (~> 0.9, >= 0.9.7)
56
56
  ruby_dep (~> 1.2)
57
- lumberjack (1.0.12)
58
- method_source (0.9.0)
57
+ lumberjack (1.0.13)
58
+ method_source (0.9.2)
59
59
  multi_xml (0.6.0)
60
- multipart-post (2.0.0)
60
+ multipart-post (2.1.1)
61
61
  nenv (0.3.0)
62
62
  notiffany (0.1.1)
63
63
  nenv (~> 0.1)
64
64
  shellany (~> 0.0)
65
- octokit (4.13.0)
65
+ octokit (4.14.0)
66
66
  sawyer (~> 0.8.0, >= 0.5.3)
67
- parallel (1.12.1)
68
- parser (2.5.1.2)
67
+ parallel (1.17.0)
68
+ parser (2.6.2.1)
69
69
  ast (~> 2.4.0)
70
70
  powerpack (0.1.2)
71
71
  pronto (0.9.5)
@@ -78,25 +78,25 @@ GEM
78
78
  pronto-brakeman (0.9.1)
79
79
  brakeman (>= 3.2.0)
80
80
  pronto (~> 0.9.0)
81
- pronto-commentator (0.1.1)
81
+ pronto-commentator (0.1.2)
82
82
  pronto (~> 0.9.5)
83
83
  pronto-rubocop (0.9.1)
84
84
  pronto (~> 0.9.0)
85
85
  rubocop (~> 0.50, >= 0.49.1)
86
- pronto-undercover (0.1.2)
87
- pronto (~> 0.9.0)
88
- undercover (~> 0.2.0)
89
- pry (0.11.1)
86
+ pronto-undercover (0.1.4)
87
+ pronto (>= 0.9, < 0.11)
88
+ undercover (~> 0.3.0)
89
+ pry (0.12.2)
90
90
  coderay (~> 1.1.0)
91
91
  method_source (~> 0.9.0)
92
92
  public_suffix (3.0.3)
93
93
  rainbow (2.2.2)
94
94
  rake
95
95
  rake (10.5.0)
96
- rb-fsevent (0.10.2)
97
- rb-inotify (0.9.10)
98
- ffi (>= 0.5.0, < 2)
99
- rf-stylez (0.2.10)
96
+ rb-fsevent (0.10.3)
97
+ rb-inotify (0.10.0)
98
+ ffi (~> 1.0)
99
+ rf-stylez (0.2.21)
100
100
  rubocop (~> 0.59.0)
101
101
  rspec (3.4.0)
102
102
  rspec-core (~> 3.4.0)
@@ -111,7 +111,7 @@ GEM
111
111
  diff-lcs (>= 1.2.0, < 2.0)
112
112
  rspec-support (~> 3.4.0)
113
113
  rspec-support (3.4.1)
114
- rspec_junit_formatter (0.3.0)
114
+ rspec_junit_formatter (0.4.1)
115
115
  rspec-core (>= 2, < 4, != 2.12.0)
116
116
  rubocop (0.59.2)
117
117
  jaro_winkler (~> 1.5.1)
@@ -123,8 +123,8 @@ GEM
123
123
  unicode-display_width (~> 1.0, >= 1.0.1)
124
124
  ruby-progressbar (1.10.0)
125
125
  ruby_dep (1.5.0)
126
- rugged (0.27.5)
127
- safe_yaml (1.0.4)
126
+ rugged (0.28.1)
127
+ safe_yaml (1.0.5)
128
128
  sawyer (0.8.1)
129
129
  addressable (>= 2.3.5, < 2.6)
130
130
  faraday (~> 0.8, < 1.0)
@@ -138,13 +138,13 @@ GEM
138
138
  terminal-table (1.8.0)
139
139
  unicode-display_width (~> 1.1, >= 1.1.1)
140
140
  thor (0.19.4)
141
- undercover (0.2.1)
142
- imagen (~> 0.1.5)
143
- rainbow (~> 2.1)
144
- rugged (~> 0.27.0)
145
- unicode-display_width (1.4.0)
146
- vcr (3.0.3)
147
- webmock (1.22.6)
141
+ undercover (0.3.2)
142
+ imagen (~> 0.1)
143
+ rainbow (>= 2.1, < 4.0)
144
+ rugged (>= 0.27, < 0.29)
145
+ unicode-display_width (1.5.0)
146
+ vcr (4.0.0)
147
+ webmock (3.5.1)
148
148
  addressable (>= 2.3.6)
149
149
  crack (>= 0.3.2)
150
150
  hashdiff
@@ -155,7 +155,7 @@ PLATFORMS
155
155
  DEPENDENCIES
156
156
  bundler (>= 1.9)
157
157
  circlemator!
158
- guard-rspec (~> 4.6.4)
158
+ guard-rspec (~> 4.7.3)
159
159
  rake (~> 10.0)
160
160
  rf-stylez
161
161
  rspec (~> 3.4.0)
@@ -164,8 +164,8 @@ DEPENDENCIES
164
164
  simplecov
165
165
  simplecov-html
166
166
  simplecov-lcov
167
- vcr (~> 3.0.1)
168
- webmock (~> 1.22.6)
167
+ vcr (~> 4.0.0)
168
+ webmock (~> 3.5.1)
169
169
 
170
170
  BUNDLED WITH
171
- 1.17.1
171
+ 2.0.2
data/README.md CHANGED
@@ -5,44 +5,30 @@ used internally at [Rainforest QA](http://www.rainforestqa.com).
5
5
 
6
6
  ## Installation
7
7
 
8
- Add this line to your application's Gemfile:
9
-
10
- ```ruby
11
- gem 'circlemator', require: false
12
- ```
13
-
14
- Then run `bundle` and check in the resulting Gemfile.lock. That should
15
- be enough, really.
8
+ Install the docker image with `docker pull rainforestapp/circlemator`.
16
9
 
17
10
  ## Usage
18
11
 
19
- Circlemator tasks are designed to be added to your circle.yml file
20
- like so:
21
-
22
- ```yml
23
- - bundle exec circlemator <task> [options]
24
12
  ```
25
-
26
- Different tasks require different options/placement in your
27
- circle.yml.
13
+ docker run rainforestapp/circlemator style-check --base-branch=develop
14
+ docker run rainforestapp/circlemator test-coverage --base-branch=develop
15
+ docker run rainforestapp/circlemator test-security --base-branch=develop
16
+ docker run rainforestapp/circlemator self-merge --base-branch=master --compare-branch=develop
17
+ docker run rainforestapp/circlemator cancel-old
18
+ docker run rainforestapp/circlemator comment 'A totally unnecessary comment' --base-branch=develop
19
+ ```
28
20
 
29
21
  ## Tasks
30
22
 
31
- ### Cancel old builds
23
+ ### Cancel old builds (`cancel-old`)
32
24
 
33
25
  CircleCI starts a build every time you push to Github. That's usually
34
26
  a good thing, but if you have a big test suite it can be annoying when
35
27
  your build queue gets gummed up running builds on out-of-date
36
28
  commits. To clear things up, the `cancel-old` task cancels all builds
37
29
  that are not at the head of their branch. It should be in your
38
- circle.yml before your tests are run but after the dependencies have
39
- been fetched, for example:
40
-
41
- ```yml
42
- test:
43
- pre:
44
- - bundle exec circlemator cancel-old
45
- ```
30
+ `circle.yml` before your tests are run but after the dependencies have
31
+ been fetched.
46
32
 
47
33
  In order for this to work, you need the following environment variable
48
34
  to be set in CircleCI:
@@ -50,14 +36,12 @@ to be set in CircleCI:
50
36
  - `CIRCLE_API_TOKEN`: Your CircleCI API token. (Can also be set with
51
37
  the `-t` option.)
52
38
 
53
- ### Comment
39
+ ### Comment (`comment`)
54
40
 
55
41
  You can comment on the open PR using the `comment` command:
56
42
 
57
- ```yml
58
- test:
59
- post:
60
- - bundle exec circlemator comment 'A totally unnecessary comment' --base-branch=develop
43
+ ```
44
+ docker run rainforestapp/circlemator comment 'A totally unnecessary comment' --base-branch=develop
61
45
  ```
62
46
 
63
47
  ### Style check
@@ -67,10 +51,8 @@ linters/checkers TBD) and comments on the Github pull request using
67
51
  the excellent [Pronto](https://github.com/prontolabs/pronto). Use it
68
52
  like so:
69
53
 
70
- ```yml
71
- test:
72
- pre:
73
- - bundle exec circlemator style-check --base-branch=develop
54
+ ```
55
+ docker run rainforestapp/circlemator style-check --base-branch=develop
74
56
  ```
75
57
 
76
58
  (Note: use local branch names, like `develop` instead of
@@ -119,10 +101,8 @@ require 'your_app'
119
101
 
120
102
  Then use it like this:
121
103
 
122
- ```yml
123
- test:
124
- post:
125
- - bundle exec circlemator test-coverage --base-branch=develop
104
+ ```
105
+ docker run rainforestapp/circlemator test-coverage --base-branch=develop
126
106
  ```
127
107
 
128
108
  Circlemator reads additional config from [.pronto.yml](https://github.com/grodowski/pronto-undercover#configuring)
@@ -136,20 +116,18 @@ Circlemator reads additional config from [.pronto.yml](https://github.com/grodow
136
116
 
137
117
  The security check looks for common security errors using [Pronto](https://github.com/prontolabs/pronto) and [Brakeman](https://github.com/presidentbeef/brakeman) Static Application Security Testing and post warnings as PR comments.
138
118
 
139
- ```yml
140
- test:
141
- pre:
142
- - bundle exec circlemator security-check --base-branch=develop
119
+ ```
120
+ docker run rainforestapp/circlemator test-security --base-branch=develop
143
121
  ```
144
122
 
145
123
  (Note: use local branch names, like `develop` instead of
146
124
  `origin/develop`; `origin` will be prepended for running pronto as
147
125
  necessary.)
148
126
 
149
- It probably makes sense to put `security-check` in either the `pre` or
127
+ It probably makes sense to put `test-security` in either the `pre` or
150
128
  `override` steps.)
151
129
 
152
- `security-check` requires the following environment variable to be set:
130
+ `test-security` requires the following environment variable to be set:
153
131
 
154
132
  - `GITHUB_ACCESS_TOKEN`: A Github API auth token for a user with commit
155
133
  access to your repo. (Can also be set with the `-g` option.)
@@ -161,27 +139,17 @@ looks like this:
161
139
 
162
140
  1. Push to feature branch pull request.
163
141
  2. Run unit tests and get code review (repeat 1-2 as necessary).
164
- 3. Merge feature branch to `develop`.
165
- 4. Open release pull request from `develop` to `master`.
166
- 5. Run unit tests + [Rainforest](http://www.rainforestqa.com) against `develop`.
167
- 6. Merge `develop` into `master` if everything's green.
168
- 7. Deploy from `master`.
142
+ 3. Merge feature branch to `master`.
143
+ 4. Deploy from `master`.
169
144
 
170
- Out of these, steps 1, 2, 3, and 4 require manual intervention, but
171
- everything else should be automatic! The `self-merge` task is designed
172
- to take care of step 6 (the rest is handled by CircleCI out of the
173
- box).
145
+ Out of these, steps 1, 2, and 3 require manual intervention, but
146
+ everything else should be automatically handled by CircleCI!
174
147
 
175
148
  To use `self-merge`, add something like the following to your
176
149
  circle.yml:
177
150
 
178
151
  ```yml
179
- deployment:
180
- staging:
181
- branch: develop
182
- commands:
183
- <any commands you would normally run>
184
- - bundle exec circlemator self-merge --base-branch=master --compare-branch=develop
152
+ docker run rainforestapp/circlemator self-merge --base-branch=master --compare-branch=develop
185
153
  ```
186
154
 
187
155
  Swap out `develop` and `master` as necessary to fit your workflow. Be
@@ -210,5 +178,5 @@ https://github.com/rainforestapp/circlemator.
210
178
 
211
179
  ### Releasing
212
180
 
213
- - Make sure you're an owner on rubygems.org
214
- - `rake release`
181
+ Merge to master, Docker will build a new docker image and release it on Docker
182
+ hub at https://hub.docker.com/r/rainforestapp/circlemator/
@@ -31,10 +31,10 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency 'bundler', '>= 1.9'
32
32
  spec.add_development_dependency 'rake', '~> 10.0'
33
33
  spec.add_development_dependency 'rubocop'
34
- spec.add_development_dependency 'vcr', '~> 3.0.1'
35
- spec.add_development_dependency 'webmock', '~> 1.22.6'
34
+ spec.add_development_dependency 'vcr', '~> 4.0.0'
35
+ spec.add_development_dependency 'webmock', '~> 3.5.1'
36
36
  spec.add_development_dependency 'rspec', '~> 3.4.0'
37
- spec.add_development_dependency 'guard-rspec', '~> 4.6.4'
37
+ spec.add_development_dependency 'guard-rspec', '~> 4.7.3'
38
38
  spec.add_development_dependency 'simplecov'
39
39
  spec.add_development_dependency 'simplecov-html'
40
40
  spec.add_development_dependency 'simplecov-lcov'
@@ -9,7 +9,7 @@ require_relative '../lib/circlemator/pr_commenter'
9
9
 
10
10
  options = {}
11
11
  parser = OptionParser.new do |opts|
12
- opts.banner = 'Usage: circlemator (self-merge|cancel-old|comment) [text] [options]'
12
+ opts.banner = 'Usage: circlemator (self-merge|cancel-old|comment|test-coverage|test-security|style-check) [text] [options]'
13
13
 
14
14
  opts.on('-bBRANCH', '--base-branch=BRANCH', 'Base branch for merging') do |b|
15
15
  options[:base_branch] = b
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Circlemator
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: circlemator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emanuel Evans
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-27 00:00:00.000000000 Z
11
+ date: 2019-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -142,28 +142,28 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 3.0.1
145
+ version: 4.0.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 3.0.1
152
+ version: 4.0.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: webmock
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.22.6
159
+ version: 3.5.1
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.22.6
166
+ version: 3.5.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rspec
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 4.6.4
187
+ version: 4.7.3
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 4.6.4
194
+ version: 4.7.3
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: simplecov
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -285,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
285
285
  - !ruby/object:Gem::Version
286
286
  version: '0'
287
287
  requirements: []
288
- rubyforge_project:
289
- rubygems_version: 2.7.3
288
+ rubygems_version: 3.0.3
290
289
  signing_key:
291
290
  specification_version: 4
292
291
  summary: A bucket of tricks for CircleCI and Github.