osp 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba243336c25206bb2fdf72c5daac8421f017344d
4
- data.tar.gz: 6506d4fcef87a75cf6f643e8640aadfa224bf2e2
3
+ metadata.gz: a9ad26b1c10b870b57a7f93e87d959e2793cc428
4
+ data.tar.gz: 73b18ffd7ba322d4e012d4a0be7b65d7c50e85d5
5
5
  SHA512:
6
- metadata.gz: 8fe52bc496dd66cfa38581e0068183f983fe58cd71a0dca12a032897f22302b7214ce73698b6ae20f155b543e03fe5b4f9903f8875374495e96110f34bb997d7
7
- data.tar.gz: 60a2137683cfbad3a01a43b2b1b7e53f96b43842dfb8a67d99537329cfc8638ff8499a454ad97eaaf42a650773300acc0b88ba2ad2bbd99738b2baaf9f6ba028
6
+ metadata.gz: ec993b8319cdab6f467944092e2473f390ea172f8228548ee85e4f2064e61cc290c388f10355832ab3ca10c578d76dc759e3a0c054793069f753a49b34abd254
7
+ data.tar.gz: 2e803c40d74bd5e7629b6f25650cf2431fbb1837e1b26b34904fb6957185356a90ecb018054b073655aeb8343607a8d09026bb2b00f0403bf861393326395469
data/.travis.yml CHANGED
@@ -3,7 +3,7 @@ rvm:
3
3
  - 2.1
4
4
  - 2.2
5
5
  sudo: required
6
- before_install:
6
+ before_install:
7
7
  - gem update --system
8
8
  - gem install bundler -v '~>1.11'
9
9
  - bundler --version
data/Makefile CHANGED
@@ -3,6 +3,9 @@ GEM_NAME = osp
3
3
 
4
4
  include Makefile.common
5
5
 
6
+ dev:
7
+ RUBYOPT=-rbundler/setup ruby --debug ./bin/osp -d passwords.osp
8
+
6
9
  .PHONY: test
7
10
  test:
8
11
  RUBYOPT=-w $(BUNDLER) exec ./tests/ts_all.rb
data/README.md CHANGED
@@ -9,7 +9,7 @@ The preferred method of installation is via RubyGems.org:
9
9
 
10
10
  or via `Gemfile`:
11
11
 
12
- gem 'osp', '~>0.1'
12
+ gem 'osp', '~>0.3'
13
13
 
14
14
  ## Project Links
15
15
 
data/bin/osp CHANGED
@@ -11,22 +11,22 @@ require 'osp'
11
11
  options = {
12
12
  :database_path => "#{Dir.home}/.osp",
13
13
  }
14
- opts = OptionParser.new do |opts|
15
- opts.banner = 'Usage: osp [options]'
16
- opts.separator('')
14
+ opts = OptionParser.new do |o|
15
+ o.banner = 'Usage: osp [options]'
16
+ o.separator('')
17
17
 
18
- opts.on('-d', '--database <path>', 'Path to the database file.') do |path|
18
+ o.on('-d', '--database <path>', 'Path to the database file.') do |path|
19
19
  options[:database_path] = path
20
20
  end
21
21
 
22
- opts.on_tail('--version', 'Show version.') do
22
+ o.on_tail('--version', 'Show version.') do
23
23
  puts "osp #{TheFox::OSP::VERSION}"
24
24
  puts TheFox::OSP::HOMEPAGE
25
25
  exit
26
26
  end
27
27
 
28
- opts.on_tail('-h', '--help', 'Show this message.') do
29
- puts opts
28
+ o.on_tail('-h', '--help', 'Show this message.') do
29
+ puts o
30
30
  puts
31
31
  exit 3
32
32
  end
@@ -56,7 +56,7 @@ puts 'Password: *****'
56
56
  puts
57
57
 
58
58
  @osp_class = TheFox::OSP::OSP
59
- #@osp_class = TheFox::OSP::OSPDev
59
+ @osp_class = TheFox::OSP::OSPDev if $DEBUG
60
60
 
61
61
  printf "Calculating base hash: #{@osp_class::HASHES_N} (#{@osp_class::HASHES_EXP}-bit) - please wait ..."
62
62
  @osp = @osp_class.new(email, password)
data/lib/osp/database.rb CHANGED
@@ -101,8 +101,8 @@ module TheFox
101
101
  # https://gist.github.com/byu/99651
102
102
 
103
103
  write_callback(1100, 'Make temp database.')
104
- db_c = @data
105
- db_c['hosts'] = db_c['hosts'].map{ |name, host| [name, host.to_h] }.to_h
104
+ db_c = @data.clone
105
+ db_c['hosts'] = db_c['hosts'].map{ |name, host| [name, host.clone.to_h] }.to_h
106
106
 
107
107
  write_callback(1200, 'Setup database encryption.')
108
108
  dk_sha256 = OpenSSL::Digest::SHA256.digest(@osp.dk)
data/lib/osp/host.rb CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ require 'date'
3
+
2
4
  module TheFox
3
5
  module OSP
4
6
 
data/lib/osp/version.rb CHANGED
@@ -2,8 +2,8 @@
2
2
  module TheFox
3
3
  module OSP
4
4
  RELEASE_ID = 0
5
- VERSION = '0.3.1'
6
- DATE = '2015-12-21'
5
+ VERSION = '0.3.2'
6
+ DATE = '2015-12-25'
7
7
  HOMEPAGE = 'https://github.com/TheFox/osp'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-21 00:00:00.000000000 Z
11
+ date: 2015-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest