namira 0.1.0 → 0.1.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +34 -8
  3. data/lib/namira/version.rb +1 -1
  4. data/namira.gemspec +14 -14
  5. metadata +10 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d00e69f0acebc986d43bdb7dbbb87cf6b4553bf
4
- data.tar.gz: 799ce7d533162d292cc7c1cd79d584bd4c4385b7
3
+ metadata.gz: 73a718a6245b965921781bcabdf93ce29f5e892a
4
+ data.tar.gz: 427e8a0b459c7c48103faacc44576272ffe3a661
5
5
  SHA512:
6
- metadata.gz: 6f5a074d77c86c01bf9729ea300e81b7c8a54bf67fe7c856040249b4e7177dcd7621f70cfee91549e71df1502311ec43399262e8f16c659ac2b7866eb137e04c
7
- data.tar.gz: c55ada08736f2c6bb53c182f1929d5f8be3d1708c7946dbc09005fb0a81fa5580a70bae6205bf07024382c080842a9fe24ee76d31697eec7e91cf6fcc9080264
6
+ metadata.gz: 842ea8719b57163910152d814a01193882b7d5f0d24c9d463cb6d456c4436ed90c774fe51b60bbbdab751389779210623f77ed01444d4adbc91909811456b309
7
+ data.tar.gz: 1322d55a14aa409eb316dd91791f07a00abd886ec8373ab1e97c2b0cd7a66a9a9e79e04bf0bb904d9f897dfbda9f42c0aef4f9a425d5844a582abe658a666e32
data/README.md CHANGED
@@ -1,9 +1,5 @@
1
1
  # Namira
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/namira`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
3
  ## Installation
8
4
 
9
5
  Add this line to your application's Gemfile:
@@ -22,7 +18,39 @@ Or install it yourself as:
22
18
 
23
19
  ## Usage
24
20
 
25
- TODO: Write usage instructions here
21
+ Sending a basic `GET` request
22
+
23
+ ```ruby
24
+ # Create a request
25
+ request = Namira::Request.new(uri: 'https://httpbin.org/headers')
26
+
27
+ # Send the request
28
+ response = request.response
29
+
30
+ # Parse a JSON response
31
+ response.from_json
32
+ ```
33
+
34
+ #### Configuration
35
+
36
+ There are a few settings you can pass.
37
+
38
+ ```ruby
39
+ Namira.configure do |config|
40
+ # Total number of times to follow a redirect
41
+ config.max_redirect = 3
42
+
43
+ # How long each portion of a request should wait before timeout
44
+ config.timeout = 5.0
45
+
46
+ # A non-default User-Agent
47
+ config.user_agent = 'my_app_user_agent'
48
+
49
+ # Any additional HTTP headers for a request. If headers are passed to the request itself they will override these settings
50
+ config.headers.accept = 'application/json' # Will become Accept
51
+ config.headers.content_type = 'application/json' # Will become Content-Type
52
+ end
53
+ ```
26
54
 
27
55
  ## Development
28
56
 
@@ -32,10 +60,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
60
 
33
61
  ## Contributing
34
62
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/namira.
36
-
63
+ Bug reports and pull requests are welcome on GitHub at https://github.com/skylarsch/namira.
37
64
 
38
65
  ## License
39
66
 
40
67
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
@@ -1,3 +1,3 @@
1
1
  module Namira
2
- VERSION = "0.1.0"
2
+ VERSION = '0.1.1'.freeze
3
3
  end
data/namira.gemspec CHANGED
@@ -4,15 +4,15 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'namira/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "namira"
7
+ spec.name = 'namira'
8
8
  spec.version = Namira::VERSION
9
- spec.authors = ["Skylar Schipper"]
10
- spec.email = ["ss@schipp.co"]
9
+ spec.authors = ['Skylar Schipper']
10
+ spec.email = ['ss@schipp.co']
11
11
 
12
- spec.summary = "A simple wrapper around HTTP"
13
- spec.description = "This is a simple wrapper around HTTP"
14
- spec.homepage = "https://github.com/skylarsch/namira"
15
- spec.license = "MIT"
12
+ spec.summary = 'A simple wrapper around HTTP'
13
+ spec.description = 'This is a simple wrapper around HTTP'
14
+ spec.homepage = 'https://github.com/skylarsch/namira'
15
+ spec.license = 'MIT'
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
18
  # delete this section to allow pushing this gem to any host.
@@ -23,13 +23,13 @@ Gem::Specification.new do |spec|
23
23
  end
24
24
 
25
25
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
- spec.bindir = "exe"
26
+ spec.bindir = 'exe'
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
- spec.require_paths = ["lib"]
28
+ spec.require_paths = ['lib']
29
29
 
30
- spec.add_development_dependency "bundler", "~> 1.11"
31
- spec.add_development_dependency "rake", "~> 10.0"
32
- spec.add_development_dependency "rspec", "~> 3.0"
33
- spec.add_development_dependency "pry"
34
- spec.add_dependency 'http', '~> 2.0.0'
30
+ spec.add_development_dependency 'bundler', '~> 1.11'
31
+ spec.add_development_dependency 'rake', '~> 10.0'
32
+ spec.add_development_dependency 'rspec', '~> 3.0'
33
+ spec.add_development_dependency 'pry'
34
+ spec.add_dependency 'http', '>= 2.0.0', '< 2.1'
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: namira
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
  - Skylar Schipper
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,16 +70,22 @@ dependencies:
70
70
  name: http
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.0.0
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '2.1'
76
79
  type: :runtime
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
- - - "~>"
83
+ - - ">="
81
84
  - !ruby/object:Gem::Version
82
85
  version: 2.0.0
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '2.1'
83
89
  description: This is a simple wrapper around HTTP
84
90
  email:
85
91
  - ss@schipp.co