Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
foxtacles committed Jun 22, 2016
2 parents 624d179 + 92cce13 commit 770dd94
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 310 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.7.3

* Fix timestamp parsing on 32-bit systems
* Fix expiration check when issue/expiry times are nil


# 0.7.2

* Don't assume Faraday form encoding middleware is present
Expand Down
2 changes: 1 addition & 1 deletion lib/signet/oauth_2/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def expired?
# @return [TrueClass, FalseClass]
# The expiration state of the access token.
def expires_within?(sec)
return self.expires_at != nil && Time.now >= (self.expires_at - sec)
return self.expires_at.nil? || Time.now >= (self.expires_at - sec)
end

##
Expand Down
2 changes: 1 addition & 1 deletion lib/signet/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Signet
module VERSION
MAJOR = 0
MINOR = 7
TINY = 2
TINY = 3

STRING = [MAJOR, MINOR, TINY].join('.')
end
Expand Down
7 changes: 1 addition & 6 deletions spec/signet/oauth_1/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

spec_dir = File.expand_path(File.join(File.dirname(__FILE__), "../.."))
$:.unshift(spec_dir)
$:.uniq!

require 'spec_helper'

require 'multi_json'
require 'signet/oauth_1/client'
require 'addressable/uri'
require 'stringio'
Expand Down
6 changes: 0 additions & 6 deletions spec/signet/oauth_1/credential_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

spec_dir = File.expand_path(File.join(File.dirname(__FILE__), "../.."))
$:.unshift(spec_dir)
$:.uniq!

require 'spec_helper'

require 'signet/oauth_1/credential'

describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
Expand Down
6 changes: 0 additions & 6 deletions spec/signet/oauth_1/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

spec_dir = File.expand_path(File.join(File.dirname(__FILE__), "../.."))
$:.unshift(spec_dir)
$:.uniq!

require 'spec_helper'

require 'signet/oauth_1/server'
require 'signet/oauth_1/client'
require 'addressable/uri'
Expand Down
241 changes: 0 additions & 241 deletions spec/signet/oauth_1/services/google_spec.rb

This file was deleted.

7 changes: 1 addition & 6 deletions spec/signet/oauth_1/signature_methods/hmac_sha1_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

spec_dir = File.expand_path(File.join(File.dirname(__FILE__), "../../.."))
$:.unshift(spec_dir)
$:.uniq!

require 'spec_helper'

require 'signet'
require 'signet/oauth_1'
require 'signet/oauth_1/signature_methods/hmac_sha1'

describe Signet::OAuth1::HMACSHA1 do
Expand Down
7 changes: 1 addition & 6 deletions spec/signet/oauth_1/signature_methods/plaintext_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

spec_dir = File.expand_path(File.join(File.dirname(__FILE__), "../../.."))
$:.unshift(spec_dir)
$:.uniq!

require 'spec_helper'

require 'signet'
require 'signet/oauth_1'
require 'signet/oauth_1/signature_methods/plaintext'

describe Signet::OAuth1::PLAINTEXT do
Expand Down
7 changes: 1 addition & 6 deletions spec/signet/oauth_1/signature_methods/rsa_sha1_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

spec_dir = File.expand_path(File.join(File.dirname(__FILE__), "../../.."))
$:.unshift(spec_dir)
$:.uniq!

require 'spec_helper'

require 'signet'
require 'signet/oauth_1'
require 'signet/oauth_1/signature_methods/rsa_sha1'

describe Signet::OAuth1::RSASHA1 do
Expand Down
6 changes: 0 additions & 6 deletions spec/signet/oauth_1_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

spec_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
$:.unshift(spec_dir)
$:.uniq!

require 'spec_helper'

require 'signet/oauth_1'
require 'signet/oauth_1/client'
require 'signet/oauth_1/credential'
Expand Down
Loading

0 comments on commit 770dd94

Please sign in to comment.