genRelease 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/genRelease +0 -4
- data/lib/genRelease.rb +9 -0
- data/lib/genRelease/commands/build.rb +1 -2
- data/lib/genRelease/commands/create.rb +1 -2
- data/lib/genRelease/commands/help_modules/OpenSSLUtils.rb +3 -3
- data/lib/genRelease/commands/sign.rb +4 -5
- data/lib/genRelease/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bf46944a48faae33ca1ccb8f83efb2a73a0d0bf
|
4
|
+
data.tar.gz: 5764d8b71f1e015f74242a6fe96322a7c0745e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e24d0f7e878916c68ff0e6caa273439cd5d6b3c47aa732d7e6aef6f57672683ec24e3dc73a43cb9dd85696493f822efc10d41e94d0cc3643b040a90b489a38a
|
7
|
+
data.tar.gz: c16f152b70397f9641dc3661fc6df2f4588ace9dde40f2d6429977d393a2f14f99bfcc6bb2726d7a5aac1fd88ac43cc9430dbedf5dd9c867df9a66f7f3328a7a
|
data/Gemfile.lock
CHANGED
data/bin/genRelease
CHANGED
data/lib/genRelease.rb
CHANGED
@@ -2,3 +2,12 @@ require 'genRelease/version.rb'
|
|
2
2
|
|
3
3
|
# Add requires for other files you add to your project here, so
|
4
4
|
# you just need to require this one file in your bin file
|
5
|
+
module GenRelease
|
6
|
+
autoload :FileUtils, 'genRelease/commands/help_modules/FileUtils'
|
7
|
+
autoload :OpenSSLUtils, 'genRelease/commands/help_modules/OpenSSLUtils'
|
8
|
+
module Commands
|
9
|
+
autoload :Sign, 'genRelease/commands/sign'
|
10
|
+
autoload :Create, 'genRelease/commands/create'
|
11
|
+
autoload :Build, 'genRelease/commands/build'
|
12
|
+
end
|
13
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
'
|
1
|
+
require 'openssl'
|
2
2
|
module GenRelease
|
3
3
|
module OpenSSLUtils
|
4
4
|
extend self
|
@@ -7,7 +7,7 @@ module GenRelease
|
|
7
7
|
PEM = "rsa.pem"
|
8
8
|
|
9
9
|
def new_certification_file
|
10
|
-
rsa = OpenSSL::PKey::RSA.new 2048
|
10
|
+
rsa = ::OpenSSL::PKey::RSA.new 2048
|
11
11
|
p rsa.to_pem
|
12
12
|
FileUtils::write PRIKEY, rsa.to_pem
|
13
13
|
p rsa.public_key.to_s
|
@@ -15,4 +15,4 @@ module GenRelease
|
|
15
15
|
FileUtils::write PEM, "#{rsa.public_key}#{rsa.to_pem}"
|
16
16
|
end
|
17
17
|
end
|
18
|
-
end
|
18
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'digest/md5'
|
2
2
|
require 'digest/sha1'
|
3
|
-
require '
|
4
|
-
|
3
|
+
require 'openssl'
|
5
4
|
module GenRelease
|
6
5
|
module Commands
|
7
6
|
class Sign
|
@@ -12,11 +11,11 @@ module GenRelease
|
|
12
11
|
end
|
13
12
|
|
14
13
|
def sign
|
15
|
-
@rsa = OpenSSL::PKey::RSA.new File.read "#{@current_dir}#{File::SEPARATOR}rsa.pem"
|
14
|
+
@rsa = ::OpenSSL::PKey::RSA.new File.read "#{@current_dir}#{File::SEPARATOR}rsa.pem"
|
16
15
|
content = File.open("#{@current_dir}#{File::SEPARATOR}Release",'rb') {|file| file.read}
|
17
16
|
message = @rsa.private_encrypt(content.gsub("\n",""))
|
18
|
-
FileUtils::write "#{@current_dir}#{File::SEPARATOR}#{FILENAME}",message
|
17
|
+
::GenRelease::FileUtils::write "#{@current_dir}#{File::SEPARATOR}#{FILENAME}",message
|
19
18
|
end
|
20
19
|
end
|
21
20
|
end
|
22
|
-
end
|
21
|
+
end
|
data/lib/genRelease/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genRelease
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- megrez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|