csr 0.1.0 → 0.1.1

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: 1d258820a2f7415cff125530786bebbe2cfec58a
4
- data.tar.gz: 637aa9daa45c9b0357a716e125b7312c3e4d6663
2
+ SHA256:
3
+ metadata.gz: 4df9cb9d645db142f786058ceac55dfb087d18879536c049305e6e7a1dbb1a0a
4
+ data.tar.gz: e2cca4a52ec7ba87277be8f628a5cb85145ecec125c4703c3dad1665944979aa
5
5
  SHA512:
6
- metadata.gz: 36cacfabcf3dc150b31c4b4b139b2edd6ccffa29f0576e5505488371f5559b86d5e05fee3ffa60a248332eb01e565950aa6fb71a4125edd7f2778e70233b9f47
7
- data.tar.gz: 3d11866339acd93406738a1436f673c00eca84b11a187c6c729cbacb719ab66a146153154519d30f28a5ab38746a1ab4efb542175125e05ea2e44f429b25775b
6
+ metadata.gz: d960abc1ef245f63a34d99dad9ea688cea671d94666b1a37f50ec7fc4c920c8327ab1431e2664d8cecf4ffd27adcdeff40c4f33df5be7f8a4b588d53db5a7d5b
7
+ data.tar.gz: 71855ce567cc48e00dfa30dd444e28afc2e74dbecae455b769748691936c8c297eb6eeb9786a67595d6b148fc0c0c02fb0973e73a6eac2355a945cc639c41903
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
@@ -2,9 +2,17 @@ language: ruby
2
2
  sudo: false
3
3
  cache: bundler
4
4
  rvm:
