Jet-fuel-kn 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/JetFuel.rb +17 -0
  3. data/Readme.md +29 -0
  4. data/jet-fuel-kn.gemspec +11 -0
  5. metadata +47 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f359a6a72299172ed7f1f0ffd88b3e5f17863513
4
+ data.tar.gz: 2d2454cedf559028e00d54249d04e577acbee78c
5
+ SHA512:
6
+ metadata.gz: e7dcd3d18c2936a7489716f53272df8db13ec903f9534fd0b88e6520e2165e9d012081a71ac3ba08aae12bbfac0c63294c2625a311e09d176b94d34af9060dc6
7
+ data.tar.gz: cd14687cf634c901a2136d7bc948b05ef51be5f30e653388f013cee6b860751d4964c1759ae49dc36b657bbc1aabb1e2e8e817aa252d2c4a27b4b08edad78dcf
@@ -0,0 +1,17 @@
1
+ class JetFuel
2
+ attr_reader :connection
3
+
4
+ def initialize
5
+ @connection = Faraday.new(url: "http://localhost:3000/v1")
6
+ end
7
+
8
+ def shorten
9
+ parse(connection.post("urls", params))
10
+ end
11
+
12
+ private
13
+
14
+ def parse(response)
15
+ JSON.parse(response.body)
16
+ end
17
+ end
@@ -0,0 +1,29 @@
1
+ Jet-fuel-kn
2
+ ======
3
+
4
+ Takes a long url, and provides a shortened one.
5
+
6
+ [MIT License](http://opensource.org/licenses/MIT)
7
+ -------------------------------------------------
8
+
9
+ The MIT License (MIT)
10
+
11
+ Copyright (c) 2015 Josh Cheek
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in
21
+ all copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
+ THE SOFTWARE.
@@ -0,0 +1,11 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'Jet-fuel-kn'
3
+ s.version = '0.1.0'
4
+ s.licenses = ['MIT']
5
+ s.summary = "Takes a long url and shortens it"
6
+ s.description = "https://gist.github.com/stevekinney/cac8d9374e99a0d7d4b2"
7
+ s.authors = ["Krista Nelson"]
8
+ s.email = 'krista.a.nelson@gmail.com'
9
+ s.files = Dir["**/*"].select { |f| File.file? f }
10
+ s.homepage = 'https://github.com/KristaANelson/Jet-fuel-kn'
11
+ end
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: Jet-fuel-kn
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Krista Nelson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-29 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: https://gist.github.com/stevekinney/cac8d9374e99a0d7d4b2
14
+ email: krista.a.nelson@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - JetFuel.rb
20
+ - Readme.md
21
+ - jet-fuel-kn.gemspec
22
+ homepage: https://github.com/KristaANelson/Jet-fuel-kn
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.2.2
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: Takes a long url and shortens it
46
+ test_files: []
47
+ has_rdoc: