gemshack 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Y2QwMmY5YmU4OGI5MzI0NmY1NWZmYjMzMzY3ZDE5MzIzZWM2YmQ5YQ==
5
+ data.tar.gz: !binary |-
6
+ ZmE1MDljODg5M2RiNjhlZGU3NmFmYmRhZmM0MDNiNjYzZmE5YjBkOQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MGExNmQwZDBlMTkzZmI2NjBjOTEzZGIxNWNmM2U3YWJlZmEwNGQ1ZTYwYTZi
10
+ YzMwODdmMmJkN2E3ZTM3NTkzYTZiNDdlZDI2NmE0MzM0NDYxNDNhNWE3MTRj
11
+ ZmJjNmZkMTUwMjYzN2I1Yjk3ZTNjYjM4NWE3OTJjMzM3NjA1NGE=
12
+ data.tar.gz: !binary |-
13
+ M2UxMmU2NzBmMTk3M2U5ZTc2Y2Y2M2Q3OTM3NGU3MTdkOTI2MzQ1NWVhODZj
14
+ YTE5ODk5Njg3M2JjNDNiZDE3NjhlMjU3N2RhNDZmMGQ2MmExZGEyZjQzMmY3
15
+ ZTVjY2IwNTIyNTRkZGExYWFjYzZmNjFkZmZlNTg3YzVjZjIxYTM=
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 bry4n
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Gemshack::Client
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'gemshack-client'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install gemshack-client
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 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
data/bin/shack ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift "lib"
4
+ require 'gemshack/cli'
5
+
6
+ Gemshack::CLI.start(ARGV)
@@ -0,0 +1,13 @@
1
+ require 'thor'
2
+ require 'gemshack/client'
3
+
4
+ module Gemshack
5
+ class CLI < Thor
6
+ desc "push GEM", "Push your private gem to GemShack"
7
+ def push(file)
8
+ puts "** Pushing #{file} to Gemshack..."
9
+ Gemshack::Client.push(file)
10
+ puts "** done"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,42 @@
1
+ require 'faraday'
2
+ require 'yaml'
3
+
4
+ module Gemshack
5
+ class Client
6
+ class << self
7
+
8
+ def host
9
+ ENV["GEMSHACK_URL"] || config["host"] || "http://gems.rubykick.com"
10
+ end
11
+
12
+ def path
13
+ "/#{api_key}/upload"
14
+ end
15
+
16
+ def api_key
17
+ config["api_key"] || "test"
18
+ end
19
+
20
+ def push(file)
21
+ client.post(path, {file: upload_io(file)})
22
+ end
23
+
24
+ def upload_io(file)
25
+ Faraday::UploadIO.new(file, 'application/gzip')
26
+ end
27
+
28
+ def client
29
+ @client ||= Faraday.new(host) do |f|
30
+ f.request :multipart
31
+ f.request :url_encoded
32
+ f.adapter :net_http
33
+ end
34
+ end
35
+
36
+ def config
37
+ @config ||= YAML.load_file(File.expand_path("~/.gemshack"))
38
+ end
39
+
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,3 @@
1
+ module Gemshack
2
+ VERSION = "0.0.3"
3
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gemshack
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - bry4n
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
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: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
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: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: ! 'WIP: just working on it'
70
+ email:
71
+ - bryann83@gmail.com
72
+ executables:
73
+ - shack
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - README.md
78
+ - LICENSE.txt
79
+ - lib/gemshack/cli.rb
80
+ - lib/gemshack/client.rb
81
+ - lib/gemshack/version.rb
82
+ - bin/shack
83
+ homepage: https://github.com/RubyKick/gemshack-client
84
+ licenses:
85
+ - MIT
86
+ metadata: {}
87
+ post_install_message:
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ requirements: []
102
+ rubyforge_project:
103
+ rubygems_version: 2.0.7
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: WIP
107
+ test_files: []