dronestream 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: 4824289ad21eaf4d72014dcf7da5380489799b74
4
- data.tar.gz: cb333d62dc6faa30627788cc68fa39ac506c46fc
3
+ metadata.gz: ba9092fbc5c7da7c3af51763beb5d0d61b041dbc
4
+ data.tar.gz: 60e700bfff6d866d9f08c9fd57aea2db601bd442
5
5
  !binary "U0hBNTEy":
6
- metadata.gz: 7c4d711e3c37fb2d82560397304f50cdd16dd27762594fa6f7c18f9affb76948c01771ea43d80861a48d3ab7015e8461aa6983f984dcaa5e57ae52682a36a4c0
7
- data.tar.gz: 93c8becadd219c3223775eba9e268599fe61b426d499c922e0dfcb3e7cac1da9c5ac6e0362a38a42b4da2e962ec4ba98a60a3460da5fb984b30a20ee43330cc2
6
+ metadata.gz: 4570842285a8b7d27ab27e1abc9ee4664f52107d0a26120cf9751fe2bbcf99d19a29306a76764971f0adb027956ad9fe32ce25217c606f5f9c54943530b548f0
7
+ data.tar.gz: 63b8860e3d41bb523468b7927d3c7da8fd7e5d4dd4227d83e7c9954b7755fedfb17d89d3b99125bccbfdbf50d309570a4728de46cefedcb2858d4d7fde5d97e8
@@ -1,3 +1,7 @@
1
+ ## 0.1.1 (June 4, 2013)
2
+
3
+ * Fix bug in `with_child_casualties`. That method now correctly returns an array, rather than throwing an error.
4
+
1
5
  ## 0.1.0 (June 2, 2013)
2
6
 
3
7
  * Version bump. Implemented more methods.
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Dronestream
2
2
 
3
- A Ruby wrapper for the [dronestre.am](http://dronestre.am) API.
3
+ A Ruby wrapper for the [dronestre.am](http://dronestre.am) API.
4
+
5
+ This is a work in progress. If you'd like to help, check out the current [issues](https://github.com/thenickcox/dronestream/issues). Alternately, you can report further issues, or work on a new one.
4
6
 
5
7
  ## Installation
6
8
 
@@ -18,12 +20,29 @@ Or install it yourself as:
18
20
 
19
21
  ## Usage
20
22
 
21
- TODO: Write usage instructions here
23
+ First, require it:
24
+
25
+ ```ruby
26
+ require 'dronestream'
27
+ #=> true
28
+ ```
29
+
30
+ Then, you can find drone strikes by a number of criteria. For example:
31
+
32
+ ```ruby
33
+ Dronestream::Strike.in_country('Yemen')
34
+ #=> [{"_id"=>"51a65578e0932c0e1eb4199f", "number"=>1, "country"=>"Yemen", "date"=>"2002-11-03T00:00:00.000Z", "town"=>"", "location"=>"Marib Province", "deaths"=>"6", "deaths_min"=>"6", "deaths_max"=>"6", "civilians"=>"0", "injuries"=>"", "children"=>"", "tweet_id"=>"278544689483890688", "bureau_id"=>"YEM001", "bij_summary_short"=>"In the first known US targeted assassination using a drone, a CIA Predator struck a car killing six al Qaeda suspects.", "bij_link"=>"http://www.thebureauinvestigates.com/2012/03/29/yemen-reported-us-covert-actions-since-2001/", "target"=>"", "lat"=>"15.47467", "lon"=>"45.322755", "articles"=>[], "names"=>["Qa’id Salim Sinan al-Harithi, Abu Ahmad al-Hijazi, Salih Hussain Ali al-Nunu, Awsan Ahmad al-Tarihi, Munir Ahmad Abdallah al-Sauda, Adil Nasir al-Sauda’"]} ...
35
+ ```
22
36
 
23
37
  ## Contributing
24
38
 
25
39
  1. Fork it
26
40
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
41
+ 3. Run tests (`rake spec`)
42
+ 4. Commit your changes (`git commit -am 'Add some feature'`)
43
+ 5. Push to the branch (`git push origin my-new-feature`)
44
+ 6. Create new Pull Request
45
+
46
+ ## Acknowledgements
47
+
48
+ Obviously, this gem couldn't be possible without the [dronestream API](http://dronestream.org). So thank you to [Josh Begley](http://joshbegley.com/) for the API. Thanks also to [@ashedryden](http://twitter.com/ashedryden) for turning me onto [hasadronekilledanyonetoday.com](http://hasadronekilledanyonetoday.com) by [Chris Zarate](https://github.com/chriszarate/hadkat), where I discovered the source.
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rake/testtask'
3
+ require 'dronestream/version'
3
4
 
4
5
  require 'rspec/core/rake_task'
5
6
 
@@ -10,3 +11,12 @@ desc 'Run specs'
10
11
  RSpec::Core::RakeTask.new do |test|
11
12
  test.pattern = 'spec/lib/dronestream/*_spec.rb'
12
13
  end
14
+
15
+ namespace :gem do
16
+ task :publish do
17
+ puts "Building gem..."
18
+ sh "gem build dronestream.gemspec"
19
+ puts "Pushing to rubygems.org"
20
+ sh "gem push dronestream-#{Dronestream::VERSION}.gem"
21
+ end
22
+ end
@@ -22,7 +22,7 @@ module Dronestream
22
22
  end
23
23
 
24
24
  def with_child_casualties
25
- all.keep_if { |strike| strike['children'].length != 0 }
25
+ all.keep_if { |strike| !strike['children'].to_i.zero? }
26
26
  end
27
27
 
28
28
  def in_town(town)
@@ -1,3 +1,3 @@
1
1
  module Dronestream
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dronestream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thenickcox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-03 00:00:00.000000000 Z
11
+ date: 2013-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler