ftpmvc-gpg 0.0.2 → 0.1.0

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
2
  SHA1:
3
- metadata.gz: 50a59f07de59922eb4c215c482310d8eb7f5d3e1
4
- data.tar.gz: 1973f0ab9a0ab9f33628095db7e052f4b20f2c76
3
+ metadata.gz: 666547b5c0a29b7adab5379ce4df0f3a704c494e
4
+ data.tar.gz: 8bc83fcd6444c2f6aa70cff4bf600f5fc0d72b08
5
5
  SHA512:
6
- metadata.gz: f048d6ce39248a31866a1b8ecea1f9fe3040f6c9971d92030301d9e109e126ee32cac71b955b83dbeeb294b1caab115382ebd9c35b34d5ca339e7eb1b5e145ac
7
- data.tar.gz: 5c2a0859a5e66affb19e661b99e966e07c961e7b5a9a3898041c9279e77b0256f348aaaae3e0fb4053d343de44dcd8a77a3bd37ba04f9a4b67714b9ce6ffc4f2
6
+ metadata.gz: b4e26f5710c8aa65518213b74cfab3e71d1853dbf1d77693947da507d46e5edb95c695f56e2f1661f05b26a574725a57fec45f42f56405daf635f0480677cb14
7
+ data.tar.gz: bdfef1ca5938ef1f19d817535e0f74c4a49470dc78c5991f09ba937acc9c38ae127e3575ae21ed4500a78f2a723087d7b7a8ab5f3f863518f162a304bfd7e672
data/ftpmvc-gpg.gemspec CHANGED
@@ -21,6 +21,6 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.6"
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "guard-rspec"
24
- spec.add_dependency "ftpmvc"
24
+ spec.add_dependency "ftpmvc", '>= 0.7.0'
25
25
  spec.add_dependency "gpgme"
26
26
  end
@@ -1,9 +1,9 @@
1
- require 'ftpmvc/filter'
1
+ require 'ftpmvc/filter/base'
2
2
  require 'gpgme'
3
3
 
4
4
  module FTPMVC
5
- module GPG
6
- class Filter < FTPMVC::Filter
5
+ module Filter
6
+ class Gpg < FTPMVC::Filter::Base
7
7
  def initialize(fs, chain, options={})
8
8
  super fs, chain
9
9
  @crypto = GPGME::Crypto.new recipients: options[:recipients], always_trust: true
@@ -1,5 +1,5 @@
1
1
  module FTPMVC
2
2
  module GPG
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/lib/ftpmvc/gpg.rb CHANGED
@@ -1,2 +1,2 @@
1
1
  require 'ftpmvc/gpg/version'
2
- require 'ftpmvc/gpg/filter'
2
+ require 'ftpmvc/filter/gpg'
@@ -4,11 +4,11 @@ require 'ftpmvc/gpg'
4
4
  require 'net/ftp'
5
5
 
6
6
 
7
- describe FTPMVC::GPG::Filter do
7
+ describe FTPMVC::Filter::Gpg do
8
8
  let(:app) do
9
9
  FTPMVC::Application.new do
10
10
 
11
- filter FTPMVC::GPG::Filter, recipients: ['john.doe@gmail.com'], keys: [
11
+ filter FTPMVC::Filter::Gpg, recipients: ['john.doe@gmail.com'], keys: [
12
12
  <<-EOF
13
13
  -----BEGIN PGP PUBLIC KEY BLOCK-----
14
14
  Version: GnuPG v1
@@ -1,13 +1,13 @@
1
- require 'ftpmvc/gpg/filter'
1
+ require 'ftpmvc/filter/gpg'
2
2
  require 'ftpmvc/file'
3
3
  require 'ftpmvc/directory'
4
4
 
5
- describe FTPMVC::GPG::Filter do
5
+ describe FTPMVC::Filter::Gpg do
6
6
  before do
7
- stub_const 'OtherFilter', Class.new(FTPMVC::Filter)
7
+ stub_const 'OtherFilter', Class.new(FTPMVC::Filter::Base)
8
8
  end
9
9
  let(:other_filter) { OtherFilter.new(nil, nil) }
10
- let(:gpg_filter) { FTPMVC::GPG::Filter.new(nil, other_filter, recipients: 'john.doe@gmail.com') }
10
+ let(:gpg_filter) { FTPMVC::Filter::Gpg.new(nil, other_filter, recipients: 'john.doe@gmail.com') }
11
11
  describe '#index' do
12
12
  before do
13
13
  allow(other_filter)
@@ -52,7 +52,7 @@ describe FTPMVC::GPG::Filter do
52
52
  context 'when keys option is given' do
53
53
  it 'imports the keys' do
54
54
  expect(GPGME::Key).to receive(:import).twice
55
- FTPMVC::GPG::Filter.new(nil,
55
+ FTPMVC::Filter::Gpg.new(nil,
56
56
  other_filter,
57
57
  recipients: 'john.doe@gmail.com',
58
58
  keys: ['mykey1', 'mykey2'])
@@ -63,7 +63,7 @@ describe FTPMVC::GPG::Filter do
63
63
  expect(GPGME::Key)
64
64
  .to receive(:import)
65
65
  .with("-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----\n")
66
- FTPMVC::GPG::Filter.new(nil, other_filter, recipients: 'john.doe@gmail.com', keys: [
66
+ FTPMVC::Filter::Gpg.new(nil, other_filter, recipients: 'john.doe@gmail.com', keys: [
67
67
  <<-EOF
68
68
  -----BEGIN PGP PUBLIC KEY BLOCK-----
69
69
  ...
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ftpmvc-gpg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Aizim Kelmanson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-12 00:00:00.000000000 Z
11
+ date: 2015-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.7.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.7.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: gpgme
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -96,11 +96,11 @@ files:
96
96
  - README.md
97
97
  - Rakefile
98
98
  - ftpmvc-gpg.gemspec
99
+ - lib/ftpmvc/filter/gpg.rb
99
100
  - lib/ftpmvc/gpg.rb
100
- - lib/ftpmvc/gpg/filter.rb
101
101
  - lib/ftpmvc/gpg/version.rb
102
- - spec/integration/ftpmvc/gpg/filter_spec.rb
103
- - spec/lib/ftpmvc/gpg/filter_spec.rb
102
+ - spec/integration/ftpmvc/filter/gpg_spec.rb
103
+ - spec/lib/ftpmvc/filter/gpg_spec.rb
104
104
  - spec/spec_helper.rb
105
105
  homepage: ''
106
106
  licenses:
@@ -127,6 +127,6 @@ signing_key:
127
127
  specification_version: 4
128
128
  summary: FTPMVC filter to encrypt/decrypt files
129
129
  test_files:
130
- - spec/integration/ftpmvc/gpg/filter_spec.rb
131
- - spec/lib/ftpmvc/gpg/filter_spec.rb
130
+ - spec/integration/ftpmvc/filter/gpg_spec.rb
131
+ - spec/lib/ftpmvc/filter/gpg_spec.rb
132
132
  - spec/spec_helper.rb