5
- - '2.2'
6
- - '2.1'
7
- addons:
8
- code_climate:
9
- repo_token:
10
- secure: "BPmBX98i6pzGOmJfgvXNuCxK1uftL8x8nLKpsuwVx+XM6t2wmtiiTTiT4xUJC0u429+M+7tdIs82KxvkRxu649sK4OFrzaxNKLtVa2cO8Lz8aGQdToJkhEADfaqTlJUn4/GS6gU67C/iPx3I7UYT5s4mK5jNY2Q18glwXrS50GA="
5
+ - 2.6.0
6
+ - 2.5.2
7
+ - 2.4.5
8
+ notifications:
9
+ email: false
10
+ before_script:
11
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
12
+ - chmod +x ./cc-test-reporter
13
+ - "./cc-test-reporter before-build"
14
+ after_script:
15
+ - "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
16
+ env:
17
+ global:
18
+ secure: WAtIHHjBdoPXQNWZe5tZf7BJtM/cMcrxaH2zWrTyFiQ6EYg7FOnCmWCBVqcL6OGOT0/VkhFxAvVd5u+TlRw262hT0Rd+Eck70xnVJ0E7rii3i/2cld8uHeDamxt9OwuJKitmJyLjmfGBsFD0gGTNS0Y5ekBylbSEMVG4to6shSM=
@@ -0,0 +1,53 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ csr (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ awesome_print (1.8.0)
10
+ byebug (10.0.2)
11
+ coderay (1.1.2)
12
+ docile (1.3.1)
13
+ json (2.1.0)
14
+ method_source (0.9.2)
15
+ minitest (5.11.3)
16
+ minitest-utils (0.4.4)
17
+ minitest
18
+ pry (0.12.2)
19
+ coderay (~> 1.1.0)
20
+ method_source (~> 0.9.0)
21
+ pry-byebug (3.6.0)
22
+ byebug (~> 10.0)
23
+ pry (~> 0.10)
24
+ pry-meta (0.0.10)
25
+ awesome_print
26
+ pry
27
+ pry-byebug
28
+ pry-remote
29
+ pry-remote (0.1.8)
30
+ pry (~> 0.9)
31
+ slop (~> 3.0)
32
+ rake (12.3.2)
33
+ simplecov (0.16.1)
34
+ docile (~> 1.1)
35
+ json (>= 1.8, < 3)
36
+ simplecov-html (~> 0.10.0)
37
+ simplecov-html (0.10.2)
38
+ slop (3.6.0)
39
+
40
+ PLATFORMS
41
+ ruby
42
+
43
+ DEPENDENCIES
44
+ bundler
45
+ csr!
46
+ minitest
47
+ minitest-utils
48
+ pry-meta
49
+ rake
50
+ simplecov
51
+
52
+ BUNDLED WITH
53
+ 1.17.3
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # CSR
2
2
 
3
- [![Build Status](https://travis-ci.org/fnando/csr.svg)](https://travis-ci.org/fnando/csr)
3
+ [![Travis-CI](https://travis-ci.org/fnando/csr.svg)](https://travis-ci.org/fnando/csr)
4
4
  [![Code Climate](https://codeclimate.com/github/fnando/csr/badges/gpa.svg)](https://codeclimate.com/github/fnando/csr)
5
- [![Test Coverage](https://codeclimate.com/github/fnando/csr/badges/coverage.svg)](https://codeclimate.com/github/fnando/csr)
5
+ [![Test Coverage](https://codeclimate.com/github/fnando/csr/badges/coverage.svg)](https://codeclimate.com/github/fnando/csr/coverage)
6
+ [![Gem](https://img.shields.io/gem/v/csr.svg)](https://rubygems.org/gems/csr)
7
+ [![Gem](https://img.shields.io/gem/dt/csr.svg)](https://rubygems.org/gems/csr)
6
8
 
7
9
  Generate CSR (Certificate Signing Request) using Ruby and OpenSSL.
8
10
 
data/Rakefile CHANGED
@@ -1,10 +1,11 @@
1
- require 'bundler/gem_tasks'
2
- require 'rake/testtask'
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
3
 
4
- Rake::TestTask.new(:spec) do |t|
5
- t.libs << 'spec'
6
- t.test_files = Dir['./spec/**/*_spec.rb']
4
+ Rake::TestTask.new do |t|
5
+ t.libs << "test"
6
+ t.test_files = Dir["./test/**/*_test.rb"]
7
+ t.warning = false
7
8
  end
8
9
 
9
- task :default => :spec
10
+ task default: :test
10
11
 
@@ -1,25 +1,25 @@
1
- require './lib/csr/version'
1
+ require "./lib/csr/version"
2
2
 
3
3
  Gem::Specification.new do |spec|
4
- spec.name = 'csr'
4
+ spec.name = "csr"
5
5
  spec.version = CSR::VERSION
6
- spec.authors = ['Nando Vieira']
7
- spec.email = ['fnando.vieira@gmail.com']
8
- spec.summary = 'Generate CSR (Certificate Signing Request) using Ruby and OpenSSL'
6
+ spec.authors = ["Nando Vieira"]
7
+ spec.email = ["fnando.vieira@gmail.com"]
8
+ spec.summary = "Generate CSR (Certificate Signing Request) using Ruby and OpenSSL"
9
9
  spec.description = spec.summary
10
- spec.homepage = 'http://rubygems.org/gems/csr'
11
- spec.license = 'MIT'
12
- spec.required_ruby_version = '>= 2.1.0'
10
+ spec.homepage = "http://rubygems.org/gems/csr"
11
+ spec.license = "MIT"
12
+ spec.required_ruby_version = ">= 2.1.0"
13
13
 
14
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
15
- spec.bindir = 'bin'
16
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
17
- spec.require_paths = ['lib']
14
+ spec.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
15
+ spec.bindir = "bin"
16
+ spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
17
+ spec.require_paths = ["lib"]
18
18
 
19
- spec.add_development_dependency 'bundler'
20
- spec.add_development_dependency 'rake'
21
- spec.add_development_dependency 'minitest'
22
- spec.add_development_dependency 'minitest-rg'
23
- spec.add_development_dependency 'pry-meta'
24
- spec.add_development_dependency 'codeclimate-test-reporter'
19
+ spec.add_development_dependency "bundler"
20
+ spec.add_development_dependency "rake"
21
+ spec.add_development_dependency "minitest"
22
+ spec.add_development_dependency "minitest-utils"
23
+ spec.add_development_dependency "pry-meta"
24
+ spec.add_development_dependency "simplecov"
25
25
  end
data/lib/csr.rb CHANGED
@@ -1,6 +1,6 @@
1
- require 'openssl'
2
- require 'fileutils'
3
- require 'csr/version'
1
+ require "openssl"
2
+ require "fileutils"
3
+ require "csr/version"
4
4
 
5
5
  class CSR
6
6
  attr_reader :bits, :country, :state, :city, :department, :organization,
@@ -17,7 +17,7 @@ class CSR
17
17
  common_name:, email:, bits: 4096, private_key: nil,
18
18
  passphrase: nil, cipher: nil, digest: nil)
19
19
 
20
- cipher ||= OpenSSL::Cipher::Cipher.new('des-ede3-cbc')
20
+ cipher ||= OpenSSL::Cipher.new("des-ede3-cbc")
21
21
  digest ||= OpenSSL::Digest::SHA256.new
22
22
  @country = country
23
23
  @state = state
@@ -41,13 +41,13 @@ class CSR
41
41
  @request ||= OpenSSL::X509::Request.new.tap do |request|
42
42
  request.version = 0
43
43
  request.subject = OpenSSL::X509::Name.new([
44
- ['C', country, OpenSSL::ASN1::PRINTABLESTRING],
45
- ['ST', state, OpenSSL::ASN1::PRINTABLESTRING],
46
- ['L', city, OpenSSL::ASN1::PRINTABLESTRING],
47
- ['O', organization, OpenSSL::ASN1::UTF8STRING],
48
- ['OU', department, OpenSSL::ASN1::UTF8STRING],
49
- ['CN', common_name, OpenSSL::ASN1::UTF8STRING],
50
- ['emailAddress', email, OpenSSL::ASN1::UTF8STRING]
44
+ ["C", country, OpenSSL::ASN1::PRINTABLESTRING],
45
+ ["ST", state, OpenSSL::ASN1::PRINTABLESTRING],
46
+ ["L", city, OpenSSL::ASN1::PRINTABLESTRING],
47
+ ["O", organization, OpenSSL::ASN1::UTF8STRING],
48
+ ["OU", department, OpenSSL::ASN1::UTF8STRING],
49
+ ["CN", common_name, OpenSSL::ASN1::UTF8STRING],
50
+ ["emailAddress", email, OpenSSL::ASN1::UTF8STRING]
51
51
  ])
52
52
 
53
53
  request.public_key = private_key.public_key
@@ -81,13 +81,13 @@ class CSR
81
81
  private
82
82
 
83
83
  def save_private_key_to(path)
84
- File.open(path, 'w') do |file|
84
+ File.open(path, "w") do |file|
85
85
  file << private_key_pem
86
86
  end
87
87
  end
88
88
 
89
89
  def save_csr_to(path)
90
- File.open(path, 'w') do |file|
90
+ File.open(path, "w") do |file|
91
91
  file << pem
92
92
  end
93
93
  end
@@ -1,3 +1,3 @@
1
1
  class CSR
2
- VERSION = '0.1.0'
2
+ VERSION = "0.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-01 00:00:00.000000000 Z
11
+ date: 2018-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: minitest-rg
56
+ name: minitest-utils
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: codeclimate-test-reporter
84
+ name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -105,6 +105,7 @@ files:
105
105
  - ".travis.yml"
106
106
  - CODE_OF_CONDUCT.md
107
107
  - Gemfile
108
+ - Gemfile.lock
108
109
  - LICENSE.txt
109
110
  - README.md
110
111
  - Rakefile
@@ -132,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
133
  - !ruby/object:Gem::Version
133
134
  version: '0'
134
135
  requirements: []
135
- rubyforge_project:
136
- rubygems_version: 2.4.6
136
+ rubygems_version: 3.0.1
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Generate CSR (Certificate Signing Request) using Ruby and OpenSSL