artisan 0.5.0 → 0.5.1
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.
- data/VERSION +1 -1
- data/artisan.gemspec +2 -2
- data/lib/artisan.rb +5 -0
- data/lib/artisan/query.rb +5 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/artisan.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "artisan"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["patrickgombert"]
|
12
|
-
s.date = "2012-10-
|
12
|
+
s.date = "2012-10-08"
|
13
13
|
s.description = "Make calls to the Artisan API."
|
14
14
|
s.email = "patrick@8thlight.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/artisan.rb
CHANGED
@@ -61,4 +61,9 @@ module Artisan
|
|
61
61
|
def self.update_estimates(key, story, address = 'artisan.8thlight.com')
|
62
62
|
response = Query.update_estimates(key, story, address)
|
63
63
|
end
|
64
|
+
|
65
|
+
def self.authenticate(username, password, address = 'artisan.8thlight.com')
|
66
|
+
response = Query.authenticate(username, password, address)
|
67
|
+
JSON:parse(response)["success"]
|
68
|
+
end
|
64
69
|
end
|
data/lib/artisan/query.rb
CHANGED
@@ -71,6 +71,11 @@ module Artisan
|
|
71
71
|
return response.body
|
72
72
|
end
|
73
73
|
|
74
|
+
def self.authenticate(username, password, address)
|
75
|
+
response = HTTParty.get 'http://' + address + '/api/auth/authenticate', :headers => {'accept' => 'application/json'}, :query => {'username' => username, 'password' => password}
|
76
|
+
Validation.validate_response response.code
|
77
|
+
return response.body
|
78
|
+
end
|
74
79
|
|
75
80
|
module Validation
|
76
81
|
def self.validate_response code
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artisan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
155
|
version: '0'
|
156
156
|
segments:
|
157
157
|
- 0
|
158
|
-
hash: -
|
158
|
+
hash: -2898020008578538293
|
159
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|