trunkly 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in trunkly.gemspec
4
+ gemspec
data/README CHANGED
@@ -12,7 +12,13 @@ Once you are signed up go on your profile page and copy the API KEY somewhere; y
12
12
 
13
13
  HOW TO USE THE RUBY CLIENT
14
14
 
15
- The Ruby client is contained in the lib/trunkly.rb file. Remember to load this file in your ruby script before starting!
15
+ 0) Installation
16
+
17
+ $ gem install trunkly
18
+
19
+ In your file or irb
20
+ $ require "rubygems" #ruby 1.8 only
21
+ $ require "trunkly"
16
22
 
17
23
  1) Retrieve the latest links shared by a user
18
24
 
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,3 @@
1
+ module Trunkly
2
+ VERSION = "0.1.1"
3
+ end
data/lib/trunkly.rb CHANGED
@@ -86,7 +86,8 @@ module Trunkly
86
86
  query_string += "&#{k.to_s}=#{v}" unless k == :user
87
87
  end
88
88
  query_string += "&api_key=#{@api_key}" if @api_key #adds api key if available
89
- query_string[0] = '?' if query_string[0] == '&'
89
+ p query_string[0]
90
+ query_string[0] = '?' if query_string[0] == 38 #replace initial &
90
91
  query_string
91
92
  end
92
93
 
data/test/test_trunkly.rb CHANGED
@@ -31,11 +31,6 @@ class TestTrunkly < Test::Unit::TestCase
31
31
  params[:one] = 1
32
32
  assert_equal "?one=1", t.send("query_string", params)
33
33
 
34
- params = {}
35
- params[:one] = 1
36
- params[:two] = 2
37
- assert_equal "?one=1&two=2", t.send("query_string", params)
38
-
39
34
  t.api_key = '12345'
40
35
  params = {}
41
36
  params[:one] = 1
data/trunkly.gemspec ADDED
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "trunkly/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "trunkly"
7
+ s.version = Trunkly::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Filippo Diotalevi"]
10
+ s.email = ["filippo.diotalevi@gmail.com"]
11
+ s.homepage = "https://github.com/fdiotalevi/trunkly-ruby"
12
+ s.summary = %q{Ruby Client for Trunk.ly API}
13
+ s.description = %q{A Ruby Client for Trunk.ly API}
14
+
15
+ s.add_dependency('json', '>= 1.0.0')
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trunkly
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Filippo Diotalevi
@@ -45,11 +45,15 @@ extra_rdoc_files: []
45
45
 
46
46
  files:
47
47
  - CHANGELOG
48
+ - Gemfile
48
49
  - LICENSE
49
50
  - README
51
+ - Rakefile
50
52
  - lib/trunkly.rb
53
+ - lib/trunkly/version.rb
51
54
  - test/helper.rb
52
55
  - test/test_trunkly.rb
56
+ - trunkly.gemspec
53
57
  has_rdoc: true
54
58
  homepage: https://github.com/fdiotalevi/trunkly-ruby
55
59
  licenses: []