twingly-url 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01e4a4a73b9009ee53c5a7aca62cf520ac8bf632
4
- data.tar.gz: 949c7a9df08b33135e184703772d0f871cd6399d
3
+ metadata.gz: e71d9c7443a57b9f00f9fa78279ea8e7ffd3c2c7
4
+ data.tar.gz: 0e112dff95a6cd5270edadb8787bfbb51d173fde
5
5
  SHA512:
6
- metadata.gz: 1f69a4c620abebcf898f7c54c73afc7f0edd3c4ce7241f2aa1f5319deeb8f6cdb0fb931856a5a94cc3945b6f7cb8681346c304c87d6754d2e69d7738cf506f45
7
- data.tar.gz: bff05c40fc41a17f243bf94a5d83fce2fc5ccfa623457f79122188180ce0fd82f413a05a35f201034a4cab5d55bf07a52446b8f9b263b8560f4d8877937fc70d
6
+ metadata.gz: cea28a55da2e632b6dffa00b5a1d8717ade55aaefa9739e2b300340ebc17f05bd93da8d36c7064ab2addc60f088852ba3b802b82b46b84c4a80bfe593202e7b4
7
+ data.tar.gz: 694eb5dcfaea6fb8601711986aac870d024944b58344d2c351860100f0f870745123bcec0b4773f9487ea3363fade9e759d723b581265433ab04d2672efa6e82
data/README.md CHANGED
@@ -18,6 +18,10 @@ Twingly URL tools.
18
18
  * `twingly/url/utilities` - Utilities to work with URLs
19
19
  * `Twingly::URL::Utilities.remove_scheme(url)` - Removes scheme from HTTP/HTTPS URLs (`http://twingly.com` -> `//twingly.com`)
20
20
 
21
+ ## Installation
22
+
23
+ gem install twingly-url
24
+
21
25
  ## Normalization example
22
26
 
23
27
  ```ruby
@@ -47,4 +51,14 @@ You can get some profiling by running
47
51
 
48
52
  Note that this isn't a benchmark, we're using [ruby-prof] which will slow things down.
49
53
 
54
+ ## Release workflow
55
+
56
+ Build the gem.
57
+
58
+ gem build twingly-url.gemspec
59
+
60
+ [Publish](http://guides.rubygems.org/publishing/) the gem.
61
+
62
+ gem push twingly-url-x.y.z.gem
63
+
50
64
  [ruby-prof]: http://ruby-prof.rubyforge.org/
@@ -1,29 +1,34 @@
1
- require 'digest/md5'
2
- require 'digest/sha2'
1
+ require 'digest'
3
2
 
4
3
  module Twingly
5
4
  module URL
6
5
  module Hasher
7
6
  module_function
8
7
 
8
+ # Instantiate digest classes in a thread-safe manner
9
+ # This is important since we don't know how people will
10
+ # use this gem (if they require it in a thread safe way)
11
+ MD5_DIGEST = Digest(:MD5)
12
+ SHA256_DIGEST = Digest(:SHA256)
13
+
9
14
  def taskdb_hash(url)
10
- Digest::MD5.hexdigest(url)[0..29].upcase
15
+ MD5_DIGEST.hexdigest(url)[0..29].upcase
11
16
  end
12
17
 
13
18
  def blogstream_hash(url)
14
- Digest::MD5.hexdigest(url)[0..29].upcase
19
+ MD5_DIGEST.hexdigest(url)[0..29].upcase
15
20
  end
16
21
 
17
22
  def documentdb_hash(url)
18
- Digest::SHA256.digest(url).unpack("L!")[0]
23
+ SHA256_DIGEST.digest(url).unpack("L!")[0]
19
24
  end
20
25
 
21
26
  def autopingdb_hash(url)
22
- Digest::SHA256.digest(url).unpack("q")[0]
27
+ SHA256_DIGEST.digest(url).unpack("q")[0]
23
28
  end
24
29
 
25
30
  def pingloggerdb_hash(url)
26
- Digest::SHA256.digest(url).unpack("Q")[0]
31
+ SHA256_DIGEST.digest(url).unpack("Q")[0]
27
32
  end
28
33
  end
29
34
  end
@@ -1,5 +1,5 @@
1
1
  module Twingly
2
2
  module URL
3
- VERSION = '1.3.3'
3
+ VERSION = '1.3.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twingly-url
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twingly AB
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-13 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.4'
41
41
  - !ruby/object:Gem::Dependency
42
- name: turn
42
+ name: minitest-reporters
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  requirements: []
130
130
  rubyforge_project:
131
- rubygems_version: 2.2.2
131
+ rubygems_version: 2.4.5
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Ruby library for URL handling