cirun 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +58 -25
- data/lib/cirun/runner.rb +5 -0
- data/lib/cirun/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8d88abc7cb39e165401509e996304a1e768ee7284044fc010f9cd5e373f08ce8
|
4
|
+
data.tar.gz: 284598f025cfdf89b5fdb965db4ed42a16e771f12f6de1d846a7815f89a2076d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d15a49b651768cecda28937f80ae5309584210275f6d50827fc07e42de90df2ac34b050c73839dfafbdaa3b7b3a1a46f24e6d67d8a218a1593860d3b9ef77b28
|
7
|
+
data.tar.gz: 0ce3bdab70167cc308dd37ac2fa4d36d52744aa26625288c397e716f864b1dec4b2619e7304867d92724ae14fe12a4430e8659a6a1f47b445665cf78dc3d801e
|
data/README.md
CHANGED
@@ -1,43 +1,76 @@
|
|
1
1
|
# Cirun
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem is intended for developers of RedmineUP and allows to run tests
|
4
|
+
against exactly the same images as on CI to speed up development
|
6
5
|
|
7
6
|
## Installation
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'cirun'
|
13
|
-
```
|
8
|
+
1. Install docker on your development machine
|
14
9
|
|
15
|
-
|
10
|
+
2.
|
16
11
|
|
17
|
-
|
12
|
+
```
|
13
|
+
docker login
|
14
|
+
```
|
18
15
|
|
19
|
-
|
16
|
+
Ask for credentials in support chat in Telegram
|
20
17
|
|
21
|
-
|
18
|
+
```ruby
|
19
|
+
gem install cirun
|
20
|
+
```
|
22
21
|
|
23
22
|
## Usage
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
24
|
+
Run `cirun --help` to see inline help
|
30
25
|
|
31
|
-
|
26
|
+
`cd` to folder with the plugin you're working on and
|
32
27
|
|
33
|
-
|
28
|
+
Run `cirun -d <database> -r <ruby> -m <redmine>` where:
|
34
29
|
|
35
|
-
|
30
|
+
*database* is one of `pg`, `mysql`
|
31
|
+
*ruby* is one of `1.9.3-p551`, `2.0.0-p648`, `2.2.6`, `2.4.1`
|
32
|
+
*redmine* is one of `2.3`, `2.4`, `2.6`, `3.0`, `3.2`, `3.3`, `3.4`, `trunk`
|
36
33
|
|
37
|
-
|
34
|
+
If name of the directory with plugin doesn't match plugin name itself,
|
35
|
+
specify plugin with `-p` argument
|
38
36
|
|
39
|
-
|
37
|
+
## Example
|
40
38
|
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
```
|
40
|
+
λ k41n-2 redmine_checklists → λ git coverage → cirun -d pg -r 2.2.6 -m 3.0
|
41
|
+
|
42
|
+
... A lot of output from docker downloading images skipped ...
|
43
|
+
|
44
|
+
Status: Downloaded newer image for redmineup/redmine_checklists:latest
|
45
|
+
+ cd /var/www/ruby-2.0.0/pg/redmine-3.0
|
46
|
+
+ '[' pg == mysql ']'
|
47
|
+
+ service postgresql start
|
48
|
+
* Starting PostgreSQL 9.5 database server [ OK ]
|
49
|
+
+ sleep 5
|
50
|
+
+ echo 'RUNNING FOR redmine_checklists ruby-2.0.0 pg redmine-3.0'
|
51
|
+
RUNNING FOR redmine_checklists ruby-2.0.0 pg redmine-3.0
|
52
|
+
+ [[ '' != '' ]]
|
53
|
+
+ cd /var/www/ruby-2.0.0/pg/redmine-3.0/plugins
|
54
|
+
+ [[ '' != '' ]]
|
55
|
+
+ cd /var/www/ruby-2.0.0/pg/redmine-3.0/
|
56
|
+
+ RAILS_ENV=test
|
57
|
+
+ bundle check
|
58
|
+
The Gemfile's dependencies are satisfied
|
59
|
+
+ RAILS_ENV=test
|
60
|
+
+ bundle exec rake redmine:plugins
|
61
|
+
Migrating redmine_checklists (Redmine Checklists plugin (PRO version))...
|
62
|
+
+ RAILS_ENV=test
|
63
|
+
+ bundle exec rake test 'TEST=plugins/redmine_checklists/test/**/*_test.rb' RCOV=on
|
64
|
+
Run options: --seed 18163
|
65
|
+
|
66
|
+
# Running:
|
67
|
+
|
68
|
+
.....DEPRECATED: Use assert_nil if expecting nil from test/test_helper.rb:274. This will fail in Minitest 6.
|
69
|
+
.DEPRECATED: Use assert_nil if expecting nil from test/test_helper.rb:274. This will fail in Minitest 6.
|
70
|
+
.DEPRECATED: Use assert_nil if expecting nil from test/test_helper.rb:274. This will fail in Minitest 6.
|
71
|
+
.............................................................
|
72
|
+
|
73
|
+
Finished in 14.858262s, 4.5766 runs/s, 12.2491 assertions/s.
|
74
|
+
|
75
|
+
68 runs, 182 assertions, 0 failures, 0 errors, 0 skips
|
76
|
+
```
|
data/lib/cirun/runner.rb
CHANGED
@@ -4,6 +4,11 @@ module Cirun
|
|
4
4
|
@opts = opts
|
5
5
|
end
|
6
6
|
|
7
|
+
def update_image
|
8
|
+
cmd = "docker pull redmineup/#{@opts.plugin}"
|
9
|
+
puts `#{cmd}`
|
10
|
+
end
|
11
|
+
|
7
12
|
def run
|
8
13
|
ruby_short = @opts.ruby.split('-').first
|
9
14
|
cmd = "docker run -t --env RUBY_VERSION=ruby-#{ruby_short} --env DB=#{@opts.database} --env REDMINE=redmine-#{@opts.redmine} --env PLUGIN=#{@opts.plugin} --env DEPENDENT=#{@opts.dependent} --mount type=bind,source=#{`pwd`.chomp},target=/var/www/ruby-#{ruby_short}/#{@opts.database}/redmine-#{@opts.redmine}/plugins/#{@opts.plugin} redmineup/#{@opts.plugin} /root/run_local.sh"
|
data/lib/cirun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cirun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrei Malyshev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
81
|
+
rubygems_version: 2.7.3
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: This gem allows fast launch tests against specific redmine/ruby/db combo
|