truncus 0.1.0 → 0.2.0

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: 3b896e7f66991c5fb2445d4695cd88aff3ffeeb1
4
- data.tar.gz: 48c86c18067d3a477e822e660b0cd5613bf66573
3
+ metadata.gz: 000e1e87cec8e267e81637a4cb1a08c9a4296d15
4
+ data.tar.gz: 1888a6bdf9f0e190a61b8d6bcf42afbafc905f7f
5
5
  SHA512:
6
- metadata.gz: 7ae8bcd38b3d58d63243f3fc706457845c2f330549aea11350be0cd485580c6cf2a730ac1a1efb9d5414dfd758e63ab56128748256f2f8bd43e0aa28f5699b8b
7
- data.tar.gz: a7e592fe477f0259dc0037ebb380fe94d1725ea79b8ae48082f437c4f265f8064138e0105088e68d8f1fb1b6efaaebee0d9599eb9a1672a8e7b1bc5c12da76bb
6
+ metadata.gz: 644c9c54ad6ddf5b0510768913306d560ac07ebbeac487077f86d4e93fa87f59b17e7863124b5d0a979c584eec24c8fa6f8cf04947217773abeda0d312fb4f37
7
+ data.tar.gz: f70db148e8959b0e307f6ca44fef9376fb3000767fb863e89356a048d74fe90567de994ed3e19f819c9ee672314067b63fbc9d580eeed2c41d6b0ad80a422ed1
data/.rspec_status CHANGED
@@ -1,6 +1,6 @@
1
1
  example_id | status | run_time |
2
2
  ----------------------------- | ------ | --------------- |
3
- ./spec/truncus_spec.rb[1:1] | passed | 0.00089 seconds |
4
- ./spec/truncus_spec.rb[1:2:1] | passed | 0.01789 seconds |
5
- ./spec/truncus_spec.rb[1:3:1] | passed | 0.01291 seconds |
6
- ./spec/truncus_spec.rb[1:4:1] | passed | 0.00264 seconds |
3
+ ./spec/truncus_spec.rb[1:1] | passed | 0.0007 seconds |
4
+ ./spec/truncus_spec.rb[1:2:1] | passed | 0.00525 seconds |
5
+ ./spec/truncus_spec.rb[1:3:1] | passed | 0.00528 seconds |
6
+ ./spec/truncus_spec.rb[1:4:1] | passed | 0.00356 seconds |
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.1
1
+ ruby-2.0.0-p648
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- truncus (0.1.0)
4
+ truncus (0.2.0)
5
5
  json
6
6
 
7
7
  GEM
@@ -14,7 +14,7 @@ GEM
14
14
  diff-lcs (1.3)
15
15
  hashdiff (0.3.7)
16
16
  json (2.1.0)
17
- public_suffix (3.0.2)
17
+ public_suffix (2.0.5)
18
18
  rake (10.5.0)
19
19
  rspec (3.7.0)
20
20
  rspec-core (~> 3.7.0)
@@ -41,6 +41,7 @@ PLATFORMS
41
41
 
42
42
  DEPENDENCIES
43
43
  bundler (~> 1.14)
44
+ public_suffix (~> 2.0)
44
45
  rake (~> 10.0)
45
46
  rspec (~> 3.0)
46
47
  truncus!
@@ -48,4 +49,4 @@ DEPENDENCIES
48
49
  webmock (~> 3.0)
49
50
 
50
51
  BUNDLED WITH
51
- 1.14.6
52
+ 1.16.1
@@ -1,3 +1,3 @@
1
1
  module Truncus
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/truncus.rb CHANGED
@@ -44,8 +44,8 @@ module Truncus
44
44
 
45
45
  # Shortens a URL, returns the shortened token
46
46
  def get_token(url)
47
- req = Net::HTTP::Post.new('/', initheader = {'Content-Type': 'application/json'})
48
- req.body = {'url': url, 'format': 'json'}.to_json
47
+ req = Net::HTTP::Post.new('/', initheader = {'Content-Type' => 'application/json'})
48
+ req.body = {url: url, format: 'json'}.to_json
49
49
 
50
50
  res = @http.request(req)
51
51
  data = JSON::parse(res.body)
data/truncus.gemspec CHANGED
@@ -29,10 +29,13 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
+ spec.required_ruby_version = ">= 2.0"
33
+
32
34
  spec.add_dependency 'json'
33
35
 
34
36
  spec.add_development_dependency "bundler", "~> 1.14"
35
37
  spec.add_development_dependency "rake", "~> 10.0"
38
+ spec.add_development_dependency "public_suffix", "~> 2.0"
36
39
  spec.add_development_dependency "rspec", "~> 3.0"
37
40
  spec.add_development_dependency "vcr", "~> 3.0"
38
41
  spec.add_development_dependency "webmock", "~> 3.0"
metadata CHANGED
@@ -1,97 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: truncus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Emminger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-14 00:00:00.000000000 Z
11
+ date: 2018-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.14'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.14'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.0'
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
54
  version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: public_suffix
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '2.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '2.0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rspec
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - "~>"
73
+ - - ~>
60
74
  - !ruby/object:Gem::Version
61
75
  version: '3.0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - "~>"
80
+ - - ~>
67
81
  - !ruby/object:Gem::Version
68
82
  version: '3.0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: vcr
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - "~>"
87
+ - - ~>
74
88
  - !ruby/object:Gem::Version
75
89
  version: '3.0'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - "~>"
94
+ - - ~>
81
95
  - !ruby/object:Gem::Version
82
96
  version: '3.0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: webmock
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - "~>"
101
+ - - ~>
88
102
  - !ruby/object:Gem::Version
89
103
  version: '3.0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - "~>"
108
+ - - ~>
95
109
  - !ruby/object:Gem::Version
96
110
  version: '3.0'
97
111
  description:
@@ -101,12 +115,12 @@ executables: []
101
115
  extensions: []
102
116
  extra_rdoc_files: []
103
117
  files:
104
- - ".gitignore"
105
- - ".rspec"
106
- - ".rspec_status"
107
- - ".ruby-gemset"
108
- - ".ruby-version"
109
- - ".travis.yml"
118
+ - .gitignore
119
+ - .rspec
120
+ - .rspec_status
121
+ - .ruby-gemset
122
+ - .ruby-version
123
+ - .travis.yml
110
124
  - Gemfile
111
125
  - Gemfile.lock
112
126
  - LICENSE
@@ -131,17 +145,17 @@ require_paths:
131
145
  - lib
132
146
  required_ruby_version: !ruby/object:Gem::Requirement
133
147
  requirements:
134
- - - ">="
148
+ - - '>='
135
149
  - !ruby/object:Gem::Version
136
- version: '0'
150
+ version: '2.0'
137
151
  required_rubygems_version: !ruby/object:Gem::Requirement
138
152
  requirements:
139
- - - ">="
153
+ - - '>='
140
154
  - !ruby/object:Gem::Version
141
155
  version: '0'
142
156
  requirements: []
143
157
  rubyforge_project:
144
- rubygems_version: 2.6.12
158
+ rubygems_version: 2.4.8
145
159
  signing_key:
146
160
  specification_version: 4
147
161
  summary: A client for the trunc.us link shortening service