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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4c3b947ecf0454c6071d2d8a20b7782f0de5d7f
4
- data.tar.gz: 4ac3a861bca6ad6899612ed6dd338afb366bc047
3
+ metadata.gz: d037875f79e6088131b44ecd2f152cfff65dabe9
4
+ data.tar.gz: ff0ddf8cc94a14729fb6e9f69d5f1cd97e66e294
5
5
  SHA512:
6
- metadata.gz: 906e8cc8ab975a891574c135c3dd2c0d8b221d143315b51efce2a8809ec7cbe8045d8ad412898ed4fd3e947e440c33ee25a99ece2dcef98a3e9b6ea453a734d6
7
- data.tar.gz: 2f41fdf4dd698d0a8adc081edc90abe7a9dc240e3c9f6e0a3b2d5411b1a8679fdf908d8770a839ec43cf02d683e481e36ecf995c654c85c654697bed7ffd6c0e
6
+ metadata.gz: 1c83a6b73f888febf70693e871279f550d5750aacb925250d61ccfc2901fbdd8a471bdedc4133231c0c306e3e267224107666c0c1b6f6fb59245300f1b1c0196
7
+ data.tar.gz: 2720cf9a1ce986629d79c7ad1f171f0b4963c050493308b119c6d0dd3af4b490fb9849a013e96c479cb80331af5a87c342dffb29e3920e7d21d330feba004a1b
checksums.yaml.gz.sig CHANGED
Binary file
data/.travis.yml CHANGED
@@ -3,10 +3,10 @@ script: bundle exec rake test
3
3
  sudo: false
4
4
 
5
5
  rvm:
6
- - 1.9
7
- - 2.0
8
- - 2.1
9
- - 2.2
6
+ - "1.9"
7
+ - "2.0"
8
+ - "2.1"
9
+ - "2.2"
10
10
 
11
11
  gemfile:
12
12
  - Gemfile.activesupport32
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
@@ -1,4 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
- gem 'activesupport', '~> 3.2'
4
+ gem 'activesupport', '~> 3.2.0'
@@ -1,4 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
- gem 'activesupport', '~> 4.0'
4
+ gem 'activesupport', '~> 4.0.0'
@@ -1,4 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
- gem 'activesupport', '~> 4.1'
4
+ gem 'activesupport', '~> 4.1.0'
@@ -1,4 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
- gem 'activesupport', '~> 4.2'
4
+ gem 'activesupport', '~> 4.2.0'
data/README.md CHANGED
@@ -1,16 +1,30 @@
1
- # Active Utils
2
-
3
- Active Utils extracts commonly used modules and classes used by [Active Merchant](http://github.com/Shopify/active_merchant), [Active Shipping](http://github.com/Shopify/active_shipping), and [Active Fulfillment](http://github.com/Shopify/active_fulfillment).
4
-
5
- ### Includes
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
- * Utils - common utils such as uid generator
14
- * Validateable - module used for making models validateable
15
- * NetworkConnectionRetries - module for retrying network connections when connection errors occur
16
- * CurrencyCode - ensure currency codes are ISO, and convert colloquial codes to ISO.
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__) + '/../../certs/cacert.pem')
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" }
@@ -1,3 +1,3 @@
1
1
  module ActiveUtils
2
- VERSION = "3.0.0.pre2"
2
+ VERSION = "3.0.0.pre3"
3
3
  end
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
- def suppress_warnings
8
- original_verbosity, $VERBOSE = $VERBOSE, nil
9
- yield
10
- ensure
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.pre2
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-05 00:00:00.000000000 Z
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