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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a9024b5aa3d035c69475d4eb9b836049de89e5ca
4
- data.tar.gz: ccd041d58ca974f204cefff6d28573aa655050e0
2
+ SHA256:
3
+ metadata.gz: 8d88abc7cb39e165401509e996304a1e768ee7284044fc010f9cd5e373f08ce8
4
+ data.tar.gz: 284598f025cfdf89b5fdb965db4ed42a16e771f12f6de1d846a7815f89a2076d
5
5
  SHA512:
6
- metadata.gz: 314e0ae3cb4809fec51c1fc5ccf7ae92a88cbf39eddf621c2628c3e5c0381bfaa8f4ae6861fc86192355491ba2814f2ade086622dacb843a8eb780403adf2c4a
7
- data.tar.gz: 1d531cacc2543a0690ab9e09cd6b4759f55d70a8bd2cdb4c76dea59cb2c2c6dc1b25b1c5d68d40f987d5c6f1af467083f33896e941720fe0872f4463b1562386
6
+ metadata.gz: d15a49b651768cecda28937f80ae5309584210275f6d50827fc07e42de90df2ac34b050c73839dfafbdaa3b7b3a1a46f24e6d67d8a218a1593860d3b9ef77b28
7
+ data.tar.gz: 0ce3bdab70167cc308dd37ac2fa4d36d52744aa26625288c397e716f864b1dec4b2619e7304867d92724ae14fe12a4430e8659a6a1f47b445665cf78dc3d801e
data/README.md CHANGED
@@ -1,43 +1,76 @@
1
1
  # Cirun
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/cirun`. 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
+ 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
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'cirun'
13
- ```
8
+ 1. Install docker on your development machine
14
9
 
15
- And then execute:
10
+ 2.
16
11
 
17
- $ bundle
12
+ ```
13
+ docker login
14
+ ```
18
15
 
19
- Or install it yourself as:
16
+ Ask for credentials in support chat in Telegram
20
17
 
21
- $ gem install cirun
18
+ ```ruby
19
+ gem install cirun
20
+ ```
22
21
 
23
22
  ## Usage
24
23
 
25
- TODO: Write usage instructions here
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
- 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).
26
+ `cd` to folder with the plugin you're working on and
32
27
 
33
- ## Contributing
28
+ Run `cirun -d <database> -r <ruby> -m <redmine>` where:
34
29
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cirun. 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.
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
- ## License
34
+ If name of the directory with plugin doesn't match plugin name itself,
35
+ specify plugin with `-p` argument
38
36
 
39
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
37
+ ## Example
40
38
 
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the Cirun project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/cirun/blob/master/CODE_OF_CONDUCT.md).
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
@@ -1,3 +1,3 @@
1
1
  module Cirun
2
- VERSION = '0.1.10'.freeze
2
+ VERSION = '0.1.11'.freeze
3
3
  end
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.10
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-02-23 00:00:00.000000000 Z
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.6.11
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