Git Product home page Git Product logo

active_utils's People

Contributors

adamcarchibald avatar bslobodin avatar casperisfine avatar charlescng avatar chrisdonaldson avatar christianblais avatar costford avatar cursedcoder avatar devanandersen avatar dougedey-shopify avatar edouard-chin avatar elfassy avatar george-ma avatar gnarlynate avatar itsgarcia avatar jduff avatar jeffutter avatar jenshenny avatar jffortier avatar jkantarek avatar krzysztofbialek avatar larissa avatar lucasuyezu avatar malazalamir avatar melari avatar ntalbott avatar nwjsmith avatar philibertdugas avatar titanoboa avatar wvanbergen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

active_utils's Issues

CONTRIBUTING.md release instructions outdated (low priority)

From speaking to Jean-Frederic Fortier and Doug Edey today it sounds like the rake instructions in Releasing may not be necessary/correct anymore:

  1. Tag the release commit on GitHub: bundle exec rake tag_release

Both indicated it should be fine to just merge version-bump PRs and deploy via shipit, so I just wanted to confirm that for documentation purposes.

@wvanbergen

Certificate Authority Bundle outdated

This gem comes with it's own certificate authority bundle and it appears that it is not being actively maintained. While the last update to file was only a few months ago, the commit only adds a new certificate and it does not update the bundle from the original source.

There is a PR still open from 2015 that updates the file to the most recent version from that time: #67

But sadly, it has not been merged. So, I won't both submitting a pull request to update it either.

However, for those that may be impacted by this: you can retrofit the most current bundle like this:

  1. Download the latest bundle from here: https://curl.haxx.se/docs/caextract.html
  2. Place the file somewhere in your project, location is up to you.
  3. Create an initializer like the following:
# config/initializers/00_monkeypatch_updated_ca_cert.rb
module ActiveMerchant
  class Connection
    CA_FILE = Rails.root.join('config', 'ssl', 'cacert.pem').to_s
  end
end

If you have been impacted by this, you likely saw an error that read something link this: "The SSL connection to the remote server could not be established" or "certificate verify failed"

ActiveUtils::ConnectionError observed

In our library there are bunch of failures related to active_utils periodically. Mostly seem to be connection errors:

ActiveUtils::ConnectionError: The connection to the remote server timed out

Opening an issue since it seems too frequent for a server timeout.

Already initialized constant COUNTRIES

After upgradng active_merchant to 1.44.1 and adding offsite_payments to my Gemfile I'm getting warnings:

/home/wojtek/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/active_utils-2.2.3/lib/active_utils/common/country.rb:65: warning: already initialized constant ActiveMerchant::Country::COUNTRIES
/home/wojtek/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activemerchant-1.44.1/lib/active_merchant/country.rb:62: warning: previous definition of COUNTRIES was here

As you can see it is defined in both gems:

https://github.com/Shopify/active_merchant/blob/master/lib/active_merchant/country.rb#L67
https://github.com/Shopify/active_utils/blob/master/lib/active_utils/common/country.rb#L65

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can image, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post aobut this project for more information.

improve connection request logging

The request method in the connection class doesn't log relevant information on connection errors.

Successful request:

[ActiveMerchant::Billing::AuthorizeNetGateway] POST https://secure.authorize.net/gateway/transact.dll
[ActiveMerchant::Billing::AuthorizeNetGateway] --> 200 OK (478 1.7270s)

Failed request:

[ActiveMerchant::Billing::ElavonGateway] POST https://www.myvirtualmerchant.com/VirtualMerchant/process.do

It would be great to have the connection error information in the application log.

Cut new gem version

@jduff @melari can one of you guys get a new version of active_utils cut and up on rubygems.org? There are some pending ActiveMerchant patches that are dependent on some merged but unreleased code in active_utils.

Thanks!

since operations returns wrong date and time.

Datetime calculation returns wrong result if timezone is Wellington (+13:00).

Test code

https://gist.github.com/matsubo/7b3c7fbe6e613d515158

require 'active_utils'

# Wrong
#2014-04-06 00:59:59 UTC
# should be 2014-04-05 23:59:59 UTC
puts 37.days.since(Time.utc(2014, 2, 27, 23, 59, 59).in_time_zone('Wellington')).utc

# OK
#2014-04-05 23:59:59 UTC
puts 37.days.since(Time.utc(2014, 2, 27, 23, 59, 59).in_time_zone('Wellington').utc)

# OK
#2014-04-04 23:59:59 UTC
puts 36.days.since(Time.utc(2014, 2, 27, 23, 59, 59).in_time_zone('Wellington')).utc

# OK
#2014-04-04 23:59:59 UTC
puts 36.days.since(Time.utc(2014, 2, 27, 23, 59, 59).in_time_zone('Wellington').utc)

Ruby version

It can be reproduced on these environment

  • ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]
  • ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
  • ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

Gem version

  • active_utils 3.2.0

Name clash with ActiveMerchant

3.0.0 came with bundle install today and I'm now getting this error when loading Rails console:

uninitialized constant ActiveMerchant::Billing::CreditCard::Validateable (NameError)

Seems to be a name clash.

certs outdated

Hi,

As your cacerts.pem file seems to be about 5 years old, how do you recommend using a newer one? Should I just overwrite the file in my gems? The Connection class has a hard-coded path so I don't see any other way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.