ciderizer 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.rubocop.localch.yml +190 -0
- data/.rubocop.yml +8 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -0
- data/Rakefile +10 -0
- data/Readme.md +62 -0
- data/ciderizer.gemspec +29 -0
- data/lib/ciderizer/version.rb +3 -0
- data/lib/generators/ciderizer/base_rails_generator.rb +18 -0
- data/lib/generators/ciderizer/ciderizer_generator.rb +19 -0
- data/lib/generators/ciderizer/options/rspec.rb +24 -0
- data/lib/generators/ciderizer/options/rubocop.rb +22 -0
- data/lib/generators/ciderizer/rspec_generator.rb +33 -0
- data/lib/generators/ciderizer/rubocop_generator.rb +32 -0
- data/lib/generators/ciderizer/templates/cider-ci.yml +3 -0
- data/lib/generators/ciderizer/templates/cider-ci/jobs/rspec.yml +58 -0
- data/lib/generators/ciderizer/templates/cider-ci/jobs/rubocop.yml +55 -0
- data/lib/generators/ciderizer/templates/cider-ci/scripts/bower.yml +2 -0
- data/lib/generators/ciderizer/templates/cider-ci/scripts/bundle.yml +2 -0
- data/lib/generators/ciderizer/templates/cider-ci/scripts/github_comment.yml +6 -0
- data/lib/generators/ciderizer/templates/cider-ci/scripts/postgres.yml +27 -0
- data/lib/generators/ciderizer/templates/cider-ci/scripts/rspec.yml +4 -0
- data/lib/generators/ciderizer/templates/cider-ci/scripts/rubocop.yml +5 -0
- data/lib/generators/ciderizer/templates/cider-ci/scripts/ruby-version.yml +2 -0
- data/lib/generators/ciderizer/templates/cider-ci/scripts/tmp-cache.yml +2 -0
- metadata +125 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7d50affdac9984e9bd177f3db598474b6c2b7f73
|
4
|
+
data.tar.gz: b789721440e8bfaff73bebde13ea90dcb4fc56b9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bb95ae513b54ce1c828851ad491bd1177d9e57bde528371ad5d75dda15e12b9f2fd0ce1205a48573b6430334f25e96ad0c5d203c6537397add7b8f22c3eaafb2
|
7
|
+
data.tar.gz: 3fcbf6bdab3f242c855e0ebb73f778c0cf825c2f91073c0cd0b5e7a00cad6d26e07910f3c3803d997e82876d8cfd3841c87bc8afdacf22193caae025313296f2
|
data/.gitignore
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
# This is master rubocop configuration.
|
2
|
+
# DO NOT EDIT THIS FILE - it WILL be overwriten on every config update
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 2.1
|
5
|
+
DisplayCopNames: true
|
6
|
+
DisplayStyleGuide: true
|
7
|
+
Include:
|
8
|
+
- '**/Rakefile'
|
9
|
+
- '**/config.ru'
|
10
|
+
- '**/Capfile'
|
11
|
+
Exclude:
|
12
|
+
- 'db/**/*'
|
13
|
+
- 'script/**/*'
|
14
|
+
- 'vendor/bundle/**/*'
|
15
|
+
- 'bin/**/*'
|
16
|
+
- 'config/unicorn.rb'
|
17
|
+
- 'config/compass.rb'
|
18
|
+
- 'Rakefile'
|
19
|
+
|
20
|
+
Rails:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
require:
|
24
|
+
- rubocop-rspec
|
25
|
+
|
26
|
+
Lint/HandleExceptions:
|
27
|
+
Exclude:
|
28
|
+
- spec/**/*
|
29
|
+
|
30
|
+
Metrics/LineLength:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
Metrics/AbcSize:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Metrics/MethodLength:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Metrics/CyclomaticComplexity:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Metrics/PerceivedComplexity:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Metrics/ClassLength:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Metrics/ModuleLength:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Metrics/ParameterLists:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Metrics/BlockNesting:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
Performance/StringReplacement:
|
58
|
+
Enabled: false
|
59
|
+
|
60
|
+
Performance/TimesMap:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Performance/RedundantBlockCall:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
Performance/RedundantMatch:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Performance/RedundantMerge:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Performance/Casecmp:
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
Style/MultilineOperationIndentation:
|
76
|
+
EnforcedStyle: indented
|
77
|
+
|
78
|
+
Style/StringLiterals:
|
79
|
+
Enabled: false
|
80
|
+
|
81
|
+
Style/RegexpLiteral:
|
82
|
+
Exclude:
|
83
|
+
- spec/**/*
|
84
|
+
|
85
|
+
Style/DotPosition:
|
86
|
+
EnforcedStyle: leading
|
87
|
+
|
88
|
+
Style/AlignParameters:
|
89
|
+
Enabled: false
|
90
|
+
|
91
|
+
Style/NumericLiterals:
|
92
|
+
Enabled: false
|
93
|
+
|
94
|
+
Style/WordArray:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
Style/EmptyLinesAroundClassBody:
|
98
|
+
Enabled: false
|
99
|
+
|
100
|
+
Style/Next:
|
101
|
+
Enabled: false
|
102
|
+
|
103
|
+
Style/PercentLiteralDelimiters:
|
104
|
+
Enabled: false
|
105
|
+
|
106
|
+
Style/GlobalVars:
|
107
|
+
Enabled: false
|
108
|
+
|
109
|
+
Style/CommentAnnotation:
|
110
|
+
Enabled: false
|
111
|
+
|
112
|
+
Style/SymbolProc:
|
113
|
+
Enabled: false
|
114
|
+
|
115
|
+
Style/DoubleNegation:
|
116
|
+
Enabled: false
|
117
|
+
|
118
|
+
Style/FormatString:
|
119
|
+
Enabled: false
|
120
|
+
|
121
|
+
Style/AsciiComments:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
Style/BarePercentLiterals:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
Style/SingleLineBlockParams:
|
128
|
+
Enabled: false
|
129
|
+
|
130
|
+
Style/MultilineBlockChain:
|
131
|
+
Enabled: false
|
132
|
+
|
133
|
+
Style/UnneededCapitalW:
|
134
|
+
Enabled: false
|
135
|
+
|
136
|
+
Style/UnneededPercentQ:
|
137
|
+
Enabled: false
|
138
|
+
|
139
|
+
Style/BlockDelimiters:
|
140
|
+
Exclude:
|
141
|
+
- spec/**/*
|
142
|
+
|
143
|
+
Style/BracesAroundHashParameters:
|
144
|
+
EnforcedStyle: context_dependent
|
145
|
+
|
146
|
+
Style/IfUnlessModifier:
|
147
|
+
Enabled: false
|
148
|
+
|
149
|
+
Style/ClassAndModuleChildren:
|
150
|
+
Enabled: false
|
151
|
+
|
152
|
+
Style/Documentation:
|
153
|
+
Enabled: false
|
154
|
+
|
155
|
+
Style/GuardClause:
|
156
|
+
Enabled: false
|
157
|
+
|
158
|
+
Style/AccessorMethodName:
|
159
|
+
Exclude:
|
160
|
+
- spec/support/pages/**/*
|
161
|
+
|
162
|
+
Style/NegatedIf:
|
163
|
+
Enabled: false
|
164
|
+
|
165
|
+
Style/MutableConstant:
|
166
|
+
Enabled: false
|
167
|
+
|
168
|
+
Style/ConditionalAssignment:
|
169
|
+
Enabled: false
|
170
|
+
|
171
|
+
Style/IndentArray:
|
172
|
+
EnforcedStyle: consistent
|
173
|
+
|
174
|
+
Style/MultilineMethodCallIndentation:
|
175
|
+
EnforcedStyle: indented
|
176
|
+
|
177
|
+
RSpec/DescribeClass:
|
178
|
+
Exclude:
|
179
|
+
- spec/views/**/*
|
180
|
+
- spec/routing/**/*
|
181
|
+
- spec/requests/**/*
|
182
|
+
- spec/features/**/*
|
183
|
+
|
184
|
+
RSpec/FilePath:
|
185
|
+
Enabled: false
|
186
|
+
|
187
|
+
Rails/Output:
|
188
|
+
Exclude:
|
189
|
+
- 'config/application.rb'
|
190
|
+
- 'config/initializers/asset_manifest_warning.rb'
|
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.1
|
data/Gemfile
ADDED
data/Rakefile
ADDED
data/Readme.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# ciderizer - bring your project to cider
|
2
|
+
|
3
|
+
This gem provides a set of generators to bring your project to [Cider CI](https://github.com/cider-ci/cider-ci)
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add the following to your Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'ciderizer', group: 'development'
|
11
|
+
```
|
12
|
+
|
13
|
+
## Generators provided
|
14
|
+
|
15
|
+
The following generators are provided by `ciderizer`. Every generator will create a job configuration and provide relevant entry to the master `cider-ci.yml` file
|
16
|
+
|
17
|
+
### ciderizer
|
18
|
+
|
19
|
+
One generator to rule them all.
|
20
|
+
|
21
|
+
Invokes all other generators
|
22
|
+
|
23
|
+
#### Usage
|
24
|
+
```
|
25
|
+
rails generate ciderizer
|
26
|
+
```
|
27
|
+
|
28
|
+
#### options
|
29
|
+
- `rspec` - include `rspec` generator.
|
30
|
+
Defaults to `true`
|
31
|
+
- `rubocop` - include `rubocop` generator
|
32
|
+
Defaults to `true`
|
33
|
+
- options from [rspec generator](#rspec) (prefixed with `rspec-`)
|
34
|
+
- options from [rubocop generator](#rubocop) (prefixed with `rubocop-`)
|
35
|
+
|
36
|
+
### rspec
|
37
|
+
|
38
|
+
Generates config for running rspec tests
|
39
|
+
|
40
|
+
#### Usage:
|
41
|
+
```
|
42
|
+
rails generate ciderizer:rspec
|
43
|
+
```
|
44
|
+
|
45
|
+
#### options
|
46
|
+
- `--bower` runs `bower-install` after bundling.
|
47
|
+
Defaults to `false`
|
48
|
+
- `--postgres` creates configuration for postgres database. Databases are deleted after the trial.
|
49
|
+
Defaults to `false`
|
50
|
+
|
51
|
+
### rubocop
|
52
|
+
|
53
|
+
Generates config for running rubocop checks
|
54
|
+
|
55
|
+
#### Usage
|
56
|
+
```
|
57
|
+
rails generate ciderizer:rubocop
|
58
|
+
```
|
59
|
+
|
60
|
+
#### options
|
61
|
+
- `--github-comment` post comments about violations to GitHub.
|
62
|
+
Defaults to `true`
|
data/ciderizer.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
$LOAD_PATH.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
# Maintain your gem's version:
|
5
|
+
require "ciderizer/version"
|
6
|
+
|
7
|
+
# Describe your gem and declare its dependencies:
|
8
|
+
Gem::Specification.new do |s|
|
9
|
+
s.name = 'ciderizer'
|
10
|
+
s.version = Ciderizer::VERSION
|
11
|
+
s.authors = ['Krzysztof Sakwerda']
|
12
|
+
s.email = 'krzysztof.sakwerda@simplificator.com'
|
13
|
+
s.homepage = 'https://github.com/local-ch/ciderizer'
|
14
|
+
s.summary = 'local.ch ciderizer'
|
15
|
+
s.description = 'A set of generators for Cider CI config'
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
19
|
+
s.require_paths = ['lib']
|
20
|
+
|
21
|
+
s.requirements << 'Ruby >= 1.9.2'
|
22
|
+
s.required_ruby_version = '>= 1.9.2'
|
23
|
+
|
24
|
+
s.add_dependency 'railties'
|
25
|
+
s.add_dependency 'ruby-static-code-analysis', '~> 3.1'
|
26
|
+
|
27
|
+
s.add_development_dependency 'releasier', '~> 2'
|
28
|
+
s.add_development_dependency 'geminabox'
|
29
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Ciderizer
|
2
|
+
class BaseRailsGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('../templates', __FILE__)
|
4
|
+
|
5
|
+
desc <<DESC
|
6
|
+
Description:
|
7
|
+
Basic scripts for rails based projects
|
8
|
+
DESC
|
9
|
+
|
10
|
+
hide!
|
11
|
+
|
12
|
+
def rails_scripts
|
13
|
+
copy_file 'cider-ci/scripts/bundle.yml'
|
14
|
+
copy_file 'cider-ci/scripts/tmp-cache.yml'
|
15
|
+
copy_file 'cider-ci/scripts/ruby-version.yml'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'options/rspec.rb'
|
2
|
+
require_relative 'options/rubocop.rb'
|
3
|
+
|
4
|
+
module Ciderizer
|
5
|
+
class CiderizerGenerator < Rails::Generators::Base
|
6
|
+
namespace 'ciderizer'
|
7
|
+
|
8
|
+
include Options::Rspec
|
9
|
+
include Options::Rubocop
|
10
|
+
|
11
|
+
class_option :rspec, type: :boolean, default: true, desc: 'Include rspec job'
|
12
|
+
class_option :rubocop, type: :boolean, default: true, desc: 'Include rubocop job'
|
13
|
+
|
14
|
+
def ciderize
|
15
|
+
invoke('ciderizer:rspec', [], rspec_options) if options.rspec?
|
16
|
+
invoke('ciderizer:rubocop', [], rubocop_options) if options.rubocop?
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Ciderizer
|
2
|
+
module Options
|
3
|
+
module Rspec
|
4
|
+
def self.included(base)
|
5
|
+
base.class_option option_name(:bower, base), type: :boolean, default: false, desc: 'Include `bower install`'
|
6
|
+
base.class_option option_name(:postgres, base), type: :boolean, default: false, desc: 'Include postgres setup'
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.option_name(name, base)
|
10
|
+
base.name.demodulize =~ /^rspec/i ? name : "rspec_#{name}"
|
11
|
+
end
|
12
|
+
private_class_method :option_name
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def rspec_options
|
17
|
+
{
|
18
|
+
bower: options[:bower] || options[:rspec_bower],
|
19
|
+
postgres: options[:postgres] || options[:rspec_postgres]
|
20
|
+
}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Ciderizer
|
2
|
+
module Options
|
3
|
+
module Rubocop
|
4
|
+
def self.included(base)
|
5
|
+
base.class_option option_name(:github_comment, base), type: :boolean, default: true, desc: 'Post commit comments on GitHub'
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.option_name(name, base)
|
9
|
+
base.name.demodulize =~ /^rubocop/i ? name : "rubocop_#{name}"
|
10
|
+
end
|
11
|
+
private_class_method :option_name
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def rubocop_options
|
16
|
+
{
|
17
|
+
github_comment: (options[:github_comment] || options[:rubocop_github_comment])
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require_relative 'options/rspec.rb'
|
2
|
+
|
3
|
+
module Ciderizer
|
4
|
+
class RspecGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
include Options::Rspec
|
7
|
+
|
8
|
+
desc <<DESC
|
9
|
+
Description:
|
10
|
+
Generates configuration for a rspec job
|
11
|
+
DESC
|
12
|
+
|
13
|
+
def cider_ci_directory
|
14
|
+
invoke 'ciderizer:base_rails'
|
15
|
+
|
16
|
+
copy_file 'cider-ci/scripts/rspec.yml'
|
17
|
+
|
18
|
+
copy_file 'cider-ci/scripts/bower.yml' if options.bower?
|
19
|
+
template 'cider-ci/scripts/postgres.yml' if options.postgres?
|
20
|
+
|
21
|
+
template 'cider-ci/jobs/rspec.yml'
|
22
|
+
end
|
23
|
+
|
24
|
+
def master_file
|
25
|
+
copy_file 'cider-ci.yml', 'cider-ci.yml' unless File.exist?('cider-ci.yml')
|
26
|
+
# to avoid double inclusion
|
27
|
+
gsub_file 'cider-ci.yml', " - cider-ci/jobs/rspec.yml\n", ''
|
28
|
+
inject_into_file 'cider-ci.yml', after: "_cider-ci_include:\n" do
|
29
|
+
" - cider-ci/jobs/rspec.yml\n"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative 'options/rubocop.rb'
|
2
|
+
|
3
|
+
module Ciderizer
|
4
|
+
class RubocopGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
include Options::Rubocop
|
7
|
+
|
8
|
+
desc <<DESC
|
9
|
+
Description:
|
10
|
+
Generates configuration for a rubocop job
|
11
|
+
DESC
|
12
|
+
|
13
|
+
def cider_ci_directory
|
14
|
+
invoke 'ciderizer:base_rails'
|
15
|
+
|
16
|
+
copy_file 'cider-ci/scripts/rubocop.yml'
|
17
|
+
|
18
|
+
copy_file 'cider-ci/scripts/github_comment.yml' if options.github_comment?
|
19
|
+
|
20
|
+
template 'cider-ci/jobs/rubocop.yml'
|
21
|
+
end
|
22
|
+
|
23
|
+
def master_file
|
24
|
+
copy_file 'cider-ci.yml', 'cider-ci.yml' unless File.exist?('cider-ci.yml')
|
25
|
+
# to avoid double inclusion
|
26
|
+
gsub_file 'cider-ci.yml', " - cider-ci/jobs/rubocop.yml\n", ''
|
27
|
+
inject_into_file 'cider-ci.yml', after: "_cider-ci_include:\n" do
|
28
|
+
" - cider-ci/jobs/rubocop.yml\n"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
rspec:
|
2
|
+
name: 'RSPec tests'
|
3
|
+
|
4
|
+
run-on:
|
5
|
+
- type: branch
|
6
|
+
include-match: ^.*$
|
7
|
+
|
8
|
+
context:
|
9
|
+
task-defaults:
|
10
|
+
ports:
|
11
|
+
CAPYBARA_PORT:
|
12
|
+
inet_address: "localhost"
|
13
|
+
min: 8000
|
14
|
+
max: 8999
|
15
|
+
PHANTOMJS_PORT:
|
16
|
+
inet_address: "localhost"
|
17
|
+
min: 44600
|
18
|
+
max: 44999
|
19
|
+
|
20
|
+
scripts:
|
21
|
+
rspec:
|
22
|
+
start-when:
|
23
|
+
- script: bundle
|
24
|
+
<% if options.bower? %>
|
25
|
+
- script: bower-install
|
26
|
+
<% end %>
|
27
|
+
- script: ruby-version
|
28
|
+
- script: tmp-cache
|
29
|
+
<% if options.postgres? %>
|
30
|
+
- script: prepare-database
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
_cider-ci_include:
|
34
|
+
- cider-ci/scripts/bundle.yml
|
35
|
+
- cider-ci/scripts/tmp-cache.yml
|
36
|
+
- cider-ci/scripts/ruby-version.yml
|
37
|
+
- cider-ci/scripts/rspec.yml
|
38
|
+
<% if options.bower? %>
|
39
|
+
- cider-ci/scripts/bower.yml
|
40
|
+
<% end %>
|
41
|
+
<% if options.postgres? %>
|
42
|
+
- cider-ci/scripts/postgres.yml
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
trial-attachments:
|
46
|
+
logs:
|
47
|
+
include-match: log\/.*\.log$
|
48
|
+
content-type: text/plain
|
49
|
+
image-screenshots:
|
50
|
+
include-match: tmp\/capybara\/.*\.png$
|
51
|
+
content-type: image/png
|
52
|
+
html-screenshots:
|
53
|
+
include-match: tmp\/capybara\/.*\.html$
|
54
|
+
content-type: text/html
|
55
|
+
|
56
|
+
_cider-ci_generate-tasks:
|
57
|
+
include-match: spec/.*_spec.rb
|
58
|
+
exclude-match: spec/support/shared/*
|
@@ -0,0 +1,55 @@
|
|
1
|
+
rubocop:
|
2
|
+
name: 'Rubocop analysis'
|
3
|
+
|
4
|
+
run-on:
|
5
|
+
- type: branch
|
6
|
+
include-match: ^.*$
|
7
|
+
|
8
|
+
context:
|
9
|
+
task-defaults:
|
10
|
+
environment-variables:
|
11
|
+
GIT_REPOSITORY: <%= `git config --get remote.origin.url | awk -F: '{print $NF}' | awk -F. '{print $1}'`.strip %>
|
12
|
+
RESULT_PATH: 'tmp/checkstyle.json'
|
13
|
+
|
14
|
+
scripts:
|
15
|
+
rubocop:
|
16
|
+
start-when:
|
17
|
+
- script: bundle
|
18
|
+
- script: ruby-version
|
19
|
+
- script: tmp-cache
|
20
|
+
|
21
|
+
<% if options.github_comment? %>
|
22
|
+
github_comment:
|
23
|
+
start-when:
|
24
|
+
- script: rubocop
|
25
|
+
states: [failed]
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
_cider-ci_include:
|
29
|
+
- cider-ci/scripts/bundle.yml
|
30
|
+
- cider-ci/scripts/tmp-cache.yml
|
31
|
+
- cider-ci/scripts/ruby-version.yml
|
32
|
+
- cider-ci/scripts/rubocop.yml
|
33
|
+
<% if options.github_comment? %>
|
34
|
+
- cider-ci/scripts/github_comment.yml
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
max-auto-trials: 1
|
38
|
+
|
39
|
+
trial-attachments:
|
40
|
+
logs:
|
41
|
+
include-match: tmp\/checkstyle.json$
|
42
|
+
content-type: application/json
|
43
|
+
|
44
|
+
tree-attachments:
|
45
|
+
logs:
|
46
|
+
include-match: tmp\/checkstyle.json$
|
47
|
+
content-type: application/json
|
48
|
+
|
49
|
+
tasks:
|
50
|
+
rubocop:
|
51
|
+
scripts:
|
52
|
+
rubocop: {}
|
53
|
+
<% if options.github_comment? %>
|
54
|
+
github_comment: {}
|
55
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
configure-database:
|
2
|
+
body: |
|
3
|
+
#!/usr/bin/env ruby
|
4
|
+
require 'yaml'
|
5
|
+
config = \
|
6
|
+
{ 'test' =>
|
7
|
+
{ 'adapter' => 'postgresql',
|
8
|
+
'encoding' => 'unicode',
|
9
|
+
'host' => 'localhost',
|
10
|
+
'pool' => 3,
|
11
|
+
'username' => ENV['PGUSER'],
|
12
|
+
'password' => ENV['PGPASSWORD'],
|
13
|
+
'database' => "<%= Rails.application.class.name.split('::').first.underscore %>#{ENV['CIDER_CI_TRIAL_ID']}"}}
|
14
|
+
File.open('config/database.yml','w') { |file| file.write config.to_yaml }
|
15
|
+
|
16
|
+
prepare-database:
|
17
|
+
body: RAILS_ENV=test bundle exec rake db:create db:migrate
|
18
|
+
start-when:
|
19
|
+
- script: bundle
|
20
|
+
- script: configure-database
|
21
|
+
|
22
|
+
delete-database:
|
23
|
+
body: RAILS_ENV=test bundle exec rake db:pg:terminate_connections db:drop
|
24
|
+
ignore-state: true
|
25
|
+
start-when:
|
26
|
+
- script: rspec
|
27
|
+
states: [aborted, passed, failed, skipped]
|
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ciderizer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Krzysztof Sakwerda
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: railties
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: ruby-static-code-analysis
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: releasier
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: geminabox
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A set of generators for Cider CI config
|
70
|
+
email: krzysztof.sakwerda@simplificator.com
|
71
|
+
executables: []
|
72
|
+
extensions: []
|
73
|
+
extra_rdoc_files: []
|
74
|
+
files:
|
75
|
+
- ".gitignore"
|
76
|
+
- ".rubocop.localch.yml"
|
77
|
+
- ".rubocop.yml"
|
78
|
+
- ".ruby-version"
|
79
|
+
- Gemfile
|
80
|
+
- Rakefile
|
81
|
+
- Readme.md
|
82
|
+
- ciderizer.gemspec
|
83
|
+
- lib/ciderizer/version.rb
|
84
|
+
- lib/generators/ciderizer/base_rails_generator.rb
|
85
|
+
- lib/generators/ciderizer/ciderizer_generator.rb
|
86
|
+
- lib/generators/ciderizer/options/rspec.rb
|
87
|
+
- lib/generators/ciderizer/options/rubocop.rb
|
88
|
+
- lib/generators/ciderizer/rspec_generator.rb
|
89
|
+
- lib/generators/ciderizer/rubocop_generator.rb
|
90
|
+
- lib/generators/ciderizer/templates/cider-ci.yml
|
91
|
+
- lib/generators/ciderizer/templates/cider-ci/jobs/rspec.yml
|
92
|
+
- lib/generators/ciderizer/templates/cider-ci/jobs/rubocop.yml
|
93
|
+
- lib/generators/ciderizer/templates/cider-ci/scripts/bower.yml
|
94
|
+
- lib/generators/ciderizer/templates/cider-ci/scripts/bundle.yml
|
95
|
+
- lib/generators/ciderizer/templates/cider-ci/scripts/github_comment.yml
|
96
|
+
- lib/generators/ciderizer/templates/cider-ci/scripts/postgres.yml
|
97
|
+
- lib/generators/ciderizer/templates/cider-ci/scripts/rspec.yml
|
98
|
+
- lib/generators/ciderizer/templates/cider-ci/scripts/rubocop.yml
|
99
|
+
- lib/generators/ciderizer/templates/cider-ci/scripts/ruby-version.yml
|
100
|
+
- lib/generators/ciderizer/templates/cider-ci/scripts/tmp-cache.yml
|
101
|
+
homepage: https://github.com/local-ch/ciderizer
|
102
|
+
licenses: []
|
103
|
+
metadata: {}
|
104
|
+
post_install_message:
|
105
|
+
rdoc_options: []
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 1.9.2
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
requirements:
|
119
|
+
- Ruby >= 1.9.2
|
120
|
+
rubyforge_project:
|
121
|
+
rubygems_version: 2.2.2
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: local.ch ciderizer
|
125
|
+
test_files: []
|