tickspot-rb 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/Gemfile +8 -0
- data/LICENSE +20 -0
- data/README.md +43 -0
- data/Rakefile +1 -0
- data/lib/tickspot.rb +25 -0
- data/lib/tickspot/client.rb +146 -0
- data/lib/tickspot/version.rb +3 -0
- data/spec/client_spec.rb +74 -0
- data/spec/fixtures/clients.xml +15 -0
- data/spec/fixtures/entries.xml +21 -0
- data/spec/fixtures/projects.xml +31 -0
- data/spec/fixtures/tasks.xml +15 -0
- data/spec/fixtures/users.xml +27 -0
- data/spec/spec_helper.rb +24 -0
- data/spec/tickspot_spec.rb +36 -0
- data/tickspot-rb.gemspec +28 -0
- metadata +137 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012 Chris Mason
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Tickspot-rb
|
2
|
+
|
3
|
+
Ruby wrapper for the [Tick API](http://www.tickspot.com/api/).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install tickspot-rb
|
8
|
+
|
9
|
+
## Example Usage
|
10
|
+
|
11
|
+
require 'tickspot'
|
12
|
+
|
13
|
+
tick = Tickspot::Client.new('myCompanyName', 'myemail@example.com', 'myTickPassword')
|
14
|
+
tick.clients
|
15
|
+
|
16
|
+
=> [{"id"=>123, "name"=>"Acme"}, {"id"=>231, "name"=>"Sterling Cooper"}, {"id"=>321, "name"=>"Justice League"}]
|
17
|
+
|
18
|
+
You can also initialize the client with a configuration block:
|
19
|
+
|
20
|
+
# config/initializers/tickspot.rb (for instance)
|
21
|
+
Tickspot.configure do |config|
|
22
|
+
config.company = 'acme'
|
23
|
+
config.email = 'wilie@acme.com'
|
24
|
+
config.password = 'secret'
|
25
|
+
end
|
26
|
+
|
27
|
+
# elsewhere
|
28
|
+
client = Tickspot::Client.new
|
29
|
+
|
30
|
+
## Note on Patches/Pull Requests
|
31
|
+
|
32
|
+
* Fork the project.
|
33
|
+
* Make your feature addition or bug fix.
|
34
|
+
* Add tests for it. This is important so I don't break it in a
|
35
|
+
future version unintentionally.
|
36
|
+
* Commit, do not mess with rakefile, version, or history.
|
37
|
+
(if you want to have your own version, that is fine but
|
38
|
+
bump version in a commit by itself I can ignore when I pull)
|
39
|
+
* Send me a pull request. Bonus points for topic branches.
|
40
|
+
|
41
|
+
## Copyright
|
42
|
+
|
43
|
+
Copyright (c) 2012 Chris Mason. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/tickspot.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
module Tickspot
|
2
|
+
|
3
|
+
class << self
|
4
|
+
attr_accessor :company, :email, :password
|
5
|
+
|
6
|
+
# config/initializers/tickspot.rb (for instance)
|
7
|
+
#
|
8
|
+
# Tickspot.configure do |config|
|
9
|
+
# config.company = 'acme'
|
10
|
+
# config.email = 'wilie@acme.com'
|
11
|
+
# config.password = 'secret'
|
12
|
+
# end
|
13
|
+
#
|
14
|
+
# elsewhere
|
15
|
+
#
|
16
|
+
# client = Tickspot::Client.new
|
17
|
+
def configure
|
18
|
+
yield self
|
19
|
+
true
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
autoload :Client, "tickspot/client"
|
24
|
+
autoload :Version, "tickspot/version"
|
25
|
+
end
|
@@ -0,0 +1,146 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
require 'hashie'
|
3
|
+
|
4
|
+
module Tickspot
|
5
|
+
|
6
|
+
class Client
|
7
|
+
include HTTParty
|
8
|
+
attr_reader :company, :email, :password
|
9
|
+
|
10
|
+
def initialize(company = Tickspot.company, email = Tickspot.email, password = Tickspot.password)
|
11
|
+
@company = company
|
12
|
+
@email = email
|
13
|
+
@password = password
|
14
|
+
|
15
|
+
self.class.base_uri "https://#{@company}.tickspot.com/api"
|
16
|
+
end
|
17
|
+
# The clients method will return a list of all clients
|
18
|
+
# and can only be accessed by admins on the subscription.
|
19
|
+
#
|
20
|
+
# Optional paramaters:
|
21
|
+
# open => [true|false]
|
22
|
+
#
|
23
|
+
def clients(options = {})
|
24
|
+
options.merge!(:email => @email, :password => @password)
|
25
|
+
self.class.post("/clients", :query => options)["clients"].map {|obj| Hashie::Mash.new obj }
|
26
|
+
end
|
27
|
+
|
28
|
+
# The projects method will return projects filtered by the parameters provided.
|
29
|
+
# Admin can see all projects on the subscription,
|
30
|
+
# while non-admins can only access the projects they are assigned.
|
31
|
+
#
|
32
|
+
# Optional parameters:
|
33
|
+
# project_id
|
34
|
+
# open [true|false]
|
35
|
+
# project_billable [true|false]
|
36
|
+
#
|
37
|
+
def projects(options = {})
|
38
|
+
options.merge!(:email => @email, :password => @password)
|
39
|
+
self.class.post("/projects", :query => options)["projects"].map {|obj| Hashie::Mash.new obj }
|
40
|
+
end
|
41
|
+
|
42
|
+
# The tasks method will return a list of all the current tasks for a specified project
|
43
|
+
# and can only be accessed by admins on the subscription.
|
44
|
+
#
|
45
|
+
# Required parameters:
|
46
|
+
# project_id
|
47
|
+
#
|
48
|
+
# Optional Parameters:
|
49
|
+
# task_id
|
50
|
+
# open [true|false]
|
51
|
+
# task_billable [true|false]
|
52
|
+
#
|
53
|
+
def tasks(options = {})
|
54
|
+
options.merge!(:email => @email, :password => @password)
|
55
|
+
self.class.post("/tasks", :query => options)["tasks"].map {|obj| Hashie::Mash.new obj }
|
56
|
+
end
|
57
|
+
|
58
|
+
# The method will return a list of all clients, projects, and tasks
|
59
|
+
# that are assigned to the user and available for time entries (open).
|
60
|
+
#
|
61
|
+
def clients_projects_tasks
|
62
|
+
self.class.post("/clients_projects_tasks", :query => {:email => @email, :password => @password})["clients"].map {|obj| Hashie::Mash.new obj }
|
63
|
+
end
|
64
|
+
|
65
|
+
# The entries method will return a list of all entries that meet the provided criteria.
|
66
|
+
# Either a start and end date have to be provided or an updated_at time.
|
67
|
+
# The entries will be in the start and end date range or they will be after
|
68
|
+
# the updated_at time depending on what criteria is provided.
|
69
|
+
# Each of the optional parameters will further filter the response.
|
70
|
+
#
|
71
|
+
# Required parameters:
|
72
|
+
# start_date
|
73
|
+
# end_date
|
74
|
+
# OR
|
75
|
+
# updated_at
|
76
|
+
#
|
77
|
+
# Optional Parameters:
|
78
|
+
# project_id
|
79
|
+
# task_id
|
80
|
+
# user_id
|
81
|
+
# user_email
|
82
|
+
# client_id
|
83
|
+
# entry_billable [true|false]
|
84
|
+
# billed [true|false]
|
85
|
+
#
|
86
|
+
def entries(options = {})
|
87
|
+
options.merge!(:email => @email, :password => @password)
|
88
|
+
self.class.post("/entries", :query => options)["entries"].map {|obj| Hashie::Mash.new obj }
|
89
|
+
end
|
90
|
+
|
91
|
+
# The users method will return a list of the most recently used tasks.
|
92
|
+
# This is useful for generating quick links for a user to select a task they have been using recently.
|
93
|
+
#
|
94
|
+
def recent_tasks
|
95
|
+
self.class.post("/recent_tasks", :query => {:email => @email, :password => @password})['recent_tasks'].map {|obj| Hashie::Mash.new obj }
|
96
|
+
end
|
97
|
+
|
98
|
+
# The users method will return a list of users.
|
99
|
+
#
|
100
|
+
# Optional parameters:
|
101
|
+
# project_id
|
102
|
+
#
|
103
|
+
def users(options = {})
|
104
|
+
options.merge!(:email => @email, :password => @password)
|
105
|
+
self.class.post("/users", :query => options)['users'].map {|obj| Hashie::Mash.new obj }
|
106
|
+
end
|
107
|
+
|
108
|
+
# The create_entry method will accept a time entry for a specified task_id
|
109
|
+
# and return the created entry along with the task and project stats.
|
110
|
+
#
|
111
|
+
# Require parameters:
|
112
|
+
# task_id
|
113
|
+
# hours
|
114
|
+
# date
|
115
|
+
#
|
116
|
+
# Optional parameters:
|
117
|
+
# notes
|
118
|
+
#
|
119
|
+
def create_entry(options = {})
|
120
|
+
options.merge!(:email => @email, :password => @password)
|
121
|
+
self.class.post("/create_entry", :query => options)
|
122
|
+
end
|
123
|
+
|
124
|
+
# The update_entry method will allow you to modify attributes of an existing entry.
|
125
|
+
# The only required parameter is the id of the entry.
|
126
|
+
# Additional parameters must be provided for any attribute that you wish to update.
|
127
|
+
# For example, if you are only changing the billed attribute,
|
128
|
+
# your post should only include the required parameters and the billed parameter.
|
129
|
+
#
|
130
|
+
# Require parameters:
|
131
|
+
# id
|
132
|
+
#
|
133
|
+
# Optional parameters:
|
134
|
+
# hours
|
135
|
+
# date
|
136
|
+
# billed
|
137
|
+
# task_id
|
138
|
+
# user_id
|
139
|
+
# notes
|
140
|
+
#
|
141
|
+
def update_entry(options = {})
|
142
|
+
options.merge!(:email => @email, :password => @password)
|
143
|
+
self.class.post("/update_entry", :query => options)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
data/spec/client_spec.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Tickspot::Client do
|
4
|
+
describe "instantiation" do
|
5
|
+
before(:each) do
|
6
|
+
Tickspot.configure do |config|
|
7
|
+
config.company = 'foo'
|
8
|
+
config.email = 'foo@example.com'
|
9
|
+
config.password = 'foo-secret'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
context "without arguments" do
|
14
|
+
let (:client) { Tickspot::Client.new }
|
15
|
+
it "uses credentials from Tickspot" do
|
16
|
+
client.company.should == 'foo'
|
17
|
+
client.email.should == 'foo@example.com'
|
18
|
+
client.password.should == 'foo-secret'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context "with arguments" do
|
23
|
+
let (:client) { Tickspot::Client.new('bar', 'bar@example.com', 'bar-secret') }
|
24
|
+
it "uses the passed in credentials" do
|
25
|
+
client.company.should == 'bar'
|
26
|
+
client.email.should == 'bar@example.com'
|
27
|
+
client.password.should == 'bar-secret'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "accessing API" do
|
33
|
+
let (:client) { Tickspot::Client.new('bar', 'bar@example.com', 'bar-secret') }
|
34
|
+
|
35
|
+
it "properly configures the base uri" do
|
36
|
+
client.class.base_uri.should == 'https://bar.tickspot.com/api'
|
37
|
+
end
|
38
|
+
|
39
|
+
it "gets a list of clients" do
|
40
|
+
fake_post("clients")
|
41
|
+
results = client.clients
|
42
|
+
results.should have(3).clients
|
43
|
+
results.first.should be_an_instance_of(Hashie::Mash)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "gets a list of users" do
|
47
|
+
fake_post("users")
|
48
|
+
results = client.users
|
49
|
+
results.should have(3).users
|
50
|
+
results.first.should be_an_instance_of(Hashie::Mash)
|
51
|
+
end
|
52
|
+
|
53
|
+
it "gets a list of projects" do
|
54
|
+
fake_post("projects")
|
55
|
+
results = client.projects
|
56
|
+
results.should have(1).project
|
57
|
+
results.first.should be_an_instance_of(Hashie::Mash)
|
58
|
+
end
|
59
|
+
|
60
|
+
it "gets a list of tasks" do
|
61
|
+
fake_post("tasks", {:project_id => 42})
|
62
|
+
results = client.tasks(:project_id => 42)
|
63
|
+
results.should have(1).task
|
64
|
+
results.first.should be_an_instance_of(Hashie::Mash)
|
65
|
+
end
|
66
|
+
|
67
|
+
it "gets a list of entries" do
|
68
|
+
fake_post("entries", {:updated_at => "2012-03-29"})
|
69
|
+
results = client.entries(:updated_at => "2012-03-29")
|
70
|
+
results.should have(1).entry
|
71
|
+
results.first.should be_an_instance_of(Hashie::Mash)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<clients type="array">
|
3
|
+
<client>
|
4
|
+
<id type="integer">12341</id>
|
5
|
+
<name>Starfleet Command</name>
|
6
|
+
</client>
|
7
|
+
<client>
|
8
|
+
<id type="integer">12342</id>
|
9
|
+
<name>The Vulcans</name>
|
10
|
+
</client>
|
11
|
+
<client>
|
12
|
+
<id type="integer">12343</id>
|
13
|
+
<name>The Cardassians</name>
|
14
|
+
</client>
|
15
|
+
</clients>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<entries type="array">
|
3
|
+
<entry>
|
4
|
+
<id type="integer">24</id>
|
5
|
+
<task_id type="integer">14</task_id>
|
6
|
+
<user_id type="integer">3</user_id>
|
7
|
+
<date type="date">2008-03-08</date>
|
8
|
+
<hours type="float">1.00</hours>
|
9
|
+
<notes>Had trouble with tribbles.</notes>
|
10
|
+
<billable>true</billable>
|
11
|
+
<billed>true</billed>
|
12
|
+
<created_at type="datetime">Tue, 07 Oct 2008 14:46:16 -0400</created_at>
|
13
|
+
<updated_at type="datetime">Tue, 07 Oct 2008 14:46:16 -0400</updated_at>
|
14
|
+
<user_email>scotty@enterprise.com</user_email>
|
15
|
+
<task_name>Remove converter assembly</task_name>
|
16
|
+
<sum_hours type="float">2.00</sum_hours>
|
17
|
+
<budget type="float">10.00</budget>
|
18
|
+
<project_name>Realign dilithium crystals</project_name>
|
19
|
+
<client_name>Starfleet Command</client_name>
|
20
|
+
</entry>
|
21
|
+
</entries>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<projects type="array">
|
3
|
+
<project>
|
4
|
+
<id type="integer">7</id>
|
5
|
+
<name>Realign dilithium crystals</name>
|
6
|
+
<budget type="float">50</budget>
|
7
|
+
<client_id type="integer">4</client_id>
|
8
|
+
<owner_id type="integer">14</owner_id>
|
9
|
+
<opened_on type="date">2006-01-01</opened_on>
|
10
|
+
<closed_on type="date"></closed_on>
|
11
|
+
<created_at type="datetime">Tue, 07 Oct 2008 14:46:16 -0400</created_at>
|
12
|
+
<updated_at type="datetime">Tue, 07 Oct 2008 14:46:16 -0400</updated_at>
|
13
|
+
<client_name>Starfleet Command</client_name>
|
14
|
+
<sum_hours type="float">22.5</sum_hours>
|
15
|
+
<user_count type="integer">2</user_count>
|
16
|
+
<tasks type="array">
|
17
|
+
<task>
|
18
|
+
<id type="integer">14</id>
|
19
|
+
<name>Remove converter assembly</name>
|
20
|
+
<position type="integer">1</position>
|
21
|
+
<project_id type="integer">2</project_id>
|
22
|
+
<opened_on type="date">2006-01-01</opened_on>
|
23
|
+
<closed_on type="date"></closed_on>
|
24
|
+
<budget type="float">50</budget>
|
25
|
+
<billable type="boolean">true</billable>
|
26
|
+
<sum_hours type="float">22.5</sum_hours>
|
27
|
+
<user_count type="integer">2</user_count>
|
28
|
+
</task>
|
29
|
+
</tasks>
|
30
|
+
</project>
|
31
|
+
</projects>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<tasks type="array">
|
3
|
+
<task>
|
4
|
+
<id type="integer">14</id>
|
5
|
+
<name>Remove converter assembly</name>
|
6
|
+
<position type="integer">1</position>
|
7
|
+
<project_id type="integer">2</project_id>
|
8
|
+
<opened_on type="date">2006-01-01</opened_on>
|
9
|
+
<closed_on type="date"></closed_on>
|
10
|
+
<budget type="float">50</budget>
|
11
|
+
<billable type="boolean">true</billable>
|
12
|
+
<sum_hours type="float">22.5</sum_hours>
|
13
|
+
<user_count type="integer">2</user_count>
|
14
|
+
</task>
|
15
|
+
</tasks>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<users type="array">
|
3
|
+
<user>
|
4
|
+
<id type="integer">64272</id>
|
5
|
+
<first_name>Bugs</first_name>
|
6
|
+
<last_name>Bunny</last_name>
|
7
|
+
<email>bugs@example.com</email>
|
8
|
+
<created_at type="datetime">Thu, 04 Nov 2010 17:31:06 -0400</created_at>
|
9
|
+
<updated_at type="datetime">Thu, 04 Nov 2010 17:31:06 -0400</updated_at>
|
10
|
+
</user>
|
11
|
+
<user>
|
12
|
+
<id type="integer">64272</id>
|
13
|
+
<first_name>Elmer</first_name>
|
14
|
+
<last_name>Fudd</last_name>
|
15
|
+
<email>elmer@example.com</email>
|
16
|
+
<created_at type="datetime">Thu, 04 Nov 2010 17:31:06 -0400</created_at>
|
17
|
+
<updated_at type="datetime">Thu, 04 Nov 2010 17:31:06 -0400</updated_at>
|
18
|
+
</user>
|
19
|
+
<user>
|
20
|
+
<id type="integer">64272</id>
|
21
|
+
<first_name>Daffy</first_name>
|
22
|
+
<last_name>Duck</last_name>
|
23
|
+
<email>daffy@example.com</email>
|
24
|
+
<created_at type="datetime">Thu, 04 Nov 2010 17:31:06 -0400</created_at>
|
25
|
+
<updated_at type="datetime">Thu, 04 Nov 2010 17:31:06 -0400</updated_at>
|
26
|
+
</user>
|
27
|
+
</users>
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
$:.unshift File.expand_path('..', __FILE__)
|
2
|
+
$:.unshift File.expand_path('../../lib', __FILE__)
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
require 'tickspot'
|
6
|
+
require 'rspec'
|
7
|
+
require 'webmock/rspec'
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
#
|
11
|
+
end
|
12
|
+
|
13
|
+
def fake_post(resource, params = {})
|
14
|
+
params.merge!(:email => 'bar@example.com', :password => 'bar-secret')
|
15
|
+
stub_request(:post, "https://bar.tickspot.com/api/#{resource}"
|
16
|
+
).with(:query => params
|
17
|
+
).to_return(:body => fixture_file("#{resource}.xml"), :status => 200, :headers => {'Content-Type' => 'application/xml'})
|
18
|
+
end
|
19
|
+
|
20
|
+
def fixture_file(filename)
|
21
|
+
return '' if filename == ''
|
22
|
+
file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
|
23
|
+
File.read(file_path)
|
24
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Tickspot do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
Tickspot.company = nil
|
7
|
+
Tickspot.email = nil
|
8
|
+
Tickspot.password = nil
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should be able to set the company" do
|
12
|
+
Tickspot.company = 'acme'
|
13
|
+
Tickspot.company.should == 'acme'
|
14
|
+
end
|
15
|
+
|
16
|
+
it "shoudl be able to set the email" do
|
17
|
+
Tickspot.email = 'my_email@example.com'
|
18
|
+
Tickspot.email.should == 'my_email@example.com'
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should be able to set the password" do
|
22
|
+
Tickspot.password = 'double_secret_probation'
|
23
|
+
Tickspot.password.should == 'double_secret_probation'
|
24
|
+
end
|
25
|
+
it "should be able to set the company, email, and password via configuration block" do
|
26
|
+
Tickspot.configure do |config|
|
27
|
+
config.company = 'acme'
|
28
|
+
config.email = 'my_email@example.com'
|
29
|
+
config.password = 'double_secret_probation'
|
30
|
+
end
|
31
|
+
|
32
|
+
Tickspot.company.should == 'acme'
|
33
|
+
Tickspot.email.should == 'my_email@example.com'
|
34
|
+
Tickspot.password.should == 'double_secret_probation'
|
35
|
+
end
|
36
|
+
end
|
data/tickspot-rb.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "tickspot/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "tickspot-rb"
|
7
|
+
s.version = Tickspot::VERSION
|
8
|
+
s.authors = ["Chris Mason"]
|
9
|
+
s.email = ["chris@chaione.com"]
|
10
|
+
s.homepage = "https://github.com/cmason/tickspot-rb"
|
11
|
+
s.description = %q{Ruby wrapper for the Tick API http://tickspot.com/api}
|
12
|
+
s.summary = s.description
|
13
|
+
|
14
|
+
s.rubyforge_project = "tickspot-rb"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ['lib']
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
s.add_runtime_dependency 'hashie'
|
23
|
+
s.add_runtime_dependency 'httparty'
|
24
|
+
s.add_development_dependency 'rake'
|
25
|
+
s.add_development_dependency 'rspec'
|
26
|
+
s.add_development_dependency 'simplecov'
|
27
|
+
s.add_development_dependency 'webmock'
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tickspot-rb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Chris Mason
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-03-30 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: hashie
|
16
|
+
requirement: &70120337962020 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70120337962020
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: httparty
|
27
|
+
requirement: &70120337961280 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70120337961280
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rake
|
38
|
+
requirement: &70120337960600 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70120337960600
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: &70120337959840 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70120337959840
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: simplecov
|
60
|
+
requirement: &70120337959380 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70120337959380
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: &70120337958600 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70120337958600
|
80
|
+
description: Ruby wrapper for the Tick API http://tickspot.com/api
|
81
|
+
email:
|
82
|
+
- chris@chaione.com
|
83
|
+
executables: []
|
84
|
+
extensions: []
|
85
|
+
extra_rdoc_files: []
|
86
|
+
files:
|
87
|
+
- .gitignore
|
88
|
+
- .rspec
|
89
|
+
- Gemfile
|
90
|
+
- LICENSE
|
91
|
+
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- lib/tickspot.rb
|
94
|
+
- lib/tickspot/client.rb
|
95
|
+
- lib/tickspot/version.rb
|
96
|
+
- spec/client_spec.rb
|
97
|
+
- spec/fixtures/clients.xml
|
98
|
+
- spec/fixtures/entries.xml
|
99
|
+
- spec/fixtures/projects.xml
|
100
|
+
- spec/fixtures/tasks.xml
|
101
|
+
- spec/fixtures/users.xml
|
102
|
+
- spec/spec_helper.rb
|
103
|
+
- spec/tickspot_spec.rb
|
104
|
+
- tickspot-rb.gemspec
|
105
|
+
homepage: https://github.com/cmason/tickspot-rb
|
106
|
+
licenses: []
|
107
|
+
post_install_message:
|
108
|
+
rdoc_options: []
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ! '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ! '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
requirements: []
|
124
|
+
rubyforge_project: tickspot-rb
|
125
|
+
rubygems_version: 1.8.17
|
126
|
+
signing_key:
|
127
|
+
specification_version: 3
|
128
|
+
summary: Ruby wrapper for the Tick API http://tickspot.com/api
|
129
|
+
test_files:
|
130
|
+
- spec/client_spec.rb
|
131
|
+
- spec/fixtures/clients.xml
|
132
|
+
- spec/fixtures/entries.xml
|
133
|
+
- spec/fixtures/projects.xml
|
134
|
+
- spec/fixtures/tasks.xml
|
135
|
+
- spec/fixtures/users.xml
|
136
|
+
- spec/spec_helper.rb
|
137
|
+
- spec/tickspot_spec.rb
|