active_utils 3.0.0.pre2 → 3.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.travis.yml +4 -4
- data/CHANGELOG.md +9 -0
- data/CONTRIBUTING.md +33 -0
- data/Gemfile.activesupport32 +1 -1
- data/Gemfile.activesupport40 +1 -1
- data/Gemfile.activesupport41 +1 -1
- data/Gemfile.activesupport42 +1 -1
- data/README.md +30 -16
- data/lib/active_utils/connection.rb +1 -1
- data/lib/active_utils/version.rb +1 -1
- data/lib/active_utils.rb +0 -1
- data/test/test_helper.rb +4 -12
- data/test/unit/connection_test.rb +4 -0
- data.tar.gz.sig +0 -0
- metadata +4 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d037875f79e6088131b44ecd2f152cfff65dabe9
|
4
|
+
data.tar.gz: ff0ddf8cc94a14729fb6e9f69d5f1cd97e66e294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c83a6b73f888febf70693e871279f550d5750aacb925250d61ccfc2901fbdd8a471bdedc4133231c0c306e3e267224107666c0c1b6f6fb59245300f1b1c0196
|
7
|
+
data.tar.gz: 2720cf9a1ce986629d79c7ad1f171f0b4963c050493308b119c6d0dd3af4b490fb9849a013e96c479cb80331af5a87c342dffb29e3920e7d21d330feba004a1b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# ActiveUtils changelog
|
2
|
+
|
3
|
+
|
4
|
+
### Version 3.0.0 (to be released)
|
5
|
+
|
6
|
+
- Fully decoupled from ActiveMerchant: no longer uses `ActiveMerchant::` as namespace, but uses `ActiveUtils::` instead.
|
7
|
+
- Bump ActiveSupport requirement to **>= 3.2**.
|
8
|
+
- The `Utils` module to generate unique identifiers has been removed. Use `SecureRandom` instead.
|
9
|
+
- Improved test setup.
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Contributing to ActiveUtils
|
2
|
+
|
3
|
+
We gladly accept bugfixes to this library. Please read the guidelines for reporting issues and submitting pull requests below.
|
4
|
+
|
5
|
+
### Reporting issues
|
6
|
+
|
7
|
+
- Include the version of ActiveUtils, Ruby, and ActiveSupport you are using.
|
8
|
+
- If you run into an unexpected exception, please include a stacktrace.
|
9
|
+
- Try to include a code snippet that demonstrates the problem.
|
10
|
+
|
11
|
+
### Pull request guidelines
|
12
|
+
|
13
|
+
1. [Fork it](http://github.com/Shopify/active_utils/fork) and clone your new repo
|
14
|
+
2. Create a branch (`git checkout -b my_awesome_feature`)
|
15
|
+
3. Commit your changes (`git add my/awesome/file.rb; git commit -m "Added my awesome feature"`)
|
16
|
+
4. Push your changes to your fork (`git push origin my_awesome_feature`)
|
17
|
+
5. Open a [Pull Request](https://github.com/shopify/active_utils/pulls)
|
18
|
+
|
19
|
+
The most important guidelines:
|
20
|
+
|
21
|
+
- All changes should be covered by tests.
|
22
|
+
- Your code should support all the Ruby versions and ActiveSupport versions we have enabled on Travis CI.
|
23
|
+
- Do not update the CHANGELOG, or the `ActiveUtils::VERSION` constant.
|
24
|
+
|
25
|
+
Final note: maybe you should also update the mirrored version in ActiveMerchant.
|
26
|
+
|
27
|
+
### Releasing
|
28
|
+
|
29
|
+
1. Check the [semantic versioning page](http://semver.org) for info on how to version the new release.
|
30
|
+
2. Update the `ActiveUtils::VERSION` constant in **lib/active_utils/version.rb**.
|
31
|
+
3. Add a `CHANGELOG.md` entry for the new release with the date.
|
32
|
+
4. Tag the release commit on GitHub: `bundle exec rake tag_release`
|
33
|
+
5. Release the gem to rubygems using ShipIt
|
data/Gemfile.activesupport32
CHANGED
data/Gemfile.activesupport40
CHANGED
data/Gemfile.activesupport41
CHANGED
data/Gemfile.activesupport42
CHANGED
data/README.md
CHANGED
@@ -1,16 +1,30 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
###
|
6
|
-
|
7
|
-
* Connection - base class for making HTTP requests
|
8
|
-
* Country - find countries mapped by name, country codes, and numeric values
|
9
|
-
* Error - common error classes used throughout the Active projects
|
10
|
-
* PostData - helper class for managing required fields that are to be POST-ed
|
11
|
-
* PostsData - making SSL HTTP requests
|
12
|
-
* RequiresParameters - helper method to ensure the required parameters are passed in
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
|
1
|
+
# ActiveUtils [![Build Status](https://travis-ci.org/Shopify/active_utils.svg?branch=master)](https://travis-ci.org/Shopify/active_utils)
|
2
|
+
|
3
|
+
ActiveUtils extracts commonly used modules and classes extracted from [Active Merchant](http://github.com/Shopify/active_merchant), to be used for other integration libraries.
|
4
|
+
|
5
|
+
### Included modules and classes
|
6
|
+
|
7
|
+
* `Connection` - base class for making HTTP requests
|
8
|
+
* `Country` - find countries mapped by name, country codes, and numeric values
|
9
|
+
* `Error` - common error classes used throughout the Active projects
|
10
|
+
* `PostData` - helper class for managing required fields that are to be POST-ed
|
11
|
+
* `PostsData` - making SSL HTTP requests
|
12
|
+
* `RequiresParameters` - helper method to ensure the required parameters are passed in
|
13
|
+
* `Validateable` - module used for making models validateable
|
14
|
+
* `NetworkConnectionRetries` - module for retrying network connections when connection errors occur
|
15
|
+
* `CurrencyCode` - ensure currency codes are ISO, and convert colloquial codes to ISO.
|
16
|
+
|
17
|
+
### Libraries that depend on ActiveUtils
|
18
|
+
|
19
|
+
- [ActiveShipping](https://github.com/Shopify/active_shipping)
|
20
|
+
- [ActiveFulfillment](https://github.com/Shopify/active_fulfillment)
|
21
|
+
- [OffsitePayments](https://github.com/Shopify/offsite_payments)
|
22
|
+
|
23
|
+
### ActiveMerchant link
|
24
|
+
|
25
|
+
While most of the code in this library was extracted from ActiveMerchant, ActiveMerchant itself doesn't use this library anymore. For PCI compliance reasons, we aim to keep the number of dependencies of ActiveMerchant as low as possible. For this reason, many of these classes and modules are mirrored in ActiveMerchant (e.g. `ActiveUtils::Connection` vs. `ActiveMerchant::Connection`. When making changes to this library, you may want to mirror those changes in ActiveMerchant.
|
26
|
+
|
27
|
+
### Misc
|
28
|
+
|
29
|
+
- This project is MIT licensed.
|
30
|
+
- Contributions are gladly accepted! See `CONTRIBUTING.md` for more information.
|
@@ -11,7 +11,7 @@ module ActiveUtils
|
|
11
11
|
OPEN_TIMEOUT = 60
|
12
12
|
READ_TIMEOUT = 60
|
13
13
|
VERIFY_PEER = true
|
14
|
-
CA_FILE = (File.dirname(__FILE__) + '
|
14
|
+
CA_FILE = (File.dirname(__FILE__) + '/../certs/cacert.pem')
|
15
15
|
CA_PATH = nil
|
16
16
|
RETRY_SAFE = false
|
17
17
|
RUBY_184_POST_HEADERS = { "Content-Type" => "application/x-www-form-urlencoded" }
|
data/lib/active_utils/version.rb
CHANGED
data/lib/active_utils.rb
CHANGED
@@ -19,7 +19,6 @@ module ActiveUtils
|
|
19
19
|
autoload :PostData, 'active_utils/post_data'
|
20
20
|
autoload :PostsData, 'active_utils/posts_data'
|
21
21
|
autoload :RequiresParameters, 'active_utils/requires_parameters'
|
22
|
-
autoload :Utils, 'active_utils/utils'
|
23
22
|
autoload :Validateable, 'active_utils/validateable'
|
24
23
|
autoload :CurrencyCode, 'active_utils/currency_code'
|
25
24
|
autoload :InvalidCurrencyCodeError, 'active_utils/currency_code'
|
data/test/test_helper.rb
CHANGED
@@ -4,16 +4,8 @@ require 'mocha/setup'
|
|
4
4
|
|
5
5
|
include ActiveUtils
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
$VERBOSE = original_verbosity
|
12
|
-
end
|
13
|
-
|
14
|
-
class Minitest::Test
|
15
|
-
def assert_deprecation_warning(message=nil)
|
16
|
-
ActiveUtils::Utils.expects(:deprecated).with(message ? message : anything)
|
17
|
-
yield
|
18
|
-
end
|
7
|
+
# This makes sure that Minitest::Test exists when an older version of Minitest
|
8
|
+
# (i.e. 4.x) is required by ActiveSupport.
|
9
|
+
unless defined?(Minitest::Test)
|
10
|
+
Minitest::Test = MiniTest::Unit::TestCase
|
19
11
|
end
|
@@ -10,6 +10,10 @@ class ConnectionTest < Minitest::Test
|
|
10
10
|
@connection.logger = stub(:info => nil, :debug => nil, :error => nil)
|
11
11
|
end
|
12
12
|
|
13
|
+
def test_path_to_cert_is_correct
|
14
|
+
assert File.exists?(ActiveUtils::Connection::CA_FILE)
|
15
|
+
end
|
16
|
+
|
13
17
|
def test_connection_endpoint_parses_string_to_uri
|
14
18
|
assert_equal URI.parse(@endpoint), @connection.endpoint
|
15
19
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
|
31
31
|
TConQSX2BnZdhIEYW+cKzEC/bLc=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-01-
|
33
|
+
date: 2015-01-16 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: activesupport
|
@@ -111,6 +111,8 @@ extra_rdoc_files: []
|
|
111
111
|
files:
|
112
112
|
- ".gitignore"
|
113
113
|
- ".travis.yml"
|
114
|
+
- CHANGELOG.md
|
115
|
+
- CONTRIBUTING.md
|
114
116
|
- Gemfile
|
115
117
|
- Gemfile.activesupport32
|
116
118
|
- Gemfile.activesupport40
|
metadata.gz.sig
CHANGED
Binary file
|