sprintly-data-ruby 0.2.0 → 0.2.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.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Gemfile.lock +3 -3
- data/README.md +25 -4
- data/lib/sprintly-data-ruby/item.rb +6 -0
- data/lib/sprintly-data-ruby/version.rb +2 -2
- data/sprintly-data-ruby.gemspec +2 -2
- data/wercker.yml +8 -0
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 275dc8e614da2efd85a2fc0fbba5da3fe715d3c8
|
4
|
+
data.tar.gz: c5ada177d97a1467e0336d20aaca94c43a151345
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59f972a2435b090af6f438128b46f06243e9b7221dfe39bd4e19012d85715d8238c3d0a57724dc25ff21ca04af7c7aa1c46549e3886cb288ab2cec539a64329e
|
7
|
+
data.tar.gz: 1b764d1356ac24d17d1d1133a86d7d552e5376988017d9a6dd41dd05f1f786898efcd43ab914c54a6ec0175e7a526b75d47938865e59ed8532ad9777641ccb4c
|
data/.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
test/fixtures
|
1
|
+
test/fixtures
|
2
|
+
*.gem
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sprintly-data-ruby (0.1
|
4
|
+
sprintly-data-ruby (0.2.1)
|
5
5
|
faraday
|
6
6
|
json
|
7
7
|
|
@@ -34,10 +34,10 @@ PLATFORMS
|
|
34
34
|
ruby
|
35
35
|
|
36
36
|
DEPENDENCIES
|
37
|
-
bundler
|
37
|
+
bundler
|
38
38
|
minitest
|
39
39
|
pry
|
40
|
-
rake
|
40
|
+
rake
|
41
41
|
sprintly-data-ruby!
|
42
42
|
vcr
|
43
43
|
webmock
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Sprintly::Data::Ruby
|
2
2
|
|
3
|
-
|
3
|
+
[](https://app.wercker.com/project/bykey/5e214b2e6c5704189acc37a7c049b8e7)
|
4
4
|
|
5
|
-
|
5
|
+
The Sprintly Data Ruby gem easily fetches Products and Items for an authorized Sprintly user.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,7 +22,26 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
Before using the gem, you must set environment variables for `SPRINTLY_EMAIL` and `SPRINTLY_API_KEY`. You can find your Sprintly API key from the User Account page in Sprintly.
|
26
|
+
|
27
|
+
An example method call to receive all products for the authorized Sprintly user looks like this:
|
28
|
+
|
29
|
+
```
|
30
|
+
Sprintly::Product.all
|
31
|
+
```
|
32
|
+
|
33
|
+
The gem also contains an instance method to retrieve all stories that are of a certain status for any given product. The following will return all items in the backlog for the first Sprintly Product returned by the `.all` query.
|
34
|
+
|
35
|
+
```
|
36
|
+
Sprintly::Product.all.first.get_items_by_status("backlog")
|
37
|
+
```
|
38
|
+
|
39
|
+
|
40
|
+
You can also see all items for a given product by replacing the `product_id` below with a valid Sprintly Product ID.
|
41
|
+
|
42
|
+
```
|
43
|
+
Sprintly::Item.for_product(product_id)
|
44
|
+
```
|
26
45
|
|
27
46
|
## Development
|
28
47
|
|
@@ -32,10 +51,12 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
51
|
|
33
52
|
## Contributing
|
34
53
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
54
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/quickleft/sprintly-data-ruby.
|
36
55
|
|
37
56
|
|
38
57
|
## License
|
39
58
|
|
40
59
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
60
|
|
61
|
+
|
62
|
+
|
@@ -14,6 +14,12 @@ module Sprintly
|
|
14
14
|
raw_items.map { |raw_item| new(raw_item) }
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.all_for_product(product_id)
|
18
|
+
response = Sprintly::Connection.get("products/#{product_id}/items.json?status=someday,backlog,in-progress,completed,accepted")
|
19
|
+
raw_items = JSON.parse(response.body)
|
20
|
+
raw_items.map { |raw_item| new(raw_item) }
|
21
|
+
end
|
22
|
+
|
17
23
|
def initialize(raw_item)
|
18
24
|
WHITELISTED_ATTRIBUTES.each do |attr|
|
19
25
|
if raw_item.has_key?(attr)
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module Sprintly
|
2
|
-
VERSION = "0.2.
|
3
|
-
end
|
2
|
+
VERSION = "0.2.1"
|
3
|
+
end
|
data/sprintly-data-ruby.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_development_dependency "bundler"
|
23
|
-
spec.add_development_dependency "rake"
|
22
|
+
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "rake"
|
24
24
|
spec.add_development_dependency "minitest"
|
25
25
|
spec.add_development_dependency "vcr"
|
26
26
|
spec.add_development_dependency "webmock"
|
data/wercker.yml
ADDED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprintly-data-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Quick Left
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
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
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- lib/sprintly-data-ruby/version.rb
|
147
147
|
- sprintly-data-ruby-0.1.0.gem
|
148
148
|
- sprintly-data-ruby.gemspec
|
149
|
+
- wercker.yml
|
149
150
|
homepage: https://github.com/quickleft/sprintly-data-ruby
|
150
151
|
licenses:
|
151
152
|
- BSD
|
@@ -166,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
167
|
version: '0'
|
167
168
|
requirements: []
|
168
169
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.4.
|
170
|
+
rubygems_version: 2.4.5
|
170
171
|
signing_key:
|
171
172
|
specification_version: 4
|
172
173
|
summary: Sprintly API interface for Ruby applications
|