sensu-plugins-github 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 548c22ad5d1567be704b8e8b21fa684ab8b091f1
4
- data.tar.gz: 3b6183591d20503b0b11cf1d6636c14277879032
3
+ metadata.gz: 2b1fe8ff865e93a387958452cd0888652e78db71
4
+ data.tar.gz: 773277656360ea65792d9535e40c386ae01ca745
5
5
  SHA512:
6
- metadata.gz: bf101e90fe49eec975ecfdaafb7600123e58e612ec3208e46bcac51fc58923ba5a770207473cc95d8e4aa8d3b2ed66ee6887ccc43e29e880ac85dc246fd1eb72
7
- data.tar.gz: a919b3d381ad3d34125d7378735de3deb9cdc18dcf7323daac8e7b127e82385bf5fb1a3f818440f9ea155fbfbc957d42cdf040e8fa9f63c9c13d5c9ec55c4164
6
+ metadata.gz: a7ef920d45c9e86d92177db4f280c6455a0300c48feb671b475dfb62d038ca0912d159b06c884c6be1ad1869f1669373fb12fc5c7d8e21ea67cdcc37595dc704
7
+ data.tar.gz: 29b6be1505438d16f102175f15dcaeef62535578ed83b416adb38c013c9bdd4507f85bdccbe9def98eed84ab8774d5c695c34cd6265afb52da4159f4a20f4ddb
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1 @@
1
- 0i��0�O��KI(�;���h �އ�9s.O���͸�^a�xg��42�ĺ�^������QˡFZz�e>���b��Mfn
2
- cӫ��ß���.�!�uL��\�"dy���*�5��E�!��b��oe�;�d��;8�"����_� &q���s?J��A�s�1�>��a�Mbo���~��U�୅gI���4N}�3Kl|�8V���ߨ��bR�2L ���0���G�A)��A�=� O t~�Ż�1�0�[Də
1
+ ���bV�G4izh4�,?��1�^���o�FoE$�pT_��ٵ�J��Le��llv~�rFk�aи�+�E%�4l~�u��e< �s,�#0�б��.ɤ�b����$�y9dx��>�f��^�H)0�h��59(�u�|�\ex�5V��*��Sybj�ͿWH@u�f�hT�{�oP7�ħd� �l�ƥ�E��yݭV��U���"�"ǜ�'\����K0k"���ݡ�TȽ��BL�e����� H[94
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- 4F���{*j��Փ%�����3E�s~�O?s{��q$] �<�z��ki��Z��F" C��|M�]�<�^ �1�E�u�7%0,��X��{s��r=�/��������k����hF\��/,�x�>A{�ˏ8G.d�i�J��q�C��26�q�_f�E-i���Y�M��g��'���K���X�I���{Y��w�օP+ ���Ӥн+
1
+ �� Cs����u��&Gl��_ȑ��@G��[�����<�F 9O=�O��K���
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
1
  #### 0.0.1.alpha.1
2
2
  * baseline release, code is identical to the community repo
3
3
  * yard doc coverage
4
+
5
+ #### 0.0.1
6
+ * initial stable release
7
+
8
+ #### 0.0.2
9
+ * add ability to read got token from file
data/README.md CHANGED
@@ -17,6 +17,8 @@ Interacts with Github API to generate metrics about repo.
17
17
 
18
18
  ## Usage
19
19
 
20
+ Your github token must be placed in *~/.ssh/git_token*. You should not be entring secure items on the commandline. For the plugin will work be backwards compatible but the ability to specify the token on the commandline will be removed in the **0.1.0** release.
21
+
20
22
  ## Installation
21
23
 
22
24
  Add the public key (if you haven’t already) as a trusted certificate
@@ -31,6 +31,7 @@
31
31
  require 'sensu-plugin/metric/cli'
32
32
  require 'rest-client'
33
33
  require 'json'
34
+ require 'sensu-plugins-github/auth'
34
35
 
35
36
  #
36
37
  # AggregateMetrics
@@ -45,7 +46,8 @@ class AggregateMetrics < Sensu::Plugin::Metric::CLI::Graphite
45
46
  option :token,
46
47
  short: '-t TOKEN',
47
48
  long: '--token TOKEN',
48
- description: 'Github OAuth Token'
49
+ description: 'Github OAuth Token',
50
+ default: SensuPluginsGithub.acquire_git_token
49
51
 
50
52
  option :repo,
51
53
  short: '-r REPO',
@@ -3,5 +3,5 @@
3
3
  #
4
4
  module SensuPluginsGithub
5
5
  # Gem version
6
- VERSION = '0.0.1'
6
+ VERSION = '0.0.2'
7
7
  end
@@ -0,0 +1,10 @@
1
+
2
+ module SensuPluginsGithub
3
+ def self.acquire_git_token
4
+ File.readlines(File.expand_path('~/.ssh/git_token')).each do |line|
5
+ @github_token = line
6
+ puts line
7
+ return line
8
+ end
9
+ end
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yieldbot, Inc. and contributors
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-02-11 00:00:00.000000000 Z
33
+ date: 2015-02-12 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: json
@@ -208,6 +208,7 @@ extensions: []
208
208
  extra_rdoc_files: []
209
209
  files:
210
210
  - bin/github-repo-metrics.rb
211
+ - lib/sensu-plugins-github/auth.rb
211
212
  - lib/sensu-plugins-github.rb
212
213
  - LICENSE
213
214
  - README.md
metadata.gz.sig CHANGED
Binary file