rultor 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4c6a6ba6886c0e1f2a7459874f011541c5b3d4a2
4
+ data.tar.gz: 6a9e8fe00d321ad0891624bc870a11a8c564d5d8
5
+ SHA512:
6
+ metadata.gz: a146f5c15345ed138164ce58cd913f1cfc9e845712f2dff13b8576abcdff33cd5eb6ac8ce36c79f56ec60f0cd3187ce5e0ce20860826cec3d4a7d12fe5226c50
7
+ data.tar.gz: e26b94c4a934581de42c018fb20e9c8ade2358a5fb06b0dcab5ecbcf9c4b640c20487d0e7605abd9b3b3d3fcac9f0ee5459e260f1068bf270abeec9f2a65d55f
data/.rultor.yml CHANGED
@@ -22,15 +22,5 @@ architect:
22
22
  - yegor256
23
23
  - alex-palevsky
24
24
  merge:
25
- commanders:
26
- - caarlos0
27
- - carlosmiranda
28
- - darkled
29
- - dmzaytsev
30
- - ggajos
31
- - krzyk
32
- - longtimeago
33
- - pinaf
34
- deploy:
35
- commanders:
36
- - yegor256
25
+ commanders: []
26
+ deploy: {}
data/.simplecov CHANGED
@@ -30,12 +30,22 @@
30
30
 
31
31
  require 'coveralls'
32
32
 
33
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
33
+ if Gem.win_platform? then
34
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
35
+ SimpleCov::Formatter::HTMLFormatter
36
+ ]
37
+ SimpleCov.start do
38
+ add_filter "/test/"
39
+ add_filter "/features/"
40
+ end
41
+ else
42
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
34
43
  SimpleCov::Formatter::HTMLFormatter,
35
44
  Coveralls::SimpleCov::Formatter
36
- ]
37
- SimpleCov.start do
38
- add_filter "/test/"
39
- add_filter "/features/"
40
- minimum_coverage 100
45
+ ]
46
+ SimpleCov.start do
47
+ add_filter "/test/"
48
+ add_filter "/features/"
49
+ minimum_coverage 100
50
+ end
41
51
  end
data/.travis.yml CHANGED
@@ -1,12 +1,17 @@
1
1
  language: ruby
2
+ rvm:
3
+ - 2.0.0
2
4
  cache: bundler
3
5
  branches:
4
6
  only:
5
7
  - master
6
8
  install:
7
- - sudo apt-get update
9
+ - travis_retry sudo apt-get update -y
8
10
  - travis_retry sudo apt-get install -y bcrypt
9
11
  - travis_retry bundle install
10
12
  script:
11
13
  - rake
14
+ - gem build rultor.gemspec
15
+ - gem install rultor-1.0.snapshot.gem
16
+ - rultor encrypt --project yegor256/rultor LICENSE.txt
12
17
 
