touchpass 0.0.8.16 → 0.0.8.18

Sign up to get free protection for your applications and to get access to all the features.
File without changes
File without changes
@@ -106,7 +106,7 @@ module Touchpass
106
106
  :udid => params[:udid],
107
107
  :app_id => params[:app_id],
108
108
  :name => params[:name],
109
- :pub_key => crypt.public_key,
109
+ :pub_key => crypt.public_key_text, # PEM format
110
110
  :messaging_type => params[:messaging_type],
111
111
  :messaging_value => params[:messaging_value]
112
112
  })
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
  module Touchpass
2
3
 
3
4
  # Used to help with creation of public / private key files for a device (by clients)
@@ -29,12 +30,15 @@ module Touchpass
29
30
 
30
31
  def private_key
31
32
  pem_file = File.join(keys_path, PRIVATE_KEY)
32
- return self.read_key(pem_file)
33
+ return self.read_key(self.private_key_path)
33
34
  end
34
35
 
35
36
  def public_key
36
- pem_file = File.join(keys_path, PUBLIC_KEY)
37
- return self.read_key(pem_file)
37
+ return self.read_key(self.public_key_path)
38
+ end
39
+
40
+ def public_key_text
41
+ return File.read(public_key_path)
38
42
  end
39
43
 
40
44
  def read_key(pem_file)
@@ -45,11 +49,21 @@ module Touchpass
45
49
  File.join(self.class.keys_path, @id)
46
50
  end
47
51
 
52
+ def public_key_path
53
+ return File.join(keys_path, PUBLIC_KEY)
54
+ end
55
+
56
+ def private_key_path
57
+ return File.join(keys_path, PRIVATE_KEY)
58
+ end
59
+
48
60
  private
61
+
49
62
  # Create target directory
50
63
  def prepare_directories(dir)
51
64
  FileUtils.makedirs dir
52
65
  end
66
+
53
67
  end
54
68
  end
55
69
 
@@ -1,3 +1,3 @@
1
1
  module Touchpass
2
- VERSION = "0.0.8.16"
2
+ VERSION = "0.0.8.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: touchpass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8.16
4
+ version: 0.0.8.18
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-04 00:00:00.000000000 Z
12
+ date: 2012-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -95,8 +95,8 @@ description: Geodica Touchpass
95
95
  email:
96
96
  - info@geodica.com
97
97
  executables:
98
- - tpcli.rb
99
- - tpcrypt.rb
98
+ - touchpass
99
+ - tpcrypt
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
@@ -120,8 +120,8 @@ files:
120
120
  - app/assets/stylesheets/touchpass/index.css
121
121
  - app/assets/stylesheets/touchpass/widget.css
122
122
  - app/controllers/touchpass/verifications_controller.rb
123
- - bin/tpcli.rb
124
- - bin/tpcrypt.rb
123
+ - bin/touchpass
124
+ - bin/tpcrypt
125
125
  - config/routes.rb
126
126
  - lib/engine.rb
127
127
  - lib/generators/templates/config/initializers/devise.rb
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project: touchpass
178
- rubygems_version: 1.8.23
178
+ rubygems_version: 1.8.24
179
179
  signing_key:
180
180
  specification_version: 3
181
181
  summary: Touchpass