wix 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ config.ru
data/lib/wix.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'base64'
2
2
  require 'json'
3
3
  require 'openssl'
4
+ require 'recursive-open-struct'
4
5
  require "wix/instance"
5
6
  require "wix/version"
6
7
  require 'wix/errors/wix_error'
@@ -14,9 +14,8 @@ module Wix
14
14
  signature = split_wix_signed_instance[0]
15
15
  encoded_json = split_wix_signed_instance[1]
16
16
  raise WixError.new(INVALID_WIX_SIGNATURE) if !valid_signature(signature, encoded_json)
17
-
18
- encoded_json_hack = encoded_json + ('=' * (4 - encoded_json.length.modulo(4)))
19
- json_string = Base64.urlsafe_decode64(encoded_json_hack)
17
+
18
+ json_string = Base64.decode64(encoded_json)
20
19
  hash = JSON.parse(json_string)
21
20
 
22
21
  RecursiveOpenStruct.new(hash, :recurse_over_arrays => true)
@@ -1,3 +1,3 @@
1
1
  module Wix
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
16
16
 
17
17
  gem.add_development_dependency "foreman"
18
18
  gem.add_development_dependency "pry"
19
+ gem.add_development_dependency "racksh"
19
20
  gem.add_development_dependency "rake"
20
21
  gem.add_development_dependency "rspec"
21
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -59,6 +59,22 @@ dependencies:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: racksh
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
62
78
  - !ruby/object:Gem::Dependency
63
79
  name: rake
64
80
  requirement: !ruby/object:Gem::Requirement
@@ -126,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
142
  version: '0'
127
143
  segments:
128
144
  - 0
129
- hash: 3518911956414316239
145
+ hash: -1883138079609829469
130
146
  required_rubygems_version: !ruby/object:Gem::Requirement
131
147
  none: false
132
148
  requirements:
@@ -135,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
151
  version: '0'
136
152
  segments:
137
153
  - 0
138
- hash: 3518911956414316239
154
+ hash: -1883138079609829469
139
155
  requirements: []
140
156
  rubyforge_project:
141
157
  rubygems_version: 1.8.23