app_name_header 0.1.0 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70120f8cc17651eee8e622c600c870ed9a6d5457
4
- data.tar.gz: 7c6153956f2252cb178081a190da5fe5ca35c61f
3
+ metadata.gz: 31784c8323f6d500b79179aa6888e1ec0822d848
4
+ data.tar.gz: 6a56ec8fca8964062a606f292e44f593ccc9148e
5
5
  SHA512:
6
- metadata.gz: 43d3a651b5028c7a63e69221ed57940bcc549e73b60c8f1790148825d25305e4fa11bf87214a3e33bbec907beccd012a247ca8a0506e22a8814704974cf3546f
7
- data.tar.gz: 529b7df0c85b0278185b75692e4371f4487c120fb919c0eb13efa3f3c92cc54b02ace40a88fda4c4dcfe837199009d46dbe8cd71ed2fecd916766f46b8529ea1
6
+ metadata.gz: e1bc1380515b52c0b99fcea7bb92d2946fa0117f9b3ba67dc1ba8bd87b03cb39fdf64a5c1702e27c98052bd30a1282be62f093fd01b0389f6fe1adfc225b50e7
7
+ data.tar.gz: 9f20ddccaa26b9040d62471fd071c7451ce7417484d9bf6be316cf0141aa6c76a797718676270452625c03cb69cfa2a1fe03c741f6645c312bf84a01f07a5b42
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # AppNameHeader
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/app_name_header`. 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
3
+ Adds the 'X-App-Name' header to your faraday request.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,20 +20,46 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ Where ever you setup your faraday connection, just do:
24
+
25
+ ```ruby
26
+ conn.use AppNameHeader::FaradayMiddleware
27
+ ```
28
+
29
+ By default the name of your app is your Rails application name. If you'd
30
+ like to set it manually, or you're not using Rails, pass the `name` option:
31
+
32
+ ```ruby
33
+ conn.use AppNameHeader::FaradayMiddleware, name: 'MoonRover'
34
+ ```
35
+
36
+ If you don't care for the header and want to do your own thing, but still use
37
+ this gem... I guess you can do that. Weirdo. Just set the `header` option:
38
+
39
+ ```ruby
40
+ conn.use AppNameHeader::FaradayMiddleware, header: 'X-Requesty-Guy-Name-Is'
41
+ ```
26
42
 
27
43
  ## Development
28
44
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
45
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
46
+ `rake rspec` to run the tests. You can also run `bin/console` for an
47
+ interactive prompt that will allow you to experiment.
30
48
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
+ To install this gem onto your local machine, run `bundle exec rake install`. To
50
+ release a new version, update the version number in `version.rb`, and then run
51
+ `bundle exec rake release`, which will create a git tag for the version, push
52
+ git commits and tags, and push the `.gem` file to
53
+ [rubygems.org](https://rubygems.org).
32
54
 
33
55
  ## Contributing
34
56
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/app_name_header.
57
+ Bug reports and pull requests are welcome on GitHub at
58
+ https://github.com/dplummer/app_name_header.
36
59
 
37
60
 
38
61
  ## License
39
62
 
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
63
+ The gem is available as open source under the terms of the [MIT
64
+ License](http://opensource.org/licenses/MIT).
41
65
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "faraday", "~> 0.8.9"
21
+ spec.add_dependency "faraday"
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.10"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
@@ -1,3 +1,3 @@
1
1
  module AppNameHeader
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_name_header
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Plummer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.8.9
19
+ version: '0'
20
20
  type: :runtime
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: 0.8.9
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.4.6
109
+ rubygems_version: 2.4.5.1
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: To set the X-App-Name http header