data/PUZZLES.md ADDED
@@ -0,0 +1,4 @@
1
+ ## Puzzles
2
+
3
+ There are 0 active puzzles (0 total):
4
+
data/README.md CHANGED
@@ -1,7 +1,10 @@
1
+ <img src="http://doc.rultor.com/images/logo.svg" width="64px" height="64px"/>
2
+
1
3
  [![Made By Teamed.io](http://img.teamed.io/btn.svg)](http://www.teamed.io)
2
4
  [![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/rultor-remote)](http://www.rultor.com/p/yegor256/rultor-remote)
3
5
 
4
6
  [![Build Status](https://travis-ci.org/yegor256/rultor-remote.svg)](https://travis-ci.org/yegor256/rultor-remote)
7
+ [![Build status](https://ci.appveyor.com/api/projects/status/qinkj0i7h6ralg7w?svg=true)](https://ci.appveyor.com/project/yegor256/rultor-remote)
5
8
  [![Gem Version](https://badge.fury.io/rb/rultor.svg)](http://badge.fury.io/rb/rultor)
6
9
  [![Dependency Status](https://gemnasium.com/yegor256/rultor-remote.svg)](https://gemnasium.com/yegor256/rultor-remote)
7
10
  [![Code Climate](http://img.shields.io/codeclimate/github/yegor256/rultor-remote.svg)](https://codeclimate.com/github/yegor256/rultor-remote)
@@ -33,3 +36,24 @@ configuration option.
33
36
  Make sure you have [gpg](https://www.gnupg.org/documentation/manpage.html) and
34
37
  [bcrypt](http://bcrypt.sourceforge.net/) installed on your machine
35
38
  (only Unix or Mac OS at the moment).
39
+
40
+ ## Questions?
41
+
42
+ If you have any questions about the tool, or something doesn't work as expected,
43
+ please [submit an issue here](https://github.com/yegor256/rultor-remote/issues/new).
44
+
45
+ ## How to contribute?
46
+
47
+ Fork the repository, make changes, submit a pull request.
48
+ We promise to review your changes same day and apply to
49
+ the `master` branch, if they look correct.
50
+
51
+ Please run Rake build before submitting a pull request (make sure you
52
+ have [bundler](http://bundler.io/) installed):
53
+
54
+ ```
55
+ $ bundle install
56
+ $ rake
57
+ ```
58
+
59
+ Make sure you're using Ruby 2.0+.
data/TEAM.md ADDED
@@ -0,0 +1,17 @@
1
+ ## Team
2
+
3
+ The following members are in the project team:
4
+
5
+ Role | Members
6
+ ---|---
7
+ PM | @alex-palevsky
8
+ CR |
9
+ DEV |
10
+ IMP |
11
+ ARC |
12
+ DES |
13
+ PO | @yegor256
14
+ ITR |
15
+ QA |
16
+ SA |
17
+ HLP |
data/appveyor.yml ADDED
@@ -0,0 +1,24 @@
1
+ version: '{build}'
2
+ skip_tags: true
3
+ clone_depth: 10
4
+ branches:
5
+ only:
6
+ - master
7
+ except:
8
+ - gh-pages
9
+ os: Windows Server 2012
10
+ install:
11
+ - cmd: SET PATH=C:\Ruby200\bin;%PATH%
12
+ - cmd: ruby --version
13
+ - cmd: gpg --version
14
+ build_script:
15
+ - bundle update
16
+ - bundle install
17
+ test_script:
18
+ - rake
19
+ - gem build rultor.gemspec
20
+ - gem install rultor-1.0.snapshot.gem
21
+ - rultor encrypt --project yegor256/rultor LICENSE.txt
22
+ cache:
23
+ - C:\Ruby200\bin -> rultor.gemspec
24
+ - C:\Ruby200\lib\ruby\gems\2.0.0 -> rultor.gemspec
@@ -12,7 +12,6 @@ Feature: Gem Package
12
12
  """
13
13
  When I run bash with
14
14
  """
15
- set -e
16
15
  cd rultor
17
16
  gem build rultor.gemspec
18
17
  gem specification --ruby rultor-*.gem > ../spec.rb
@@ -51,7 +51,7 @@ Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
51
51
  end
52
52
  end
53
53
 
54
- When(%r{^I run bin\/rultor with "([^"]*)"$}) do |arg|
54
+ When(/^I run bin\/rultor with "([^"]*)"$/) do |arg|
55
55
  home = File.join(File.dirname(__FILE__), '../..')
56
56
  @stdout = `ruby -I#{home}/lib #{home}/bin/rultor #{arg} 2>&1`
57
57
  @exitstatus = $CHILD_STATUS.exitstatus
@@ -45,37 +45,66 @@ module Rultor
45
45
  end
46
46
 
47
47
  def run
48
+ source = File.join(@dir, @file)
49
+ target = File.join(@dir, @file + '.asc')
50
+ if Gem.win_platform?
51
+ windows(source, target)
52
+ else
53
+ unix(source, target)
54
+ end
55
+ fail 'PGP encryption failed' unless $CHILD_STATUS.exitstatus == 0
56
+ Rultor.log.info "#{@file} encrypted into #{target}" \
57
+ " (#{File.size(target)} bytes)"
58
+ end
59
+
60
+ private
61
+
62
+ def unix(source, target)
48
63
  system(
49
64
  "
50
65
  set -x
51
66
  set -e
52
- file=#{Shellwords.escape(@file)}
53
- enc=#{Shellwords.escape(@file + '.enc')}
54
- if [ -e \"${enc}\" ]; then
55
- echo \"file already exists: ${enc}\"
56
- exit -1
57
- fi
58
- asc=#{Shellwords.escape(@file + '.asc')}
67
+ file=#{Shellwords.escape(source)}
68
+ asc=#{Shellwords.escape(target)}
59
69
  if [ -e \"${asc}\" ]; then
60
70
  echo \"file already exists: ${asc}\"
61
71
  exit -1
62
72
  fi
63
- cd #{Shellwords.escape(@dir)}
73
+ tmp=$(mktemp)
74
+ rm -f \"${tmp}\"
64
75
  gpg --version
65
76
  gpg --symmetric --armor --verbose --batch --no-tty \
66
77
  --passphrase #{Shellwords.escape(@key)} \
67
- -o \"${enc}\" \"${file}\"
78
+ -o \"${tmp}\" \"${file}\"
68
79
  gpg --keyserver hkp://pool.sks-keyservers.net \
69
80
  --verbose --recv-keys 9AF0FA4C
70
81
  gpg --trust-model always \
71
82
  --output \"${asc}\" \
72
83
  --batch --no-tty --armor --encrypt --verbose \
73
- --recipient 9AF0FA4C \"${enc}\"
74
- rm -f \"${enc}\"
84
+ --recipient 9AF0FA4C \"${tmp}\"
85
+ rm -f \"${tmp}\"
75
86
  "
76
87
  )
77
- fail 'Failed to PGP encrypt' unless $CHILD_STATUS.exitstatus == 0
78
- Rultor.log.info "#{@file} encrypted"
88
+ end
89
+
90
+ def windows(source, target)
91
+ tmp = source + '.enc'
92
+ system(
93
+ [
94
+ 'gpg --version',
95
+ 'gpg --symmetric --armor --verbose --batch --no-tty' \
96
+ " --passphrase #{Shellwords.escape(@key)}" \
97
+ " -o #{Shellwords.escape(tmp)}" \
98
+ " #{Shellwords.escape(source)}",
99
+ 'gpg --keyserver hkp://pool.sks-keyservers.net' \
100
+ ' --verbose --recv-keys 9AF0FA4C',
101
+ 'gpg --trust-model always' \
102
+ " --output #{Shellwords.escape(target)}" \
103
+ ' --batch --no-tty --armor --encrypt --verbose' \
104
+ " --recipient 9AF0FA4C #{Shellwords.escape(tmp)}"
105
+ ].join(' && ')
106
+ )
107
+ File.delete(tmp)
79
108
  end
80
109
  end
81
110
  end
@@ -33,5 +33,5 @@
33
33
  # Copyright:: Copyright (c) 2014 Yegor Bugayenko
34
34
  # License:: BSD
35
35
  module Rultor
36
- VERSION = '0.4.1'
36
+ VERSION = '0.4.2'
37
37
  end
data/lib/rultor.rb CHANGED
@@ -40,7 +40,7 @@ module Rultor
40
40
  unless @log
41
41
  @log = Logger.new(STDOUT)
42
42
  @log.formatter = proc { |_, _, _, msg|
43
- puts "#{msg.dump}"
43
+ puts msg.dump
44
44
  }
45
45
  end
46
46
  @log
data/rultor.gemspec CHANGED
@@ -48,17 +48,17 @@ Gem::Specification.new do |s|
48
48
  s.email = 'yegor@teamed.io'
49
49
  s.homepage = 'http://github.com/yegor256/rultor-remote'
50
50
  s.files = `git ls-files`.split($RS)
51
- s.executables = s.files.grep(%r{^bin\/}) { |f| File.basename(f) }
52
- s.test_files = s.files.grep(%r{^(test|spec|features)\/})
51
+ s.executables = s.files.grep(/^bin\//) { |f| File.basename(f) }
52
+ s.test_files = s.files.grep(/^(test|spec|features)\//)
53
53
  s.rdoc_options = ['--charset=UTF-8']
54
54
  s.extra_rdoc_files = %w(README.md LICENSE.txt)
55
- s.add_runtime_dependency 'slop', '~> 3.6'
56
- s.add_development_dependency 'rake', '~> 10.1'
57
- s.add_development_dependency 'coveralls', '~> 0.7', '>= 0.7.0'
58
- s.add_development_dependency 'rdoc', '~> 3.11'
55
+ s.add_runtime_dependency 'slop', '3.6'
56
+ s.add_development_dependency 'rake', '10.4.2'
57
+ s.add_development_dependency 'coveralls', '0.7.0'
58
+ s.add_development_dependency 'rdoc', '3.11'
59
59
  s.add_development_dependency 'cucumber', '1.3.11'
60
- s.add_development_dependency 'minitest', '~> 5.4', '>= 5.4.0'
61
- s.add_development_dependency 'rubocop', '~> 0.24', '>= 0.24.1'
62
- s.add_development_dependency 'rubocop-rspec', '~> 1.1', '>= 1.1.0'
63
- s.add_development_dependency 'rspec-rails', '~> 2.13'
60
+ s.add_development_dependency 'minitest', '5.4.0'
61
+ s.add_development_dependency 'rubocop', '0.24.1'
62
+ s.add_development_dependency 'rubocop-rspec', '1.1.0'
63
+ s.add_development_dependency 'rspec-rails', '2.13'
64
64
  end
metadata CHANGED
@@ -1,90 +1,74 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rultor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
5
- prerelease:
4
+ version: 0.4.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Yegor Bugayenko
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2016-02-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: slop
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - '='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.6'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - '='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.6'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - '='
36
32
  - !ruby/object:Gem::Version
37
- version: '10.1'
33
+ version: 10.4.2
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - '='
44
39
  - !ruby/object:Gem::Version
45
- version: '10.1'
40
+ version: 10.4.2
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: coveralls
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: '0.7'
54
- - - ! '>='
45
+ - - '='
55
46
  - !ruby/object:Gem::Version
56
47
  version: 0.7.0
57
48
  type: :development
58
49
  prerelease: false
59
50
  version_requirements: !ruby/object:Gem::Requirement
60
- none: false
61
51
  requirements:
62
- - - ~>
63
- - !ruby/object:Gem::Version
64
- version: '0.7'
65
- - - ! '>='
52
+ - - '='
66
53
  - !ruby/object:Gem::Version
67
54
  version: 0.7.0
68
55
  - !ruby/object:Gem::Dependency
69
56
  name: rdoc
70
57
  requirement: !ruby/object:Gem::Requirement
71
- none: false
72
58
  requirements:
73
- - - ~>
59
+ - - '='
74
60
  - !ruby/object:Gem::Version
75
61
  version: '3.11'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
- none: false
80
65
  requirements:
81
- - - ~>
66
+ - - '='
82
67
  - !ruby/object:Gem::Version
83
68
  version: '3.11'
84
69
  - !ruby/object:Gem::Dependency
85
70
  name: cucumber
86
71
  requirement: !ruby/object:Gem::Requirement
87
- none: false
88
72
  requirements:
89
73
  - - '='
90
74
  - !ruby/object:Gem::Version
@@ -92,7 +76,6 @@ dependencies:
92
76
  type: :development
93
77
  prerelease: false
94
78
  version_requirements: !ruby/object:Gem::Requirement
95
- none: false
96
79
  requirements:
97
80
  - - '='
98
81
  - !ruby/object:Gem::Version
@@ -100,83 +83,57 @@ dependencies:
100
83
  - !ruby/object:Gem::Dependency
101
84
  name: minitest
102
85
  requirement: !ruby/object:Gem::Requirement
103
- none: false
104
86
  requirements:
105
- - - ~>
106
- - !ruby/object:Gem::Version
107
- version: '5.4'
108
- - - ! '>='
87
+ - - '='
109
88
  - !ruby/object:Gem::Version
110
89
  version: 5.4.0
111
90
  type: :development
112
91
  prerelease: false
113
92
  version_requirements: !ruby/object:Gem::Requirement
114
- none: false
115
93
  requirements:
116
- - - ~>
117
- - !ruby/object:Gem::Version
118
- version: '5.4'
119
- - - ! '>='
94
+ - - '='
120
95
  - !ruby/object:Gem::Version
121
96
  version: 5.4.0
122
97
  - !ruby/object:Gem::Dependency
123
98
  name: rubocop
124
99
  requirement: !ruby/object:Gem::Requirement
125
- none: false
126
100
  requirements:
127
- - - ~>
128
- - !ruby/object:Gem::Version
129
- version: '0.24'
130
- - - ! '>='
101
+ - - '='
131
102
  - !ruby/object:Gem::Version
132
103
  version: 0.24.1
133
104
  type: :development
134
105
  prerelease: false
135
106
  version_requirements: !ruby/object:Gem::Requirement
136
- none: false
137
107
  requirements:
138
- - - ~>
139
- - !ruby/object:Gem::Version
140
- version: '0.24'
141
- - - ! '>='
108
+ - - '='
142
109
  - !ruby/object:Gem::Version
143
110
  version: 0.24.1
144
111
  - !ruby/object:Gem::Dependency
145
112
  name: rubocop-rspec
146
113
  requirement: !ruby/object:Gem::Requirement
147
- none: false
148
114
  requirements:
149
- - - ~>
150
- - !ruby/object:Gem::Version
151
- version: '1.1'
152
- - - ! '>='
115
+ - - '='
153
116
  - !ruby/object:Gem::Version
154
117
  version: 1.1.0
155
118
  type: :development
156
119
  prerelease: false
157
120
  version_requirements: !ruby/object:Gem::Requirement
158
- none: false
159
121
  requirements:
160
- - - ~>
161
- - !ruby/object:Gem::Version
162
- version: '1.1'
163
- - - ! '>='
122
+ - - '='
164
123
  - !ruby/object:Gem::Version
165
124
  version: 1.1.0
166
125
  - !ruby/object:Gem::Dependency
167
126
  name: rspec-rails
168
127
  requirement: !ruby/object:Gem::Requirement
169
- none: false
170
128
  requirements:
171
- - - ~>
129
+ - - '='
172
130
  - !ruby/object:Gem::Version
173
131
  version: '2.13'
174
132
  type: :development
175
133
  prerelease: false
176
134
  version_requirements: !ruby/object:Gem::Requirement
177
- none: false
178
135
  requirements:
179
- - - ~>
136
+ - - '='
180
137
  - !ruby/object:Gem::Version
181
138
  version: '2.13'
182
139
  description: Command line remote control of www.rultor.com
@@ -188,16 +145,19 @@ extra_rdoc_files:
188
145
  - README.md
189
146
  - LICENSE.txt
190
147
  files:
191
- - .gitattributes
192
- - .gitignore
193
- - .rubocop.yml
194
- - .rultor.yml
195
- - .simplecov
196
- - .travis.yml
148
+ - ".gitattributes"
149
+ - ".gitignore"
150
+ - ".rubocop.yml"
151
+ - ".rultor.yml"
152
+ - ".simplecov"
153
+ - ".travis.yml"
197
154
  - Gemfile
198
155
  - LICENSE.txt
156
+ - PUZZLES.md
199
157
  - README.md
200
158
  - Rakefile
159
+ - TEAM.md
160
+ - appveyor.yml
201
161
  - bin/rultor
202
162
  - cucumber.yml
203
163
  - features/cli/encrypt.feature
@@ -216,26 +176,25 @@ files:
216
176
  homepage: http://github.com/yegor256/rultor-remote
217
177
  licenses:
218
178
  - BSD
179
+ metadata: {}
219
180
  post_install_message:
220
181
  rdoc_options:
221
- - --charset=UTF-8
182
+ - "--charset=UTF-8"
222
183
  require_paths:
223
184
  - lib
224
185
  required_ruby_version: !ruby/object:Gem::Requirement
225
- none: false
226
186
  requirements:
227
- - - ! '>='
187
+ - - ">="
228
188
  - !ruby/object:Gem::Version
229
189
  version: 1.9.3
230
190
  required_rubygems_version: !ruby/object:Gem::Requirement
231
- none: false
232
191
  requirements:
233
- - - ! '>='
192
+ - - ">="
234
193
  - !ruby/object:Gem::Version
235
194
  version: '0'
236
195
  requirements: []
237
196
  rubyforge_project:
238
- rubygems_version: 1.8.23
197
+ rubygems_version: 2.4.5.1
239
198
  signing_key:
240
199
  specification_version: 2
241
200
  summary: Rultor.com Remote Control