girl_world 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e4bd51495bec92f93d0498596a1a1a7697465a44
4
+ data.tar.gz: 1d01fc2c34173adc8d2859d69cd77c5fdfa47f0c
5
+ SHA512:
6
+ metadata.gz: 43d219d4c0ac0ef50327a935b739f2ea1da8f4a368b4591b68c7fe2de379d79f52151757e4ca839d7b2a262dcf04b9b49f2852b0cc4cbe049901981e4fc853d1
7
+ data.tar.gz: 66d33e916bdb57b30affb80591a55d7f02955ca35da30b5a72e769205eecad08c217c006501967d6a16f78aecb9a0da4d152f273ea336e51494031c3b4fb6341
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ gem 'httparty'
9
+
10
+ group :development do
11
+ gem "shoulda", ">= 0"
12
+ gem "rdoc", "~> 3.12"
13
+ gem "bundler", "~> 1.0"
14
+ gem "jeweler", "~> 1.8.7"
15
+ gem "simplecov"
16
+ gem 'pry'
17
+
18
+ end
@@ -0,0 +1,91 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (4.0.1)
5
+ i18n (~> 0.6, >= 0.6.4)
6
+ minitest (~> 4.2)
7
+ multi_json (~> 1.3)
8
+ thread_safe (~> 0.1)
9
+ tzinfo (~> 0.3.37)
10
+ addressable (2.3.5)
11
+ atomic (1.1.14)
12
+ builder (3.2.2)
13
+ coderay (1.1.0)
14
+ docile (1.1.0)
15
+ faraday (0.8.8)
16
+ multipart-post (~> 1.2.0)
17
+ git (1.2.6)
18
+ github_api (0.10.1)
19
+ addressable
20
+ faraday (~> 0.8.1)
21
+ hashie (>= 1.2)
22
+ multi_json (~> 1.4)
23
+ nokogiri (~> 1.5.2)
24
+ oauth2
25
+ hashie (2.0.5)
26
+ highline (1.6.20)
27
+ httparty (0.12.0)
28
+ json (~> 1.8)
29
+ multi_xml (>= 0.5.2)
30
+ httpauth (0.2.0)
31
+ i18n (0.6.5)
32
+ jeweler (1.8.8)
33
+ builder
34
+ bundler (~> 1.0)
35
+ git (>= 1.2.5)
36
+ github_api (= 0.10.1)
37
+ highline (>= 1.6.15)
38
+ nokogiri (= 1.5.10)
39
+ rake
40
+ rdoc
41
+ json (1.8.1)
42
+ jwt (0.1.8)
43
+ multi_json (>= 1.5)
44
+ method_source (0.8.2)
45
+ minitest (4.7.5)
46
+ multi_json (1.8.2)
47
+ multi_xml (0.5.5)
48
+ multipart-post (1.2.0)
49
+ nokogiri (1.5.10)
50
+ oauth2 (0.9.2)
51
+ faraday (~> 0.8)
52
+ httpauth (~> 0.2)
53
+ jwt (~> 0.1.4)
54
+ multi_json (~> 1.0)
55
+ multi_xml (~> 0.5)
56
+ rack (~> 1.2)
57
+ pry (0.9.12.4)
58
+ coderay (~> 1.0)
59
+ method_source (~> 0.8)
60
+ slop (~> 3.4)
61
+ rack (1.5.2)
62
+ rake (10.1.0)
63
+ rdoc (3.12.2)
64
+ json (~> 1.4)
65
+ shoulda (3.5.0)
66
+ shoulda-context (~> 1.0, >= 1.0.1)
67
+ shoulda-matchers (>= 1.4.1, < 3.0)
68
+ shoulda-context (1.1.6)
69
+ shoulda-matchers (2.4.0)
70
+ activesupport (>= 3.0.0)
71
+ simplecov (0.8.2)
72
+ docile (~> 1.1.0)
73
+ multi_json
74
+ simplecov-html (~> 0.8.0)
75
+ simplecov-html (0.8.0)
76
+ slop (3.4.7)
77
+ thread_safe (0.1.3)
78
+ atomic
79
+ tzinfo (0.3.38)
80
+
81
+ PLATFORMS
82
+ ruby
83
+
84
+ DEPENDENCIES
85
+ bundler (~> 1.0)
86
+ httparty
87
+ jeweler (~> 1.8.7)
88
+ pry
89
+ rdoc (~> 3.12)
90
+ shoulda
91
+ simplecov
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 AmalHussein
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Amal Hussein
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.
@@ -0,0 +1,4 @@
1
+ girl_world
2
+ ==========
3
+
4
+ A Ruby Wrapper for the World Bank API which queries the Gender Statistics database for health, wealth, and economic indicators of women, and girls around the world.
@@ -0,0 +1,19 @@
1
+ = girl_world
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to girl_world
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
+ * Fork the project.
10
+ * Start a feature/bugfix branch.
11
+ * Commit and push until you are happy with your contribution.
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2013 Amal Hussein. See LICENSE.txt for
18
+ further details.
19
+
@@ -0,0 +1,45 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "girl_world"
18
+ gem.homepage = "http://github.com/AmalHussein/girl_world"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{A Ruby Wrapper for the World Bank API which queries the Gender Statistics database for health, wealth, and economic indicators of women, and girls around the world. }
21
+ gem.description = %Q{A Ruby Wrapper for the World Bank API which queries the Gender Statistics database for health, wealth, and economic indicators of women, and girls around the world. }
22
+ gem.email = "amalhussein08@gmail.com"
23
+ gem.authors = ["Amal Hussein"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'test/**/test_*.rb'
32
+ test.verbose = true
33
+ end
34
+
35
+ task :default => :test
36
+
37
+ require 'rdoc/task'
38
+ Rake::RDocTask.new do |rdoc|
39
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
40
+
41
+ rdoc.rdoc_dir = 'rdoc'
42
+ rdoc.title = "girl_world #{version}"
43
+ rdoc.rdoc_files.include('README*')
44
+ rdoc.rdoc_files.include('lib/**/*.rb')
45
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
@@ -0,0 +1,63 @@
1
+ require 'pry'
2
+ require 'httparty'
3
+ #require 'girl_world'
4
+
5
+ module GirlWorld
6
+ #Format for the defination of an indicator indicators
7
+ # http://api.worldbank.org/indicators/SP.POP.TOTL
8
+ #ex => http://api.worldbank.org/indicators/SE.ENR.PRSC.FM.ZS for girl/boy ratio for high school
9
+
10
+ #Return a list of all indicators
11
+ # http://api.worldbank.org/indicators
12
+
13
+ # Return information about GDP in current US dollars
14
+ # http://api.worldbank.org/indicators/NY.GDP.MKTP.CD
15
+
16
+ # Return the definition of the indicator SP.POP.TOTL, in this case, total population
17
+ # http://api.worldbank.org/indicators/SP.POP.TOTL
18
+
19
+ # Display all indicators for the source: Doing Business referred by numeric ID
20
+ # http://api.worldbank.org/source/1/indicators
21
+
22
+ # Return the GDP (in current US$) for Brazil (this call also accepts the 3 letter ISO code)
23
+ # http://api.worldbank.org/countries/br/indicators/NY.GDP.MKTP.CD
24
+
25
+ # Return the GDP for ALL countries (please note the "all" special keyword) in 2002
26
+ # http://api.worldbank.org/countries/all/indicators/NY.GDP.MKTP.CD?date=2002:2002
27
+
28
+ # In order to get one indicator for a country - for example GNI per capita for Brazil in current US$ using the Atlas method
29
+ # http://api.worldbank.org/countries/br/indicators/NY.GNP.PCAP.CD/?date=2006:2006
30
+
31
+ # By default, the GNI call above gives all the data available. If you want just the GNI data from, say, 1960 to 1970
32
+ # http://api.worldbank.org/countries/br/indicators/NY.GNP.PCAP.CD?date=1960:1970
33
+
34
+ def self.high_school_ratio(country)
35
+ HTTParty.get("http://api.worldbank.org/countries/#{country}/indicators/SE.ENR.PRSC.FM.ZS?&format=json")
36
+ end
37
+
38
+ def self.high_school_ratio_date(country, start_year, end_year)
39
+ HTTParty.get("http://api.worldbank.org/countries/#{country}/indicators/SE.ENR.PRSC.FM.ZS?date=#{start_year}:#{end_year}&format=json")
40
+ end
41
+
42
+
43
+ def poplution(country)
44
+
45
+ end
46
+
47
+ end
48
+
49
+ puts GirlWorld.high_school_ratio('us')
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'girl_world'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestGirlWorld < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,161 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: girl_world
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Amal Hussein
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: shoulda
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rdoc
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '3.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '3.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jeweler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: 1.8.7
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 1.8.7
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: 'A Ruby Wrapper for the World Bank API which queries the Gender Statistics
112
+ database for health, wealth, and economic indicators of women, and girls around
113
+ the world. '
114
+ email: amalhussein08@gmail.com
115
+ executables: []
116
+ extensions: []
117
+ extra_rdoc_files:
118
+ - LICENSE
119
+ - LICENSE.txt
120
+ - README.md
121
+ - README.rdoc
122
+ files:
123
+ - .document
124
+ - Gemfile
125
+ - Gemfile.lock
126
+ - LICENSE
127
+ - LICENSE.txt
128
+ - README.md
129
+ - README.rdoc
130
+ - Rakefile
131
+ - VERSION
132
+ - lib/girl_world.rb
133
+ - test/helper.rb
134
+ - test/test_girl_world.rb
135
+ homepage: http://github.com/AmalHussein/girl_world
136
+ licenses:
137
+ - MIT
138
+ metadata: {}
139
+ post_install_message:
140
+ rdoc_options: []
141
+ require_paths:
142
+ - lib
143
+ required_ruby_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - '>='
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ requirements: []
154
+ rubyforge_project:
155
+ rubygems_version: 2.0.6
156
+ signing_key:
157
+ specification_version: 4
158
+ summary: A Ruby Wrapper for the World Bank API which queries the Gender Statistics
159
+ database for health, wealth, and economic indicators of women, and girls around
160
+ the world.
161
+ test_files: []